LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AI and AO Synch with AO Controls

Hi everyone,

 

I am having some difficulties modifying the shipped NI example that shows how to perform a multi-function (AI and AO) synch (see pic).... I hope someone can help.

 

The NI example works fine as it and synchs my AI and AO... But I need to be able to control the AO waveform generated while the instrument is running (turn it on/off, change the frequency, number of pulses written, etc as needed)... Ideally, I want the AO function inside a case structure within a while loop... This way, I toogle a boolean and the AO writes what is need and stops... Until I toogle again..

 

I generally know I way around LV.... My problem is that I am not sure which parts of the AO function should stay ouside the while loop (so it initializes) and which bits should be inside the loop for control (e.g. dig trigger, start etc) keeping in mind the instrument as it will ony work when the AI and AO start functions are connected via the error wire... Thus, I can't just just drag stuff into a new loop and re-wire as the 2 loops will be dependent, which I do not want... Also don't for get the trigger wire..

 

I have tried a range of things, but nothing works... Any suggestions? Should I be using a queues for the start error and trigger source wires?

 

Regards,

Jack

LV 2010SP1

0 Kudos
Message 1 of 3
(2,331 Views)

Hello jcannon,

 

The only way to change the parameters of an analog output on the fly is setting the channel under non regenerative mode, you may try the example shown in the image below, but it may be difficult to put this code and the sync code together.

 

Rege.png

 

Regards

 

Mart G

0 Kudos
Message 2 of 3
(2,322 Views)

Thanks Mart...

 

This solves part of my problem... Not sure how I missed that example!

 

Regards,

Jack

0 Kudos
Message 3 of 3
(2,319 Views)