LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx

Hello, I want to use an USB-6212 module to generate one triangle waweform on analog output (A0) each time the module receive a TTL rising edge on PFI0 input. I try whith the numerous examples from Nithan (Cont Gen Voltage Wfm-Int Clk-Dig Start.vi with LabVIEW 10 or 12), but I don't succeed.

I want also generate a single pulse (PFI4) each time my single output period is trigged. The frequency of the input trigger is 1KHz when these of the waveform is 1Hz. Perhaps, is this an explanation of my problem. Could you help me ?

0 Kudos
Message 1 of 5
(2,549 Views)

Hello Bingal,

 

I ran some tests on a USB-6212 ("Dev9" on my computer).

 

I also used a PCI-6221 ("Dev3") in order to realize the two following tasks :

1) Generate a pulse on a counter (CTR0)

2) Acquire voltage on AI2 (because I connected it to AO0 of my USB-6212)

 

Using the example provided here : NI-DAQmx: Simple Function Generator

 

I generated a triangle waveform. I checked I get the signal by reading AI2 of my PCI-6221. It works fine.

 

Then I modified the example in order to have a trigger on PFI0 line.

 

So here are the steps I followed :

 

1) I run "Function Generator.vi"

2) I run the "Voltage - Continuous Input.vi" example in order to see if I read the triangle waveform. At this moment, I only see noise.

3) I run the "Counter - Single Pulse Output" example in order to generate a pulse which is sent to PFI0 of my USB-6212

4) I run again the "Voltage - Continuous Input.vi" example (if I had stopped it) and I see the triangle wave.

 

And the frequency desired is the right one.

 

I let you realize the test and see if it's also good for you.

 

You'll find in attachment the three VIs with the modifications.

 

Regards,

Jérémy C.
NI France

Message 2 of 5
(2,500 Views)

Hello, thank you Jeremy for your help. Unfortunately, I can't test your example because I don't find the right Waweform buffer generation.vi ...

I try an other solution with LabVIEW 10, but with a lot of clumsiness, I think; but it works !!

It is not perfect, but I'll try to improve it.

0 Kudos
Message 3 of 5
(2,471 Views)
0 Kudos
Message 4 of 5
(2,469 Views)

Sorry again, waxeform buffer generator was in NI-DAQmx: Simple Function Generator.

I'll test your example with LabVIEW 2012 as soon as possible.

Thank you again for your help.

0 Kudos
Message 5 of 5
(2,462 Views)