09-13-2021 04:47 PM
Trying to talk to a device and I'm not able to establish a modbus TCP connection to the slave. Referencing this link, Using I-9871 with CompactRIO , I THINK I have everything installed.....the only software I'm not seeing on my cRIO is what they are referring to as NI-Serial RT.
I'm using a CompactRIO 9053 and LabVIEW 2020. I am able to talk to the modbus slave from laptop via Python, so I know my settings such as the port are correct. My cRIO's ip address 192.168.2.23, and my slave is 192.168.2.250, so I'm on the same network.
Below is a screenshot of what is installed on my cRIO. There's more if you could scroll, but they aren't related to the serial issue I'm having. Like I said, everything required seems to be there except for NI-Serial RT but that doesn't even show up anywhere on the Add section.
09-13-2021 05:01 PM - edited 09-13-2021 05:02 PM
Alright sooooo........should I be going out of the cRIO's main ethernet port instead of trying to use a 9871 card, since I'm trying to communicate with modbus TCP? Is the 9871 meant only for serial such as RTU?
09-13-2021 06:42 PM
If you're looking for TCP, a regular cRIO Ethernet port should work. I don't think the Modbus card would support regular TCP.
09-13-2021 09:55 PM - edited 09-13-2021 09:58 PM
Modbus TCP is simply put, "Modbus over Ethernet".
No special hardware beyond an Ethernet interface should be needed.
Modbus RTU is serial and usually requires an RS-485 (most common) or RS-232 interface.
These are most often a simple USB to RS-XXX device that installs a virtual Com port.
09-14-2021 03:15 AM
Just to clarify, the NI-9871 is a card with up to 4 serial ports (RS-422 or RS-485). It can be used to talk to a modbus device with a serial RS-485 or RS-422 interface. But it is not limited to the modbus protocol. It can be used with any serial protocol.
Regards, Jens