11-18-2016 01:41 PM
I'm trying to use the secondary ethernet port (eth1) on a cRIO-9074? I'm using the primary port for comms to the HMI and would like to use the secondary port to send TCP/ModBus queries to third-party standalone equipment.
I get an Error 56 and Error 59 during the 'TCP Open Connection.vi' using port 502 when running the code on the cRIO. The same TCP Open works fine if I connected directly from a standard computer to the third-party equipment.
Here is the configuration I'm using:
cRIO-9074:
Primary Ethernet Port (eth0): 192.168.10.60 / 255.255.0.0
Secondary Ethernet Port (eth1): 10.10.10.1 / 255.255.0.0
PC (HMI):
Connected directly to cRIO (eth0): 192.168.10.25 / 255.255.0.0
Third-Party Equipment:
Connected directly to cRIO (eth1): 10.10.10.2 / 255.255.0.0
LabVIEW version : 2013-32bit
LabVIEW Real-Time version: 13.0.0
NI-RIO version: 13.0
11-18-2016 04:09 PM
Hey Hansel,
It sounds like you're using the functions on the TCP Palette for modbus communication as opposed to the modbus library that ships with NI RT or DSC, correct?
If so, I would highly recommend switching to the modbus functions that ship with RT. You've already paid for the RT module, so take advantage of the functions pre-built and tested for modbus.
As for the connection itself, I'd start with trying to communicate from your dev PC to the 2nd ethernet port of the cRIO via TCP (preferrably via the RT modbus functions). Troubleshoot that first, as you have full control of both endpoints of communication. Once you know you can do TCP successfully on that second port, then introduce the 3rd party modbus device.
11-18-2016 04:45 PM
At this point I'm just trying to do a simple TCP Open Connection from the Data Communication > Protocols > TCP palette (and I keep getting an Error 59 and sometimes Error 56 when trying to run on the cRIO).
Which Modbus Functions are you referring to that ship with RT? There is a 'cRIO ModBus Reference Library' on my palette. However, all the VIs within the palette have broken arrows. For instance, the 'cRIO Modbus Initialize.vi' is trying to find a 'Session - Root.lvclass' under '_Session Fwk' folder in userlib (which doesn't appear to exist anywhere on the PC).
I've tried talking directly to the third-party equipmnet with a PC, so I know the cable and equipment IP port are communicating correctlly. I'm also successful pinging the second cRIO ethernet port when connected directly to a PC.
11-18-2016 05:14 PM
OK. It appears I may have it working now. Some "unpublished features" I discovered by accident when trying to utilize the second ethernet port (eth1) on the cRIO:
I'm interested in the ModBus for RT capability that is supposed to ship with RT. The only reference I found when using the NI Not-So-Helpful-Help is a reference to a cRIO ModBus API posted back in 2010 (https://decibel.ni.com/content/docs/DOC-13508). Do you have knowledge of a more recent version download pertinent for LV2013?