From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best Practise for connecting to Ethernet based device

Hi,

 

I have inherited a system where we have a cDAQ-9181 controlling an vehicle access barrier, with a LabView application on  a PC talking to it via Ethernet.

(The application is very simple - press a button > send a value to the 9181 unit > opens the barrier )

 

All works fine most of the time.

( We occasionally get network related errors. The LabView application sometimes thinks another PC has reserved the unit, or gives “error 89130 - device not available for routing” )

 

 

The users would now like to be able to easily run the application from a second PC ( not at the same time ), but this seems to be a problem. If I exit the application on PC “A” and run it on PC “B” it struggles to reserve the chassis, and throws the “89130” error and I have to restart the unit via MAC.

 

 

While I’m a “veteran” control programmer, I’m new to LabView, and would be very grateful for any pointers on “best practise” for talking to devices via Ethernet, or any specific suggestions for handling multiple PCs talking to a single device.

 

Thank You.

 

Tim.

0 Kudos
Message 1 of 8
(2,626 Views)

Hi Tim,

 

Thank you for your post and welcome to the NI forums.

 

There are lots of knowledgebase articles on our website and you should be able to find documentation for most of our hardware.

 

There is a good troubleshooting guide for cDAQ Ethernet here (http://ae.natinst.com/public.nsf/web/searchinternal/e67b4e4749f378ff862577270059bd4b?OpenDocument) - it outlines the steps to take to ensure you have a stable a connection as possible. You may have already seen it, but the quick-start guide for your specific device may also be worth consulting for best practices. Are these helpful?

 

As for using more than one PC - this shouldn't be too much of an issue. I would expect that the resource isn't being closed correctly - when you exit the App on PC 'A', how are you closing off the resource?

 

Best regards,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 8
(2,590 Views)

Hi Eden,

 

Thanks for replying.

 

Our .vi is based directly on the "Network DAQ - Basic Configuration.vi" from the LabView examples.

 

It reserves the device with the "DAXmx Reserve Network Device" function.

Sits in a while loop, (sending a value using the DACmx wite function when users presses some open/close barrier buttons, )

...until the user presses the Exit button

then calls the "DACmx Clear Task" and "DACmx unreserve network device" functions as it exits.

 

Really simple application....

 

...just seems a bit flakey.

 

 

Thanks,

 

Tim.

 

 

0 Kudos
Message 3 of 8
(2,582 Views)

 

...sorry, but I can not open the link you suggested.

0 Kudos
Message 4 of 8
(2,580 Views)

Sorry Tim, accidentally sent you the internal version, try this - http://digital.ni.com/public.nsf/allkb/E67B4E4749F378FF862577270059BD4B?OpenDocument

 

OK, the application seems simple enough. I'll check out the example you're basing it on and get back to you.

 

Best regards,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 5 of 8
(2,578 Views)

Hi Tim,

 

I hope the link helped. As for the connection issues - I have looked at the example and as long as you're unreserving the resource correctly there shouldn't be an issue (as you know).

 

There are a few steps that may be worth trying on this document.

 

Best regards,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 6 of 8
(2,551 Views)

Can't get the referenced URL to work. Says no longer available or error in syntax.Smiley Indifferent

0 Kudos
Message 7 of 8
(2,495 Views)

Oops! Never mind. Just saw correction in next msg. Smiley Wink

0 Kudos
Message 8 of 8
(2,494 Views)