Skip to Main Content Skip to Search
Product Documentation

MPL PATI PWM generate - MPL PATI PWM generate block

Library

xPC Target Library for MPL

Scaling Output to Input

Hardware Output

Block Input Data Type

Scaling

0 to 5 volts

Double

Counts

General Description

This block uses the PWM module in the time processor units (TPUs) on the board to generate rectangular wave output. See the MPC555 documentation from Freescale Semiconductor at http://www.freescale.com for more information on the PWM module.

This block has three inputs:

Limitations

If you use multiple blocks for different channels, the relative timing between the output signals is not controlled and is not repeatable on the order of a few 10s of microseconds even if the output frequency is the same.

Block Parameters

Channel

From the list, select a channel from 1 to 32. This board has two TPUs. Channels 1 through 16 are on the first TPU, channels 17 through 32 are on the second TPU. The channel you select works with the Timebase parameter.

Priority

From the list, select Low, Medium, or High priority. This has a small effect on the order that individual timers are serviced. See the MPC555 TPU documentation for more information.

Initial high count

Enter the high count to be used from initialization until the model is running.

Initial low count

Enter the low count to be used from initialization until the model is running.

Immediate update

Select this check box to force the output to use the new count immediately. Selecting this check box can result in very short output pulses. It terminates long pulses immediately.

Clear this check box to allow the current output cycle to finish before the update. Clearing this check box generates smoother frequency and phase transitions without transients.

The block does not interrupt long pulses. Note that your selection of this parameter value depends on your application.

Arm input

Select this check box to indicate that the ARM input is present. If this check box is selected, the channel behaves as follows. Note that there might be a delay, on the order of the output period, between the time that the ARM input becomes 1 and the output port starts changing.

  • If the input signal to this port is 1, the channel outputs the signal specified by the H and L ports.

  • If the input signal is to this port is 0, the output stops at the level specified by the Disarm state drop-down list.

If you do not select this check box, the block behaves as if the ARM input is 1. No A input port appears.

Disarm state

From the drop-down list, select

  • Disarm to LOW

  • Disarm to HIGH

When the ARM input is 0, this parameter specifies the state of the output.

State on model stop

From the drop-down list, select

  • Leave running

    Continue to get output pulses at the last H and L port values.

  • Stop to LOW

    Immediately go to the LOW output state and maintain that level.

  • Stop to HIGH

    Immediately go to the HIGH output state and maintain that level.

Timebase

From the list, select TCR1 or TCR2. This depends on the MPL PATI Timebase Setup settings. If you do not use the MPL PATI Timebase Setup block, the TCR1 time base defaults to 1.25 MHz.

Sample time

Enter the base sample time or a multiple of the base sample time.

PCI slot

If only one board of this type is in the target PC, enter

-1 

to automatically locate the board.

If two or more boards of this type are in the target PC, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber, SlotNumber]. To determine the bus number and the PCI slot number, type

getxpcpci

See Also

MPL PATI Timebase Setup

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS