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

Page 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

Image 37
Contents Unit Page Introduction Precautions for design Safety Precautions Always read before starting usePrecautions for wiring Precautions for installationPrecautions for disposal Precautions for starting and maintenanceWarranty description WarrantyMemo Contents Specifications TroubleshootingAppendix Outline Memo Wiring saving FeaturesEmulated serialization on parallel DIO PLC MechanismStation No. setting switch MSB 2nd digit Station No. setting switch LSB 1st digitCommunication speed switch BPS CC-Link system cable terminalsA1SHCPU Assignment of CC-Link compatible I/OPLC Outline Outline Memo Connection Memo Operation Confirming the CC-Link compatible module settingsResponse when starting the robot controller Installing the CC-Link compatible moduleProcedure Saving the robot controller dataSetting the station No Setting the CC-Link compatible moduleProcedures Setting the communication speedMounting the ferrite core Noise measuresTesting the line from the master station PLC Connecting to the CC-Link systemParameter Meaning Parameter setting for CC-Link serial I/O boardType Display Meaning Parameter setting for CC-Link serial I/O boardPress the F Edit key Memo Communication Memo When connection to CC-Link system is correctly established State when robot controller power is turned onInitial data process Initial process for connecting to CC-Link systemInitial data process master station PLC side Receiving data Communication with master station PLCTransmitting data Direct connection by emulated serialization on parallel DIO Direct connection from SI n to do n Direct connection by emulated serialization on parallel DIODirect connection from SO n to DI n Direct connection by emulated serialization on parallel DReferring to the data from the programming unit Referring to communication dataTroubleshooting Memo Confirmation details Check Items to confirm before starting up CC-Link systemRUN Errl SD RD Meanings of LEDs on CC-Link compatible moduleConfirmation item TroubleshootingProgramming unit error display confirmation CC-Link compatible module LED confirmation Confirmation from master station PLC Emg.stop on Error messages relating to CC-LinkMemo Specifications Memo Profile Remote registers Device No Signal name Details RXn0 Details of remote input/output signalsDetails of remote input/output signals Details of remote input/output signals Initial data process for CC-Link connection Dedicated input/output signal timing chartServo on and emergency stop Initial servo on process after power onShift to emergency stop Servo on process from emergency stop statusAuto mode changeover process SpecificationsProgram reset process Program execution processStopping with program interlock Program stop process using interlock inputDetails of sample Sample programPoints used Robot program data assignment Variables usedBit information used X1FF PLC data assignmentGosub *PLACE Robot program 1st unit’s RCX40 2nd unit’s RCX142X0F From PLC programRET From H0 Set initial data process complete flag OFF Communication speed setting CC-Link compatible module specificationsMemo Appendix Memo Term definition Unit