LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM & CompacRIO & NI 9401

Solved!
Go to solution

Hi everybody,

 

I am trying to use the module NI 9401 for:

  1. Generate two PWM with a dutycycle = 25% and amplitude 5v.
  2. Use this module also to get 5v output.

Any help?

 

Thnaks for all,

Best regards,

Iñaki 

0 Kudos
Message 1 of 6
(4,814 Views)

Hi iiri,

 

1. What is your problem? When you want to create a PWM output you should program it! 😄

 

2. See the technical specs of your module. At 100µA it will provide atleast 4.7V, at 2mA >=4.3V. It's a plain TTL signal, so you cannot expect to get an accurate 5V output!

Best regards,
GerdW


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

What's the frequency of the PWM signal you want to generate?

 

I suggest to programm that directly in the FPGA of the cRIO.

 

Jens

Kudos are welcome...
0 Kudos
Message 3 of 6
(4,798 Views)

I configure the NI 9401 pins to "Pulse Width Modulation", but there is no option to set the duty cycle. Futhermore, All the signals are set to PWM (For example, frecuency 1 Hz). Is not an option to set the duty cycle and control these PWM's without programming?  If we have to program it, which is the best way to do this?

 

Thanks for all,

Best regards,

Iñaki

0 Kudos
Message 4 of 6
(4,744 Views)

Hi Inaki,

 

but there is no option to set the duty cycle.

Sure there is, right in your image!

You can access the ScanEngine IONode "PWM0" and set its duty cycle value…

 

control these PWM's without programming?

You are working with a device meant to be "programmed" - and you want to achieve something without "programming"?

What kind of programmer are you? 😄

 

If we have to program it, which is the best way to do this?

Create a VI, which does exactly what you want (or what your requirements tell you)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 6
(4,736 Views)
Solution
Accepted by topic author iiribarbilbao

Hi GerdW,

 

I had taught that it was some parameter to modify in order to change the PWM, but I have checked that you need to program it. I have programmed setting to 0 or 1 depending to a timer. 

 

More info:

https://forums.ni.com/t5/Digital-I-O/cRio-with-9401-and-PWM-over-10-Hz/td-p/883367

https://forums.ni.com/t5/LabVIEW/how-to-generate-pwm-at-Digital-output-using-ni-9401/td-p/3278834

 

Thanks to all

0 Kudos
Message 6 of 6
(4,601 Views)