LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to multiple TDMS files + turning off motor after elapsed time or error

Hi everyone,

 

Further to help received here https://forums.ni.com/t5/LabVIEW/Stopping-motor-after-elapsed-time/m-p/3660890 I've made an attempt to solve 3 problems I have:

  1. If any error occurs, Labview should turn off the valves and motor (“Spray Off” and “Motor Off”)
  2. When the microphone registration time is completed (“Time Target”), Labview should turn off the valves and motor.
  3. Rather than writing 1 huge TDMS file, it would be better to start a new TDMS file after 1GB of data or 1h of running time has elapsed.

Attached is the original VI, and the VI with attempted solution, prefixed NEW_. The original VI works fine except for the above so the critical thing I'd like to check is that my solutions haven't changed how the VI will work except for solving the above problems.

 

In detail the changes for each part I've made are:

1: Linking the Boolean output from the Simple Error Handler VIs (at the far right of the VI and from the case structure at the bottom left), and true values from the previously empty alternate cases for the case structures, to the while loop at the bottom right that controls the motor and spray.

 

2: Added the elapsed time express VI and connected the Boolean output to the stop conditions of the while loop at the bottom right that controls the motor and spray.

 

3: Added the write to measurement file express VI to the while loop in the top right and deleted the DAQmx clear task VI.

 

Please let me know if any more information is needed, and thank you for your help.

 

0 Kudos
Message 1 of 1
(2,088 Views)