beautypg.com

Output pulse programming, Appendix-2 output pulse programming – Electro Cam PL-1746 Series User Manual

Page 141

background image

Appendix-2 Output Pulse Programming

Output Pulse Programming

Once the Read command is sent, the information requested will be written to the M0 files (see table 2).
In this example you would see the following information returned:

Info returned

M0 file

Purpose

90

M0:S.898

On: start position of pulse

180

M0:S.899

Off: end position of pulse

0

M0:S.900

Number of the pulse being read

1

M0:S.901

Quantity of pulses in the channel

Where to monitor outputs for use in a ladder program:
The ON/OFF status for each of the 32 outputs (or channels) can be monitored in the first two 16 bit input words.
I:S.0 Outputs 0-15
I:S.1 Outputs 16-31

Special pulse edits:
To clear all pulses in a channel write a pulse of ON = 0, OFF = 0.
To delete one of the pulses in a channel containing multiple pulses change the OFF value to equal the ON value.
To turn a channel on all the time write a pulse of ON = 1, OFF = 1.

Table 1: Data requirements in M0 files before executing specific commands.
Command

Program Channel On/off

*Pulse #

Read

x

x

x*

Write

x

x

x

Inc ON

x

x

x*

Dec ON

x

x

x*

Inc OFF

x

x

x*

Dec OFF

x

x

x*

Inc both ON/OFF

x

x

x*

Dec both ON/OFF

x

x

x*

Inc all in channel

x

x

Dec all in channel

x

x

Change ON

x

x

x (ON)

x*

Change OFF

x

x

x (OFF)

x*

*Pulse number only required if there is more than one pulse in a channel.

Table 2: Where to write (& read) pulse edit data.
M0:S.896

Program number

M0:S.897

Channel number

M0:S.898

On: Start position of pulse

M0:S.899

Off: End position of pulse

M0:S.900

Number of the pulse being read

M0:S.901

Quantity of pulses in the channel (read only)

Table 3: Command Status Register M0:S.902.
Bit #

Purpose

0

command (execute / busy)

1

command bit

2

command bit

3

command bit

4

command bit

5 - 9

not used

10

error: incorrect pulse number entered

11

error: ON pulse out of scale factor range

12

error: OFF pulse out of scale factor range

13

error: channel number out of range

14

error: program number out of range

15

error: any above error causes this bit to go high