3. Instruction Set 6. For relative M flags and special D registers, please refer to explanations of API 80 RS instruction. Program example 1: COM2 (RS-485) 1. When X0 = ON, PLC will send out communication commands by COM2 to read status of servo drive. 2. When PLC received the feedback data from ASDA, M1127 will be active and the read data will be stored in D0~D4. M1002 Set communication protocol as 9600,8,E,1 Retain communication setting Set time-out value as 100ms X0 Set up in ASCII mode Sending request X0 Data Register Function Code: K0 Monitor ASDA status M1127 ASDA address: K1 Processing received data ASCII mode:
Store the received data into specified registers D0~D4 in Hex RTU mode : Store the received data into specified registers D0~D4 in Hex Reset communication completed flag M1127 3-495 For A2-type only Code Function Parameter Com. Addr. Read/Write data (Settings) manual. K19(H13) JOG Operation P4-05 040AH S: Range: 1~5000, 4999, 4998, 0 K20(H14) Auxiliary Function (Servo ON/OFF) P2-30 023CH S: K1 = ON, Others = OFF K21(H15) Speed Command (3 sets) P1-09 ~ P1-11 0112H ~ 0117H S+0 ~ S+5: Range: -60000~+60000 K22(H16) Torque Command (3 sets) P1-12 ~ P1-14 0118H ~ 011DH S+0 ~ S+5: Range:
-300~+300 K23(H17) Block Data Read / Write Register (for mapping parameter ) P0-35 ~ P0-38 0046H~ 004DH S+0 ~ S+7: Please refer to explanations in ASDA-A2 manual. MOV H87 D1120 SET M1120 MOV K100 D1129 RST M1143 SET M1143 SET M1122 ASDRW K1 K0 D0 RST M1127