LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted delay

Solved!
Go to solution

In my program I have 3 analog inputs with a DAQ USB module.

I want to log this analog values by writing them to a .lvm file.

The problem is that I want to log every 1 or 10 or ... seconds. So I put in a loop with a delay. 

But this makes the program slow, especially when I want to stop the program.

 

How can I solve this problem? 

0 Kudos
Message 1 of 5
(2,468 Views)
Solution
Accepted by topic author Peira

Hi Peira,

 

Check out the attached VI. I have done a simulation of what you want using an event structure. I guess this will help you.


Regards,

Nitzz

(Give kudos to good Answers and Mark it as a Solution if your problem is Solved;)) 

Message 2 of 5
(2,464 Views)

Thx NitzZ,

 

I adapted my program and it works.

 

Kind regards 

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

I'm running into a new question.

I save my data to a .lvm file with "write to measurment file" and open it with excel.

I merge 3 signals, is it possible to give them a header in the .lvm file. Like signal 1, signal 2, Time...?

 

 

 

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

Hi Peira,


I am not sure about creating headers for LVM files. But what you can do is, you can create a template with the required Headers (Open a blank LVM file in excel and just add the headers and save it) and browse this path in the write to measurement file express VI. Also in its properties, tick the append to file option and then run your VI. Your data will be saved into the Template lvm file with your headers in it. Not the best way to do this, I suppose, but it surely works:) 

Regards,

Nitzz

(Kudosa are always Welcome;)) 

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