Why PWM?

I just finished a couple of projects where I built a "time proportional" output. There are two of these chunks of code in one ladder section. When the code is running it only increases the scan time by 0.4ms.
Basically I am taking the output of the PID and multiplying it by a user settable time then dividing it by the max PID output. This gives a PID output in a time value as a fraction of the total time. Takes about 5 rungs to do for each in an Omron PLC. Less in an AB. It seems to work well and one of the requirements was to have the output be on a specified time base. However, this PWM sound interesting. I have never heard of it and don't even know what it means. I certainly didn't know it was an instruction in a Micro. I'll have to research it more but any additional info would be appriciated.


Thanks,
Beryl
 
PWM means pulse width modulation....here is a basic explanation, with pictures (my kind of explanation):http://www.embedded.com/story/OEG20010821S0096

THe ML1200 and 1500 Instruction:
Description

Use this instruction to control and monitor the pulse width modulation function, which in turn controls the physical PWM output.

PWM files are always included when a program is downloaded or transferred from a memory module.

Note: A maximum of two elements can be configured for the PTO and PWM files combined.

Operation

The PWM function is controlled by a state machine. The rung state when the instruction is executed is only one of several inputs used to control this state machine. Consequently the setting of the EN bit is described next, but the actual operation is described in the PWM State Machine topic.

When executed on a true rung, the PWM instruction sets the EN bit and executes the state machine.

When executed on a false rung, the PWM instruction resets the EN bit and executes the state machine.

Pre-First Pass

1 The EN, NO, ER, ID, AS, RS and DS Status/Control bits are reset.
2 The Error Code is reset to zero.
3 The Current Frequency and Current Duty Cycle are reset to zero.

MCR Zone Execution

In an active MCR zone, the PWM operates as if the rung state were false.

Entering Parameters

Enter a 0 or a 1 for the PWM number. The PWM status and control information is contained in a Pulse Output (PWM) control file or (PWM) function file. A list of requirements regarding the use of the PWM follows:

You can assign outputs O:0/2 and O:0/3 to any of the PTO or PWM functions but, the same output cannot be assigned to more than one function.

There is no restriction on the number of PWM instructions that can be in a program. Each time one of the instructions is executed, it updates the PWM function as described by the PWM state machine.

The output image for the output controlled by the PWM function is updated to reflect the state of the physical output every time that the PWM instruction is evaluated.

If the PWM function is being used, the output image for the output controlled by the PWM function is not transferred to the physical output. This constraint also applies to immediate outputs. The PWM function is being used if and only if a transition out of the Pre-Idle state is made. For example, a PWM instruction may be contained in a subroutine or interrupt file that is never executed, in this case the PWM function is not used Immediate outputs update the output image (but not the physical output.)

If the output controlled by the PWM function is forced, the force overrides the PWM and the PWM errors out as described in Faults Generated.

When the PWM is in the Idle or Error state, the output controlled by the PWM is off (unless a force overrides the physical output.)

If the PWM instruction is being used when a power fail occurs, the corresponding output image are set to zero.

Note A maximum of two elements can be configured for the PTO and PWM files combined.

The ML1200/1500 Instruction Set Reference manual will explain more: http://www.ab.com/manuals/cp/1762-rm001e-en-p.pdf

AB offers Quick Start guides for using PWM:
http://domino.automation.rockwell.c...671BC67B52C8AEE385256AFB00672734?OpenDocument

http://domino.automation.rockwell.c...6061C1E42EFF91DE85256AFB0069FF7F?OpenDocument



Rockwell Software 2000
 

Similar Topics

Good morning! I'm trying to find a DIN rail-mountable 4-0channel PWM amplifier that is capable of accepting a 5VDC PWM with a maximum frequency...
Replies
2
Views
117
I have a project to control the speed of motor DC using PWM Output on PLC and when im on working i have a several trouble and of of them is the...
Replies
6
Views
252
Hi All, I came up with this for ramping the PWM pin on the micro 820. I'm new to ladder logic so I am not sure if this will even work? Once...
Replies
6
Views
371
Hi, I am trying to have my PLC start a heating fan in a linear manner. A certain percentage at a certain received setpoint. To do this, I use a...
Replies
8
Views
1,607
Hi guys, i have never had to do a PWM Output or input before i have a Device that to dimm the lamp output from the ballast, the ballast has a 24V...
Replies
6
Views
1,099
Back
Top Bottom