LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to multiple RT controllers from 1 host VI?

Howdy,
 
Imagine having multiple control/data acquisition CompactRIO systems running and connected to ethernet, each having their own IP address.
 
Now consider having one computer also on the LAN that may serve as a host "Main control" for starting/stopping, gathering periodic data, interface of data, etc.  The primary acquisition still would take place at each individual station.
 
What techniques are available to connect to and control all the cRIO systems at the same time from one host VI on that "Main control" computer?
 
Maybe, a loop that goes through each IP? Using VISA? Can a range be used somehow, xxx.yyy.zzz.* to send a command to all?
 
Or maybe you can point out a way that is more straight forward than I am considering.
 
Thanks in advance!
 
- Con
0 Kudos
Message 1 of 5
(3,191 Views)

The most versatile way is implementing your own protocol for transferring data.

You can have a communication loop running on each cRIO and have a communication loop in the computer. The computer can hold several TCP refnums in an array and send the appropiate data to each controller. Each controller, once receiving data, will have to analyze it and decide what to do.

This doesn't work "at the same time", but it's fast enough to be that. For example, I have a system like that with several FPs spread over several miles, and the computer does the loop in about 2 seconds (and could do it faster).
 
There are several tutorials and examples available. Search the site for TCP messaging protocl and for TCP tutorials and go to LabUseful's site for an example of a stable comm mechanism which you can expand on your own.
 
Another option is to wait for LV8, which will have the ability to connect to several RT targets at the same time. At least that's what they showed at NIWeek (there's a page on the site with videos).

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(3,185 Views)

Thanks for the info tst!

I had a feeling it would involve TCP and lower priority command-parsing loops.

- Con

0 Kudos
Message 3 of 5
(3,180 Views)

You're welcome. Luckily, data manipulation with TCP in LV is very easy.

Is your nick an homage to Khan? It's just that that dog doesn't look very wrathful.


___________________
Try to take over the world!
0 Kudos
Message 4 of 5
(3,176 Views)

Well Wrath of Khan was a good Star Trek flick and Conrad is my name...

As far as wrathfulness of my pitbull... she was a great, friendly dog... her wagging tail was whip-like.

Thanks again for the suggestion - it looks like I will focus first on creating some type of lower priority command parser for incoming TCP messages, with the high priority loop used for data acquisition / control and a medium priority loop for outgoing TCP messages.

0 Kudos
Message 5 of 5
(3,171 Views)