LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA serial read/write not appearing in time profiling window.

am using Labview7 and an E series DAQ card to take data from and control an electric motor dynomometer. I am trying to speed up my VI. The VI has analog read/write, digital IO, a counter, and some VISA serial port read and writes all within a while loop that continues until a stop button is pressed. I have been using the time profiling feature found in Tools > Advanced > Profile VIs. All the funcions I previously listed show up as items in the profiling table, except for the VISA read and the VISA write. Why do they not show up in the profiling window?

This page shows my VISA read and write resident in my block diagram
http://www-personal.ksu.edu/~sjh5569/block_diag.gif

This page shows the profiling table which does not list the VISA read or Write
http://www-personal.ksu.edu/~sjh5569/profiling.gif

Sorry if the links don't work. It means many readers have clicked and that my data transfoer quota has been exceeded. Thanks for the help.
0 Kudos
Message 1 of 2
(2,432 Views)
I think VISA Read and VISA Write are functions, not VIs, because you cannot open a panel or diagram for them. To see how much time they are taking you could wrap them into subVIs and then they would show on the profiler. Of course there is a slight overhead to the subVI call, but I would expect it to be small compared to the Read or Write function time.

If 8 bytes are not available Read will wait for them. An architecture which checks Bytes available and only reads that number may be faster.

Consider putting the serial read and write in a separate parallel loop. The DAQ in another loop and the data processing in yet another loop. Each loop should have a wait function with the wait times based on how fast the loop needs to update. Communicate between loops with queues. Look at state machines and the producer/consumer model.


Lynn
Message 2 of 2
(2,424 Views)