Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronizing AI with VISA call

Highlighted

I'm trying to synchronize analog input with a command to a VISA instrument. The steps are to create a task for the AI and AO, triggering the AI from the AO, start the AI, then use two timed loops - one for the AO start and one for the instrument commands. The two loops are started at the same time with Synchronize Timed Structure Start. The instrument takes a fixed amount of time to execute (~30msec), which is set as the delay for the AI after receiving the trigger.

 

The problem is that the start of the execution of the instrument command appears to be random, even with the timed loops.

 

The program is somewhat of a behemoth, and I'd rather not list it, but, hopefully you can get the gist of the function from the description.

 

Any suggestions on what to look for would be helpful. Is there a better approach to synch the AI and VISA commands?

0 Kudos
Message 1 of 5
(2,746 Views)
Highlighted

DeKay,

 

are you using a realtime OS?  

0 Kudos
Message 2 of 5
(2,703 Views)
Highlighted

I'm using windows 7. I guess there is some question about whether or not it is real time.

I tried using the same format as the example in 'Synchronizing the Start of Timed Structures' in LabView help, but without success. A call to the GPIB instrument is in one loop, and the AI start VI is in the second loop. Both are set to execute one time, but within a larger loop to allow averaging of measurements.

0 Kudos
Message 3 of 5
(2,697 Views)
Highlighted

I'll try bumping up the priority in Windows TAsk Manager/Processes for Labview. It is currently at 'normal'. I'll use the highest (normal, above normal, high, realtime) that still allows stable operation.

Thanks for the nudge. I'll post a follow up when tested.

Still, it doesn't seem necessary. The program worked with XP years ago...

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

Im not entirely sure it was a nudge in the right direction.  Hopefully it works out.  

 

let us know how it goes!

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