Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Link Local Connections on Eth1 (secondary ethernet port)

Hi all,

 

I am using the second ethernet port on my cRIO 9067 to commnucate to a Eurotherm device via with the TCP modbusprotocol. In the interest of simplicity I simply connected the controller to the cRIO with a ethernet patch cable. If the eth1 (second port) of the cRIO is configured in link-local mode, I can get the two devices to communicate. 

 

The only issue is if this connection is broken, for example the patch cable is removed then reinserted, the TCP connection cannot be re-established. Error 59 "LabVIEW:  The network is down, unreachable, or has been reset." is what you get from then on.

 

Essentially, the slave device has to be conencted to the cRIO secondary port when the cRIO boots up for this scheme to work.

 

Is there any way to reset the second adapter programmatically WITHOUT rebooting the cRIO? Possibly through some linux commands?

 

 

Regards,

Mark Garnett

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

What version of LabVIEW are you using?

 

Run the following commands on the target, either on the serial console or through ssh.

 

1. Check whether ifplugd is running for eth1. 

Run  ps auxw | grep ifplugd . You should see something like this:
894 admin {ifplugd} /bin/busybox.nosuid /usr/sbin/ifplugd -i eth0 -fI -u0 -d0 -a -m auto -M -l
898 admin {ifplugd} /bin/busybox.nosuid /usr/sbin/ifplugd -i eth1 -fI -u0 -d0 -a -m auto -M -l

 

2. Check whether ifplugd reacts to the cable being disconnected and reconnected.

Run tail -f /var/log/messages . Among other thing you should see the following:

2015-10-15T08:48:23.000+00:00 NI-cRIO-9068-1856E9C ifplugd(eth1): link is down
2015-10-15T08:48:23.000+00:00 NI-cRIO-9068-1856E9C ifplugd(eth1): executing '/etc/ifplugd/ifplugd.action eth1'
2015-10-15T08:48:23.000+00:00 NI-cRIO-9068-1856E9C ifplugd(eth1): exit code: 0
2015-10-15T08:48:28.000+00:00 NI-cRIO-9068-1856E9C ifplugd(eth1): link is up
2015-10-15T08:48:28.000+00:00 NI-cRIO-9068-1856E9C ifplugd(eth1): executing '/etc/ifplugd/ifplugd.action eth1'

3. Check whether zcip is running. For an interface configured as DHCP with link-local fallback, you should see both udhcpc and zcip running. If eth1 is configured to link-local only, zcip should be running. 

ps auxw | grep "dhc\|zc" | grep eth1
2877 admin {zcip} /bin/busybox.nosuid /sbin/zcip -f eth1 /etc/natinst/networking/zcip.script
2924 admin {udhcpc} /bin/busybox.nosuid /sbin/udhcpc -a -b -x hostname NI-cRIO-9068-1856E9C -i eth1 -r 10d

 

Regards,

Adrian.

Message 2 of 3
(4,180 Views)

Thank you Adrian! That's exactly what I was looking for. I will give this a try and post the resutls to this thread

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