beautypg.com

4 reference program, Timing diagram, Reference program – KEYENCE SR-750 Series User Manual

Page 90: Real time processing, Sequential processing, Sr-750 series configuration, Real time processing „ sequential processing, E sr-750 um

background image

90

E SR-750 UM

9-4

Reference Program

This section introduces simple reference programs regarding the PLC link with the
SR-750 Series.
In actual operation, program by taking into account error handling, etc.

Timing diagram

In the following timing diagram, an explanation of operation of devices and the SR-
750 Series in real time processing and sequential processing is given.
Construct an operation program by referring to the timing diagram.

„

Real time processing

• When starting the program, specify the alternate function or parameter bank

number to be used. (D+00 region)

• Read data is overwritten in the data region (D+02 and over). To transfer data, do

so at the timing for setting the flag (B+04) to OFF.

• Data from D+02 will be overwritten. As a result, if the length changes, since there

may remain previous data in the region, program to delete data from D+04, after
transferring data if necessary.

„

Sequential processing

• When starting the program, set the processing method (A+01) to sequential

processing, and specify the alternate function or parameter bank number to be
used in the D-00 region.

• When data write request (B+02) is ON and data write complete (B+03) is OFF,

program to set data write enabled (A+02) to ON.
This setting makes it possible to obtain all data even when multiple pieces of data
are sent.

• When data write complete (B+03) is set to ON, new data is written into D+02 and

over. Perform a data transfer at the timing for setting data write complete flag
(B+03) to ON.

• Data after D+02 will be overwritten. As a result, if the length changes, since

previous data may remain in the region, program to delete data from D+04, if
necessary, after transferring data.

ON

OFF

ON

OFF

ON

OFF

ON

OFF

ON

OFF

Reading success

Reading error

Control region

Response

region

Read operation (The light is illuminated.)

Processing

method A+01

Timing instruction

A+00

Timing response

B+00

Data being written

B+04

Data region

Read bank

Instruction D+00

Data region

D+02~

Alternate instruction or the specified value of parameter bank

Read

data

Read

error

Reading OK

Read error

ON

OFF

ON

OFF

ON

OFF

ON

OFF

ON

OFF

ON

OFF

ON

OFF

Reading success

Reading error

Control region

Response

region

Read operation (The light is illuminated.)

Processing

method A+01

Timing instruction

A+00

Timing response

B+00

Data write

request B+02

Data region

Read bank

instruction D+00

Data region

D+02~

Alternate instruction or the specified value of parameter bank

Read

data

Read

error

Data write

complete B+03

Data write

enabled A+02

Reference Program

This is a reference program for the use of the KV Series. In this program, error
handling is not considered, thus program by taking into account error handling and
test in actual operation.

„

SR-750 Series configuration

It is assumed that the SR-750 Series is configured as follows:

• Timing

: Level trigger

• Read mode

: Single

• Memory assignment

DM front address: DM1000
Control region address: R100
Response region address: R200

• PLC link timing input : Yes

* To use on a trial basis, specify the PLC communication interface to the SR-750

Series and perform communication configuration for the KV Series.

„

Real time processing

„

Sequential processing

Write "0" into DM1000 and set to use
the alternate function.

Input R000 as read timing.

Set up the R101 and set it to sequential
processing.

Write "0" into DM1000 and set to use
the alternate function.

Input R000 as read timing.

Use the data write request flag (R202),
data write enabled flag (R102), data
write complete flag (R203) to perform
sequential processing.

Specifying alternate function

CR2008

Timing input processing

R000

R100

Data processing

R204

Program data to be written into
DM1004 or later.

END

ENDH

#0

DW

DM1000

Specifying sequential processing and alternate function

CR2008

R101

SET

Timing input processing

R000

R100

Sequential processing

R202

Program read data to be written into
DM1004 or later.

END

ENDH

R102

R203

Data processing

R203

#0

DW

DM1000