17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

144 GPWM General PWM output<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong><br />

SE<br />

Type<br />

Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F<br />

S 1 *<br />

S 2 *<br />

D * * *<br />

GPWM: 7 steps<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

S 1 : Width of output pulse S 2 : Pulse output cycle (occupies 3 devices) D: Pulse output device<br />

Explanations:<br />

1. When GPWM instruction executes, pulse output will be executes on device specified by D<br />

according to pulse output width S 1 and pulse output cycle S 2 .<br />

2. S 1 : pulse output width. Range: t = 0~32,767ms.<br />

3. S 2 : pulse output cycle. Range: T = 1~32,767ms, S 1 ≦ S 2 .<br />

4. S 2 +1 and S 2 +2 are system-defined parameters, please don’t use them.<br />

5. D: pulse output device: Y, M and S.<br />

6. When S 1 ≦ 0, no pulse output will be performed. When S 1 ≧ S 2 , the pulse output device<br />

remains ON.<br />

7. S 1 and S 2 can be modified when GPWM instruction is being executed<br />

Program Example:<br />

Assume D0 = K1000, D2 = K2000. When X0 = ON, Y20 will output pulses as the following diagram.<br />

When X0 = OFF, Y20 output will be OFF.<br />

t T<br />

X0<br />

GPWM D0 D2 Y20<br />

t=1000ms<br />

Output Y20<br />

T=2000ms<br />

Points to note:<br />

1. The instruction operates by the scan cycle; therefore the maximum error will be one PLC<br />

scan cycle. S 1 , S 2 and (S 2 - S 1 ) should be bigger than PLC scan cycle, otherwise malfunction<br />

will occur during GPWM outputs.<br />

2. Please note that placing this instruction in a subroutine will cause inaccurate GPWM outputs<br />

3-327

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!