LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ is too slow in my program...using LV7.0 and the express vi

Hello -- I am using LV 7.0 and the express vi's I/O Assistant for DAQ of panel meters connected to some sensors. I am also using the field point 1001 module for control of a motor, and using express vi for that, all within the same vi. The computer is connected to the devices via a serial connection, particualarly USB to 485 to the FP modules and panel meters. The DAQ is really slow and only takes data about every 2 seconds or so, and that is not acceptable for what I am trying to do. How can I make the daq happen every second, to make it more of a real time DAQ and control as well?

Thanks!
0 Kudos
Message 1 of 4
(2,888 Views)
Hi,

The DAQ assistants are meant as a tool to get you familiar with programming, not as a way to write your entire program. I would suggest using the example finder by going to Help>>Find Examples, and beginning there. There is a lot of overhead associated with those express vis, and they are limited in their functionality. So, I would look at the example programs and go from there. I hope this helps.

George
0 Kudos
Message 2 of 4
(2,860 Views)
The express vi is actually faster for me because for some reason when I try to acquire data using only the visa read / write, the data gets mixed up and the read function doesn't grab ALL the data so it gets carried over to the next visa write/read and all the numerical indicators are mixed up with the data mixed up. So....the only way I found to fix this issue was to make each visa write/read function within a sequence structure and it reads properly. So this ends up being slower than just have the express vi in place. I am attaching an example vi of this. I need to find out why data acquisition is so slow 😞
0 Kudos
Message 3 of 4
(2,844 Views)
Several things may be slowing your program. One is initializing the serial port in each frame and closing after the read in each frame. Another is the way you are reading. It is usually more robust to check bytes at port and only read that many. Particularly if your devices have well defined message terminator character(s), this can be more efficient.

Your program looks like a good canidate for a state machine architecture. Look at the examples and the archives for more information.

Lynn
0 Kudos
Message 4 of 4
(2,837 Views)