LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running two myrio devices from single labview VI

Solved!
Go to solution

Can a single labview VI runs/controls two myrio devices at the same time? Or I should only run one device, and make it communicate wirelessly with the other one?

0 Kudos
Message 1 of 9
(4,709 Views)

One VI will only run on one device. If you look into the item view of the project explorer, on the very first level you have different targets, e.g. "My Computer", or "myRIO". Each VI will be nested under one of the targets, and that VI will be running on its target. You can add two myRIO device into one project, but when you create a VI, you have to specify which target it will run on. Of course you can have the two identical VIs running on two myRIO devices, but I am not sure that is what you want to achieve.

 

If you want to have two myRIO device communicate with each other and share data in some way, I think Network Published Shared Variables are the easist way. You can also look into Network streams or TCP/UDP protocol.

0 Kudos
Message 2 of 9
(4,678 Views)

AuZn, you're answering a slightly different question than the OP asked.  You're right that a VI can only run in a single location.  Each myRIO would require a VI running on the myRIO.

 

That doesn't mean you can't send controls from a single VI on the host PC.  With that single VI, you could easily control both using any of the communication protocols that exist.  If you're capable of doing this for a single myRIO, it's trivial to expand this to control a second.

0 Kudos
Message 3 of 9
(4,668 Views)

Well, OP said s/he want a single VI to "run" two myRIO, and by "run" I thought s/he means "run on".

 

I fully agrees that you can send controls from a single VI on the host PC to the two myRIOs. Or you can send control from one myRIO to another. If we know more what OP wants to do, we can make better suggestions. But the bottom line is that each myRIO needs to have its own VI to run, and to share data/send command, there needs to be some communication protocols.

0 Kudos
Message 4 of 9
(4,662 Views)

Thanks all for the appreciated replies.

 

What I actually want to do is to control two motors wirelessly. So, I thought of having one myrio at my location, and another myrio along with the motors and the driver at the other location. I would like to control these motors from myrio at my location.

 

Based on the comments, I think the appropriate way is to control both using one of the communication protocols using a single a VI. Wil this work regardless of the signal that I will send being analog or digital, and is there any expected synchornization problems?

 

Thanks!

0 Kudos
Message 5 of 9
(4,658 Views)
Solution
Accepted by topic author Cowboy12
So you are collecting signal at one location with one myRIO, and send the signal to another myRIO at another location, which myRIO use the signal yo controls two motors. Do I understand it correctly?

A simple solution is have the signal collecting myRIO write the signal to a shared variable, and have the motor controlling myRIO read the shared variable and control the motor. Two myRIO will work asynchronously in this case. Is there special requirements for synchronization? Because synchronization over wireless is pretty challenging.
0 Kudos
Message 6 of 9
(4,651 Views)

Yes, I am exactly doing this Auzn!

 

I am not sure yet about the synchronization requirement up to the moment. But, how much delay do you expect if I send a signal from myrio at my location to the other myrio to drive a motor (open/close gripper)?

 

Thanks!

0 Kudos
Message 7 of 9
(4,642 Views)
It is not uncommon to see latency of a few ms over WiFi, but for your purpose, I don't think it would matter.
0 Kudos
Message 8 of 9
(4,635 Views)

I also think so. Thanks!

0 Kudos
Message 9 of 9
(4,630 Views)