beautypg.com

Precautions, Sample program, 2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 310

background image

2 Instructions

2-274

CP1E CPU Unit Instructions Reference Manual(W483)

Precautions

When using TPO(685) in combination with PIDAT(191) in a cyclic task and also using an interrupt
task, temporarily disable interrupts by executing DI(693) (DISABLE INTERRUPTS) ahead PIDAT(191)
and TPO(685). If interrupts are not disabled and an interrupt occurs between the PIDAT(191) and
TPO(685), the control period may be shifted.

Sample program

Combining TPO(685) with PIDAT(191)

When CIO 0.00 is ON, TPO(685) takes the manipulated variable output from PIDAT(191) (contained in
D0), calculates the duty ratio from that manipulated variable value (Duty ratio = MV

÷ MV range), con-

verts the duty ratio to a time-proportional output, and outputs the pulses to bit 01 of CIO 100.

In this case, CIO 100 is allocated to a Transistor Output Unit and bit CIO 100.01 is connected to a solid
state relay for heater control.

DI

EI

S

C

D

S

C

R

Reception prohibited

Reception allowed

Interrupt task

Interrupt task

Cyclic task

PIDAT

PV input

PID parameters

Parameters

TPO

Pulse output

Manipulated
variable

Manipulated
variable

0.00

PIDAT

10

D200

D0

TPO

D0

D500

100.01

S

C

D

D200

D201

:

D206

:

:

D500

S

C

R

4

4

1

PV input

PID parameters

Manipulated variable

Manipulated variable

Parameters

Pulse output

Set value (SV)

Proportional band (P)

Output range: 4 hex

(12 bits: 0000 to 0FFF hex)

MV range: 4 hex

(12 bits: 0000 to 0FFF hex)

Input type: 1 hex (MV)

When CIO 0.00 goes from OFF to ON, PID(190)
reads the parameters, performs the PID
calculation with the PV input in CIO 10, and
outputs the manipulated variable (MV) to D0.

TPO(685) calculates the duty ratio by dividing
the MV in D0 by the MV range (0FFF Hex since
the range is set to 12 bits), converts that duty
ratio to a time-proportional output, and outputs
the pulse output to bit 01 of CIO 100.

This manual is related to the following products: