10-06-2006 03:35 AM
10-06-2006 03:50 PM
Hi Nick,
Unfortunately, the arb cannot change the analog gain directly in response to a trigger. You can do it in software if you have an SMC-based arb (5412, 5421, 5422, 5441) and can live with the software latency. With NI-FGEN 2.4 or later, you can do it by outputting a marker when you receive the trigger. You can then poll the marker status in software using the NI-FGEN Marker Event Latched Status property, and set the analog gain accordingly. To output the marker, you will need to be in script or sequence mode, and begin generating the same waveform once the trigger is received. See either the NI-FGEN script example or marker example for how to output a marker. Hope this helps.
10-06-2006 04:33 PM
Edit to my previous reply: You will need script mode to do this, since you only want the marker to be output the first time you play the waveform after the trigger is received. So, you will need an arb that supports script mode (5421, 5422, 5441). The script would look something like this:
repeat forever
repeat until scripttrigger0
generate wfm1
end repeat
generate wfm1 marker0 (0)
end repeat
10-09-2006 04:36 AM
Hi Evan,
Thanks for the replies. I am using the Arb in Sequence mode but only have one waveform defined in the sequence. I have been trying to use the marker event so it is good to know that I am on the right track in my thinking. I need to change the gain many times on this waveform so I need to generate the marker each time the signal is generated. With this in mind I think that your first response is the one I need to follow. I was trying to use the live status but saw no changes ever, I have now tried to use the latched status as you suggested but I still see no changes to the value. I have checked to see if the marker is being generated and it is so I'm a bit puzzled here, could you give me a bit more guidance. I'm using NI-FGEN 2.4.
Thanx,
Nick
10-09-2006 07:57 AM
Hi Evan,
Perseverance pays off I got there in the end, thanks for the pointer.
Nick