LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best Architecture

I am currently decoupling the GUI from a large state machine to prepare for hardware transition to Compact FieldPoint. I have started using DataSocket as a means of sending information back and forth between the the GUI loop and the logic loop. Is this the best method it appears to work but I have no experience here. Any comments would be appreciated.

Rob
0 Kudos
Message 1 of 2
(2,749 Views)
Hi Rob,

"Best" is dependent on your app's requirements.

Based on the fact you have posted this Q to the LV-RT list, I will give you the RT answer. This assumes you have a time critical(TC) operation you are trying to perform while allowing monitoring and control.

Confining my answer to the code running on the RT platform.

Split the app into two pieces, one for the TC stuff, one for everything else.

Include in the TC loop only the minimum code required plus a control and update section. For both the control and Update sections of the TC loop, I would suggest using queues. One brining in control updates that come from the GUI and the other posting status and results to the GUI. The TC loop should be lean and mean.

The other section should then be responsib
le for queueing up new control requests and monitoring the status and results queues. This section can then be implemented using the data comm mechanism of your choice.

The thoughts I have shared here are intended to keep the TC loop TC, while allowing flexibility in how you monitor and control the app.

VI server has worked well in my RT app's. I have set up LV2 style globals designed to hold control info comming from the GUI and another that tracks the status.

This let me interact with the TC loop by calling the appropriate LV2 global running on the RT platform. Aside from tasks involved in targeting the LV2 global on the RT machine, this approach ends up falling together in a style similar to doing your standard "continuous double buffered acq. with display type app.

I am interested in others opinions on this question, and will watch for updates.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 2
(2,749 Views)