LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Design Pattern Suggestions on A Labview Project For Calibration Station

Hello, 

 

I am designing a labview application to calibrate test units while communicating with a Ruska Digital Pressure Controller and a Temperature Chamber. There are several stages of the calibration. 

(1) Initialization - Reset all property nodes

(2) Set Up Correct COM ports for instruments

(3) Register each Testing Unit information using Bar Code scanner

(4) Validate each test unit to check if any information is not registered by scanning and to check for its compatibility with other units. 

(5) If all units pass validation, send the information from Labview to the test unit to complete registeration

(6) Begin calibration process by controlling Ruska and Temp Chamber. (No communication between Labview and Unit at this stage)

(8) When calibration process is complete, begin certification process by comparing test unit reading and instrumentation set point for several data points

(9) When certification process is complete, show Pass/Fail Results

 

I am currently using User Interface Event Handler Design Pattern (Single Loop) with different events configured for Stages (1)-(4). I plan to have a initization VI outside the loop for stage (1). For stage (5) and beyond, I was thinking to have :

One loop for test unit communcation as they are not communicating in parallel with the instruments

Parallel loops for Ruska and Temp Chamber using labview Drivers

One loop for certification process

 

Since they are sequential in order. I am thinking to use local variables to turn on and off each loop accordingly in the same VI. I dont think this is the optimal way of doing it since everything is in the same VI. Any suggestions on overall design pattern choice and optimization are appreciated. 

 

Thanks

 

Fliu

0 Kudos
Message 1 of 4
(2,611 Views)

You have defined states so it makes sense to use a state machine architecture.  There are templates that ship with Labview that are a good start.  I like the JKI State Machine, which you can find online.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 4
(2,569 Views)
A state machine should likely be a part if it, but only a part. You also have several things that should be handled as separate processes.

Start here and work your way forward.
http://www.notatamelion.com/2014/10/27/getting-everything-running/

Mike....

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 4
(2,537 Views)

I strongly agree with the idea of using a state machine design pattern for this application. And if you still would like to explore the idea of sharing data between parallel lopps, I recommend you two explore/study the following approaches:

 

“Queues (producer/consumer design pattern)”

http://www.ni.com/white-paper/3023/en/

 

“Notifiers”

http://digital.ni.com/public.nsf/allkb/B9398355D9550EAF862566F20009DE19

 

So, you can integrate both ideas, state machine and queues or notifies, as following for example:

https://decibel.ni.com/content/docs/DOC-32964

 

Cheers!

0 Kudos
Message 4 of 4
(2,503 Views)