10-11-2016 06:02 AM
Hi everyone,
I'd like to create a VI in which I can start/pause/stop analog data acquisition and data display in a graph indicator with a DAQ assistant in the automatically generated while loop. I have seen that I can use event sructure or case structures. What would you recommend? Is there an example I can refer to?
Thanks
Regards,
ES
Solved! Go to Solution.
10-11-2016 06:12 AM
10-11-2016 09:07 AM
Dear Gerdw
Do you have a simple example I can refer to?
Thanks,
ES
10-11-2016 09:33 AM
Hi ES,
LabVIEW comes with a lot of examples, either in the example finder or in the "File" menu -> "New…".
So select the "New…" entry of the file menu and choose "VI" -> "from example" -> "frameworks" -> "pattern" -> "statemachine"!
(The mentioned items are rough translations to English as I use a German LabVIEW version, they can have slightly different names.)
10-12-2016 06:37 AM
Hello,
there's no state machine example in the English version of Labview. Maybe is it the Control Design?
10-12-2016 06:44 AM
@Emanuele_S wrote:Hello,
there's no state machine example in the English version of Labview. Maybe is it the Control Design?
There is. Did you check the example finder?? Another advice, forget the DAQ Assistant, and use proper DAQmx VIs in your state machine!
10-12-2016 06:53 AM - edited 10-12-2016 06:55 AM
Actually there is a DAQmx example ready to use for the purpose you described.
Open LabVIEW, and go to "Create...", then "Continuous measurement and logging" project. It just does what you need:
EDIT: sorry, wrong entry, you need the one with DAQmx:
EDIT2:
10-12-2016 08:41 AM
Hi everyone,
thanks for your suggestions.
I have built a very simple state machine code, in which I can set three values
0 - pause
1- acquire
2 - stop
I attach the code. I just would like to know if I can set a three-option button which makes me visually select these three states, instead of setting the numeric values 0,1,2.
Thanks again for your help.
Regards,
ES
10-12-2016 08:53 AM
10-12-2016 09:16 AM
I did that, it's better than before but I prefer to have three buttons: Pause - Acquire - Stop.
I think it's easy do to this, how can I?
ES