Pulse Width Modulation Configuration

Overview

2 PWM channels can be configured on the controller.

Hardware

Each frequency generator channel has the same I/O mapping as the PWM channel with 1 fast output and 2 auxiliary standard inputs.

Open the Configuration Window

Step

Action

1

In the Devices tree, double-click MyController > Embedded Functions > PTO_PWM.

2

Select a PTO 0 tab.

3

In the PTO / PWM > PTO00 > Mode drop-down menu, select PWM.

Result: The PTO 0 tab Variable becomes PWM00 and the PTO 1 tab Variable becomes PWM01.

Configuration Window Description

This table describes each parameter available when the embedded PTO_PWM is configured in PWM mode:

Parameter

Value

Default Value

Unit

Description

Mode

Not Used

PTO 1

PWM

Frequency Generator

Not Used

The mode selected is PWM.

NOTE: 1 This is not an option in PTO 1 tab. It is only supported for PTO 0 tab.

Auxiliary Inputs

EN

Disabled

Enabled

Disabled

Enables the IN_EN physical input to be used for enabling the functionality.

EN Filter

0.02

0.4

1.2

4

3

ms

Defines the value of the IN_EN filter value.

SYNC

Disabled

Enabled

Disabled

Enables the IN_SYNC input to be used for synchronization.

SYNC Filter

0.02

0.4

1.2

4

3

ms

Defines the value of the IN_SYNC filter value.

SYNC Edge

Rising Edge

Falling Edge

Rising Edge

Defines the IN_SYNC edge on which synchronization occurs.

Configure a PWM Channel

Step

Action

1

Enable the PWM channel: Set the Mode parameter to PWM.

Result: EcoStruxure Machine Expert creates a variable named PWM00 or PWM01 depending on the selected channel.

NOTE: You can rename the variable by entering a new name in the Variable field. When creating a PWM function block, you can find the Global Variable name representing the channel from the Input Assistant when naming the block.

2

In the list box of EN parameter, enable/disable the IN_EN physical input.

3

Configure the filter value of the IN_EN input (if enabled in step 2).

4

In the list box of SYNC parameter, enable/disable the IN_SYNC physical input.

5

Configure the filter value of the IN_SYNC input (if enabled in step 4).

Configure the filter value of the SYNC input (if enabled in step 4).

6

Configure the edge (rising or falling) for IN_SYNC signal detection (if enabled in step 4).