08-09-2016 10:11 AM - edited 08-09-2016 10:12 AM
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)?
Solved! Go to Solution.
08-09-2016
10:34 AM
- last edited on
04-02-2025
05:29 PM
by
Content Cleaner
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: https://www.ni.com/docs/en-US/bundle/labview/page/reading-and-writing-shared-variables-programmatica...
As for other methods - you could always broadcast the data over UDP with multicast (or with a TCP/IP connection handler).
08-09-2016
10:49 AM
- last edited on
04-02-2025
05:30 PM
by
Content Cleaner
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. https://www.ni.com/en/shop/compactrio/compactrio-developers-guide.html
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.
08-09-2016 11:13 AM - edited 08-09-2016 11:15 AM
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...