From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6251 to sequentially output digital signal

Solved!
Go to solution

Thanks for your input Duffy2007!
I have tried out your suggestion and it gives the same behaviour I have described before, with short lived pulses appearing every 200ms, and not pulses LASTING 200ms. I've attached the oscilloscope screenshot and my adapted vi.

 

EDIT: The apparent simultaneous HIGH-LOW signal is in fact first HIGH followed by LOW 10µs later.

Download All
0 Kudos
Message 11 of 19
(1,744 Views)

I am getting quite frustrated because what I want to do seems like it should absolutely be possible, yet I can not find a satisfactory solution. So I change my tactics.
Does someone know if the following is possible with the NI PCIe-6251?:

 

  • Setup a task with two (or more) digital outputs (DO)
  • Setup a timer which produces pulses at a given frequency (say 1MHz or 10MHz, etc.)
  • Setup a counter which counts the timer pulses and sets DO channels to HIGH and LOW given the number returned by the counter

From the description of the "Create Virtual Task" vi, for the "CO Pulse Time" instance, this should be doable with the following code.

 

counterHIGH_LOW.png

 

However, nothing happens at all: no errors no signal, not even the short lived pulses as could be seen in the image I posted before.

I find the DAQmx vi's description very confusing and can not really make sense of the interplay between the DAQmx "Create Virtual Task" vi and the DAQmx "Timing" vi. I get that their interplay is crucial, but can not set them up properly

0 Kudos
Message 12 of 19
(1,722 Views)

hello dougbockILT,

 

i will try this example tomorrow with the real HW

 

 

idea3.png

 

 

 
0 Kudos
Message 13 of 19
(1,711 Views)
Solution
Accepted by topic author dougbockILT

hello dougbockILT,

 

it should working, only the trigger type must be additionally set.
200ms DO0 10µS break 200ms DO1 10µS and so on

 

 working.PNG

  

 

 

 

 

best regards
Alexander
Message 14 of 19
(1,702 Views)

Duffy2007, thank you for your input on this. Your results look exactly like what I need.

Unfortuanately, I can't reporduce this with the exact same VI you supplied! I have attched another copy of the vi I used (essentially identical to yours), and an oscillioscope screenshot. I have also wired the CTR outputs to the analog inputs of the PCIe-6251 in the hope to measure the same waveforms as you could with the examle vi. But no luck! Now I'm worrying that I might have the wiring all wrong. Could you verify that this is the correct method of wiring:

 

Each  digital channel has one wire connected to the counter (ctr0/ PFI12 and ctr1/PFI13, respectively), while each of the other wires is connected to D GND. 

ctrSuggestion2.png

scrshot2.png

The HIGH-LOW pulse in the second image repeats every 200ms...

 

wiring.png

0 Kudos
Message 15 of 19
(1,686 Views)

Hello dougbockILT,

 

CTR0 out PFI 12 pin2 and CTR1 out PFI 12 pin40 seems to be correct

i wired

pin2 to pin68 CTR0

pin40 to pin33 CTR1

pin32 to pin 5 GND

Open the test panel and configure continuous measurement with RSE 500 Khz and 500 K Samples. That works on my side.

 

best regards
Alexander
Message 16 of 19
(1,682 Views)

@Duffy2007 wrote:

 

pin32 to pin 5 GND 


That doesnt sound right. pin5 is another PFI6/P1.6. Surely you meant pin32 to pin4 (which is D GND).

 


@Duffy2007 wrote:

 

Open the test panel and configure continuous measurement with RSE 500 Khz and 500 K Samples. That works on my side.


I could only set 100k samples max. Here's the same result as for the oscilloscope:

 

scrshot-again1.png

 

testpanelSCRshot.PNG

I am ready to accept that my pci card might be broken. Otherwise I can't explain that I get completely different results using your exact same vi and wiring...

0 Kudos
Message 17 of 19
(1,676 Views)

Well that makes me look stupid... I had the oscilloscope cable connected the wrong way, basically shorting out my signal. I can't believe that not once in two days of rewiring countless times, I didn't switch the sheath/core wires of the oscilloscope at some point... 

 

So heres the actual measurement, as it is supposed to look:

scrshot-again5.pngscrshot-again3.png

 

 

THANK YOU VERY MUCH DUFFY2007!

0 Kudos
Message 18 of 19
(1,667 Views)

Hello dougbockILT,

 

great to see, that it works, now you can start with your application development.

best regards
Alexander
Message 19 of 19
(1,661 Views)