LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating waveform from txt file

I am trying to write a VI which would read in a txt file and generate analog output (waveform). The intention is to have step analog output, which the user can configure for custom time steps and voltage values. The text file contains two columns, the first column has the duration in seconds and the second column contains the desired voltage output. The VI stops execution once the execution time reaches the total time (sum of all the entries in 1st column).

 

I have used nested For loops to access the array from the file and build an array to generate the waveform. It seems like this logic is incorrect, or maybe I'm wiring incorrect data type.

 

I would really appreciate if someone would take a look at the attached VI and suggest the solution.

Thanks.

Download All
0 Kudos
Message 1 of 4
(3,531 Views)

you have done a lot of basic mistakes like....

you are autoindexing an array to a for loop and also tied its count terminal.

without spending time to your vi i would suggest you to go through the Labview Basic 1 & 2.

0 Kudos
Message 2 of 4
(3,519 Views)

Hi,

You should take a look at the example that comes with LabVIEW, they are often a good source for beginners. (Help >> Find examples).

 

Here's my suggestion :

Clipboard04.jpg

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 4
(3,497 Views)

Thanks. Those were helpfil tips and I got it to work. Here is a block diagram, in case anyone wants it.

0 Kudos
Message 4 of 4
(3,489 Views)