LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timing in labview

Hi

First of all I’m new to labview, so excuse me if I’m not putting this right, but I’m trying to explained as much I can.

 

I build a K8055 board. Basically its some kind of I/O board that can be connected to the PC through a USB port. The board is provided with VB demo application and a DLL file that can be called to communicate with the board.

 

I started creating VI to run the board using CALL LIBRARY FUNCTION so it can read/write to the board. So far I managed to initial the connection to the board, read the analogue inputs and write to the digital outputs. The problem is that the VI takes a long time to execute the functions while it’s executed instantly in VB application.

 

Any information would help me to build this application right would be appreciated

Marwan
http://www.geocities.com/marwan_m13/weemee8080.jpg
0 Kudos
Message 1 of 4
(2,873 Views)
Difficult to tell if this was the reason, but your loop was running full speed, and writting unnecessarily to your card. I made some modifications to your vi. Tell us if the problem still persists.
Chilly Charly    (aka CC)
Message 2 of 4
(2,860 Views)

Yah it made a difference, but there's still some delay compare it to VB application.

Can you please explain briefly the change you made.

Thanks

Marwan
http://www.geocities.com/marwan_m13/weemee8080.jpg
0 Kudos
Message 3 of 4
(2,850 Views)


Marwan a écrit: ...Can you please explain briefly the change you made.

To avoid writting the card at each iteration, I used an event loop. So that the card adress, the channel number... are written only if there is a change. You should move the write adress out of the loop to write it at each new run.

I used the timeout event to cadence the readings. You can decrease the value of the timeout to speed up the acquisition

Chilly Charly    (aka CC)
Message 4 of 4
(2,845 Views)