Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Retriggerable AO in VB.Net

I'm trying to create a retriggerable analog output in VB.Net. I can find examples for LabVIEW but I cannot open them as I am still stuck with LabVIEW 6.1.  Does anyone have an example in VB.Net?
 
Thanks,
 
Charles
Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 1 of 6
(3,578 Views)
Charles,

I would need a little more information on what kind of card you have.  Also are you using the NI-DAQmx driver, and what operating system you have.  That would help a lot.

Thank you,
Raajit L
National Instruments
0 Kudos
Message 2 of 6
(3,560 Views)
Thank you for your reply. I am using the USB-6251 card with DAQmx8.3 drivers with Visual Basic.Net 2005 on a Windows XP professional sp2 pc. I have another quick question, can I write a waveform to the output that can be scaled after it is there?
Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 3 of 6
(3,564 Views)
Charles,
  1. You cannot do retriggerable analog output. 
  2. However you can do retriggerable finite pulse output with the counters. 
  3. What this means is that you can set up a re-triggerable finite pulse train output task with one of your counters
  4. Then set up a continuous analog output generation
  5. Route the counter's internal output to the sample clock for the analog input task.
Now when you recieve your trigger, your counter task will output a finite pulse train. This pulse train will be the sample clock. So for each trigger you will generate a finite amount of data points. Then it will wait until the next trigger to generate the next data points when the finite pulse train is output.

As far as an example is concerned, there is an example of retriggerable analog input in c++ on this post.  Since the DAQmx calls are the same, this should help you out.  You also mentioned that you could not open a LabVIEW example, which is why I attached the setup of the LabVIEW example as an image for you. 

Here is an article with an explanation for analog input again. Hope all this helps.

>>
can I write a waveform to the output that can be scaled after it is there?

I do not really understand your question here.  You can write unscaled data as I16, I32 and U16 (unsigned integer).

Regards,

Message Edited by Raajit L on 05-08-2007 10:41 PM

Raajit L
National Instruments
0 Kudos
Message 4 of 6
(3,545 Views)

Thank you for your other examples they were very helpful.

>>>>can I write a waveform to the output that can be scaled after it is there?

>>I do not really understand your question here.  You can write unscaled data as I16, I32 and U16 (unsigned integer).

What I would like to be able to do is to send a waveform to the output buffer that varies between 0 and 1, then be able to rescale that waveform to achieve different output levels without having to resend the entire waveform.

 

Charles


Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 5 of 6
(3,536 Views)
Charles,

Unfortunately there is not way of changing the scale of the waveform, which is already on the buffer, since that would involve changing the buffer size on the fly etc.  You would have to scale the waveform and send it to the buffer again.  I hope that helps.

Thank you,
Raajit L
National Instruments
0 Kudos
Message 6 of 6
(3,520 Views)