Pou pwm_program, The pou defines four variables – Rockwell Automation 2080-LC50 Micro830 and Micro850 Programmable Controllers User Manual User Manual

Page 125

Advertising
background image

Rockwell Automation Publication 2080-UM002F-EN-E - December 2013

111

Motion Control with PTO and PWM Chapter 7

POU PWM_Program

The POU defines four variables.

MC_MoveVelocity_1

MC_MoveVelocity

EN

AxisIn

Velocity

Execute

Acceleration

PWM0

TRUE

G_PWM_Frequency

50000.0

Axis

ENO

InVelocity

Busy

Active

Direction

CommandAborted

3

__SYSVA_FIRST_SCAN

Acceleration

50000.0

Deceleration

0.0

Jerk

1

DirectionIn

0

Error

ErrorID

After first scan, use MC_MoveVelocity to continually set the PWM frequency (for example: 50,000 => 50 KHz) from global variable
G_PWM_Frequency. PWM axis will run forever (until Program Mode, MC_Halt, and so on).

Variable MC_Power_1
(* *)
Direction: VAR
Data Type: MC_Power
Attribute: ReadWrite
Direct variable (Channel):

Variable MC_MoveVelocity_1
(* *)
Direction: VAR
Data Type: MC_MoveVelocity
Attribute: ReadWrite
Direct variable (Channel):

Variable Update_PWM_Duty_Cycle
(* *)
Direction: Var
Data type: BOOL
Attribute: ReadWrite
Direct variable (Channel):

Variable MC_Power_1
(* *)
Direction: VAR
Data Type: MC_Power
Attribute: ReadWrite
Direct variable (Channel):

Advertising
This manual is related to the following products: