02-06-2018 11:56 AM - edited 02-06-2018 11:58 AM
Dear NI friends,
I use a real-time application (see attachment) with various VIs running in parallel on a PXI target.
In the Controlling.vi, sensor data are captured and simultaneously actuators are commanded both inside a Timed Loop. Also a Networking.vi is used for interaction with the user, e.g. chart monitoring and update of control setpoints. This vi communicates with the controlling.vi via single-process shared variables and with the user interface via network-published shared variables.
A third, Logging.vi is used for logging data and saving them on the PXI. After the test I can load the text file onto the host pc. My question is how should I log variables that are already used in the controlling.vi. Should I use a separate single process shared variable and basically capture the data twice or can I read the same variables that are used for communication with the networking.vi? I am not sure if conflicts can arise due to the fact that one variable will be read from two separate VIs simultaneously.
Best wishes,
Lysandros
Solved! Go to Solution.
02-06-2018 01:19 PM
You can just read the same variable. Just make sure only 1 place is ever writing to that variable.
Personally, I would use a Queue to send the data to the logging loop.
02-06-2018 11:44 PM
Thanks for the quick reply. I did not mention that I also need the acquisition timestamp for each variable. If I enable timestamping, will this time be the acquisition time or the instant I call the variable again inside the logging.vi?
Best regards
Lysandros