LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write data to text file on command using trigger

Hi there

 

I'm kinda new to using Labview, and i seek some advices. 

 

I've got this program, which is used to read from a usb-device (6215). It measures the voltage at an input channel on the usb-device, and processes it, and finally writes the data to a txt file. I want to control when it writes the data (only one instance/ measurement at a time) via a trigger. 

 

The problem is, that the trigger does not work. It always writes to the file i have specified. Can anyone help me getting this right?

 

Furthermore, if someone have any suggestions how to make the data in the text file more readable (i'dd suggest using colums - but how?) i would greatly appreciate it. Maybe converting to an exel-document could be the answer?

 

 Thank you in advance, Troels

 

 

Ps:

Hope you can see past the danish text 

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

Your true and false cases are identical and the file write is outside of the case statement. The boolean trigger does nothing. Why don't you try putting the file write inside the true case statement and nothing in the false case? You wouls also place the DAQmx Read inside the true case.

 

If you are not going to use an event structure (but you should), place a Wait (ms) function inside the loop.

0 Kudos
Message 2 of 2
(2,357 Views)