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?
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.
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...