PWMgen Output Type Interpretation
21 May 2014 09:29 #47136
by saskrick
PWMgen Output Type Interpretation was created by saskrick
Folks
I am a faculty advisor working with some students. We are driving large servo motors (1 kW SEW industrial motors) via PWMgen. The input to this controller is a unipolar analog signal (0 – 10V) and two binary signals (CW and CCW) I am specifying output type "1". The documentation is a bit confusing:
"Output type 1 - PWM/PDM and direction pins. Positive and negative inputs will be output as positive and negative PWM. The direction pin is false for positive commands, and true for negative commands. If your control needs positive PWM for both CW and CCW use the abs component to convert your PWM signal to positive value when a negative input is input."
do I need to use the "abs" component to make the velocity signal always positive? what is "negative PWM" - makes no sense to me....
Regards, Rick Retzlaff
I am a faculty advisor working with some students. We are driving large servo motors (1 kW SEW industrial motors) via PWMgen. The input to this controller is a unipolar analog signal (0 – 10V) and two binary signals (CW and CCW) I am specifying output type "1". The documentation is a bit confusing:
"Output type 1 - PWM/PDM and direction pins. Positive and negative inputs will be output as positive and negative PWM. The direction pin is false for positive commands, and true for negative commands. If your control needs positive PWM for both CW and CCW use the abs component to convert your PWM signal to positive value when a negative input is input."
do I need to use the "abs" component to make the velocity signal always positive? what is "negative PWM" - makes no sense to me....
Regards, Rick Retzlaff
Please Log in or Create an account to join the conversation.
21 May 2014 21:06 #47161
by PCW
Replied by PCW on topic PWMgen Output Type Interpretation
The manual could be clearer but its spelled out in the section on individual pins:
I would probably change the first section to read:
In any case it does what you need without requiring an absolute component added
pwmgen.N.value float in
Commanded value. When value = 0.0, duty cycle is 0%, and when
value = +/-scale, duty cycle is +/- 100%. (Subject to min-dc and
max-dc limitations.)
I would probably change the first section to read:
type 1: pwm/direction
Two output pins, pwm and dir. The duty cycle of the pwm varies as a
function of the absolute value of the input. dir is low for positive inputs and
high for negative inputs.
In any case it does what you need without requiring an absolute component added
Please Log in or Create an account to join the conversation.
21 May 2014 21:37 #47162
by saskrick
Replied by saskrick on topic PWMgen Output Type Interpretation
Yes, I like that wording. Thanks. So my HAL code makes sense?:
net Xvel-cmd => pwmgen.0.value
net Xpwm pwmgen.0.pwm
net Xdir <= pwmgen.0.dir
net Xdir => parport.0.pin-02-out
net Xdir => parport.0.pin-04-out
setp parport.0.pin-04-out-invert TRUE
net Xpwm => parport.0.pin-03-out
(I need two DIR output pins for the SEW)
net Xvel-cmd => pwmgen.0.value
net Xpwm pwmgen.0.pwm
net Xdir <= pwmgen.0.dir
net Xdir => parport.0.pin-02-out
net Xdir => parport.0.pin-04-out
setp parport.0.pin-04-out-invert TRUE
net Xpwm => parport.0.pin-03-out
(I need two DIR output pins for the SEW)
Please Log in or Create an account to join the conversation.
21 May 2014 21:45 #47163
by PCW
Replied by PCW on topic PWMgen Output Type Interpretation
looks ok to me
Note that you can combine signal assignments in one line if you like:
net Xdir pwmgen.0.dir parport.0.pin-02-out parport.0.pin-04-out
just a matter of personal preference
Note that you can combine signal assignments in one line if you like:
net Xdir pwmgen.0.dir parport.0.pin-02-out parport.0.pin-04-out
just a matter of personal preference
Please Log in or Create an account to join the conversation.
Time to create page: 0.185 seconds