Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputting square wave with NI 9263

Hello.

 

I have a problem when trying to output 0 or 5V through the NI 9263. This should form a square wave and it should run parallel to a timed loop responsible for other control task. It should handle the PWM signal sent to a motor control circuit. This means that the duty cycle shouldn't be static. The PWM should run at 140kHz. The timed loop that runs parallel only runs at 1kHz. Only options for the timed loop is either 1kHz or 1MHz.

 

Sincerely Christian

0 Kudos
Message 1 of 2
(6,663 Views)

Hi Christian.

 

 

I'm not sure I understand your question.

 

Normally you would use a digital module, and not an analog module, to generate a PWM signal. A digital module can make use of a counter to generate the PWM. For more information, see this article:

Pulse Width Modulation (PWM) Using NI-DAQmx and LabVIEW

 

Also, be carefull with the use of the timed loop. The Timed Loop is a single-threaded structure meaning that it does not allow code within the structure to execute in parallel. The timed Loop has a preemptive nature and can monopolize resources of a system. If using a digital module, you can corrolate the PWM to the counter, and therefore you do not need this software timing.

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 2 of 2
(5,594 Views)