× 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.



Hi Russell,

My thoughts are in-line:


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'm not familiar with TCP-Com software, but it sounds like a proxy of sorts to allow you to use TCP/IP communications to communicate with an RS-232 device.   FWIW, there are also hardware devices that do this, small devices you can plug into the RS-232 port of whatever machine requires the RS-232 communications (I've used them on printers and scales) and then you plug into ethernet on the other end, and it acts as an TCP/IP server, eliminating the need for the PC.  Might be worth considering.


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).

There is no concept of a "register" in TCP/IP programming.  I'm guessing that this is specific to the particular machine you are talking to ("Modbus"? whatever that is.)

I would not recommend using CLIENTEX1 as a base for anything.  It is meant to be a very beginner example, to allow you to understand some basic ideas of TCP/IP programming.  Subsequent examples build on this, making it more robust.

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.

This depends on what the target machine is expecting to see.   A TCP channel is just a communications medium.  It enables communication to occur, but it doesn't tell you what specifically needs to be communicated.

Asking us whether your data needs to be in ASCII, or what to put in your variable would be analogous to calling up your telephone provider (such as AT&T or Verizon here in the USA) and asking them what language you need to speak when you call your friend. They aren't going to know that!  You have to work it out with your friend.

Likewise, we aren't going to be able to tell you what you need to send/receive to your Modbus device.  You'll need to look in the docs for the Modbus device, or work it out with someone who has expertise with those devices.


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.

Sorry, I have no idea what "16 bit input register 6302" is. Again, this sounds device-specific.  See above.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.