Acqiuring data in "Idle" case and "Go" case

Acqiuring data in "Idle" case and "Go" case

Post by POBA » Sat, 18 Aug 2007 04:10:07


See SM Tester Bill 8-16-07 in the attached llb.
 
On the block diagram, upper while loop, case "Idle" I have a Daq sub vi that displays the value on the front panel in a cluster on the front panel. (Works great) This allows the user to see the readings of the devices when they are mounting the pecimen under test. 
 
Next, I want to use the same Daq sub vi to display the data (to the same cluster on the fromt panel)  for the "Go" case. In addition, I want the data collected in the "Go" case to be saved to a file. The intent is to collect the data as the motor moves.
 
If I place my Daq sub vi in the "Go" case the data isn't collected because the "SM Move" vi then runs.  If I place the Daq sub vi in the "SM Move" vi, the cluster appears on the front panel of the "SM Move" vi, not the main panel. 
 
Can someone suggest some good programming practices?
 
Thanks,
 
Bill


SmartMotor.llb:
http://www.yqcomputer.com/
 
 
 

Acqiuring data in "Idle" case and "Go" case

Post by tbd » Sat, 18 Aug 2007 14:40:06

Hi Bill,
      I looked at your code (there are a few missing "SER"ial-port related VI, nothing serious) and have a question before suggesting a solution: 



I want the data collected in the "Go" case to be saved to a file. The intent is to collect the data as the motor moves.


Do  you mean you want multiple DAQs displayed/filed during SM Move?
If so, I'd be inclined to put a DAQ loop on your diagram that does nothing but call the DAQ VI periodically.  The "DAQ loop" would always write to the Status cluster, but optionally log to a file.  The "GO" case could enable/disable DAQ Logging by using a local-variable or occurrance to communicate with the DAQ loop.
Cheers!