Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Default Analog Output Channel AO0 high in C#

I have a mass spectrometer where the "Exit Gate" must be set high to block ions from getting into the detector.  We are currently using CTR0 defaulted to High blocks the gate then drop to 0 volts opening the gate for 100 usec at a time.  CTR0 is triggered off an Analog Output voltage profile.  The Analog Output voltage profile is an array 600 values in length that repeats about 200 times.  Simple enough and it works well.

We wish to make CTR0 available for another device.  The Analog Output profile may be able to do everything CTR0 is doing for us; however, the Analog Output channel defaults low before the voltage profile begins writing.  Therefore, an initial spike of ions is released into the detector at the start of the experiment.  I attempted to use AOIdleOutputBehavior.MaintainExistingValue; but I get an error that says it is not available/meaningless in this application.  Since the profile repeats 200 times, it is not possible for me to buffer the beginning of this profile with high values prior to beginning the experiment.  I need to default the Analog Output Channel voltage to 5 volts.

Is it possible to default the Analog Output Channel to 5 volts prior to writing a profile of 600 values that repeats some 200 times?

PS - CTR1Out is being used already.
0 Kudos
Message 1 of 4
(3,082 Views)
I am using a DAQmx
0 Kudos
Message 2 of 4
(3,072 Views)
Hello,

When you write a value to a DAQ Card (i.e. 6251) on the Analog Output channel, that channel will hold the value until you update it.  Updates come from things like updating the analog output with another DAQmx write, restarting the computer or resetting the device.  I have posted a screenshot of an analog output that uses a simple software timed AO for a channel/task before I configure the timing and additional waveform.  As you can see I output a 5 V signal with one DAQmx write.  I then setup the timing and wrote a sine wave to the device.  You can see the output stays high until I start the waveform generation.  Is this what you are looking for?

If so, before you start anything with your setup/mass spectrometer is it possible just to call a single DAQmx write 1 channel 1 sample to set the value high.  I was not sure what you meant by "Since the profile repeats 200 times, it is not possible for me to buffer the beginning of this profile with high values prior to beginning the experiment"  so If this does not work can you please explain a little more about this?  With the method I mentioned above, you just need to write data with auto start on for a single point DAQmx write.  Then write your larger waveform that repeats 200 times. 

Regards,

Jesse O.
Applications Engineering
National Instruments


Jesse O. | National Instruments R&D
Message 3 of 4
(3,063 Views)
Jesse, Thanks!  You do understand my problem correctly.  I will give it a shot. 
 
If you don't hear back from me, you will know it worked.  Greatly appreciated.

Message Edited by bfdiii on 07-27-2007 02:14 PM

0 Kudos
Message 4 of 4
(3,052 Views)