LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reusing numerical controller and graph?

i'm developing a lie detection system.so i need to make use of some numercal controllers and a graph indicator that i used in the flat sequence structure in a seperate frame of the same flat sequence structure.so my question is how can reuse the numerical controller and graph indicator again?please help me,i'm stuck...

0 Kudos
Message 1 of 5
(2,282 Views)

Instead of a sequence, use a state machine and a single indicator that gets data according to the current state.

 

Can you show us some code?

0 Kudos
Message 2 of 5
(2,277 Views)

i have attached the code and the screenshot too.the purpose of the system is to detect if the subject is lying.i'm using the Sensordaq,handgrip heart rate momitor and the respiration sensor. as in the code, the first frame is exucuted in the beginning to identify the baselines of the subject from the sensors and are stored into the tdms file.now i'm about to develope the second frame, where the code for the further testing will be developed.for each questions, the subject's physiological reactions are logged and compared with the threshold values to identify whether the subject is lying or not.

i thought of developing the code through the flat sequence structure. if there is a better way, could you please share it with me?this is my finl year project and i need it to be perfect.pease help me,

thank you.

Capture.JPG

0 Kudos
Message 3 of 5
(2,272 Views)

A *.lvproj does not contain anything useful for us. You need to attach the relevant VIs.

 

Your code does not look like it flows right. You have interactive loops inside a timed loop, which does not make a lot of sense. There is no way the timed loop can do its job it the code is trapped inside inner loops. Your second inner loop cannot stop unless "stop 3" is true from the beginning. Once that loop start executing, it cannot detect changes in the "stop 3" button.

 

Most likely your code will lockup permanently under most conditions.

 

In any case, my suggestion for a state machine is still reasonable. Use a single loop with a single case structure and all controls and indicators. Use a case for each state and keep the state in a shift register that can be updated for the next iteration according to the changes in condition. Look at the design templates or do a forum search for some ideas.

 

 

0 Kudos
Message 4 of 5
(2,267 Views)

I'm soo sorry, i unknowingly attached the project file instead of the vi.here i have attached the correct file.actually the timed loop is to record the subject'sphysiological reactions for the first 30 seconds.currently i'm only in the starting stage.so i should replace the flat sequence structure with the case structure, isnt it?but still i will need to use a timer for the threshold data collection?

0 Kudos
Message 5 of 5
(2,257 Views)