Yamaha Yamaha Robot Controller CC-Link Unit Communication with master station PLC, Receiving data

Models: Yamaha Robot Controller CC-Link Unit RCX Series

1 76
Download 76 pages 2.82 Kb
Page 37
Image 37

3. Communication with master station PLC

The method for communicating with the master station PLC by using the robot program when the CC-

Link system is correctly connected is explained in this section.

c CAUTION

SIW(0) and SIW(1) are viewed as dedicated input ports. The robot controller handles these ports as input ports of meaningful data, so do not use them as general-purpose input ports.

Set these ports to "0" in most cases.

3.1Receiving data

Data is received by reading the master station PLC output device data with the robot controller’s input port.

The correspondence of the master station PLC’s output device numbers and robot controller’s input port numbers is shown below.

Master station

Robot controller

Master station

Robot controller

output device No.

input port No.

output device No.

input port No.

 

 

 

 

 

RYn7~RYn0

SI(07)~SI(00)

RWwn

 

SIW(0)

RYnF~RYn8

SI(17)~SI(10)

RWw(n+1)

 

SIW(1)

RY(n+1)7~RY(n+1)0

SI(27)~SI(20)

RWw(n+2)

SID(2)

SIW(2)

RY(n+1)F~RY(n+1)8

SI(37)~SI(30)

RWw(n+3)

 

SIW(3)

RY(n+2)7~RY(n+2)0

SI(47)~SI(40)

RWw(n+4)

SID(4)

SIW(4)

RY(n+2)F~RY(n+2)8

SI(57)~SI(50)

RWw(n+5)

 

SIW(5)

RY(n+3)7~RY(n+3)0

SI(67)~SI(60)

RWw(n+6)

SID(6)

SIW(6)

RY(n+3)F~RY(n+3)8

SI(77)~SI(70)

RWw(n+7)

 

SIW(7)

RY(n+4)7~RY(n+4)0

SI(107)~SI(100)

RWw(n+8)

SID(8)

SIW(8)

RY(n+4)F~RY(n+4)8

SI(117)~SI(110)

RWw(n+9)

 

SIW(9)

RY(n+5)7~RY(n+5)0

SI(127)~SI(120)

RWw(n+10)

SID(10)

SIW(10)

RY(n+5)F~RY(n+5)8

SI(137)~SI(130)

RWw(n+11)

 

SIW(11)

RY(n+6)7~RY(n+6)0

SI(147)~SI(140)

RWw(n+12)

SID(12)

SIW(12)

RY(n+6)F~RY(n+6)8

SI(157)~SI(150)

RWw(n+13)

 

SIW(13)

 

 

RWw(n+14)

SID(14)

SIW(14)

 

 

RWw(n+15)

 

SIW(15)

n: Address assigned to master module with station No. setting

When reading the bit information from the master station PLC’s output device No. with the robot controller, write the following commands in the robot program in the same manner as the DI input port:

WAIT command Assignment statement

3

Communication

n NOTE

The SI statement in the robot language can be defined from SI0 ( ) to SI27 ( ), but the CC-Link compatible module accepts from SI0 ( ) to SI15 ( ).

Example

:To wait for RY(n+1)0 to turn ON

 

WAIT SI(20) = 1

* The robot program will wait for SI(20) to

 

 

turn ON.

Example

:To read the RY(n+1) 0 to RY(n+1)7 data in variable A

 

A = SI2()

* The SI2() data will be converted into a deci-

 

 

mal and substituted into variable A.

 

 

If SI2() is 7Fh, variable A will be 127.

When reading the word information from the master station PLC’s output device No. with the robot controller, write the following command in the robot program.

Assignment statement

n NOTE

Word data read out with SIW(n) is a little endian format with no sign. Double word data read out with SID(n) is a little endian format with a sign.

Example

:To read the RWw (n+2) word data in variable B

 

B = SIW (2)

* The SIW (2) data will be substituted into

 

 

variable B as a decimal. If SIW (2) is

 

 

01FFh, variable B will be 511.

Example

:To read the RWw (n+2) and RWw (n+3) double word data into variable C

 

C = SID (2)

* The SIW (2) and SIW (3) data will be sub-

 

 

stituted into variable C as a decimal. If SIW

 

 

(2) is 0010h and SIW (3) is 0001h, vari-

 

 

able C will be 65552.

3-3

Page 37
Image 37
Yamaha Yamaha Robot Controller CC-Link Unit, RCX Series owner manual Communication with master station PLC, Receiving data