Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO Secondary Ethernet Port Usage

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

0 Kudos
Message 1 of 4
(3,288 Views)

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.

 

 

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 2 of 4
(3,277 Views)

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.

0 Kudos
Message 3 of 4
(3,274 Views)

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:

  • The TCP code must be run ON the cRIO.  It will not work in interactive mode(ie. running the RT code interactively on the development computer while connected to the cRIO).
  • A network switch must be placed between eth1 and the stand-alone equipment.

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?

0 Kudos
Message 4 of 4
(3,270 Views)