Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

CRIO 9063 AND TCP/IP MODBUS

Solved!
Go to solution

Hi all,

I have a crio 9063 communicating through the only available 10/100/1000 ethernet port with HMI application (Client PC conneted to the same local network) using STM library (Simple TCP Messaging), all is working fine 🙂 Now the next step is to share periodically (15 s) some processed values to a third party PLC connected to the same Network. The question is : If I use MODBUS TCP  protocol to write the processed values to some holding registers and configured the CRIO as a slave for the Master third party PLC, can I establish a communication with the latter using the same crio 9063 ethernet port ? (assuming that the PLC is connected to the same network as my 9063 crio), I mean is it possible for the master PLC to pull data from the crio 9063 knowing his IP address and Modbus TCP registers ? OR should I use the RS232 port available with the crio 9063 and use a modbus serial protocol ? OR maybe a c-serie module to communicate with the Master PLC.

 

Thanks

0 Kudos
Message 1 of 2
(4,567 Views)
Solution
Accepted by topic author IYED

You can open more than one socket and port to the cRIO, much like almost any other TCP/IP capable piece of equipment. In this case, your HMI is opening a socket to access your cRIO at a specified port number (not sure what port STM uses but I guess you can probably configure this at both ends). In addition, you have a "Master" PLC that will open a socket to access your cRIO on port 502 (ModbusTCP). In the real-time module on the cRIO you can add a MoudbusTCP server (aka "slave", the terminology can be confusing) and then create shared variables that link to the appropriate modbus registers. Once this is setup you will effectively have two TCP servers running in your application awaiting connections - one waiting on the STM configured port and the other waiting on port 502.

 

The idea of abstracting connections to devices by way of sockets, addresses and ports allows multiple devices to communicate over the same physical connection which is one of the many advantages of TCP/IP as a protocol.

 

The only limitation you will face is that of bandwidth but the numbers you give suggest that will not be a concern.

Message 2 of 2
(4,528 Views)