LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network shared global variables between several RT targets

Solved!
Go to solution

Hello,

I look for info regarding network shared variables for RT intercommunication.

 

Scenario: one "master" PXI and several "slave" PXIs running RT VIs. Data is available in a form of a type definied cluster on each slave PXIs (inside a non-deterministic while loop). I imagine I create network shared global variables for each PXI slaves. One variable for each slave. I only write data to these variables at a single place (in the above mentioned while loops), on the slave PXIs. I need to read this data in a lossy way (i only need the most recent value, like tags) from the master PXI.

Question: should I just use the default "network shared variable" settings? I mean, I do not enable the RT FIFO option (single element), because I think for a cluster it is a no go in case of RT (variable length)?

 

What do you think? Or would you have better idea how to share data between slave and master RT targets (I do not need deterministic/losless data transmission, only recent values)?

0 Kudos
Message 1 of 4
(3,448 Views)
Solution
Accepted by topic author Blokk

I believe the way to do this is to use Shared Variable Aliasing/Binding - they allow you to 'link' shared variables across multiple targets. https://forums.ni.com/t5/LabVIEW/Bind-Alias-shared-variable-to-scan-engine-variable/td-p/3290043.

 

You can also use programmatic access to access shared variables running on another target: http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/usingdynvarapi/

 

As for other methods - you could always broadcast the data over UDP with multicast (or with a TCP/IP connection handler).


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 4
(3,437 Views)
Solution
Accepted by topic author Blokk

Hello Blokk

 

If you are sharing data from a non-deterministic loop then publishing to a network shared variable should be fine with the small caveat that you are not attempting to push large amounts of data at high update rates. Something in the range of a couple of KBs per second through the shared variable engine is acceptable in my experience.

 

You should not need to enable an RT-FIFO on these channels given that the loop is not deterministic.

 

When unsure about RT development I refer to the comprehensive CompactRio Development Guide. Whilst the name suggests that it is for CRio it covers all RT development. http://www.ni.com/compactriodevguide/

 

This particular issue is covered in section 2 (p56) http://www.ni.com/pdf/products/us/criodevguidesec2.pdf

 

Section 2 page 55 also covers the options for your second question - Or would you have better idea how to share data between slave and master RT targets?

 

LabVIEW to LabVIEW tags with the shared variable engine is probably the easiest method. The shared variable engine will also support a few other access methods like EPICS which might be handy later.

Message 3 of 4
(3,430 Views)

Thanks to both of you for the useful information!

 

edit: as for the data type to broadcast: it is only a cluster with a size of ~64 KByte, and the required rate is just 1 Hz...

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