LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i give output as a digital signal in labview

I'm trying to give output to a device named as "BNC-2120",as a digital signal using simulate signal as a source.

I'm getting right result on the waveform graph but I'm not getting any output on the oscilloscope (connected to BNC-2120).

 

please tell if any other information is required.

image.jpeg

 I have connected the oscilloscope with labview using  P(0.0)

Thanks.

 

0 Kudos
Message 1 of 7
(526 Views)

1. Youre trying to write in two ways in parallel, through DAQmx Write.vi (but without initialization) and throught the DAQ-Assistant. This cannot work and I assume there's some error when doing this.

2. The BNC-2120 is just a connector block for a DAQ-Card (like e.g. a PXI-62xx or USB-63xx). Feel free to share which exact DAQ-Card you are using.

3. To properly output a digital Signal (PWM), go to Help->Find Examples... and use the Digital - Continuous Output.vi Example:

JGoebel_0-1733408948488.png

That example works for multiple channels (by writing an Integer that contains the state for all digital outputs in the task), you can simply write a 0 or 1 as integer to set the first channel in the task to high/low. Then insert as many Samples as you need:
E.g an array of 0,0,0,0,1,1,1,1 output at 100hz output rate gives you a 12.5Hz Digital Signal with 50% Dutycycle.

 

Best,
Jan

 

0 Kudos
Message 2 of 7
(509 Views)

you probably need to use the function DIGITAL WFM 

LVNinja_0-1733412983664.png

 

0 Kudos
Message 3 of 7
(483 Views)

What will have to connect in the input of the wfm. As it is not getting connected with Simulate signal or the true-false array or the output of comparator operator.

0 Kudos
Message 4 of 7
(452 Views)

1. Earlier, I ,tried to use both of them separately also but it didn't work.

2. I'm using the port pxi-6229

3. I'm using LabView 8.6 and don't have that example here.

0 Kudos
Message 5 of 7
(450 Views)

with this new vi I'm able to get some output.

But.....

 

I'm getting output as 0(blue channel) when there is a square wave on  "waveform".

 

1.jpeg

2.jpeg

 

and I'm getting 5(blue channel) as the output when at near  100% duty cycle.

3.jpeg

4.jpeg

Yellow channel is what I'm trying to follow.

 

thanks

0 Kudos
Message 6 of 7
(441 Views)

Hi , it's hard to tell what is going on without showing the code. 

 

0 Kudos
Message 7 of 7
(427 Views)