× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Don't know if it would be of interest to you but I have a socket client at
www.think400.dk/downloads.htm. It is written in C and RPG. The RPG wrappers
the C functions.

It might be helpful to look at the socket code.

On Wed, Jul 10, 2019 at 12:55 PM Russell Wesh <russell.wesh@xxxxxxxxx>
wrote:

Good Afternoon

I am hoping to get some assistance to communicate in RPGLE with a pick to
light device that uses Modbus protocol
I believe I should be able to do this by following Scott Klement's Socket
programming guide but I am having some issues with the communication.

Currently I have the pick to light device plugged into COM port 7 of my PC
via USB.
I am then using demo version of TCP-Com software to allow my PC to act as
a server to which my Socket Client program on the Iseries can connect to
and communicate with.

I am using the CLIENTEX1 tutorial program as a base for my personal socket
client program with the major changes being no entry parameters and no
receiving of data (For now I simply want to write to a single register and
get something to happen on the device).

When I run my program I have confirmed that the connection is established
and program runs all the way from beginning to end but nothing is actually
happening with the device.
I believe the issue is with what I am sending (request variable) and I'm
unsure if I should even be performing translations to ASCII as well.

Below is a sample of my program with further details. Does anyone have any
experience with this and can provide me with more direction?
I would like to send the value 1 to 16 bit input register 6302. My slave
ID should be default 1.

Thank you in advance.

https://code.midrange.com/4bfa64631f.html


[cid:image001.png@01D53737.D9A202A0]


Russell Wesh | Applications Supervisor
Sumitomo Drive Technologies
Sumitomo Machinery Corp. of America
Tel: +1-757-485-3355 ext. 8633
www.sumitomodrive.com<http://www.sumitomodrive.com/> | How are we doing?<
http://www.sumitomodrive.com/SMACustomerSatisfaction>

[
https://www.sumitomodrive.com/themes/spartan/images/social/facebookicon.png
]<https://www.facebook.com/Sumitomodrives>[
https://www.sumitomodrive.com/themes/spartan/images/social/youtubeicon.png
]<https://www.youtube.com/user/SumitomoPTDrives>[
https://www.sumitomodrive.com/themes/spartan/images/social/twittericon.png
]<https://twitter.com/SumitomoDrives>[Image result for linkedin no
background]<https://www.linkedin.com/company/698414/>



--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.