04-13-2011 04:12 AM - edited 04-13-2011 04:14 AM
Dear Sirs, I' triying to generate a pwm with a NI PCI 6602 board to control a motor. I have revised several examples in ni.com but normally in these examples the duty cycle is dinamyc but only change manually (updating the duty cycle value). I have prepared some code attached below. I want to change the duty cycle dynamically following a sine, oscillating around the initial duty cycle (like an offset, to move the motor between the max and min limits around the central position) introduce in the front panel. As I don´t want to get repeated duty cycle values the sine rate also must be 50 Hz (to obtain a smooth movement on the motor0). The code below works fine for low pulse train frequencies but when I increase the frequency of the pulse (to 50 Hz) and also the loop timing to 20 ms, the error -200301 appears. How Can I improve the code to obtain the required rates? Thanks Bye.
08-09-2016
09:39 AM
- last edited on
12-19-2024
09:50 AM
by
Content Cleaner
I am working on setting up our NI PCI 6602 to generate a PWM signal. I have used the suggested progamming from https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1P0CAI&l=en-US.
When I try to setupo the Counter I/O input to the DAQmx Create Virtual Channel.vi, it will not configure for a Cntr out for the 6602. It will only let me configure the AI channels of the 6036E card. What am I missing?
Sorry for stupid questions. I am new at this.
10-14-2016 07:17 AM
Did you change the DAQmx Create Virtual Channel.vi instance to CO Pulse Freq?