Use pto for pwm control – Rockwell Automation 2080-LC50 Micro830 and Micro850 Programmable Controllers User Manual User Manual

Page 124

Advertising
background image

110

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

Chapter 7 Motion Control with PTO and PWM

Use PTO for PWM Control

The following example shows you how to use a PTO axis as a PWM.

Launch Connected Components Workbench and create the following
ladder program.

MC_Power_1

MC_Power

EN

Axis

Enable_Positive

Enable

Enable_Negative

PWM0

TRUE

TRUE

TRUE

Axis

ENO

Status

Busy

Active

Error

ErrorID

1

Enable/power up the PWM axis immediately after going to RUN mode. PWM axis will remain powered ON (until Program mode,
and so on).

__SYSVA_FIRST_SCAN

MC_WriteParameter_1

MC_WriteParameter

EN

AxisIn

Parameter_Number

Execute

Value

PWM0

Update_PWM_Duty_Cycle

1005

G_PWM_Duty_Cycle

Axis

ENO

Done

Busy

Error

ErrorID

2

Continually use MC_WriteParameter (Parameter 1005) to change the Duty Cycle from global variable G_PWM_Duty_Cycle
(example: 0.5 => 50%)

MC_ExecutionMode

0

Update_PWM_Duty_Cycle

Update_PWM_Duty_Cycle

Advertising
This manual is related to the following products: