02-06-2009 11:01 AM
Hello,
I've read some theory about State Machines in Labview and I have the following problem.
I created a simulated USB9233 device and I am interested in the analysis of two signals acquired simultaneously from Channels 0 and 1.
1. I want to acquire two simultaneous sequences of 2048 samples at a rate of 15kHz.
2. I want to plot the sequences and their spectrum.
3. I want to end the process or go back to step 1 and start over with two new sequences.
I've attached my vi. Is it correct? Does it work ok?
Thank you very much and have a nice day.
02-09-2009 03:35 PM - edited 02-09-2009 03:35 PM
Hi raul20002,
I was able to get the VI running using asimulated device. Is there any reason you want to use a statemachine? The following code functions the same as your state machine:

Otherwise, the best way to know if the VI is working properly is to use actual hardware with a known signal to verify the measurement.
02-10-2009 09:27 AM
Hello and thank you for your answer.
I can understand that the code you sent me. However, the reason I wish to understand and work with state machines is the fact that at school, I am required to use use this manner of implementation. I recently looked at a Labview Basics I: Introduction Course Manual. At the end of this book (Lesson 10-5) there are some examples with state machines.
I wanted to see if my vi is correct and if I understood the concept of state machines.
Thank you again.
02-10-2009 10:58 AM - edited 02-10-2009 10:59 AM
raul20002 wrote:Hello and thank you for your answer.
....
I wanted to see if my vi is correct and if I understood the concept of state machines.
Thank you again.
That looks OK. I will generally include a diagram to illustrate the State Machine to make it easier for people to understand my code.
Ben