LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pwm labview using NI USB 6251

Hello I´m new in LabVIEW

I would like to generate 3 PWM signals using NI USB 6251, but I have only 2 counters..
I use the example of LabVIEW of this link http://www.ni.com/tutorial/2991/en/
but how can I generate the other pwm?
Besides I need to generate a specific number of pulses like 10
How can I do that? and how can I show the pulse in a waveform
Thanks!

0 Kudos
Message 1 of 6
(3,205 Views)

Hi ZelDrums,

 

sounds like you bought the wrong DAQ hardware for your task!

 

Which frequencies are we talking about? For low frequencies you could use software timing to generate a PWM: switch on/off a digital output pin with some delay in between…

 

Besides I need to generate a specific number of pulses like 10 How can I do that?

Well, generate a signal (aka waveform) consisting of your ten pulses. There are a lot of signal generation functions!


and how can I show the pulse in a waveform

Please use proper LabVIEW terms. You probably want to show your signal (aka waveform) in a chart or graph: just wire your waveform to an indicator of your choice!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,168 Views)

I didn´t buy the wrong DAQ hardware, I already had that hardware Smiley Sad

but I found an example whe resolve my problem like send a number of pulses, I didn´t explain well  Smiley Tongue

my ask was if is possible to generate a pwm without using  counters? 

Thanks! 

0 Kudos
Message 3 of 6
(3,095 Views)

Hi Zel,

 

yes, it's possible. I already told you so…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,082 Views)

there will be some example that can explain  to me a little about how to do it?
thanks!!

0 Kudos
Message 5 of 6
(3,073 Views)

Hi Zel,

 

what's the problem with switching a DigitalOutput on and off with some delays in between?

Pseudocode:

repeat
  switch DO on
  wait (high time)
  switch DO off
  wait (low time)
until break

The same as snippet:

check.png

 

You will find examples with the example finder and by searching in this forum…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,064 Views)