background image

3 Basic Instructions 

DVP-PLC Application Manual

 

3-6

Mnemonic Function Program 

steps 

ORB 

Parallel connection- loop blocks 

Controllers 

ES

EX

SS

SA 

SX 

SC 

EH

SV

 

 

Operand 

N/A 

Explanations: 

To perform the “OR” operation of the preserved logic results and content in the accumulative register. 

Program Example: 

Ladder diagram:

 

Instruction code:

 

Operation:

 

LD 

X0 

Loading in contact A of X0 

ANI 

X1 

Connecting to contact B of X1 in series 

LDI 

X2 

Loading in contact B of X2 

AND 

X3 

Connecting to contact A of X3 in series 

ORB 

 

Connecting circuit block in parallel 

X0

X2

Y1

X1

X3

ORB

Block A

Block B

 

OUT Y1 

Driving 

Y1 

coil 

 

Mnemonic Function 

Program 

steps

MPS 

Store the current result of the 
internal PLC operations 

Controllers 

ES

EX

SS

SA 

SX 

SC 

EH

SV

 

 

Operand 

N/A 

Explanations: 

To save the content in the accumulative register into the operational result (the pointer of operational result will plus 

1). 

 

Mnemonic Function 

Program 

steps

MRD 

Reads the current result of the 
internal PLC operations 

Controllers 

ES

EX

SS

SA 

SX 

SC 

EH

SV

 

 

Operand 

N/A 

Explanations: 

To read the operational result and store it into the accumulative register (the pointer of operational result stays intact)

.

 

 

Mnemonic Function 

Program 

steps

MPP 

Pops (recalls and removes) the 
currently stored result 

Controllers 

ES

EX

SS

SA 

SX 

SC 

EH

SV

 

 

Operand 

N/A 

Explanations: 

To retrieve the previous preserved logical operation result and store it into the accumulative register (the pointer of 

operational result will minus 1)

.

 

Summary of Contents for DVP-PLC

Page 1: ...PLC PLC...

Page 2: ...es Constants K H 2 6 2 3 Numbering and Functions of External Input Output Contacts X Y 2 8 2 4 Numbering and Functions of Auxiliary Relays M 2 11 2 5 Numbering and Functions of Step Relays S 2 11 2 6...

Page 3: ...r 6 Application Instructions API 00 49 API00 09 Loop Control 6 1 API10 19 Transmission Comparison 6 18 API20 29 Four Arithmetic Operation 6 32 API30 39 Rotation Displacement 6 46 API40 49 Data Process...

Page 4: ...72 175 Floating Point Operation 9 51 API180 190 Matrix 9 59 API191 199 Positioning Instruction 9 76 Chapter 10 Application Instructions API 215 246 API202 203 Others 10 1 API215 223 Contact Type Logic...

Page 5: ...ut and PO pulse output Therefore PLC will still stand important in the industrial automation field in the future 1 1 The Working Principles of Ladder Diagram The ladder diagram was a diagram language...

Page 6: ...ferent sequence the same input status can result in different output results For example switch X5 and X6 of action sequence 1 and 3 do not act but Y3 is Off in sequence 1 and On in sequence 3 Y3 outp...

Page 7: ...also differ in reverse current For example in the traditional ladder diagram illustrated below when X0 X1 X4 and X6 are On and others are Off Y0 output on the circuit will be On as the dotted line go...

Page 8: ...is an internal memory storage unit in the PLC corresponding to a external input point and is used for connecting to the external input switches and receiving external input signals The input relay wil...

Page 9: ...coil contact and register in it When the coil is On and the estimated time is reached its contact will be enabled contact A closed contact B open Every timer has its fixed timing period unit 1ms 10ms...

Page 10: ...isters as other data registers They can be read and written and can be used in word devices bit devices or as a constant for index indication Device indication E0 E7 F0 F7 are indicated as E and F and...

Page 11: ...ck Parallel block Separation line and combination line The vertical line is used for separating the devices For the devices on the left the vertical line is a combination line indicating that there ar...

Page 12: ...us number will be generated automatically The same input points can be used repeatedly See the figure below X0 X1 X2 X3 X4 X5 Y0 X11 X12 X13 X6 X7 X10 C0 C1 00000 00000 Continuous number The operation...

Page 13: ...t the rising edge or falling edge when the contact is On as shown in the figure below X0 OFF ON OFF Time Falling edge X0 OFF ON OFF Time Rising edge 2 AND ANI instruction A single device connects to a...

Page 14: ...y instruction but considering the convenience of operating the PLC and the limitation on its capacity some parts in the ladder diagram will be omitted during the conversion We can determine the type o...

Page 15: ...below we can see clearly the sequence to be planned When the step S moves to the next step the original S will be Off Such a sequence can then be converted into a PLC ladder diagram and called step la...

Page 16: ...OUT M0 MRD AN I X1 OUT M1 MPP AN I M2 OUT M2 END OR block ANI Multiple outputs RST C0 OR block Series connection blcok AND block Parallel connection block The output will continue following the statu...

Page 17: ...nation However once the number of blocks exceed the range that the MPU allows problems will occur Therefore the best way is to execute the block combination instruction after a block is made which wil...

Page 18: ...ombining or editing should be done from the up left to the bottom right The dotted lined area should be moved up Parallel operation with empty device is not allowed Empty device cannot do operations w...

Page 19: ...block in parallel place the block on top to omit ORB instruction Ladder diagram complied into instruction LD T0 LD X1 AND X2 T0 X1 X2 ORB Ladder diagram complied into instruction LD X1 AND X2 T0 X1 X2...

Page 20: ...1 Correct the circuit of reverse flow In the following two examples the diagram in the left hand side is the ladder diagram we desire However the illegal reverse flow in it is incorrect according to o...

Page 21: ...s is called start first X2 Y1 X1 Y1 Example 3 Latched circuit for SET and RST instructions X2 Y1 X1 SET Y1 RST Stop first See the diagram in the right hand side for the latched circuit consist of RST...

Page 22: ...either the corresponding output Y1 or Y2 will be enabled first Either Y1 or Y2 will be enabled at a time i e Y1 and Y2 will not be enabled at the same time the interlock Even X1 and X2 are enabled at...

Page 23: ...in coil Y1 outputs oscillating pulses by the cycle T On T Off An oscillating circuit with cycle nT T T0 X0 TMR Y1 Y1 T0 Kn Y1 T T n X0 The ladder diagram program controls the On time of coil Y1 by tim...

Page 24: ...square pulse signals of the cycle 2T Example 11 Delay circuit T10 X0 TMR Y1 T10 K1000 Time base T 0 1 sec X0 Y1 100 seconds When input X0 is On due to that its corresponding normally closed contact i...

Page 25: ...tart to count for one time and reset for counting the pulses from X13 When the counting of counter C6 reaches n2 the pulses from input X13 will be n1 n2 Example 15 Traffic light control by using step...

Page 26: ...2 Y12 TMR T10 K250 Y11 TMR T12 K50 Y12 TMR T11 K50 M1013 Y10 TMR T13 K350 Ladder Diagram M1002 ZRST S0 S127 SET S0 SET S20 Y2 END S0 S S21 S Y1 S23 S Y12 S30 S T13 S23 S S33 S SET S30 S20 S TMR T0 SET...

Page 27: ...LAD 0 S0 ZRST S127 M1002 S0 SET Transferring Condition 1 TRANS T0 S22 Y2 T2 TMR K50 M1013 Transferring Condition 4 TRANS T13 TRANS T13 TRANS T13 TRANS T13 TRANS T13 TRANS T13 TRANS T13 0 2 3 4 5 6 7 1...

Page 28: ...1 Basic Principles of PLC Ladder Diagram DVP PLC Application Manual 1 24 MEMO...

Page 29: ...ntact of the same No will be On Initial step latched S0 S9 10 points Zero return latched S10 S19 10 points used with IST instruction Relay bit S Step Latched S20 S127 108 points Total 128 points Used...

Page 30: ...phase 2 inputs 3 points 3 C251 C254 2 phase 2 inputs 4 points 3 Total 16 points C Counter For SC 32 bit high speed counter C235 C245 1 phase 1 input 11 points 3 C246 C250 1 phase 2 inputs 4 points 3 C...

Page 31: ...y Latched M0 M511 M512 M999 M1000 M1999 M2000 M4095 Default latched Default latched M Auxiliary relay It is fixed to be non latched Start D1200 K512 End D1201 K999 Some are latched and cannot be modif...

Page 32: ...ts 2 Zero return S10 S19 10 points used with IST instruction 2 General purpose S20 S499 480 points 2 Latched S500 S899 400 points 3 Relay bit S Step Alarm S900 S1023 124 points 3 Total 1 024 points Us...

Page 33: ...A SX SC EH EH2 SV series MPU General purpose Latched Special auxiliary relay Latched M0 M499 M500 M999 M1000 M1999 M2000 M4095 M Auxiliary relay Start D1200 K500 End D1201 K999 Some are latched and ca...

Page 34: ...s See the explanations bellows for the functions and works of every type of value 1 Binary value BIN All the operations and storage of values in PLC are conducted in BIN Belows are the terms for BIN v...

Page 35: ...word or double word e g K2Y10 K4M100 Here K1 refers to a 4 bit data and K2 K4 refer to 8 bit 12 bit and 16 bit data Constant H H is normally placed before a hexadecimal value in the PLC For example H1...

Page 36: ...12SC I O Extension Unit Note 2 Input X X0 X3 4 points X0 X7 8 points X0 X5 X10 X11 8 points X20 X177 Output Y Y0 Y1 2 points Y0 Y3 4 points Y0 Y1 Y10 Y11 4 points Y20 Y177 Note 1 Besides 4DI and 2DO S...

Page 37: ...e 2 The input points on I O extension units start from X20 and output points start from Y20 The calculation on the No of I O points is the same as that in SS series Input Relay X0 X377 The numbering o...

Page 38: ...tus in the input signal memory The new On Off status will be read in in the next scan 3 There will be approximately a 10ms delay from the On Off or Off On changes to the status being recognized by the...

Page 39: ...control loop but it cannot directly drive the external load There are three types of auxiliary relays 1 General purpose auxiliary relay If the relay encouters power cut during the operation of the PLC...

Page 40: ...oints used for initial steps 2 Zero return step relay S10 S19 total 10 points S10 S19 are planned for zero return when used with API 60 IST instruction in the program If they are not used with IST the...

Page 41: ...ut coil will be On The set value should be a K value in decimal and the data register D can also be a set value The actual set time in the timer timing unit set value There are three types of timers 1...

Page 42: ...t the subroutine is not being executed the timer will not be able to time correctly How to designate SV The actual set time in the timer timing unit set value a Designating constant K SV is a constant...

Page 43: ...rameters Total 253 points Features of counter 16 bits counters 32 bits counters Type General purpose General purpose High speed Counting direction Counting up Counting up counting down Set value 0 32...

Page 44: ...and PV of C0 SV K5 The X1 trigger signal comes afterwards will not be accepted by C0 and the PV of C0 will stay at K5 X0 X1 0 1 2 3 4 5 0 Contacts Y0 C0 PV in C0 SV 32 bit general purpose addition sub...

Page 45: ...egister of C0 next time when X1 goes from Off to On the contact of counter C0 will be On and its PV will equal SV X10 X11 X12 0 1 2 3 4 5 4 3 2 1 0 1 2 3 4 5 6 7 8 0 7 6 5 4 3 Contacts Y0 C0 Accumulat...

Page 46: ...ching 20KHz But the two counting frequencies added together has to be smaller or equal 20KHz If the input is a 2 phase 2 input signal the counting frequency will be approximately 4KHz The 1 phase inpu...

Page 47: ...speed counters X10 X11 in SC series MPU a When X10 and X11 are set to be 1 phase 1 input or 1 phase 2 outputs the maximum frequency can reach 100KHz When set to be 2 phase 2 inputs the maximum freque...

Page 48: ...C243 C243 This function only applies to 4 special high speed counters C243 C245 C250 and C255 5 Counting modes a The 2 phase 2 inputs counting mode of the high speed counters in ES EX SS V5 5 and abov...

Page 49: ...by DCNT instruction 2 There are three counting modes in every HHSC see the table below a 1 phase 1 input refers to pulse direction mode b 1 phase 2 inputs refers to clockwise counterclockwise CW CCW...

Page 50: ...HHSC1 HHSC2 HHSC3 HHSC0 HHSC1 HHSC2 HHSC3 HHSC0 HHSC1 HHSC2 HHSC3 HHSC0 HHSC1 HHSC2 HHSC3 M1246 M1247 M1248 M1249 M1254 M1253 M1252 M1251 DHSCS DHSCR DHSCZ I 010 I 020 I 030 I 040 I 050 I 060 M1289 M1...

Page 51: ...ignal point R M1265 Disable the external control signal input point of HHSC0 start signal point S M1266 Disable the external control signal input point of HHSC1 reset signal point R M1267 Disable the...

Page 52: ...Reset of C235 M1329 Enable Start Reset of C236 M1330 Enable Start Reset of C237 M1331 Enable Start Reset of C238 M1332 Enable Start Reset of C239 M1333 Enable Start Reset of C240 D1022 Multiplied fre...

Page 53: ...the signals from X0 the PV in the counter will count up plus 1 or count down minus 1 4 When the counting of C241 reaches SV K5 the contact of C241 will be On If there are still input signals from X0...

Page 54: ...246 reaches SV K5 the contact of C246 will be On If there are still input signals from X0 the counting will continue 4 C246 in EH EH2 SV series MPU has external input signals to reset X2 and start X3...

Page 55: ...ble frequency or 4 times frequency of C251 HHSC0 in ES SA series MPU can be set up by D1022 The default setting is double frequency mode 5 C251 in EH EH2 SV series MPU has external input signals to re...

Page 56: ...o be non latched Latched D200 D999 D2000 D4999 3 800 points Can be modified to be non latched by setting up parameter Special purpose D1000 D1999 1 000 points Some are latched Data register D Index re...

Page 57: ...ister E F F0 E0 E0 F0 16 bits 16 bits 32 bits Higher 16 bits Lower 16 bits Index registers E F are 16 bit data registers and can be written and read If you need to use a 32 bit register you have to de...

Page 58: ...ead from the file register to data register D and the address of the file register or the data register D exceed their ranges PLC will stop the reading 3 There are 1 600 file registers in SA SX SC ser...

Page 59: ...ints Pointer I Interruption Frequency measurement card triggered interruption I180 1 point Position pointer of interruption subroutine Note Input point X as a high speed counter cannot be used as an e...

Page 60: ...nterrupt and intercept the present value in the high speed counter D1181 is the device to store the 32 bit value X1 pulse input point works with X5 external interruption point corresponding to C236 wo...

Page 61: ...when the scan time is very long and you need the communication data to be processed immediately you can use interruption I170 for this matter 6 Frequency measurement card triggered interruption I180 W...

Page 62: ...O Off M1016 Displaying real time clock in A D Off R W NO Off M1017 30 seconds correction on real time clock Off R W NO Off M1018 Flag for radian degree On for degree Off R W NO Off M1019 Enabling freq...

Page 63: ...roup pulse output CH2 Y4 Y5 is completed Not available in EH Off R NO Off M1036 SPD instruction is able to use X0 X5 to detect the flag only available in SC_V1 4 and above Off Off R W NO Off M1037 EH2...

Page 64: ...On 100us Off 1ms EH_V1 2 and above EH2 SV when On D1371 will decide the time base Off R W NO Off M1071 Y2 time base switching for PWM instruction On 100us Off 1ms EH_V1 2 and above EH2 SV when On D13...

Page 65: ...Off M1094 Matrix pointer clear flag Clearing the current value of the Pr to 0 Off Off R W NO Off M1095 Matrix rotation displacement output carry flag Off Off R NO Off M1096 Matrix displacement input...

Page 66: ...pulse output is completed not available in SC_V1 4 and above Off Off Off R W NO Off M1120 Retaining the communication setting of COM2 RS 485 modifying D1120 will be invalid when M1120 is set Off Off R...

Page 67: ...receiving of VFD A commands error Off Off R NO Off M1143 Selecting ASCII or RTU mode of COM2 RS 485 when in Slave mode Off ASCII On RTU Selecting ASCII or RTU mode of COM2 RS 485 when in Master mode...

Page 68: ...ion Off R W NO Off M1172 Switch for 2 phase pulse output On switch on Off Off Off R W NO Off M1173 On continuous output Off R W NO Off M1174 The number of output pulses reaches the target Off Off R W...

Page 69: ...On counting down Off R W NO Off M1215 Counting mode of C215 On counting down Off R W NO Off M1216 Counting mode of C216 On counting down Off R W NO Off M1217 Counting mode of C217 On counting down Of...

Page 70: ...unter monitoring On counting down Off R NO Off M1248 C248 counter monitoring On counting down Off R NO Off M1249 C249 counter monitoring On counting down Off R NO Off M1250 C250 counter monitoring On...

Page 71: ...nhibiting I00 Off R W NO Off M1281 Inhibiting I10 Off R W NO Off M1282 Inhibiting I20 Off R W NO Off M1283 Inhibiting I30 Off R W NO Off M1284 Inhibiting I40 Off R W NO Off M1285 Inhibiting I50 Off R...

Page 72: ...g start input point of C238 Off R W NO Off M1316 Controlling start input point of C239 Off R W NO Off M1317 Controlling start input point of C240 Off R W NO Off M1320 Controlling reset input point of...

Page 73: ...CH0 Y0 Y1 Off R W NO Off M1345 Enabling the offset of the 2nd group pulse output CH1 Y2 Y3 Off R W NO Off M1346 Enabling ZRN CLEAR output signal Off R W NO Off M1347 Reset after the 1st group pulse o...

Page 74: ...f R NO Off M1378 Indicating Slave ID 3 data transaction status on EASY PLC LINK Off R NO Off M1379 Indicating Slave ID 4 data transaction status on EASY PLC LINK Off R NO Off M1380 Indicating Slave ID...

Page 75: ...Slave ID 16 linking error Off R NO Off M1408 Indicating reading from Salve ID 1 is completed Off R NO Off M1409 Indicating reading from Salve ID 2 is completed Off R NO Off M1410 Indicating reading f...

Page 76: ...14 is completed Off R NO Off M1438 Indicating writing to Salve ID 15 is completed Off R NO Off M1439 Indicating writing to Salve ID 16 is completed Off R NO Off M1440 Slave ID 17 status on EASY PLC LI...

Page 77: ...PLC LINK Off R NO Off M1465 Indicating Slave ID 26 data transaction status on EASY PLC LINK Off R NO Off M1466 Indicating Slave ID 27 data transaction status on EASY PLC LINK Off R NO Off M1467 Indica...

Page 78: ...R NO Off M1496 Indicating reading from Salve ID 25 is completed Off R NO Off M1497 Indicating reading from Salve ID 26 is completed Off R NO Off M1498 Indicating reading from Salve ID 27 is completed...

Page 79: ...ter the 3 rd group pulse output CH2 Y4 Y5 is completed for PLSY instruction Not available in EH Off R W NO Off M1525 EH2 SV reset after the 4 th group pulse output CH3 Y6 Y7 is completed for PLSY inst...

Page 80: ...on ES EX SS SA SX SC EH EH2 SV Off On STOP RUN RUN STO P Attribute Latched Default M1536 EH2 SV CH2 being able to designate deceleration time Has to be used with D1350 Off R W NO Off M1537 EH2 SV CH3...

Page 81: ...32 767 unit 0 1ms accumulative high speed timer 0 R W NO 0 D1018 PI low byte H 0FDB H 0FDB H 0FDB R W NO H 0FDB D1019 PI high byte H 4049 H 4049 H 4049 R W NO H 4049 D1020 X0 X7 input filter Unit ms 1...

Page 82: ...ep No 8 0 R NO 0 D1049 No of alarm On 0 R NO 0 D1050 D1055 Process of data for Modbus communication instruction PLC automatically converts the ASCII data in D1070 D1085 in to hex data 0 R NO 0 D1056 P...

Page 83: ...000 R W YES 2 000 D1104 Start No of register D for Y0 acceleration deceleration pulse output Not available in SC_V1 4 and above 0 R W NO 0 D1109 COM3 communication protocol 0 R W NO 0 D1110 Average v...

Page 84: ...tput 0 R W NO 0 D1136 Number of sections in Y11 output for 2 axis synchronous control available in SC_V1 4 and above 0 R W NO 0 D1137 Address where incorrect use of operand occurs 0 0 R NO 0 D1140 Num...

Page 85: ...de of X10 available in SC_V1 4 and above 0 R W NO 0 D1167 Switching rising falling edge counting mode of X11 available in SC_V1 4 and above 0 R W NO 0 D1168 Interruption request for receiving specific...

Page 86: ...0 D1199 Low 16 bytes of high speed counter value extracted by interruption I501 0 R NO 0 D1200 Start latched address for auxiliary relays M0 M999 EH 500 SA SX SC 512 R W YES D1201 End latched address...

Page 87: ...0 Y0 Y1 in DRVI DDRVI DRVA DDRVA PLSV DPLSV 0 R W NO 0 D1223 Time difference between direction signal and pulse output for the 2nd group pulse CH1 Y2 Y3 in DRVI DDRVI DRVA DDRVA PLSV DPLSV 0 R W NO 0...

Page 88: ...23 ID of the 4th right side extension module available in EH EH2 0 R NO 0 D1324 ID of the 5th right side extension module available in EH EH2 0 R NO 0 D1325 ID of the 6th right side extension module a...

Page 89: ...roup pulse output CH0 Y0 Y1 YES D1340 SC start end frequency of Y10 output 200 R W NO 200 D1341 Low word of max output frequency R YES H 04D0 D1342 High word of max output frequency Fixed as 200KHz R...

Page 90: ...alve ID 1 R W YES H 1064 D1356 Starting reference for Master to read from Salve ID 2 R W YES H 1064 D1357 Starting reference for Master to read from Salve ID 3 R W YES H 1064 D1358 Starting reference...

Page 91: ...Y7 available in EH2 SV R W YES 0 D1378 High word of the present value of the 4th group pulses CH3 Y6 Y7 available in EH2 SV R W YES 0 D1379 Start frequency of the 1 st section and end frequency of the...

Page 92: ...4 Starting reference for Master to write in Salve ID 10 R W YES H 10C8 D1425 Starting reference for Master to write in Salve ID 11 R W YES H 10C8 D1426 Starting reference for Master to write in Salve...

Page 93: ...YES 16 D1457 Data length to be written on Slave ID 8 R W YES 16 D1458 Data length to be written on Slave ID 9 R W YES 16 D1459 Data length to be written on Slave ID 10 R W YES 16 D1460 Data length to...

Page 94: ...ave ID 2 when M1353 Off When M1353 On the starting D register No to store data read from ID 17 32 by Master available in EH EH2 SV R YES 0 D1528 D1543 Data buffer to store the data written on Slave ID...

Page 95: ...D1687 Data buffer to store the data read from Slave ID 7 R YES 0 D1688 D1703 Data buffer to store the data to be written on Slave ID 7 R W YES 0 D1704 D1719 Data buffer to store the data read from Sla...

Page 96: ...1879 Data buffer to store the data read from Slave ID 13 R YES 0 D1880 D1895 Data buffer to store the data to be written on Slave ID 13 R W YES 0 D1896 D1911 Data buffer to store the data read from Sl...

Page 97: ...emains Off afterward The pulse width 1 scan time Use this contact for all kinds of initial settings M1003 M1003 is Off during the first scan when PLC starts to RUN and remains On afterward M1003 enabl...

Page 98: ...e set value in the monitor timer Function Group Program Capacity Number D1002 Contents The program capacity differs in different series of MPUs 1 ES EX SS series MPU 3 792 Steps 2 SA SX SC series MPU...

Page 99: ...the execution of the program and PLC ERROR LED indicator remains beaconing 2 Users can use WPLSoft or HPP to monitor the content STEP address when WDT timer is On Function Group Checking Lost PLC SRAM...

Page 100: ...or STOP stauts for SA SX SC b M1015 On High speed counter D1015 is enabled only whtn PLC scans to END instruction Min timing unit of D1015 100us c Timing range of D1015 0 32 767 When the timing reache...

Page 101: ...RTC a Use TWR instruction fir SA SX SX EH EH2 SV series MPU See API 167 TWR for more details b Use WPLSoft or digital display panel DU 01 Function Group PI Number D1018 D1019 Contents 1 D1018 and D10...

Page 102: ...Completed Flag Number M1029 M1030 M1036 M1037 M1102 M1103 Contents Using execution completed flag 1 API 52 MTR API 71 HKY API 72 DSW API 74 SEGL API 77 PR M1029 On whenever the instruction completes...

Page 103: ...se output is completed After PLSY instruction is disabled M1102 and M1103 will be set Off In DDRVA DDRVI and DZRN M1102 and M1103 will be set Off when next time these instructions are enabled Function...

Page 104: ...he PLC is a heater when PLC switches from RUN to STOP the status of the heater will be retained After the PLC program is modified the PLC will RUN again Function Group All Output Y Inhibited Number M1...

Page 105: ...ut point X5 12 Remaining time for speed detection unit ms Function Group X0 Detecting Pulse Width Number M1084 D1023 Contents When M1084 On X0 of ES EX SS_V6 4 SA SX_V1 6 SC_V1 4 can detect pulse widt...

Page 106: ...Communication protocol of COM2 RS 232 RS 485 RS 422 Master or Slave 2 Communication setting in M1120 remains 3 M1143 is set in ASCII RTU mode COM3 1 Communication format is set in D1109 b0 b3 and b8 b...

Page 107: ...ed communication format will return to default setting Example 2 Modifying the communication format of COM1 1 Add the program code below on top of the program to modify the communication format of COM...

Page 108: ...RTU mode COM1 is set by M1139 and COM2 is set by M1143 When the flags are On they are in RTU mode when the flags are Off they are in ASCII mode 2 How to set up RTU mode COM1 9 600 8 E 1 RTU MOV H86 D...

Page 109: ...set value of time must be less than that in D1000 scan time out timer WDT 2 In EASY PLC LINK you can set up delayed transmission of the next communication data unit 1 scan period for SA SX SC 0 1ms f...

Page 110: ...H2 analog input DA card DVP F2DA 12 bits 0 10 V 0 4 000 or 0 20 mA 0 4 000 Device No Function D1056 Present value of EX SX analog input channel CH0 and EH EH2 AD card channel CH0 D1057 Present value o...

Page 111: ...egister Number M1101 D1101 D1103 Contents 1 When the power of PLC turns from Off to On PLC determines whether to automatically send the content in the file register to the assigned data register by ch...

Page 112: ...4 and versions above Device No Function M1115 Activation switch M1116 Accelerating flag M1117 Target frequency reached flag M1118 Decelerating flag M1119 Function completed flag D1104 Start No of con...

Page 113: ...C goes from STOP to RUN M1115 M1119 will be reset as Off D1104 will only be cleared as 0 when it turns from Off to On Either accel decel pulse output function or PLSY Y0 output can be executed at a ti...

Page 114: ...the acceleration deceleration pulse output will start c M1116 On in the acceleration process When the speed reaches its target M1117 will be On M1118 On in the deceleration process When the speed rea...

Page 115: ...put pulses is updated in every scan time When M1133 turns from Off to on the number will be cleared as 0 When 1133 turns from On to Off the last numner of output pulses will be shown Note The special...

Page 116: ...lses are all in 32 bit Thus the 3 sections will continuously occupy 12 D devices 3 2 2 12 4 Note a Make sure that the output frequency and the number of pulses have been set before using this function...

Page 117: ...Output frequency Device D Number of output pulses 1 D201 D200 K1 000 D203 D202 K1 000 X 2 D205 D204 K4 000 D207 D206 K4 000 1 D301 D300 K3 000 D303 D302 K3 000 Y 2 D305 D304 K1 000 D307 D306 K1 000 Ta...

Page 118: ...0 D237 D236 K15 644 D239 D238 K7 822 1 D301 D300 K15 644 D303 D302 K7 822 2 D305 D304 K15 258 D307 D306 K7 629 3 D309 D308 K14 498 D311 D310 K7 249 4 D313 D312 K13 380 D315 D314 K6 690 5 D317 D316 K11...

Page 119: ...D1135 D1136 M1 SET Y0 Y1 K10 K10 SET RST SET Y0 Y1 Y0 Y1 RST RST Y0 Y1 RST SET M2 M3 M4 Figure 5 M0 M1 On refers to drawing a 90 arc in Quadrant I M0 M2 On refers to drawing a 90 arc in Quadrant II M0...

Page 120: ...ant I M0 M2 On refers to drawing a 90 arc in Quadrant II M0 M3 On refers to drawing a 90 arc in Quadrant III M0 M4 On refers to drawing a 90 arc in Quadrant IV See figure 7 0 0 X Y 50 000 50 000 50 00...

Page 121: ...a negative one see figure 9 When X0 On D0 will accumulate once and the 2 axes will draw a 90 arc Output frequency and number of pulses see table 2 0 0 X Y 50 000 50 000 50 000 50 000 10 000 0 D0 K1 D...

Page 122: ...clockwise until they reach 50 000 50 000 see figure 10 Rx target value in X Ry target value in Y N number of sections 3 1416 0 0 X Y 0 Ry Rx 0 x10 y10 x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 x6 y6 x7 y7 x8 y8 x...

Page 123: ...690 5 966 5 095 4 100 3 002 1 832 616 Table 5 Step 3 Decide the execution time of every section and obtain the frequency of every section by table 5 Assume every section executes for 500ms the equatio...

Page 124: ...bits in the 32 bit data register for accumulative Y0 output pulses D1144 Starting No of the register D for Y0 adjustable pulse speed acceleration deceleration D1154 Recommended value for indicated gap...

Page 125: ...c Range of gap time 1 32 767ms Min unit ms d The range of gap frequency within acceleration section 1Hz 32 700Hz within deceleration section 1 32 700Hz If the gap frequency is set as 0Hz it will fail...

Page 126: ...es not follow the rules k When PLC goes from STOP to RUN M1144 M1149 will be reset to Off When PLC goes from RUN to STOP only M1144 will be reset not M1145 M1149 l SA SX SC uses parameter table D0 D99...

Page 127: ...ion and deceleration in 1 section and the pulse output program with direction switch TF1 TF2 TF2 TF1 SF2 SF2 SF1 SF1 X0 ON Y7 OFF Position Zero point Y7 On Explanation a See example 2 for the settings...

Page 128: ...Example 4 Program of zero return for 1 acceleration section and 1 deceleration section The timing diagram of relevant flags M1149 M1148 M1144 X0 Zero return stops Pulse output stops Accelerating to z...

Page 129: ...When X7 is triggered M1144 will enable an acceleration Set M1149 counting temporarily stops and 10 pulses will be sent out before the deceleration switch X0 is triggered and the program will enter the...

Page 130: ...execution For example when HKY instruction is executed it takes 8 scan times to obtain a valid input value from a key Therefore the single step execution will result in incorrect actions b High speed...

Page 131: ...to on the number will be cleared as 0 When M1172 is cleared as 0 when PLC goes from STOP to RUN When PLC goes from RUN to STOP the last number of pulses will be shown 3 Note This function can only be...

Page 132: ...8 and D1199 are the registers to store the 32 bit values Function Group MODEM Connection Function Number M1184 M1188 Contents 1 The system connection PC WPLSoft is executing MODEM MODEM Telecommunicat...

Page 133: ...X SC is from the start address No to the end address No 2 See the tables in Chapter 2 1 for more details Function Group Force On Off of Input Point X Number M1304 Contents 1 For SA SX SC when M1304 On...

Page 134: ...hut down the criteria contact for pulse output instruction and turn On M1334 Because PLSY does not have acceleration deceleration setting M1334 does not need to be set in PLSY The time from executing...

Page 135: ...hutdown Applicable to DDRVI DDRVA PLSY instructions Criteria for executing immediate output shutdown M1311 On set before executing the instruction and the criteria triggers set in X11 D1167 K0 refers...

Page 136: ...le ID for SV Module Name Module ID hex Module Name Module ID hex DVP04AD S H 0088 DVP04PT S H 008A DVP06AD S H 00C8 DVP04TC S H 008B DVP02DA S H 0049 DVP06XA S H 00CC DVP04DA S H 0089 DVP01PU S H 0110...

Page 137: ...f data Number of data Number of data Number of data D1434 D1450 D1435 D1451 D1436 D1452 D1437 D1453 D1438 D1454 D1439 D1455 D1440 D1456 D1441 D1457 Start Communication Address D1355 D1415 D1356 D1416...

Page 138: ...D145 8 D1443 D1459 D1444 D1460 D1445 D1461 D1446 D1462 D1447 D1463 D1448 D1464 D1449 D1465 Start Communication Address D1363 D1423 D1364 D1424 D1365 D1425 D1366 D1426 D1367 D1427 D1368 D1428 D1369 D1...

Page 139: ...D1439 D1455 D1440 D1456 D1441 D1457 Start Communication Address D1355 D1415 D1356 D1416 D1357 D1417 D1358 D1418 D1359 D1419 D1360 D1420 D1361 D1421 D1362 D1422 LINK in SLAVE PLC M1360 M1361 M1362 M136...

Page 140: ...D1447 D1463 D1448 D1464 D1449 D1465 Start Communication Address D1363 D1423 D1364 D1424 D1365 D1425 D1366 D1426 D1367 D1427 D1368 D1428 D1369 D1429 D1370 D1430 LINK in SLAVE PLC M1368 M1369 M1370 M137...

Page 141: ...D1549 D1565 D1550 D1566 D1551 D1567 start Communication Address D1512 D1528 D1513 D1529 D1514 D1530 D1515 D1531 D1516 D1532 D1517 D1533 D1518 D1534 D1519 D1535 LINK in SLAVE PLC M1440 M1441 M1442 M14...

Page 142: ...D1557 D1573 D1558 D1574 D1559 D1575 Start Communication Address D1520 D1536 D1521 D1537 D1522 D1538 D1523 D1539 D1524 D1540 D1525 D1541 D1526 D1542 D1527 D1543 LINK in SLAVE PLC M1448 M1449 M1450 M14...

Page 143: ...same as those in the Master PLC set in D1109 When SA SX SC EH EH2 SV serves as Slave it only supports ASCII format Max baud rate 38 400bps h The start station No K1 K214 of Slave ID1 is assigned by D1...

Page 144: ...tec the action of EASY EASY PLC LINK e When 1353 On D1480 D1607 read write buffer of SLAVE ID1 4 will be used for storing the No of registers D for Slave ID1 ID32 The No of register D shall not be 9 9...

Page 145: ...bled If the number of read written data 16 the communication timeout shall be 500ms in case a communication timeout may occur iv EASY EASY PLC LINK is only workable when the baud rate is 1 200bps If t...

Page 146: ...sable Enable Set M1354 Reset M1354 Enable auto maual mode of EASY PLC LINK Set M1351 Set M1350 Disable 32 slaves linkage and up to 100 data for exchange Reset M1353 1 Enable 32 slaves linkage and up t...

Page 147: ...Slave ID e g D1480 corresponds to ID1 D1481 to ID2 and so on D1480 D1495 D1576 D1591 D1496 D1511 and D1592 D1607 have to be set before EASY EASY PLC LINK is enabled In the execution of EASY EASY PLC...

Page 148: ...of data in EASY EASY PLC LINK will not be done at END but at the enabling of I170 immediately after the receiving of data is completed If the reaction speed of the RS 485 IC direction control signal...

Page 149: ...s will be read into D1480 D1495 and D1512 D1527 of the Master and the data in D1496 D1511 and D1528 D1543 will be written into D200 D215 of the two Slaves Master PLC 1 Slave PLC 2 D1480 D1495 D100 D11...

Page 150: ...M1002 MOV K17 D1121 H86 D1120 K6 K2 M1351 END MOV SET M1120 MOV MOV D1434 D1450 M1350 X1 H2100 H2000 MOV MOV D1355 D1415 Master ID COM2 communication protocol Retain communication protocol Number of d...

Page 151: ...377 Y 000 377 Octal bit 0500 05FF 0 177 0 177 0 377 T 000 255 bit word 0600 06FF 0 127 0 255 0 255 M 000 255 bit 0800 08FF M 256 511 bit 0900 09FF M 512 767 bit 0A00 0AFF M 768 1 023 bit 0B00 0BFF M 1...

Page 152: ...word 9100 91FF D 4 608 4863 word 9200 92FF D 4 864 5 119 word 9300 93FF 0 4 999 D 5 120 5 375 word 9400 94FF D 5 376 5 631 word 9500 95FF D 5 632 5 887 word 9600 96FF D 5 888 6 143 word 9700 97FF D 6...

Page 153: ...0503 Use of KnYm exceeds the range C400 Illegal instruction 0601 Use of device T exceeds the range C401 General loop error 0604 Use of register T exceeds the range C402 Continuously using LD LDI inst...

Page 154: ...ng to write data into memory 0E1A Use of device exceeds the range including E F index register modification C420 Read write function card error 0E1B The index of the radical is a negative value C430 I...

Page 155: ...ult of the internal PLC operations N A 1 68 1 68 0 24 1 3 3 6 MRD Reads the current result of the internal PLC operations N A 1 6 1 6 0 24 1 3 6 MPP Pops recalls and removes the currently stored resul...

Page 156: ...SA EH STEP Page 89 PLS Rising edge output Y M 7 8 7 8 9 92 3 3 13 99 PLF Falling edge output Y M 7 8 7 8 10 16 3 3 14 End instruction Execution speed us Instruction Code Function Operands ES SA EH STE...

Page 157: ...tion Program steps LDI Loading in B contact 1 Controllers ES EX SS SA SX SC EH SV X0 X377 Y0 Y377 M0 M4095 S0 S1023 T0 T255 C0 C255 D0 D9999 Operand 9 9 9 9 9 9 Explanations The LDI instruction is use...

Page 158: ...he AND operation with the logical operation result obtained The final result will be store in the accumulative register Program Example Ladder diagram Instruction code Operation LD X1 Loading in conta...

Page 159: ...register Program Example Ladder diagram Instruction code Operation LD X0 Loading in contact A of X0 ORI X1 Connecting to contact B of X1 in parallel X0 X1 Y1 OUT Y1 Driving Y1 coil Mnemonic Function P...

Page 160: ...eps MPS Store the current result of the internal PLC operations 1 Controllers ES EX SS SA SX SC EH SV Operand N A Explanations To save the content in the accumulative register into the operational res...

Page 161: ...rs ES EX SS SA SX SC EH SV X0 X377 Y0 Y377 M0 M4095 S0 S1023 T0 T255 C0 C255 D0 D9999 Operand 9 9 9 Explanations 1 To output the logical operation result before OUT instruction into a designated devic...

Page 162: ...s of the designated devices are Device Status Y M S Coil and contact will be set to Off T C Present values of the timer or counter will be set to 0 and the coil and contact will be set to Off D E F Th...

Page 163: ...t after the counting reaches its target the contact and present value will stay intact Use RST instruction to restart or reset the counting Program Example Ladder diagram Instruction code Operation LD...

Page 164: ...uted the execution of instructions between MC and MCR will not be interrupted When MC instruction is Off the actions of the instructions between MC and MCR are Instruction type Explanation General pur...

Page 165: ...ies connection contact X0 Y0 MC N0 X1 X2 Y1 MC N1 X3 MCR N1 MCR N0 X10 MC N0 Y10 X11 MCR N0 Mnemonic Function Program steps LDP Rising edge detection operation 1 Controllers ES EX SS SA SX SC EH SV X0...

Page 166: ...eries connection 1 Controllers ES EX SS SA SX SC EH SV X0 X377 Y0 Y377 M0 M4095 S0 S1023 T0 T255 C0 C255 D0 D9999 Operand 9 9 9 9 9 9 Explanations ANDP instruction is used in the series connection of...

Page 167: ...ps ORF Falling edge parallel connection 1 Controllers ES EX SS SA SX SC EH SV X0 X377 Y0 Y377 M0 M4095 S0 S1023 T0 T255 C0 C255 D0 D9999 Operand 9 9 9 9 9 9 Explanations The ORP instructions are used...

Page 168: ...SC EH SV X0 X377 Y0 Y377 M0 M4095 S0 S1023 T0 T255 C0 C255 D0 D9999 Operand 9 9 Explanations When X0 goes from On to Off falling edge trigger PLF instruction will be executed and S will send out pulse...

Page 169: ...diagram Instruction code Operation LD X0 Loading in B contact of X0 NOP No operation X0 Y1 NOP NOP instruction will be omitted in the ladder diagram OUT Y1 Driving Y1 coil Mnemonic Function Program st...

Page 170: ...I150 I160 I170 I180 Explanations A interruption program has to start with a interruption pointer I and ends with API 03 IRET I instruction has to be used with API 03 IRET API 04 EI and API 05 DI See...

Page 171: ...S9 and the bus returns to a normal ladder diagram instruction SFC uses the step ladder diagram composed of STL RET to complete the action of a circuit The No of S cannot be repeated Mnemonic Function...

Page 172: ...t step according to the set transition criteria Therefore you can repeat the cycle and obtain the result you desire 4 See the SFC chart in the right hand side The initial step S0 transfers to a genera...

Page 173: ...d of every step sequence There is no limitation on the times of using RET which is used together with S0 S9 If there is no RET instruction at the end of a step sequence errors will be detected by WPL...

Page 174: ...execution Pro gram execution 3 Repeated Use of Output Coil a You can use output coils of the same No in different steps b See the diagram in the right There can be the same output device Y0 among diff...

Page 175: ...agram starting with S0 S9 co existing in the program The transfer of a step can take place in the same step sequence or be transferred to different step sequence Therefore there are some slight differ...

Page 176: ...the diagram in the right hand side for a correct compilation Y0 S S Y1 Y2 M0 n Y0 S S Y2 Y1 n M0 Y0 S S Y1 Y2 M0 n M1000 BUS or Modifying the position of M0 Normally open contact in RUN mode 7 Restri...

Page 177: ...the same but if there are many conditions or actions in S10 it is recommended that you modify the diagram in the left hand side into the diagram in the right hand side SET S20 is only executed after...

Page 178: ...ctions on diverging sequence See 4 5 for example a You can use maximum 8 diverged steps in a divergence sequence b You can use maximum 16 loops in multiple divergence sequences or in simultaneous sequ...

Page 179: ...sic type of sequences The first step in a step ladder diagram is called the initial step which can be S0 S9 The steps following the initial step are general steps which can be S10 S1023 If you are usi...

Page 180: ...to the step in another sequence S0 S21 S42 S43 OUT OUT S0 S21 S41 OUT OUT S1 S41 S43 OUT S42 c Reset Sequence See the diagram in the right hand side When the condition at S50 is true S50 will be reset...

Page 181: ...S30 when X1 On S20 will be transferred to S31 when X2 On S20 will be transferred to S32 Ladder diagram X0 SET SET S31 S30 S SET S32 S20 X1 X2 SFC S20 S30 S31 S32 X0 X1 X2 c Structure of the simultaneo...

Page 182: ...rgence Ladder diagram M1002 ZRST S0 S127 SET S1 SET S20 Y0 SET S30 Y1 SET S40 Y2 END X0 S1 S S20 S X1 S30 S X2 S40 S X3 SET S31 X4 SET S32 X7 SET S50 Y3 S31 S X5 SET S41 Y4 S41 S X6 SET S50 Y5 S32 S X...

Page 183: ...S0 S127 SET S3 SET S20 Y0 SET S30 Y1 SET S40 Y2 END X0 S3 S S20 S X1 S30 S X2 S40 S SET S31 SET S32 Y3 S31 S X3 SET S41 Y4 S41 S Y5 S32 S X4 SET S42 Y6 S42 S X5 SET S50 S50 S T1 SET S60 TMR T1 K10 Y7...

Page 184: ...2 ZRST S0 SET S4 SET S20 Y0 SET S30 Y1 SET S40 Y2 END X0 S4 S S20 S X1 S30 S X2 S40 S X3 SET S31 SET S32 SET S50 Y3 S31 S X4 SET S41 Y4 S41 S X5 SET S50 Y5 S32 S X6 SET S42 Y6 S42 S X7 SET S50 S50 S T...

Page 185: ...S X7 SET S50 Y7 S50 S X11 SET S60 Y13 S60 S SET S51 X2 X3 S20 Y0 SET S20 S X0 S0 END Y10 S51 S X12 SET S61 S61 S X15 SET S70 Y14 Y17 S70 S X17 RET S0 S60 S S61 S Y4 S32 S X6 SET S41 Y6 S41 S X10 SET...

Page 186: ...e convergence Ladder diagram SFC S127 M1002 ZRST S0 SET S0 SET S30 Y0 SET S31 Y1 SET S33 Y2 END X0 S0 S S30 S X1 S31 S X2 S32 S X3 SET S32 SET S33 Y3 S33 S X4 SET S34 Y4 S34 S X5 SET S35 Y6 S36 S X6 S...

Page 187: ...X46 Y27 S61 X27 X42 Y30 S62 X30 Y31 S63 X31 Y40 S76 X43 X50 Y6 S36 X16 X7 Y7 Y21 Y36 S56 Y22 S57 Y23 S20 X23 OUT RST S36 Y10 Y13 Y25 Y37 S58 X37 X24 Y24 RST S58 S37 S42 S59 S75 X40 X47 X10 X17 X25 SET...

Page 188: ...ill result in no auto operation Program Example 2 1 Robot arm control by IST instruction a Motion request Separate the big ball and small ball and move them to different boxes Configure the control pa...

Page 189: ...ding Y0 descending Y1 right shifting Y2 left shifting Y3 clipping Y4 Start Circuit M1000 IST X10 S20 S80 X0 M1044 X1 Y4 Manual Operation Mode X20 SET RST Y4 Y4 S S0 X21 X22 Y1 Y0 X23 Y0 Y1 X24 X4 Y2 Y...

Page 190: ...Descending stops Robot arm ascends to upper limit X4 On Right shifting stops Robot arm left shifting to left limit X1 On Enable zero return completed flag Zero return operation completed Auto Operati...

Page 191: ...SET S42 Y2 S42 S X3 SET S50 X3 Y1 S50 S X5 SET S60 RST Y4 TMR T2 S60 S SET S70 T2 K30 Y0 S70 S X4 SET S80 Y3 S80 S X1 X1 RET S2 Enter auto operation mode Clipping tightly Clipping released Robot arm...

Page 192: ...4 Step Ladder Instructions DVP PLC Application Manual 4 22 MEMO...

Page 193: ...3 7 13 6 37 24 INC DINC 3 Increment 3 3 3 3 5 6 39 25 DEC DDEC 3 Decrement 3 3 3 3 5 6 40 26 WAND DAND 3 Logical Word AND 3 3 3 7 13 6 41 27 WOR DOR 3 Logical Word OR 3 3 3 7 13 6 42 28 WXOR DXOR 3 Lo...

Page 194: ...7 75 79 TO DTO 3 Write CR Data into Special Modules 3 3 3 9 17 7 76 80 RS Serial Communication Instruction 3 3 3 9 7 80 81 PRUN DPRUN 3 Parallel Run 3 3 5 9 7 93 82 ASCI 3 Converts Hex to ASCII 3 3 3...

Page 195: ...osine 3 9 8 53 Floating Point Operation 138 DTANH 3 Hyperbolic Tangent 3 9 8 54 143 DELAY 9 Delay Instruction 9 9 3 8 55 144 GPWM General PWM Output 9 9 7 8 57 145 FTC Fuzzy Temperature Control 9 9 9...

Page 196: ...High Speed Timer 3 3 9 93 197 DCLLM Close Loop Position Control 3 17 9 95 202 SCAL 3 Proportional Value Calculation 3 3 3 9 10 1 203 SCLP 3 Parameter Proportional Value Calculation 3 3 3 9 10 3 215 LD...

Page 197: ...ion Instructions DVP PLC Application Manual 5 5 Note 1 For applicable models ES includes ES EX SS SA includes SA SX SC EH includes EH EH2 SV 2 ES EX SS series MPU does not support pulse execution type...

Page 198: ...X SA SC EH SV PULSE 16 bit 32 bit API No Indication of if there is a 16 bit or 32 bit instruction If there is a 32 bit instruction the column will be marked with D Mnemonic of the application instruct...

Page 199: ...only be constant K H or a register it will be represented as m m1 m2 n n1 n2 Length of operand 16 bit instruction or 32 bit instruction Depending on the contents in the operand the length of an opera...

Page 200: ...ually in 16 bits i e of the length of 1 register D A designated 32 bit data register refers to 2 consecutive register Ds 4 If an operand of a 32 bit instruction designates D0 the 32 bit data register...

Page 201: ...uctions ADD SUB MUL DVI will affect the status of M1020 M1022 When the instruction is not executed the On Off status of the flag will be held The status of the four flags relates to many instructions...

Page 202: ...u can use index register modification in the operands to expand the functions of the instruction 1 Can be used only once in the program API 58 PWM ES series MPU API 60 IST ES SA EH series MPU API 74 S...

Page 203: ...tem will execute the instruction that is first scanned and enabled and ignore the rest 5 3 Handling of Numeric Values Devices only with On Off status are called bit devices e g X Y M and S Devices use...

Page 204: ...ded as 0 For 32 bit data please use K8Y0 The operations in DVP PLC are conducted in BIN integers When the integer performs division e g 40 3 13 and the remainder is 1 When the integer performs square...

Page 205: ...for storing a binary floating point as below S E7 E6 E5 E1 E0 A22 A21 A20 A6 A5 A4 A3 A2 A1 A0 b0 b1 b2 b3 b4 b5 b6 b20 b21 b22 b23 b24 b28 b29 b30 b31 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 6 5 1 0 1 2 3 1...

Page 206: ...ter you have to designate E In this case F will be covered up by E and cannot be used otherwise the contents in E may become incorrect We recommend you use MOVP instruction to reset the contents in D...

Page 207: ...X KnY KnM KnS T C and D by E F you have to select a 16 bit register i e you can designate E or F To modify constant K and H in a 32 bit instruction you have to select a 32 bit register i e you have to...

Page 208: ...2 AND DAND S1 S2 3 3 3 10 11 233 AND DAND S1 S2 3 3 3 10 11 234 AND DAND S1 S2 3 3 3 10 11 236 AND DAND S1 S2 3 3 3 10 11 237 AND DAND S1 S2 3 3 3 10 11 A 238 AND DAND S1 S2 3 3 3 10 11 15 BMOV 3 Bloc...

Page 209: ...FMOV DFMOV 3 Fill Move 3 3 3 6 26 49 FLT DFLT 3 Floating Point 3 3 3 6 70 78 FROM DFROM 3 Read CR Data in Special Modules 3 3 3 7 75 102 FWD Forward Running of VFD A 3 3 3 8 11 F 145 FTC Fuzzy Temper...

Page 210: ...87 MBWR 3 Write Matrix Bit 3 3 9 69 188 MBS 3 Matrix Bit Displacement 3 3 9 71 189 MBR 3 Matrix Bit Rotation 3 3 9 73 M 190 MBC 3 Matrix Bit Status Counting 3 3 9 75 09 NEXT End of a FOR NEXT Loop 3 3...

Page 211: ...Bit Shift Left 3 3 3 6 51 38 SFWR 3 Shift Register Write 3 3 6 55 39 SFRD 3 Shift Register Read 3 3 6 56 43 SUM DSUM 3 Sum of Active Bits 3 3 3 6 63 48 SQR DSQR 3 Square Root 3 3 3 6 72 56 SPD Speed...

Page 212: ...6 41 27 WOR DOR 3 Logical Word OR 3 3 3 6 42 28 WXOR DXOR 3 Logical Exclusive OR 3 3 3 6 43 36 WSFR 3 Word Shift Right 3 3 6 52 W 37 WSFL 3 Word Shift Left 3 3 6 54 X 17 XCH DXCH 3 Exchange 3 3 3 6 27...

Page 213: ...will occur 8 Actions of all devices while conditional jumping is being executed a Y M and S remain their previous status before the conditional jump takes place b Timer 10ms and 100ms that is executi...

Page 214: ...ove can ensure correct actions others will cause errors 3 When MC instruction is executed PLC will push the status of the switch contact into the self defined stack in PLC The stack will be controlled...

Page 215: ...ntOff T240 remains unchanged M7 M10 Off M10 On Off trigger Counter does not count C0 C234 3 M7 Off M10 On Off trigger M10 On Off trigger Counter C0 stops counting and stays latched After M0 goes Off C...

Page 216: ...2 Y1 is a dual output When M0 Off Y1 is controlled by M1 When M0 On Y1 is controlled by M12 CJ P0 M0 M1 M2 M17 M3 M4 M5 M6 M7 M10 M11 M0 M12 M13 END RST RST RST T127 C0 D0 Y1 CJ P0 CJ P63 S1 TMR T0 K1...

Page 217: ...routines of the same pointer number with no limit on times 8 Subroutine can be nested for 5 levels including the initial CALL instruction If entering the sixth level the subroutine won t be executed A...

Page 218: ...P11 is executed and the program jumps to the subroutine designated by P11 3 When X12 is On CALL P12 is executed and the program jumps to the subroutine designated by P12 4 When X13 is On CALL P13 is e...

Page 219: ...INC D10 X2 P10 Y4 X2 X11 CALL P11 INC D11 Y5 SRET INC D20 X2 P11 Y6 X12 CALL P12 X2 INC D21 Y7 SRET X2 X13 X2 X2 X2 X14 X2 P13 P14 P12 INC D30 Y10 CALL P13 INC D31 Y11 SRET INC D40 Y12 CALL P14 INC D4...

Page 220: ...I Disable Interruption instruction EI 1 steps PULSE 16 bit 32 bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Explanations 1 No operand No contact to drive the instruction...

Page 221: ...ediately will be memorized and will be executed in the area allowed for interruption 9 The time interruptions in ES SA will not be memorized 10 When using the interruption pointer DO NOT repeatedly us...

Page 222: ...es interruption in rising edge b Time interruptions I6 I7 2 points 1 99ms time base 1ms I8 1 point 1 99ms time base 0 1ms c High speed counter interruptions I010 I020 I030 I040 1050 1060 6 points used...

Page 223: ...le high speed counter interruption I020 M1291 Disable high speed counter interruption I030 M1292 Disable high speed counter interruption I040 M1293 Disable high speed counter interruption I050 M1294 D...

Page 224: ...add SRET instruction in the end of its subroutine Interruption program has to be written after FEND instruction and IRET must be added in the end of the service program 3 If several FEND instructions...

Page 225: ...lication Manual 6 13 CALL Instruction Program Flow X1 CALL P63 P0 P63 CJ P0 I301 X0 0 The program flow when X0 off X1 off main program main program main program The program flow when X0 Off X1 On Inte...

Page 226: ...TOP status by RUN STOP switch If there is no RUN STOP switch PLC will return to STOP status automatically 4 When to use WDT a When errors occur in the PLC system b When the executing time of the progr...

Page 227: ...ve the instruction is required 2 FOR instruction indicates FOR NEXT loops executing back and forth N times before escaping for the next execution 3 N K1 K32 767 N is regarded as K1 when N 1 4 When FOR...

Page 228: ...6 16 FOR K3 FOR K4 NEXT NEXT A B Program Example 2 When X7 Off PLC will execute the program between FOR NEXT When X7 On CJ instruction jumps to P6 and avoids executing the programs between FOR NEXT X...

Page 229: ...e executed the user can adopt CJ instruction for a jumping When the most inner FOR NEXT loop is in the status of X1 On CJ instruction executes jumping to P0 and skips the execution on P0 X0 TMR T0 K10...

Page 230: ...tents in S1 and S2 are compared and the result will be stored in D 5 The two comparison values are compared algebraically and the two values are signed binary values When b15 1 in 16 bit instruction o...

Page 231: ...See the specifications of each model for their range of use 5 S is compared with its S1 S2 and the result is stored in D 6 When S1 S2 the instruction performs comparison by using S1 as the lower uppe...

Page 232: ...ent of D remains unchanged 4 If the operation result refers to a 32 bit output i e application instruction MUL and so on and the user needs to move the present value in the 32 bit high speed counter D...

Page 233: ...it to low digit of D 2 Range m1 1 4 m2 1 m1 n m2 4 3 See the specifications of each model for their range of use 4 M1168 is designated by SMOV working mode When M1168 On the program is in BIN mode Whe...

Page 234: ...and D20 H5678 After the execution D10 will remain unchanged and D20 will become H5128 Program Example 3 1 This instruction can be used to combine the DIP switches connected to the input terminals wit...

Page 235: ...See the specifications of each model for their range of use 3 This instruction can be used for phase reversed output 4 Reverse the phase 0 1 1 0 of all the contents in S and send the contents to D Giv...

Page 236: ...3 The contents in n registers starting from the device designated by S will be moved to n registers starting from the device designated by D If n exceeds the actual number of available source devices...

Page 237: ...n is processed following the order 1 2 3 X10 BMOV D20 D19 K3 D19 D20 D21 D20 D21 D22 2 1 3 2 In EH EH2 SV when S D the instruction is processed following the order 1 2 3 D11 D13 X11 BMOV D10 D11 K3 D1...

Page 238: ...n device F only 16 bit instruction is applicable 2 Range of n 1 512 16 bit instruction 1 256 32 bit instruction 3 See the specifications of each model for their range of use 4 The contents in n regist...

Page 239: ...ed by XCH working mode Program Example 1 When X0 Off On the contents in D20 and D40 exchange with each other X0 D40 XCHP D20 Before execution After execution 120 120 40 40 D20 D40 D20 D40 Program Exam...

Page 240: ...6 Application Instructions API 00 49 DVP PLC Application Manual 6 28 X0 M1303 DXCHP D100 D100 9 20 20 9 D100L D100H 8 40 40 8 D101L D101H D100L D100H D101L D101H Before execution After execution...

Page 241: ...or M1068 operation error D1067 error code 4 The content in S BIN value is converted into BCD value and stored in D 5 As a 16 bit 32 bit instruction when the conversion result exceeds the range of 0 9...

Page 242: ...alue in hex and any one of its digits does not fall in the range of 0 9 an operation error will occur M1067 M1068 On and D1067 records the error code 0E18 hex 7 Constant K and H will automatically be...

Page 243: ...1 10 0 10 2 6 4 2 X17 X0 8 8 8 10 3 6 8 Y37 Y20 4 digit DIP switch in BCD format 4 digit BCD value Using BIN instruction to store the BIN value into D100 Using BCD instruction to convert the content i...

Page 244: ...highest bit is symbolic bit 0 and 1 which is suitable for algebraic addition e g 3 9 6 6 Flag changes in binary addition In 16 bit BIN addition a If the operation result 0 zero flag M1020 On b If the...

Page 245: ...1 0 1 32 767 0 1 2 2 1 0 2 147 483 648 1 0 1 2 147 483 647 0 1 2 16 bit Zero flag Zero flag Borrow flag The highest bit of the data 1 negative 32 bit Zero flag Zero flag The highest bit of the data 0...

Page 246: ...traction 6 Flag changes in binary subtraction In 16 bit instruction a If the operation result 0 zero flag M1020 On b If the operation result 32 768 borrow flag M1021 On c If the operation result 32 76...

Page 247: ...stores the result in D Be careful with the positive negative signs of S1 S2 and D when doing 16 bit and 32 bit operations 7 In 16 bit BIN multiplication b15 b00 X b15 b00 b31 b16 b15 b00 1 b15 is a sy...

Page 248: ...Instructions API 00 49 DVP PLC Application Manual 6 36 and the lower 16 bit are stored in D20 On Off of the most left bit indicates the positive negative status of the result value X0 MUL D0 D10 D20 M...

Page 249: ...and S2 in BIN format and stores the result in D Be careful with the positive negative signs of S1 S2 and D when doing 16 bit and 32 bit operations 7 This instruction will not be executed when the divi...

Page 250: ...6 Application Instructions API 00 49 DVP PLC Application Manual 6 38 X0 DIV D0 D10 D20 D0 D10 K4Y0 DIV...

Page 251: ...1 If D is used in device F only 16 bit instruction is applicable 2 See the specifications of each model for their range of use 3 If the instruction is not a pulse execution one the content in the des...

Page 252: ...If D is used in device F only 16 bit instruction is applicable 2 See the specifications of each model for their range of use 3 If the instruction is not a pulse execution one the content in the desig...

Page 253: ...S1 and S2 and stores the result in D 4 Operation rule The corresponding bit of the operation result in D will be 0 if any of the bits in S1 or S2 is 0 Program Example 1 When X0 On the 16 bit D0 and D2...

Page 254: ...S1 and S2 and stores the result in D 4 Operation rule The corresponding bit of the operation result in D will be 1 if any of the bits in S1 or S2 is 1 Program Example 1 When X0 On the 16 bit D0 and D...

Page 255: ...n rule If the bits in S1 and S2 are the same the corresponding bit of the operation result in D will be 0 if the bits in S1 and S2 are different the corresponding bit of the operation result in D will...

Page 256: ...use 3 This instruction converts a negative BIN value into an absolute value 4 This instruction adopts pulse execution instructions NEGP DNEGP Program Example 1 When X0 Off On the phase of every bit o...

Page 257: ...1 1 1 1 1 1 1 1 1 1 D0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 D0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 D0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 D0 1 2 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 D0 3 0 0 0 1 0 0 0 0 0 0 0 0...

Page 258: ...is designated as KnY KnM and KnS only K4 16 bit and K8 32 bit are valid 3 Range of n K1 K16 16 bit K1 K32 32 bit 4 See the specifications of each model for their range of use 5 Flag M1022 carry flag...

Page 259: ...If D is designated as KnY KnM and KnS only K4 16 bit and K8 32 bit are valid 3 Range of n K1 K16 16 bit K1 K32 32 bit 4 See the specifications of each model for their range of use 5 Flag M1022 carry f...

Page 260: ...nS only K4 16 bit and K8 32 bit are valid 3 Range of n K1 K16 16 bit K1 K32 32 bit 4 See the specifications of each model for their range of use 5 Flag M1022 carry flag 6 This instruction rotates the...

Page 261: ...KnS only K4 16 bit and K8 32 bit are valid 3 Range of n K1 K16 16 bit K1 K32 32 bit 4 See the specifications of each model for their range of use 5 Flag M1022 carry flag 6 This instruction rotates the...

Page 262: ...1 n2 n1 512 4 ES EX SS series MPU does not support E F index register modification 5 See the specifications of each model for their range of use 6 This instruction shifts the bit device of n1 bits des...

Page 263: ...S 1 n2 n1 512 4 ES EX SS series MPU does not support E F index register modification 5 See the specifications of each model for their range of use 6 This instruction shifts the bit device of n1 bits d...

Page 264: ...Provided the devices designated by S and D belong to Kn type the number of digits of Kn has to be the same 3 Range of n1 1 512 4 Range of n2 1 n1 5 See the specifications of each model for their range...

Page 265: ...or 2 digits 2 The figure below illustrates the right shift of the words in one scan n Y17 Y10 carry o Y27 Y20 Y17 Y10 p X27 X20 Y27 Y20 completed X0 WSFRP K1X20 K4 K2 X27 X26 X25 X24 Y27 Y26 Y25 Y24 Y...

Page 266: ...gory 2 Provided the devices designated by S and D belong to Kn type the number of digits of Kn has to be the same 3 Range of n1 1 512 4 Range of n2 1 n1 5 See the specifications of each model for thei...

Page 267: ...device designated by S will be written into the designated location in the first in first out stack data designated by the pointer When the content in the pointer exceeds n 1 this instruction will not...

Page 268: ...nt in the pointer minuses 1 and the content in the device designated by S will be written into the designated location in the first in first out stack data designated by the pointer When the content i...

Page 269: ...counter and 32 bit counter cannot use ZRST instruction together 7 In SA EH 16 bit counter and 32 bit counter can use ZRST instruction together 8 When D1 D2 only operands designated by D2 will be reset...

Page 270: ...6 Application Instructions API 00 49 DVP PLC Application Manual 6 58 RST M0 X0 RST T0 RST Y0 FMOV K0 D10 K5...

Page 271: ...dopts pulse execution instructions DECOP Program Example 1 1 When D is used as a bit device n 1 8 Errors will occur if n 0 or n 8 2 When n 8 the maximum points to decode is 28 256 points Please be awa...

Page 272: ...ower 8 bits of D20 The higher 8 bits of D20 are all 0 5 After the execution of this instruction is completed and X10 turns to Off the content that has been decoded and output keeps acting X10 DECOP D1...

Page 273: ...f no bits of S is 1 M1067 M1068 On and D1067 records the error code 0E1A hex 8 This instruction adopts pulse execution instructions ENCOP Program Example 1 1 When S is used as a bit device n 1 8 Error...

Page 274: ...l 6 62 4 After the execution of this instruction is completed and X10 turns to Off the content in D remains unchanged ENCOP D10 K3 D20 X0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 b15 b0 D20 1 6 5 4 3 2 1 0 0 0 0...

Page 275: ...s S Source device D Destination device for storing counted value Explanations 1 If S and D are used in device F only 16 bit instruction is applicable 2 See the specifications of each model for their r...

Page 276: ...ce D Device for storing check result n Bits specified for check Explanations 1 If S is used in device F only 16 bit instruction is applicable 2 Range of n 0 15 16 bit instruction 0 31 32 bit instructi...

Page 277: ...dels Operand S cannot designate KnX KnY KnM KnS 4 ES EX SS series MPU does not support E F index register modification 5 See the specifications of each model for their range of use 6 After the content...

Page 278: ...nstruction is used for enabling the annunciator Program Example If X3 On for more than 5 seconds annuniciator point S999 On Even X3 goes Off afterwards S999 will still keep On However T10 will be rese...

Page 279: ...r S900 S1023 in EH EH2 SV starts output M1048 will be On b M1049 valid monitoring When M1049 On D1049 will automatically display the annuciator of the smallest number in action 2 Application of annunc...

Page 280: ...kward switch X1 On and backward device Y1 On Y1 will go Off only when the device reaches the back position switch X3 5 Y2 will be On when any annunciator is enabled Whenever X4 is on 1 annunciator in...

Page 281: ...each model for their range of use 2 Flags M1020 zero flag M1021 borrow flag M1067 instruction operation error 3 This instruction performs a square root operation on S and stores the result in D 4 S c...

Page 282: ...ag M1021 On c If the conversion result is 0 zero flag M1020 On 5 When M1081 is On binary floating point value is converted into BIN integer digits after decimal point are left out At this time S of th...

Page 283: ...result will be D12 K32 767 and M1022 On 3 When X11 On D1 and D0 binary floating point value are converted into D21 and D20 BIN integer If D0 D1 H47C35000 the floating point value will be presented as...

Page 284: ...teger is converted to D203 and D202 binary floating point value 4The result of K615 K10 is stored in D301 and D300 binary floating point value 5 The result of binary decimal division D101 D100 D203 D2...

Page 285: ...ut output terminals will be updated after the program scans to END When the program starts to scan the status of the external input terminal is read and stored into the memory of the input point The o...

Page 286: ...to On or the END instruction is being executed the response time will be determined upon the contents in D1020 and D1021 b You can use MOV instruction in the program to move the time values to D1020...

Page 287: ...input terminals in the matrix 8 D1 designate the start device No of transistor output Y in the matrix scan 9 This instruction occupies continuous 8 input devices starting from S n external output term...

Page 288: ...14 M15 M16 M17 X42 X43 X44 X45 X46 X47 M21 M22 M23 M24 M25 M26 M27 24V 24G M10 the internal relay corresponding to the external switch Must connect to the diode of 0 1A 50V 1N4148 in series 3 See the...

Page 289: ...signated in S2 pluses 1 or minuses 1 DHSCS instruction will perform a comparison immediately When the present value in the high speed counter equals the comparative value designated in S1 device desig...

Page 290: ...nter will result in error d For SA SX SC series MPU when the counting reaches the target the interruption will occur X0 is the counter for counting input and the interruption No is I010 1 phase 2 inpu...

Page 291: ...ency of the two input points has to be smaller or equal 20KHz Provided the input is a 2 phas input signal the counting frequency will be approximately 4KHz The frequency of the input points X2 and X3...

Page 292: ...than 6 times as well When DHSCR instruction designates I interruption the designated high speed counter cannot be used in other DHSCS DHSCR and DHSZ instructions d The functions of X10 X11 high speed...

Page 293: ...comparative instruction DHSCS requires a high speed reponse output it is suggested that you use Y10 or Y11 for the output If you use other general devices for the output there will be delay of 1 scan...

Page 294: ...uency of up to 10KHz C241 C254 are hardware high speed counter HHSC There are four HHSC in EH EH2 SV series MPU HHSC0 3 The pulse input frequency of HHSC0 and HHSC1 can reach 200KHz and that of HHSC2...

Page 295: ...at the same time there will be some limitations DHSCS instruction will occupy 1 group of settings DHSCR 1 group of settings and DHSZ 2 groups of settings There three instructions cannot occupy 8 grou...

Page 296: ...4 times frequency Start signal S Interruption forbidden flag High speed comparative instruction Output reaches comparative value Output reaches comparative value for outputs Counting up down monitorin...

Page 297: ...nput point of HHSC1 start signal point S M1268 Disable the external control signal input point of HHSC2 reset signal point R M1269 Disable the external control signal input point of HHSC2 start signal...

Page 298: ...D1150 Table counting register for DHSZ multiple set values comparison mode D1151 Register for DHSZ instruction frequency control mode counting by table D1152 low word D1153 high word In frequency cont...

Page 299: ...rks for more details 7 The high speed counter inputs counting pulses from the corresponding external input terminals X0 X17 by inserting an interruption When the No of high speed counter designated in...

Page 300: ...ut point is On the present value in the corresponding high speed counter will be cleared to 0 and the output contact will be Off If you wish the reset to be executed immediately by the external output...

Page 301: ...of API 53 DHSCS for more details 4 D will occupy 3 consecutive devices 5 Flags M1150 M1333 see remarks of API 53 DHSCS for more details M1150 M1151 DHSZ executing multiple points comparison mode see P...

Page 302: ...in the counter K2 000 Y10 will be On DZCPP instruction is a pulse execution instruction and will only be executed once with Y10 being kept On 3 When the drive contact X10 Off Y10 Y12 will be reset to...

Page 303: ...parison section At the same time the index value displayed in D1150 will be 0 indicating that PLC performs the comparison based on the group 0 data 7 When the group 0 data in the table have been compa...

Page 304: ...register for DHSZ multiple set values comparison mode Program Example 4 1 Program Example 4 is only applicable to EH EH2 SV series MPU 2 DHSZ and DPLSY instructions are combined for frequency control...

Page 305: ...or the next group 7 M1153 is the flag for the completion of one execution of the table can be Off by the user Or when the next comparion cycle takes place and the group 0 data has been compared PLC wi...

Page 306: ...n of DHSZ frequency control mode is completed Special D Function D1151 Table counting register for DHSZ multiple set values comparison mode D1152 low word D1153 high word In frequency control mode DHS...

Page 307: ...K0 Y0 Frequency Number of pulses Output point 14 During the execution of DHSZ instruction do not modify the set values in the comparison table 15 The designated data will be arranged into the the abo...

Page 308: ...y of the counter can be set by D1022 5 The received number of pulses of the input terminal designated in S1 is calculated within the time in ms designated in S2 The result is stored in the register de...

Page 309: ...re enable SPD instruction Program Example 1 When X7 On D2 will calculate the high speed pulses input by X1 and stop the calculation automatically after 1 000ms The result will be stored in D0 2 When...

Page 310: ...0 30KHz Y1 0 30KHz Y10 77 100KHz Y11 77 100KHz Y0 1 200KHz Y2 1 200KHz Y0 0 200KHz Y2 0 200KHz Y4 0 200KHz Y6 0 200KHz 4 S2 designates the number of output pulses The 16 bit instruction can designate...

Page 311: ...13 The user has to reset the pulse output completed flags after the pulse output is completed 14 After PLSY instruction starts to be executed Y will start a pulse output Modifying S2 at this moment wi...

Page 312: ...en On Y0 output will be continuous with no limitation on the number of pulses When Off the number of output pulses from Y0 will be decided by S2 M1023 SA SX SC When On Y1 output will be continuous wit...

Page 313: ...H1 offset pulses enabled M1340 EH EH2 SV I110 interruption occurs after CH0 pulse output is completed M1341 EH EH2 SV I120 interruption after occurs CH1 pulse output is completed M1342 EH EH2 SV I130...

Page 314: ...EH2 SV High word of the current number of output pulses at CH1 D1375 EH2 SV Low word of the current number of output pulses at CH2 D1376 EH2 SV High word of the current number of output pulses at CH2...

Page 315: ...lses whenever X1 is triggered Y2 will output 1 000 pulses b When X triggers Y pulse output there should be an interval of at least one scan time between the end of Y pulse output and the next X trigge...

Page 316: ...cannot be the same as those of API 57 PLSY and API 59 PLSR 9 PWM instruction designates the pulse output width in S1 and pulse output period in S2 and outputs from output device D 10 For SA SX SC ser...

Page 317: ...SV CH0 pulse output pauses M1335 EH EH2 SV CH1 pulse output pauses M1336 EH EH2 SV CH0 pulse output has been sent M1337 EH EH2 SV CH1 pulse output has been sent M1520 EH2 SV CH2 pulse output pauses M...

Page 318: ...nt number of output pulses from CH3 3 Time unit settings for EH EH2 SV series MPU You cannot modify M1070 in the program D1371 D1372 D1373 and D1374 determine the time unit of the output pulses from C...

Page 319: ...on reponds to the acceleration deceleration demand from the step motor in case the step motor may crash 5 Range of S2 110 32 767 16 bit 110 2 147 483 647 32 bit If S2 is less than 110 the pulet output...

Page 320: ...series MPU when all the CH0 Y0 Y1 pulses have been sent M1029 will be On when all the CH1 Y2 Y3 pulses have been sent M1030 will be On when CH2 Y4 Y5 pulses have been sent M1036 will be On when CH3 Y6...

Page 321: ...133 Y0 of SA SX SC series MPU can output pulses at up to 50KHz See 2 11 for more details of special D and special M Range of output frequecies for all series MPU ES EX SS SA SX SC EH EH2 SV Range Y0 1...

Page 322: ...reach the maximum acceleration frequency within the acceleration deceleration time offered the instruction will automatically adjust the acceleration deceleration time and the maximum frequency 4 The...

Page 323: ...y instruction specifically for the initial status of step ladder control procedure to accommodate special auxiliary relay Program Example 1 1 Use of IST instruction M1000 IST X10 S20 S60 S X10 Individ...

Page 324: ...on Press auto start button at the zero point After a cycle of auto operation the operation will stops at the zero point Press auto stop button in the middle of the operation to stop the operation and...

Page 325: ...ST Y2 Y3 SET M1043 RST S12 Clipping released Descending stops Robot arm ascends to upper limit X4 On Right shifting stops Robot arm left shifting to left limit X1 On Enable zero return completed flag...

Page 326: ...LICATION MANUAL 7 42 Auto Operation Modes SFC S2 S20 S30 S31 M1044 X5 T0 Y1 SET Y0 S32 X4 X2 S50 Y1 Y2 S2 X1 M1041 X0 Y4 TMR T0 K30 S60 RST X5 Y4 TMR T2 K30 S70 T2 Y0 S80 X4 Y3 X1 S40 S41 X5 T1 SET Y0...

Page 327: ...S X4 SET S42 Y2 S42 S X3 SET S50 X3 Y1 S50 S X5 SET S60 RST Y4 TMR T2 S60 S SET S70 T2 K30 Y0 S70 S X4 SET S80 Y3 S80 S X1 X1 RET S2 Enter auto operation mode Clipping tightly Clipping released Robot...

Page 328: ...n when zero return is completed M1044 In continuous operation mode M1044 has to be On to more S2 to the next step M1045 All output resets are forbidden If the machine not at the zero point goes from m...

Page 329: ...6 In the 32 bit instruction S1 S2 D and n will designate 32 bit registers 7 For D the 16 bit counters and 32 bit counters in SA SX SC series MPU cannot be mixed when being used Program Example 1 When...

Page 330: ...5 S2 of DABSD instruction can designate high speed counters However when the present value in the high speed counter is compared with the target value the result cannot output immediately owing to th...

Page 331: ...10 390 M13 On 5 If the lower bound value upper bound value when C10 upper bound value 60 or upper bound value 140 M12 will be On Lower bound value Upper bound value Present value in C10 Output D100 40...

Page 332: ...the counter 7 The present value in S2 is compared with S1 S2 will be reset to 0 whenever a comparison is completed The current number of data processed in temporarily stored in S2 1 8 When n data have...

Page 333: ...7 Application Instructions API 50 99 DVP PLC APPLICATION MANUAL 7 49 X0 M10 M12 M11 M13 M14 M1029 15 10 15 15 30 30 40 25 1 1 1 0 0 0 2 3 4 C10 C11 Present value Present value...

Page 334: ...8 times in the program 5 The On time unit 100ms of the external button switch is stored in device No D 1 The On time unit second of the switch is multiplied by n and stored in D 6 Multiple setting Whe...

Page 335: ...M0 refers to the pulses generated from one scan period after the button switch of the teaching timer X10 is released 7 Use the set number of the DIP switch as the indirectly designated pointer and se...

Page 336: ...ing sequence 6 The No of timers designated by STMR instructions can be used only once Program Example 1 When X10 On STMR instruction will designate timer T0 and set the set value in T0 as 5 seconds 2...

Page 337: ...7 Application Instructions API 50 99 DVP PLC APPLICATION MANUAL 7 53 X10 STMR T10 K50 Y0 Y3 X10 Y1 Y2 5 sec 5 sec...

Page 338: ...f of D will switch 3 This instruction adopts pulse execution instructions ATLP Program Example 1 When X0 goes from Off to On Y0 will be On When X0 goes from Off to On for the second time Y0 will be Of...

Page 339: ...ou have to preset the scan time 6 The set value of start ramp signal is pre written in D10 and set value of end ramp signal in D11 When X10 On D10 increases towards D11 through n 100 scans the duratio...

Page 340: ...7 Application Instructions API 50 99 DVP PLC APPLICATION MANUAL 7 56 Remarks D12 for enabling On Off of M1026 X10 D11 D10 D12 M1029 Start signal M1026 ON X10 D11 D10 D12 M1029 Start signal M1026 OFF...

Page 341: ...del for their range of use 5 Flag M1029 SORT execution completed 6 The sorted result is stored in m1 m2 registers starting from the device designated in D Therefore if S and D designate the same regis...

Page 342: ...2 Data Column 1 2 3 4 5 Column Row Students No Physics English Math Chemistry 1 D50 4 D55 70 D60 60 D65 99 D70 50 2 D51 2 D56 55 D61 65 D66 54 D71 63 3 D52 1 D57 90 D62 75 D67 66 D72 79 4 D53 5 D58 95...

Page 343: ...and D2 do not support E F index register modification 4 This instruction designates 10 external input points representing decimal numbers 0 9 starting from S The 10 points are respectively connected t...

Page 344: ...5 301 Store the result in D0 9 999 is the maximum value allowed to stored in D0 Once the value exceeds 4 digits the highest digit will overflow 3 M12 On when from X2 is pressed to the other key is pr...

Page 345: ...This instruction designates 4 continuous external input points starting from S and 4 continuous external input points starting from D1 to construct a 16 key keyboard by a matrix scan The keyed in valu...

Page 346: ...l be Off M3 will be On and retained b When many keys are pressed at the same time the first key pressed has the priority F E D C B A M5 M4 M3 M2 M1 M0 4 Key output signal a When any of A F is pressed...

Page 347: ...yed in value correctly In this case please fix the scan time b If the scan period is too long the key may respond slowly In this case write this instruction into the time interruption subroutine to fi...

Page 348: ...hes The set values of DIP switches are stored in D2 n decides to read 1 or 2 4 digit DIP switches 5 There is no limitation on the times of using this instruction in the program However for SA series M...

Page 349: ...utive registers 2 Follow the methods below for the transistor scan output a When X10 On DSW instruction will be executed When X10 goes Off M10 will keep being On until the scan output completes a scan...

Page 350: ...oded into a 7 segment display for output The decoded results will be stored in Y10 Y17 If the content exceeds 4 bits the lower 4 bits are still used for the decoding X10 SEGD D10 K2Y10 Decoding table...

Page 351: ...ying 1 or 2 4 digit 7 segment display data and outputs of scanned signals Every digit carries a 7 segment display drive to convert the BCD codes into 7 segment display signal The drive also carries la...

Page 352: ...first group will display 1 2 3 4 and the second group will display 4 3 2 1 5 Wiring of the 7 segment display scan output COM Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y20 Y21 Y22 Y23 COM COM 1 2 4 8 100 101 102...

Page 353: ...put b3 b2 b1 b0 8 4 2 1 A B C D 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0...

Page 354: ...specifications of each model for their range of use 6 The output points designated by this instruction shall be transistor output 7 When using this instruction please fix the scan time or place this i...

Page 355: ...1 1 2 4 8 103 102 101 100 Y20 Y21 Y22 Y23 Y27 Y26 Y25 Y24 Digit indication LED X21 X20 X22 X23 Minus down Move to left Move to right 7 segment display for the 4 digit set value Add up The 4 switches a...

Page 356: ...See the specifications of each model for their range of use 3 Flag M1161 8 16 bit mode switch 4 If the execution of this instruction is connected to a 7 segment display the error message can be displ...

Page 357: ...on will output the ASCII codes in the 4 registers starting from S from the output devices in the order designated in D Program Example 1 1 Use API 76 ASC to convert A H into ASCII codes and store them...

Page 358: ...for 16 letters in sequence During the output if the drive contact goes Off the data output will stop after it is completed 3 When the string encounters 00H NUL the string output will finish The letter...

Page 359: ...2 16 bit and 32 bit for ES SA 0 48 for EH 0 254 for EH2 SV 0 499 3 Range of n a 16 bit for ES SA 1 49 m2 for EH 1 255 m2 for EH2 SV 1 500 m2 b 32 bit for ES SA 1 49 m2 2 for EH 1 255 m2 2 for EH2 SV 1...

Page 360: ...s MPU do not support word device D 6 Flag M1083 On when allowing interruptions during FROM TO instruction See remarks for more details 7 This instruction is for writing the data into the CR in special...

Page 361: ...M TO instruction all external or internal interruption subroutines will be forbidden The interruptions are allowed only after FROM TO instruction finishes its execution FROM TO instruction can also be...

Page 362: ...Set the OFFSET value of CH2 as 0mA K0LSB and GAIN value as 10mA K1 000LSB M1002 TO K1 K1 H18 K1 TO K1 K33 H0 K1 X0 TO K1 K22 K0 K1 TO K1 K28 K1000 K1 1 Write H18 to CR 1 of anlog output module No 1 a...

Page 363: ...ion module No 0 and see if it is DVP 04AD S H88 2 If D0 H88 set the input modes CH1 CH3 mode 0 CH2 CH4 mode 3 3 Set the average times in CH1 and CH2 from CR 2 and CR 3 as K32 4 Read the average of inp...

Page 364: ...Designate m as K0 if you do not need to send data Designate n as K0 if you do not need to receive data 7 There is no limitation on the times of using this instruction in the program but only one instr...

Page 365: ...00ms Set up sending request Receiving of data is completed the flag is reset Write in the data to be transmitted in advance Sending request pulses Receiving completed The flag is reset Program Example...

Page 366: ...will be divided into the higher 8 bits and lower 8 bits for data transmission M1001 M1161 D100 D120 K4 K7 RS X0 Sending data PLC external equipment STX D100L D100L D101L D101L ETX1 ETX2 Head code sou...

Page 367: ...or sent data PLC sends out message Register Data Explanation D100 low 3A H STX D100 high 0 30 H ADR 1 D101 low 1 31 H ADR 0 Address of AC motor drive ADR 1 0 D101 high 0 30 H CMD 1 D102 low 3 33 H CMD...

Page 368: ...9 high 0 30 H D130 low 0 30 H D130 high 0 30 H D131 low 0 30 H Content of address 2104 H D131 high 0 30 H D132 low 1 31 H D132 high 3 33 H D133 low 6 36 H Content of address 2105 H D133 high 0 30 H D1...

Page 369: ...000 0012 02 07 VFD B PLC PLC receives 01 06 2000 0012 02 07 Registers for sent data PLC sends out messages Register Data Explanation D100 low 01 H Address D101 low 06 H Function D102 low 20 H D103 low...

Page 370: ...ived when M1123 is On in the program You have to reset M1123 to Off when the process of received data is completed Set up automatically by the system reset by the user M1124 Waiting for receiving On w...

Page 371: ...rds of the data being received D1124 Definition of the start word STX See the table above for more details D1125 Definition of the first end word ETX1 of RS instruction See the table above for more de...

Page 372: ...e the start word and end word of the control string Therefore you can set up the start word and end word in D1124 D1126 or use the start word and end word defined by the PLC When you use M1126 M1130 a...

Page 373: ...END Lo LF 0AH The communication protocol is in Modbus ASCII mode i e every byte is composed of 2 ASCII characters For example 64Hex is 64 in ASCII composed by 6 36Hex and 4 34Hex Every hex 0 9 A F cor...

Page 374: ...U mode M1143 On START See the following explanation Address Communication address In 8 bit binary Function Function code In 8 bit binary DATA n 1 DATA 0 Data n 8 bit data CRC CHK Low CRC CHK High CRC...

Page 375: ...8 bit message until the operation of all the messages are completed The final value obtained in the CRC register is the CRC checksum The CRC checksum has to be placed interchangeably in the checksum...

Page 376: ...rsion completed M1127 MODRD RDST MODRW data converted to hex M1131 Transmission ready M1121 Sending request M1122 Receiving completed M1123 Waiting for receiving M1124 Communication status cleared M11...

Page 377: ...KnX D has to designate KnM when S designates KnM D has to designate KnY 3 See the specifications of each model for their range of use 4 This instruction sends the content in S to D in the form of oct...

Page 378: ...every bit of the hex data in S into ASCII codes and send them to the 8 high bits and 8 low bits of D n the converted number of bits 5 8 bit conversion mode When M1161 On the instruction converts every...

Page 379: ...5 D21 Low byte 3 2 1 0 7 6 D21 High byte 3 2 1 0 7 D22 Low byte 3 2 1 0 D22 High byte 3 2 1 D23 Llow byte 3 2 D23 High byte 3 D24 Low byte D24 High byte D25 Low byte D25 High byte D26 Low byte D26 Hig...

Page 380: ...41H D13 CDEFH 3 33H 7 37H B 42H 4 When n 2 the bit structure will be as 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 2 3 D10 0123 H 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 3 3 3 2 1 0 0 0 1 0 0 0 0 ASCII...

Page 381: ...3 2 1 0 D25 3 2 1 D26 3 2 D27 3 D28 D29 D30 D31 D32 D33 D34 D35 no change n D K9 K10 K11 K12 K13 K14 K15 K16 D20 B A 9 8 F E D C D21 4 B A 9 8 F E D D22 5 4 B A 9 8 F E D23 6 5 4 B A 9 8 F D24 7 6 5 4...

Page 382: ...to D every 4 bits as a group n the number of bits converted into ASCII codes 5 8 bit conversion mode When M1161 On the instruction is in 8 bit conversion mode Every bit of the hex data in S are conve...

Page 383: ...H AB45 H 11 CDE H F89A H B456 H 12 The undesignated parts in the registers in use are all 0 CDEF H 89AB H 4567 H 13 C H DEF8 H 9AB4 H 5670 H 14 CD H EF89 H AB45 H 6701 H 15 CDE H F89A H B456 H 7012 H...

Page 384: ...44H D C D 4 When n 1 16 D n D13 D12 D11 D10 1 C H 2 CD H 3 CDE H 4 CDEF H 5 C H DEF8 H 6 CD H EF89 H 7 CDE H F89A H 8 CDEF H 89AB H 9 C H DEF8 H 9AB4 H 10 CD H EF89 H AB45 H 11 CDE H F89A H B456 H 12...

Page 385: ...16 bit conversion mode When M1161 Off the instruction is in 16 bit conversion mode The instruction sums up n data 8 bits as a unit from the start register designated in S and stores the results in the...

Page 386: ...1161 On The 8 bit conversion mode 2 When X0 On the instruction will sum up 6 data stored in the register designated in D0 8 bits as a unit n 6 indicates D0 D5 are designated and store the result in th...

Page 387: ...unction cards No 2 No 7 and converting the data into values 0 255 stored in D 5 If you are to set up the timer by the VR volume simply rotate the VR to modify the set time in the timer If you are to a...

Page 388: ...2 7 plusing 1 Therefore the 8 VR rotary switch volumes will be VR0 D100 VR1 D101 VR2 D102 VR7 D107 and be read to designated registers in order Remarks 1 VR refers to Variable Resister 2 The 2 points...

Page 389: ...ion cards No 2 No 7 and storing the data in D If the position of the VR falls in the middle of two scales VRSC will round up the value into an integer of 0 10 Program Example 1 When X0 On the scale of...

Page 390: ...s DABS DABSP 5 steps PULSE 16 bit 32 bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands D Device of the absolute value Explanations 1 See the specifications of each m...

Page 391: ...n the parameters are S3 S3 20 After all the parameters are set up PID instruction will start to be executed and the results will be stored in D D has to be the data register area without latched funct...

Page 392: ...0 when MV is bigger than 1 000 S3 6 has to be bigger or equal S3 7 otherwise the upper bound and lower bound will switch S3 7 Lower bound of output value MV 32 768 32 767 Ex if S3 7 is set as 1 000 th...

Page 393: ...2 inverse control E PV SV S3 5 6 The range that 32 bit error value E doesn t work 0 2 147 483 647 E the error of SV PV When S3 5 6 K0 the function will not be enabled e g when S3 5 6 is set as 5 MV of...

Page 394: ...on is different from a general PID instruction by the variable use of the differential value To avoid the flaw that the transient differential value is too big when a general PID instruction is execut...

Page 395: ...K0 K2 S3 In Diagram 1 S is differentiation referring to PV previous PV sampling time 1 S is integration referring to previous integral value error value sampling time G S refers to the device being co...

Page 396: ...below for how to adjust KP 100 refers to 100 i e the gain of the error is 1 KP 100 will decrease the error and KP 100 will increase the error f When you select the parameter exclusively for temperatur...

Page 397: ...d PV respectively and the results are as the figure below 1 5 1 0 5 0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 1 K 40 P K 20 P K 10 P SV 1 K 5 P Time sec Step 2 From the figure we can see that when KP 40...

Page 398: ...he system requires a gradual control Therefore the system will be overloaded or out of control if the process progresses too fast Suggested solution Solution 1 Longer sampling time Solution 2 Using de...

Page 399: ...the pressure control system PID instruction for close loop control Explanation Since the speed and pressure control systems are not interrelated we have to structure a open loop for speed control firs...

Page 400: ...for the temperature control Purpose Using auto tuning to calculate the most suitable parameters for PID temperature control Explanation You may not be familiar with the temperature environment for the...

Page 401: ...of auto tuning Auto tuning area S3 4 k3 PID control area S3 4 k4 Auto tuning area S3 4 k3 PID control area S3 4 k4 The experiment result of using the adjusted parameter exclusively for temperature con...

Page 402: ...118 approximately 20 minutes for the control Next we modify the target temperature from 80 C to 100 C and obtain the result below From the result above we can see that when the parameter is 100 C we...

Page 403: ...lt in RS 485 communication ports in Delta VFD drives except for VFD A series are all compatible with MODBUS communication format MODRD can be used for controlling communication read data of Delta driv...

Page 404: ...D1090 high 3 33 H CMD 0 Instruction code CMD 1 0 D1091 low 2 32 H D1091 high 1 31 H D1092 low 0 30 H D1092 high 1 31 H Starting data address D1093 low 0 30 H D1093 high 0 30 H D1094 low 0 30 H D1094...

Page 405: ...between PLC and VFD S series AC motor drives RTU Mode M1143 On MOV D1120 H87 M1002 SET M1120 MOV D1129 K100 M1127 RST M1127 receiving completed Set up communication protocol 9600 8 E 1 Retain communi...

Page 406: ...l trigger M1129 and send request to M1122 for reading the data again 4 M1140 will be On when data receiving error occurs The program will trigger M1140 and send request to M1122 for reading the data a...

Page 407: ...MODRD API 105 RDST and API 150 MODRW Function Code H03 cannot use rising edge contacts LDP ANDP ORP and falling edge contacts LDF ANDF ORF otherwise the data stores in the receiving registers will be...

Page 408: ...I mode RTU mode The built in RS 485 communication ports in Delta VFD drives except for VFD A series are all compatible with MODBUS communication format MODRD can be used for controlling communication...

Page 409: ...a sending messages Register DATA Explanation D1089 low 0 30 H ADR 1 D1089 high 1 31 H ADR 0 Address of AC motor drive ADR 1 0 D1090 low 0 30 H CMD 1 D1090 high 6 36 H CMD 0 Instruction code CMD 1 0 D1...

Page 410: ...94 low 12 H Data contents D1095 low 02 H CRC CHK Low D1096 low 07 H CRC CHK High Registers for received data responding messages Register DATA Explanation D1070 low 01 H Address D1071 low 06 H Functio...

Page 411: ...request Program Example 4 1 In the communication between PLC and VFD S series AC motor drive ASCII Mode M1143 Off retry when communication time out data receiving error and sending address error occur...

Page 412: ...ransmission request Set up communication instruction device address 01 data address H0100 data H1770 The received data are stored in D1070 D1085 in ASCII format Sending receiving of data is completed...

Page 413: ...A Controllers ES EX SS SA SX SC EH SV Bit Devices Word Devices Program Steps Type OP X Y M S K H KnX KnY KnM KnS T C D E F S1 S2 n STOP 7 steps PULSE 16 bit 32 bit ES EX SS SA SX SC EH SV ES EX SS SA...

Page 414: ...M1122 M1129 M1142 X0 Communication time out Retry Data receive error Retry handle received data Receiving completed Communication command setting Device address 0 Frequency 500Hz K1 indicated AC moto...

Page 415: ...3 H Checksum D1072 low 06 H Reply authorization correct 06H incorrect 07 H D1073 low 0 30 H D1074 low 0 30 H D1075 low 0 30 H D1076 low 1 31 H Communication address D1077 low 0 30 H D1078 low 5 35 H D...

Page 416: ...ack feedback from AC motor drive 11 bytes see VFD A user manual are stored in the low bytes of D1070 D1080 Q S B Uu Nn ABCD Feedback Explanation Data storage Q Start word Q 51H D1070 low S Checksum co...

Page 417: ...startup 1 DC braking startup b1 0 Forward running 1 Reverse running b0 0 Stop 1 Running ES series PLCs will store B in special auxiliary relay M1168 b0 M1175 b7 SA EH series PLCs will store B in hex i...

Page 418: ...instruction exclusively for Delta VFD A series AC motor drives and is used for reset when the AC motor drive operates abnormally 6 n instructed target n 1 AC motor drive at assigned address n 2 all c...

Page 419: ...divides its hex data area into higher 8 bits and lower 8 bits and performs LRC checksum operation on each bit The data will be sent to the higher 8 bits and lower 8 bits in D n the number of calculat...

Page 420: ...K 0 1 can be calculated by LRC instruction in 8 bit mode M1161 On M1000 LRC D101 K12 D113 LRC checksum 01 H 03 H 21 H 01 H 00 H 06 H 2C H Obtain 2 s complement D4H and store D 44H in the lower 8 bits...

Page 421: ...operation error will occur the instruction will not be executed M1067 M1068 On and D1067 will record the error code H 0E1A 4 In 16 bit conversion mode When M1161 Off S divides its hex data area into...

Page 422: ...ster DATA Explanation D100 low 01 H Address D101 low 06 H Function D102 low 20 H D103 low 00 H Data address D104 low 00 H D105 low 12 H Data content D106 low 02 H CRC CHK 0 D107 low 07 H CRC CHK 1 The...

Page 423: ...he higher bit Step 4 Check the value that shifts to the right If it is 0 store the new value from Step 3 into the CRC register otherwise Exclusive OR A001H and the CRC register and store the result in...

Page 424: ...n the low byte in D Every switch has a corresponding bit 5 When there is no digital function card inserted the error message C400 hex will appear in grammar check Program Example 1 There are l 8 DIP s...

Page 425: ...ge of use 3 The binary floating point values S1 and S2 are compared with each other The comparison result is stored in D 4 If S1 or S2 is an designated constant K or H the instruction will convert the...

Page 426: ...cifications of each model for their range of use 3 S is compared with S1 and S2 and the result is stored in D 4 If S1 or S2 is andesignated constant K or H the instruction will convert the constant in...

Page 427: ...in floating point FX XX 2 See the specifications of each model for their range of use 3 This instruction is able to enter floating point values directly in S 4 When the instruction is executed the co...

Page 428: ...range of use 2 Flags M1020 zero flag M1021 borrow flag M1022 carry flag 3 Radian degree 180 4 If the absolute value of the result maximum floating point available the carry flag M1022 On 5 If the abso...

Page 429: ...range of use 2 Flags M1020 zero flag M1021 borrow flag M1022 carry flag 3 Degree radian 180 4 If the absolute value of the result maximum floating point available the carry flag M1022 On 5 If the abso...

Page 430: ...s it in the register designated by D 4 PLC conducts floating point operation in binary format DEBCD instruction is exclusively for converting floating points from binary to decimal 5 If the absolute v...

Page 431: ...ecimal floating point real numbers 9 999 9 999 Range of exponants 41 35 Range of PLC decimal floating points 1 175 10 41 3 402 10 35 6 If the result 0 the zero flag M1020 On Program Example 1 When X1...

Page 432: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 30 Remarks For floating point operations see 5 3 Handling of Numeric Values...

Page 433: ...nated constant K or H the instruction will convert the constant into a binary floating point value before the operation 5 S1 and S2 can designate the same register In this case if the continuous execu...

Page 434: ...t system 4 If S1 or S2 is an designated constant K or H the instruction will convert the constant into a binary floating point value before the operation 5 S1 and S2 can designate the same register In...

Page 435: ...point system 4 If S1 or S2 is an designated constant K or H the instruction will convert the constant into a binary floating point value before the operation 5 S1 and S2 can designate the same regist...

Page 436: ...y D The division is conducted in binary floating point system 4 If S1 or S2 is an designated constant K or H the instruction will convert the constant into a binary floating point value before the ope...

Page 437: ...D registers the data should be 32 bit and the operation should be performed in floating point system Therefore S should be converted into a floating point value 5 The content in D eS e 2 71828 S desig...

Page 438: ...isters the data should be 32 bit and the operation should be performed in floating point system Therefore S should be converted into a floating point value 5 eD S The content in D lnS S designated sou...

Page 439: ...isters the data should be 32 bit and the operation should be performed in floating point system Therefore S1 and S2 should be converted into floating point values 5 S1 D S2 D LogS1 S2 D Example Assume...

Page 440: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 38 For floating point operations see 5 3 Handling of Numeric Values...

Page 441: ...ration is performed in floating point system 5 If S is an designated constant K or H the instruction will convert the constant into a binary floating point value before the operation 6 If the result o...

Page 442: ...in S2 When designating D registers the data should be 32 bit and the operation should be performed in floating point system Therefore S1 and S2 should be converted into floating point values Example...

Page 443: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 41 For floating point operations see 5 3 Handling of Numeric Values...

Page 444: ...to BIN integer and stored in the register designated by D The decimal of BIN integer is left out 4 This instruction is the inverse operation of API 49 FLT instruction 5 If the converstion result 0 the...

Page 445: ...e 180 5 When M1018 On the program will be in angle mode and the range of angle should be 0 angle 360 6 If the result On M1020 On 7 The SIN value obtained by S is calculated and stored in the register...

Page 446: ...ing point D41 D40 RAD D51 D50 SIN binary floating point binary floating point binary floating point binary floating point Program Example 3 When M1018 On the program is in angle mode When X0 On use th...

Page 447: ...ram will be in angle mode and the range of angle should be 0 angle 360 6 If the result On M1020 On 7 The COS value obtained by S is calculated and stored in the register designated by D The figure bel...

Page 448: ...plication Manual 8 46 store the binary floating point result in D11 D10 0 angle 360 M1002 SET M1018 X0 DCOS D0 D10 D 1 D 0 D11 D 10 angle value COS value binary floating point Remarks For floating poi...

Page 449: ...ian mode and the RAD value angle 180 5 When M1018 On the program will be in angle mode and the range of angle should be 0 angle 360 6 If the result On M1020 On 7 The TAN value obtained by S is calcula...

Page 450: ...plication Manual 8 48 store the binary floating point result in D11 D10 0 angle 360 M1002 SET M1018 X0 DTAN D0 D10 D 1 D 0 D 11 D 10 angle value TAN value binary floating point Remarks For floating po...

Page 451: ...use 2 Flag M1020 zero flag 3 ASIN value sin 1 The figure below offers the relation between the entered sin value and the result S Entered data sine value R ASIN value radian R S 2 2 0 1 0 1 0 4 The d...

Page 452: ...f use 2 Flag M1020 zero flag 3 ACOS value cos 1 The figure below offers the relation between the entered cos value and the result S Entered data cosine value R ACOS value radian R S 2 0 1 0 1 0 4 The...

Page 453: ...ting point D ATAN value Explanations 1 See the specifications of each model for their range of use 2 Flag M1020 zero flag 3 ATAN value tan 1 The figure below offers the relation between the entered ta...

Page 454: ...each model for their range of use 2 Flags M1020 zero flag M1021 borrow flag M1022 carry flag 3 SINH value es e s 2 The result is stored in D Program Example 1 When X0 On obtain the SINH value of bina...

Page 455: ...f each model for their range of use 2 Flags M1020 zero flag M1021 borrow flag M1022 carry flag 3 COSH value es e s 2 The result is stored in D Program Example 1 When X0 On obtain the COSH value of bin...

Page 456: ...each model for their range of use 2 Flags M1020 zero flag M1021 borrow flag M1022 carry flag 3 TANH value es e s es e s The result is stored in D Program Example 1 When X0 On obtain the TANH value of...

Page 457: ...d the program after DELAY in every scan period will execute delay outputs according to the delay time designated by the user Program Example When X0 goes from Off to On and generates an external inter...

Page 458: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 56 or relay itself See 2 3 for more information...

Page 459: ...arameters for the system Do not occupy them 6 Pulse output devices D Y M S 7 When being executed GPWM instruction designates S1 and S2 and that pulses output will be from device D 8 When S1 0 there wi...

Page 460: ...struction will not be executed If S3 K200 S3 will adopt K200 S3 will occupy 7 consecutive devices 4 See the specifications of each model for their range of use 5 Settings of parameter S3 1 bit0 0 C bi...

Page 461: ...er function PV currently measured value previous PV 2 b2 1 Slow heating environment b3 1 General heating environment b4 1 Fast heating environment 1 b0 temperature unit b1 filter function b2 b5 heatin...

Page 462: ...can be modified during the control 4 Example 1 control diagram Fuzzy Controller FTC SV D10 D22 MV Y0 D11 PV e PT Module GPWM Program Temperature Sensor Output D22 MV of FTC instruction is the input D2...

Page 463: ...of the target temperature Example 2 Due to that the temperature once exceeds the target temperature we modify the heating environment into fast heating environment D13 K16 The results are shown in the...

Page 464: ...ime has been shortened as 37 minutes Therefore we find out that modifying the sampling time can speed up the time for reaching the target temperature Example 4 To see if we can reach the target temper...

Page 465: ...2 consecutive output devices when in use D 0 is the open contact and D 1 is the close contact 3 This instruction only supports EH2 SV and does not support EH 4 The unit of time 0 1 second When the sc...

Page 466: ...ous position was at 4 seconds the valve shall be closed Y0 Off Y1 On for 2 seconds moving the valve to the position of 2 seconds 3 Phase 3 Change the position of the valve and D0 K30 Due to that the p...

Page 467: ...he valve is at the position of 0 second before moving on to the next step 2 Phase 2 When T0 On allow D0 K40 to start is action Open the valve Y0 On Y1 Off for 4 seconds moving the valve to the positio...

Page 468: ...s applicable 2 See the specifications of each model for their range of use 3 As 16 bit instruction the contents in the 8 high bytes and 8 low bytes are swapped 4 As 32 bit instruction the 8 high bytes...

Page 469: ...explanations below 6 SA SX SC EH EH2 SV uses this instruction to read the data in file registers and store them into data registers 7 SA SX SC offers 1 600 16 bit file registers 8 m and n of SA SX SC...

Page 470: ...ta registers and write them into file registers 7 SA SX SC offers 1 600 16 bit file registers 8 m and n of SA SX SC do not suppot E and F index register modification 9 EH EH2 SV offers 10 000 16 bit f...

Page 471: ...r or data register exceed their range 6 In PLC program only API 148 MEMR and API 149 MEMW can be used to read or write the file register See 2 8 3 for more information on file registers 7 File registe...

Page 472: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 70 MEMO...

Page 473: ...drive or DVP PLC to write many data Only these function codes are available currently other function codes are still not executable See program examples for more information 7 S3 Device address of da...

Page 474: ...7 If the device address is illegal to a designated communication device the communication device will respond with an error message and PLC will store the error code in D1130 and M1141 On For example...

Page 475: ...gh 0 30 H Content of address 2100H PLC automatically convert ASCII codes to numerals and store the numeral in D1296 H0100 D5 Low 1 31 H D5 High 7 37 H D6 Low 6 36 H D6 High 6 36 H Content of address 2...

Page 476: ...D9 Low 0B H D10 Low B8 H Content of address 2103H PLC automatically convert ASCII codes to numerals and store the numeral in D1299 H0BB8 D11 Low 00 H D12 Low 00 H Content of address 2104H PLC automat...

Page 477: ...0 K1 Address of communi cation device K1 Function code K6 write 1 word datum Data address H2000 Register for storing the data Data length word SET X0 M1122 Set up sending request Process of received d...

Page 478: ...1256 Low 01 H Address D1257 Low 06 H Function D1258 Low 20 H D1259 Low 00 H Data Address D1260 Low 00 H D1261 Low 12 H Data content The content of register D50 H12 D1262 Low 02 H CRC CHK Low D1263 Low...

Page 479: ...ata sent back from AC motor drive is correct M1140 and M1141 will be reset H87 MOV M1002 D1120 SET M1120 K100 MOV D1129 M1127 RST M1127 M1143 X10 Set up communication protocol 9600 8 E 1 Retain commun...

Page 480: ...D1072 Low 2 32 H D1072 High 0 30 H D1073 Low 0 30 H D1073 High 0 30 H Data Address D1074 Low 0 30 H D1074 High 0 30 H D1075 Low 0 30 H D1075 High 2 32 H Number of Registers D1076 Low C 43 H LRC CHK 1...

Page 481: ...time out M1130 User system defined STX ETX M1131 On when MODRD MODWR MODRW is converting data to hex M1140 MODRD MODWR MODRW data receiving error M1141 MODRD MODWR MODRW parameter error M1142 VFD A ha...

Page 482: ...truction is for detecting the time span of output signals from X10 X17 the valid frequency range is 1 1KHz When M1169 On the instruction will detect the time span of the continuous rising edge and fal...

Page 483: ...ruption of the timer is disabled and the calculated time will be assigned to special D designated by RTMD 5 With API 153 RTMD RTMU can measure the execution time of I interruption service subroutine w...

Page 484: ...program 2 Due to the lower priority of the interruption enabled by RTMU when RTMU is enabled other high speed pulse input counting or high speed pulse output may result in failure to trigger the timer...

Page 485: ...EX SS SA SX SC EH SV Operands S1 Lower bound of the random number S2 Upper bound of the random number D The random number produced Explanations 1 S1 S2 K0 S1 S2 K32 767 2 See the specifications of ea...

Page 486: ...ck function 6 S will occupy 3 consecutive devices S S 1 and S 2 S and S 1 are connected to the absolute position bit 0 bit 1 on the servo for data transmitting S 2 is connected to Servo for transmitti...

Page 487: ...d in the present value registers D1337 D1336 of CH0 pulse in EH MPU At the same time the timer T10 is enabled and starts to count for 5 seconds If the reading of the absolute position is not completed...

Page 488: ...ishi MR H2 A see remarks of API 159 DRVA instruction CR 8 SG 10 reset Ex Mitsubishi MR J2 A 5 Flags explanation M1010 For EH EH2 SV series MPU When M1010 is On CH0 Y0 Y1 and CH1 Y2 Y3 will output puls...

Page 489: ...API 157 PLSV API 158 DRVI API 159 DRVA The present value increases or decreases according to the corresponding rotation direction D1337 is for high word D1336 is for low word 2 For EH EH2 SV series M...

Page 490: ...ration time has to be longer than 10ms The time shorter than 10ms or longer than 10 000ms will be output by 10ms The default setting in EH EH2 SV series MPU is 100ms For SC series MPU the time has to...

Page 491: ...0 100 000Hz If the designated speed is slower than 100Hz the zero return will operate at 100Hz and when the designated speed is faster than 100KHz the zero return will operate at 100KHz 5 S2 is the de...

Page 492: ...return is completed the PLC can send the reset signal to the servo drive and the signal will last for approximately 20ms After 20ms the reset signal will return to Off again b Output devices for reset...

Page 493: ...en the pulse output is completed M1102 and M1103 will be enabled f Due to that ZRN DZRN instruction cannot locate the position of DOG the zero return can only be done towards a single direction In the...

Page 494: ...from Off to On will therefore become the trigger of acceleration converting to deceleration The On time of DOG has to be longer than 10us otherwise the signal may be regarded as useless interference l...

Page 495: ...evice EH series MPU can designate Y0 and Y2 and EH2 SV series MPU can designate Y0 Y2 Y4 and Y6 5 The operation of D2 corresponds to the or of S When S is D2 will be On when S is D2 will be Off 6 PLSV...

Page 496: ...rections 5 S2 is the designated pulse output frequency For EH EH2 SV series MPU the 16 bit instruction can designate its range 10 32 767Hz The range designated by 32 bit instruction is 10 200 000Hz Fo...

Page 497: ...put frequency is smaller than 10Hz the output will be operated at 10Hz 14 D1343 D1353 is for setting up the time of the first acceleartion segment and last deceleration segment of CH0 CH1 The accelera...

Page 498: ...signating the traveling distance starting from the current position by signs also known as a relative driving method 3 000 3 000 0 Current position F0 the first acceleration segment The last decelerat...

Page 499: ...mediately without deceleration when the pulse output instruction is disabled M1335 Y11 pulse output stops immediately without deceleration when the pulse output instruction is disabled 4 Special regis...

Page 500: ...SV phase setting of CH0 Y0 Y1 D1220 determines the phase by the last two bits other bits are invalid 1 K0 Y0 output 2 K1 Y0 Y1 AB phase output A ahead of B 3 K2 Y0 Y1 AB phase output B ahead of A 4 K3...

Page 501: ...SV high word of the current number of output pulses from CH2 D1377 For EH2 SV low word of the current number of output pulses from CH3 D1378 For EH2 SV high word of the current number of output pulse...

Page 502: ...S2 is the designated pulse output frequency For EH EH2 SV series MPU the 16 bit instruction can designate its range 10 32 767Hz The range designated by 32 bit instruction is 10 200 000Hz For SC series...

Page 503: ...in EH EH2 SV series MPU is larger than 200KHz the output will be operated at 200KHz When the absolute value of the input frequency is smaller than 10Hz the output will be operated at 10Hz 15 D1343 D1...

Page 504: ...sition control Designating the traveling distance starting from the zero point 0 also known as a absolute driving method 3 000 3 000 0 Zero point F0 the first acceleration segment The last deceleratio...

Page 505: ...deceleration time till it reaches end frequency and stop the pulse output M1335 corresponds to Y11 output and applies the same rule 3 See remarks of DDRVI instruction for more details on the flags 4 W...

Page 506: ...DO4 DO1 DO2 DO3 DO4 SRDY ZSPD HOME TPOS 220VAC 24 27 28 DO5 DO5 ALARM OZ COM PLS 41 47 SIGN 37 PU HI VDD 17 35 DC24V 24V CN1 VDD COM DI 1 DI 5 DI 6 DI 7 DI 8 17 11 9 33 32 31 30 COM 45 DVP12SC11T DVP1...

Page 507: ...e output Forward backward direction Note a When detecting an absolute position by using DABSR instruction the parameter setting of a Mitsubishi MR J2 A servo drive that connects to Delta EH series PLC...

Page 508: ...ction c Explanations on the Y0 Y1 pulses from CH0 and Y2 Y3 pulses from CH1 Voltage range DC5V DC24V Current range 10mA 100mA Output pulse frequency Y0 Y2 at 200KHz Y1 Y3 at 10KHz 8 Settings of pulse...

Page 509: ...oning Zero return completed flag Zero return completed flag Reset zero point return completed flag Reset forward positioning completed flag Reset backward positioning completed flag Drive zero return...

Page 510: ...ve positioning instruction to execute a JOG operation when Y1 On in the direction Number of output pulses in di rection Output point for reverse signals Number of output pulses in direction Output poi...

Page 511: ...compared with the present values of hour minute and second starting from S The comparison result is stored in D 5 S is the hour of the current time K0 K23 in RTC S 1 is the minute K0 K59 and S 2 is th...

Page 512: ...nd S2 The comparsion result is stored in D 6 S1 S1 1 S1 2 The hour minute and second of the lower bound of the time for comparison 7 S2 S2 1 S2 2 The hour minute and second ond of the upper bound of t...

Page 513: ...the hour minute and second of the register designated in D 5 If S1 and S2 exceed their ranges the program will regard this as an operation error and the instruction will not be executed M1067 and M10...

Page 514: ...inute and second of the register designated in D 5 If S1 and S2 exceed their ranges the program will regard this as an operation error and the instruction will not be executed M1067 and M1068 will be...

Page 515: ...ails 4 The built in RTC in EH EH2 SV SA SX SC series MPU offers 7 data year week month day hour minute second stored in D1319 D1313 TRD instruction is for program designers to read the current data in...

Page 516: ...Hour 0 23 D1316 Day 1 31 D1317 Month 1 12 D1318 Week 1 7 D1319 Year 0 99 2 digit year in A D 2 How to correct RTC There are 2 ways to correct the built in RTC a By a specific instruction See API 167...

Page 517: ...xecuted the new set time will be written in the RTC built in PLC immediately Therefore please be noted that the new set time has to match the current time then when the instruction is executed 6 If S...

Page 518: ...the second will be automatically reset to 0 and the minute hand will remain at its location When the second hand locates at 30 59 the second will be automatically reset to 0 and the minute hand will i...

Page 519: ...K0 K3 599 unit second 6 This instruction times the time and when the time reaches the set time in hour D2 will be On This function allows the user to time the operation of the machine or conduct main...

Page 520: ...32 bit instruction when X0 On Y10 will be On and the timing will start When the timing reaches 40 000 hours Y0 will be On D1 and D0 will record the current time measured in hour and D2 will record th...

Page 521: ...applicable 2 See the specifications of each model for their range of use 3 This instruction converts the BIN value in the device designated in S into Gray code and stores the value in D 4 See the rang...

Page 522: ...e Gray code in the device designated in S into BIN value and stores the value in D 4 This instruction converts the content in Gray code in the absolute position encoder connected at the PLC input term...

Page 523: ...ating point values in register D their functions are the same as API 120 EADD 6 S1 and S2 can designate the same register In this case if the continuous execution type instruction is in use and during...

Page 524: ...ons API 150 199 DVP PLC Application Manual 9 52 Remarks The functions of this instruction are in V6 6 of ES EX SS series V1 6 of SA SX series and V1 4 of SC series DADDR instruction supports EH2 SV se...

Page 525: ...es the floating point values in register D their functions are the same as API 121 ESUB 6 S1 and S2 can designate the same register In this case if the continuous execution type instruction is in use...

Page 526: ...ons API 150 199 DVP PLC Application Manual 9 54 Remarks The functions of this instruction are in V6 6 of ES EX SS series V1 6 of SA SX series and V1 4 of SC series DADDR instruction supports EH2 SV se...

Page 527: ...he floating point values in register D their functions are the same as API 122 EMUL 6 S1 and S2 can designate the same register In this case if the continuous execution type instruction is in use and...

Page 528: ...ons API 150 199 DVP PLC Application Manual 9 56 Remarks The functions of this instruction are in V6 6 of ES EX SS series V1 6 of SA SX series and V1 4 of SC series DADDR instruction supports EH2 SV se...

Page 529: ...When S1 and S2 stores the floating point values in register D their functions are the same as API 123 EDIV 6 If S2 is 0 the program will regard it as an operation error and the instruction will not b...

Page 530: ...ons API 150 199 DVP PLC Application Manual 9 58 Remarks The functions of this instruction are in V6 6 of ES EX SS series V1 6 of SA SX series and V1 4 of SC series DADDR instruction supports EH2 SV se...

Page 531: ...d S2 perform matrix AND operation according to the array length n The result is stored in D 6 Operation rule of matix AND The result will be 1 if both two bits are 1 otherwise the result will be 0 Pro...

Page 532: ...t displacement and rotation in a matrix operation The bit number decreases from left to right see the figure below 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0...

Page 533: ...of each model for their range of use 5 The two matrix sources S1 and S2 perform matrix OR operation according to the array length n The result is stored in D 6 Operation rule of matrix OR The result w...

Page 534: ...ach model for their range of use 5 The two matrix sources S1 and S2 perform matrix XOR operation according to the array length n The result is stored in D 6 Operation rule of matrix XOR The result wil...

Page 535: ...each model for their range of use 5 The two matrix sources S1 and S2 perform matrix XNR operation according to the array length n The result is stored in D 6 Operation rule of matrix XNR The result w...

Page 536: ...nX KnY KnM and KnS D designates KnY KnM and KnS 3 SA SX SC can designate n 4 EH EH2 SV can designate n 4 4 See the specifications of each model for their range of use 5 S performs an inverse matrix op...

Page 537: ...the matrix bit search flag will turn On M1091 1 When the comparison progresses to the last bit the matrix search end flag M1089 will turn On and the No where the comparison is completed is stored in D...

Page 538: ...1 0 1 0 1 0 b47 b0 MCMP b47 b0 0 0 1 1 1 0 pointer Remarks Flags explanations Flags Function M1088 Matrix comparison flag Comparing between equivalent values M1088 1 or different values M1088 0 M1089...

Page 539: ...it is On pointer D is cleared as 0 The instruction then reads the On Off status from the 0th bit of S to the matrix rotation displacement output carry flag M1095 Whenever finishing reading 1 bit the...

Page 540: ...ks Flag explanations Flags Function M1088 Matrix search end flag When the comparison reaches the last bit M1089 1 M1092 Matrix pointer error flag When the pointer Pr exceeds its range M1092 1 M1093 Ma...

Page 541: ...is On pointer D is cleared as 0 The instruction then writes the value in the matrix displacement input complement flag M1096 into the location starting from the 0th bit of S Whenever finishing writing...

Page 542: ...0 45 Before Execution After Execution pointer pointer Matrix displacement input complement flag Remarks Flag explanations Flags Function M1088 Matrix search end flag When the comparison reaches the la...

Page 543: ...ight M1097 1 displacement of matrix bits The empty bits derived from every displacement of 1 bit when left displacement b0 when right displacement b16n 1 is filled by the status of the complement flag...

Page 544: ...097 MBSP D0 D20 K3 1 b0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 b15 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0...

Page 545: ...ength n M1097 determines the left M1097 0 or right M1097 1 rotation of matrix bits The empty bits derived from every rotation of 1 bit when left rotation b0 when right rotation b16n 1 is filled by rot...

Page 546: ...registers D20 D22 The carry flag M1095 will be 0 X1 MBRP D0 D20 K3 M1097 Before Execution After right rotation M1097 0 1 b0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1...

Page 547: ...of use 5 Flags M1098 M1099 See remarks for more details 6 This instruction counts the number of bits which are 1 or 0 in S by array length n The result is stored in D 7 The instruction counts the numb...

Page 548: ...8 low word CH2 D1376 high word D1375 low word and CH3 D1378 high word D1377 low word will increase When in backward direction the present value will decrease 4 D can designate Y0 and Y4 When Y0 is des...

Page 549: ...0 0 27000 27000 0 55000 27000 27000 X Y 2 Steps a Set the four coordinates 0 0 27000 27000 0 55000 27000 27000 as the figure above Calculate the relative coordinates of the four points and obtain 2700...

Page 550: ...eration and last deceleration segment for the Y0 output of the 1st group X axis motion and Y2 of the Y axis motion for API 191 DPPMR and API 192 DPPMA D1343 Time settings of the first acceleration and...

Page 551: ...ord D1338 low word CH2 D1376 high word D1375 low word and CH3 D1378 high word D1377 low word will increase When in backward direction the present value will decrease 4 D can designate Y0 and Y4 When Y...

Page 552: ...tput Program Example 1 Draw a rhombus as the figure below 0 0 27000 27000 0 55000 27000 27000 X Y 2 Steps a Set the four coordinates 0 0 27000 27000 0 55000 27000 27000 as the figure above Place them...

Page 553: ...rection When in forward direction the pulse present value registers CH0 D1337 high word D1336 low word CH1 D1339 high word D1338 low word CH2 D1376 high word D1375 low word and CH3 D1378 high word D13...

Page 554: ...Draw four 90 arcs 8 When the direction signal is On the direction is positive When the direction signal is Off the direction is negative When S is set as K0 K2 the arcs will be clockwise see figure 5...

Page 555: ...on in the lower 16 bits of S can only be K0 K3 16 The settings of motion time in the high 16 bits of S can be slower than the the fastest suggested time but shall not be faster than the fastest sugges...

Page 556: ...until the fourth segment of arc is completed Program Example 2 1 Draw a tilted ellipse as the figure below Y X 0 0 26000 26000 34000 18000 8000 8000 2 Steps a Find the max and min coordinates on X and...

Page 557: ...D0 K1 D0 K2 D0 K4 M0 K1 D0 D0 M0 M1029 3 Motion explanation When PLC RUN and M0 On PLC will start the drawing of the first segment of the arc D0 will plus 1 whenever a segment of arc is completed and...

Page 558: ...word CH1 D1339 high word D1338 low word CH2 D1376 high word D1375 low word and CH3 D1378 high word D1377 low word the output direction will be positive and direction signals Y1 Y3 Y5 Y7 will be On Wh...

Page 559: ...Draw four 90 arcs 8 When the direction signal is On the direction is positive When the direction signal is Off the direction is negative When S is set as K0 K2 the arcs will be clockwise see figure 5...

Page 560: ...s of direction and resolution in the lower 16 bits of S can only be K0 K3 16 The settings of motion time in the high 16 bits of S can be slower than the the fastest suggested time but shall not be fas...

Page 561: ...to execute automatically The same motion will keep executing until the fourth segment of arc is completed Program Example 2 1 Draw a tilted ellipse as the figure below Y X 0 0 26000 26000 34000 18000...

Page 562: ...D0 K2 D0 K4 M0 K1 D0 D0 M0 M1029 D1336 D1339 3 Motion explanation When PLC RUN and M0 On PLC will start the drawing of the first segment of the arc D0 will plus 1 whenever a segment of arc is complet...

Page 563: ...number of segments being executed Whenever the program scans to this instruction the instruction will automatically update the segment No that is currently being executed 6 D can only designate output...

Page 564: ...output will be forbidden M1335 When On CH1 Y2 pulse output will be forbidden M1520 When On CH2 Y4 pulse output will be forbidden M1521 When On CH3 Y6 pulse output will be forbidden M1336 CH0 Y0 pulse...

Page 565: ...ly 6 When S is neither 1 nor 0 HST instruction will not be executed Program Example 1 When X10 On M1015 will be On The high speed timer will start to time and record the present value in D1015 2 When...

Page 566: ...l 9 94 b When M1015 On the high speed timer D1015 will be enabled The minimum timing unit of D1015 100us c Timing range of D1015 K0 K32 767 When the timing reaches K32 767 the next timing will restart...

Page 567: ...e pulse output reaches the set target number of feedbacks in S2 the output will continue to operate by the frequency of the last segment until the feedback pulses reaches the target number c S1 can be...

Page 568: ...put according to the number of feedback pulses or external interruption signals 2 The execution Frequency Time Number C high speed counting target number of feedbacks or occurrence of external interru...

Page 569: ...M1000 M0 I 010 MOV K100 D1198 K300 D1343 K600 D1348 SET DMOV K0 D1336 M1534 RST C251 EI DCNT C251 K100000 DCLLM X0 K50000 K100000 Y0 FEND INC D0 IRET END MOV MOV 3 Assume the first execution result a...

Page 570: ...on time as 250ms and deceleration time as 550ms to complete the design Program Example 2 1 Assume the feedback of the encoder is an A B phase input and we adopt C251 timing we suggust you clear it to...

Page 571: ...quency Y0 stops output Time Number Estimated number of output pulses 50 500 Actual number of output pulses D1336 D1337 K50 560 6 Observe the result of the second execution a The actual output number 5...

Page 572: ...oop output input ratio of CH3 default K100 D1220 Phase setting of CH0 Y0 Y1 determined by the last 2 digits of D1220 other digits are invalid 1 K0 Y0 output 2 K1 Y0 Y1 AB phase output A ahead of B 3 K...

Page 573: ...t end frequency settings of CH0 default K200 D1352 Start end frequency settings of CH1 default K200 D1379 Start end frequency settings of CH2 default K200 D1380 Start end frequency settings of CH3 def...

Page 574: ...9 Application Instructions API 150 199 DVP PLC Application Manual 9 102 MEMO...

Page 575: ...ications of each model for their range of use 4 Operation equation in the instruction D S1 S2 1000 S3 Users have to obtain S2 and S3 decimals are rounded up into 16 bit integers by using the slope and...

Page 576: ...ruction is applicable for known slope and offset If slope and offset are unknown use SCLP instruction for the calculation 2 S2 has to be within the range 32 768 32 767 If S2 falls without the range us...

Page 577: ...767 S2 2 Maximum destination value 32 768 32 767 S2 3 Minimum destination value 32 768 32 767 4 Settings of S2 for 32 bit instruction S2 occupies 8 consecutive devices in 32 bit instruction Range Devi...

Page 578: ...curve is shown as the figure D 1 Min destination value Max Destination value Destination value Source value Max source value Min source value Program Example 1 1 Assume S1 500 max source value D0 3 0...

Page 579: ...0 D10 X0 MOV MOV MOV MOV K3000 K200 K30 K500 D0 D1 D2 D3 S1 500 D 0 30 500 Destination value Source value Program Example 3 1 Assume the source of S1 D100 F500 max source value D0 F3000 min source val...

Page 580: ...648 2 147 483 647 If the value falls without the bounds the bound value will be used for calculation 3 Range of floating point S1 for 32 bit instruction max source value S1 min source value following...

Page 581: ...the instruction is disabled 3 LD instruction is used for direct connection with BUS API No 16 bit instruction 32 bit instruction Continuity condition No continuity condition 215 LD DLD S1 S2 0 S1 S2...

Page 582: ...operation instruction used on series contacts API No 16 bit instruction 32 bit instruction Continuity condition No continuity condition 218 AND DAND S1 S2 0 S1 S2 0 219 AND DAND S1 S2 0 S1 S2 0 220 A...

Page 583: ...OR is an operation instruction used on parallel contacts API No 16 bit instruction 32 bit instruction Continuity condition No continuity condition 221 OR DOR S1 S2 0 S1 S2 0 222 OR DOR S1 S2 0 S1 S2...

Page 584: ...tion is enabled If the result is the continuity of the instruction is disabled 3 LD instruction is used for direct connection with BUS API No 16 bit instruction 32 bit instruction Continuity condition...

Page 585: ...is the continuity of the instruction is disabled 3 AND is a comparison instruction is used on series contacts API No 16 bit instruction 32 bit instruction Continuity condition No continuity condition...

Page 586: ...f the instruction is enabled If the result is the continuity of the instruction is disabled 3 OR is an comparison instruction used on parallel contacts API No 16 bit instruction 32 bit instruction Con...

Reviews: