LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to automate start and stop file writing depending on input values

hello all,

            i would like to start and stop saving to file depending on input scenarios.

i would like to take a mean of the input value for say 5 seconds, compare it with the ranges, if found within the range, start saving the file.

 

i have the follwoing conditions:

1. when input is between 95-105, start saving to file.

2. when input is between 145-155, append the data to SAME file without stopping the code

3. when input is between 165--175, append the data to SAME file without stopping the code..

 

and so on... the input value range can be fixed/or should be re-configurable by the user. 

 

1 more thing, i have a control over input, ex: if the input needs to be held steady to value -- 102, then i can maintain the input fairly constant near 102.

 

can anyone please tel me how can i acheive this task?

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 1 of 5
(2,502 Views)

Sounds like a good candidate for a state machine.

 

Lynn

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

hmmm... any good examples???

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 3 of 5
(2,474 Views)

Hello,

 

There is an example on the Example Finder called State Machine Test Sequencer that may help you to get started. You can locate this in your VI by going to Help -> Find Examples... And then enter State Machine Test Sequencer in the search box. In this example, a case structure is used to handle each "state". Each case also contains information about which case should be executed next. Hope this helps!

Julianne K
Systems Engineer, Embedded Systems
Certified LabVIEW Architect, Certified LabVIEW Embedded Systems Developer
National Instruments
0 Kudos
Message 4 of 5
(2,470 Views)

alrght, will try tat and let you guys know...

thanks

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 5 of 5
(2,462 Views)