LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital I/O Modules with Compact DAQ

Just double checked everything  and yeah there was a mistake in the connections. It is working correctly now. Thanks.

 

I am now trying to get the pulse width modulation working from this tutorial:

 

http://www.ni.com/tutorial/2991/en/

 

I dont really understand what ctr0, ctr1, ctr2, and ctr3 are. They aren't outputs on the 9474 module as it only has 10 pins, which include 8 digital output channels a common and positive power supply terminal. There isn't any ctr pins.

 

PWM Block Diagram.png

0 Kudos
Message 11 of 16
(1,019 Views)
Those are counter pins and your device doesn't have any. That's pretty simple and you said so yourself. If you want to play around with counters, you need a DAQ device that has some.
0 Kudos
Message 12 of 16
(1,013 Views)

It has to be here or the option wouldn't be available. I only get options for features which are actually on my hardware.

 

 

EDIT: CTR0 appears to be D3 oon the module. Got PWM signal succesfully but the code doesn't let me change the frequency mid-operation. I can only set the frequency at the start of the program.

0 Kudos
Message 13 of 16
(1,006 Views)
The data sheet says 0 counters for the 9474 so I'm unsure what you are using. The example would need to be modified so that the frequency and duty cycle are set inside the loop. You would also have to disable continuous sample mode.
0 Kudos
Message 14 of 16
(999 Views)

Im not sure but i am using a 9474 and it seems to have a built in PWM for some reason.

 

Ok I will have a look into that and see if I can get variable frequency.

0 Kudos
Message 15 of 16
(986 Views)

Hi,

 

just an idea:

On a cRIO several (but not all) DIO modules allow the ScanEngine to operate with PWM and CTR signals: the DIO modules have to be a certain type (with atleast 8 channels or multiples of 8).

I think the cDAQ follows the same rule: with a certain DIO module you can use the DIO channels for PWM and CTR signals, which are generated in the cDAQ chassis hardware.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 16
(971 Views)