I'm using Codesys V3 and I need to make a communication between a RFID reader and plc model M251 from Schneider. I tested the TCP/IP communication between then RFID reader and my PC with a software called Hercules (see the image attached) and saw that the reader shows on the network whats is running through it.
I believe I have to do a program to be listening what run over the Ethernet network as the same way that this Hercules makes.
Anyone have any examples of this TCP/IP server program for help me do a program with these same function?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Add the use case library "Network".
Then call the function blocks "NBS.TCP_Client" and "NBS.TCP_Read"
See the screenshot for a (not complete) example.
PS, the IP address can be initialized e.g. like this:
stIp: NBS.IP_ADDR := (sAddr := '192.168.1.190');
PS2, isn't the device a Modbus TCP/IP device. It doesn't seem like a coincidence that the port number is 502...
In that case it is much easier to use the Modbus TCP/IP communication functionality.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm using Codesys V3 and I need to make a communication between a RFID reader and plc model M251 from Schneider. I tested the TCP/IP communication between then RFID reader and my PC with a software called Hercules (see the image attached) and saw that the reader shows on the network whats is running through it.
I believe I have to do a program to be listening what run over the Ethernet network as the same way that this Hercules makes.
Anyone have any examples of this TCP/IP server program for help me do a program with these same function?
Thanks!
Add the use case library "Network".
Then call the function blocks "NBS.TCP_Client" and "NBS.TCP_Read"
See the screenshot for a (not complete) example.
PS, the IP address can be initialized e.g. like this:
stIp: NBS.IP_ADDR := (sAddr := '192.168.1.190');
PS2, isn't the device a Modbus TCP/IP device. It doesn't seem like a coincidence that the port number is 502...
In that case it is much easier to use the Modbus TCP/IP communication functionality.