Home
Programming Manual - Mitsubishi Electric
Contents
1. GSUB the program is run from the first step in accordance with the number of consecutive transitions of the corresponding program When subroutine called The program is run immediately from the first step After that at occurrence of a valid event the program is run continuously by the number of consecutive transitions of the corresponding program The subroutine called program is controlled in accordance with the executed task and number of consecutive transitions of the call source program End control As specified for END operation 11 4 11 SFC PARAMETERS Start control e Program run by NMI task When automatically started At occurrence of a valid event after PLC ready M2000 has turned from OFF to ON the program is run from the initial first step in accordance with the number of consecutive transitions of the corresponding program When not automatically started The program is started by the SFC start instruction SFCS from the PLC or by a subroutine call start GSUB made from within the SFC program e When started by the instruction At occurrence of a valid event after execution of the SFCS instruction the program is run from the initial first step in accordance with the number of consecutive transitions of the corresponding program e When subroutine started At occurrence of a valid event after execution of GSUB the program is
2. Sequence program Execution condition f Execution command Controls An interruption to the motion CPU PCPU is generated on the leading edge OFF ON of the ITP instruction execution command in the sequence program When an interruption is generated by the SCPU the motion CPU processes the active step of the SFC program to be executed at a PLC interrupt 1 This instruction is always valid in any of the real mode virtual mode and mode changing status Execution instruction ITP instruction IT to PCPU generated Event task executed 2 When the motion side is in the DI interrupt disable status event processing stands by until the El interrupt enable instruction is executed 12 5 12 HOW TO RUN SFC PROGRAM Errors At occurrence of the following error an SFC error is set to the SFC dedicated devices SFC error history devices 8000 to 8039 and SFC error detection M2039 and the SFC program s active step to be executed at a PLC interrupt is not processed lt SFC error history devices SFC 8056 Error SFC program number 1 M2039 nd ON detection signal 8057 Error type 1 8058 Error program number 1 8059 Error block number 1 8060 Error code indicated below 8061 Year month 2 Error 8062 Day hour 22 occurrence Minute 8063 time 22 second Error Factor 3 f Error Code NE Error Processing Corrective Action
3. A172SHCPUN 32 axes feature Code total 287k bytes SFC chart operation control transition yt Text total Program capacit bu 224k bytes 9 pacty operation control transition y Motion control program 52k bytes Approx 56k bytes servo program y PP yt Program storage Code e motion control program PCPU SRAM area Text PCPU SRAM Number of motion SFC programs 256 No 0 to 255 Number of motion SFC steps all programs Max approx 7 5k steps 1 step 1 transition varies with the number of operation control program transition program steps 16 bytes 16 characters Motion SFO program ARIS program SFC program name is used as SFC file name Motion Motion SFC chart size program Max 64k bytes Motion SFC chart comments included SFC program Motion SFC steps program Max 4094 steps Number of selective branches branch 255 Number of parallel branches branch 255 Parallel branch nesting Up to 4 levels Subroutine call nesting No restrictions Motion SFC chart comments Max 80 characters symbol Operation control program F FS Transition program G Number of operation Once execution type 4096 FO to F4095 4096 with F and FS combined control programs Scan execution type 4096 FSO to FS4095 F FSO to F FS4095 Number of transition programs 4096 GO to G4095 Code size program Max approx 64k bytes 32766 steps Text size program Max approx
4. lt Normal jump gt Ran i lt Coupling jump gt List representation corresponding to SFC chart symbols shown in 4 2 CALL Kn IFBm IFT1 SFT Gn CALL Fn JMP IFEm IFT2 SFT Gn CALL Fn JMP IFEm IFEm CALL Fn SFT Gn PABm PAT1 CALL Fn SET Gn JMP PAEm PAT2 CALL Fn SET Gn JMP PAEm PAEm CALL Fn CALL Fn JMP Pn CALL Fn JMP Pn e Steps and transitions connected in series are processed in order from top to bottom e Steps and transitions need not be lined up alternately When a transition is omitted unconditional shift transition processing is performed After the step or transition preceding a branch is executed the route whose transition condition enables first is executed e Selective branch destinations should always be started by transitions all of which must be Shift or WAIT Using Shift and WAIT together will cause a parallel branch e After the route branched by a selective branch has been processed execution shifts to a coupling point A coupling may be preceded and followed by either a step or a transition Multiple routes steps connected in parallel are executed simultaneously Each parallel branch destination may be started by either a step or transition Execution waits at the coupling point for executions of the routes branched by a parallel branch to be completed and shifts to the next when execu
5. IFBm IFT1 SFT Gn JMP IFEm IFT2 SFT Gn JMP IFEm IFEm When this transition is preceded by a motion control step execution does not wait for completion of the motion operation and shifts to the lower step when the transition condition Gn GO to G4095 enables or shifts to the right connected step when the condition does not enable When this transition is preceded by an operation control step execution shifts to the low step when the transition condition enables after operation has been performed or shifts to the right connected step when the condition does not enable When this transition is preceded by a subroutine call start step execution does not wait for completion of the subroutine operation and shifts to the lower step when the transition condition enables or shifts to the right connected step when the condition does not enable 4 SFC PROGRAMS Classification Transition WAIT Y N Symbol Code size byte When condition does not enable When Y condition enables List Representation IFBm IFT1 WAIT Gn JMP IFEm IFT2 SFT Gn JMP IFEm IFEm Function When this transition is preceded by a motion control step execution waits for completion of the motion operation and shifts to the lower step when the transition condition Gn GO to G4095 enables or shifts to the right connected step when the condition does not enable e When this transition is prece
6. 3 Functions a The data specified at S1 and the data specified at 82 are compared and the result is true if they are not equal b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before comparison is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which compares whether 0 and DO are unequal or not 0 DO 0 100 l gt True DO 20 5 OPERATION CONTROL PROGRAMS 5 11 3 Less than lt o o 61 lt 152 1 Usable data Usable Data Word device Constant 32 bit 64bit 16bit O PS DU ison integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K Bit device 2 Data to be set Data Type of Result S1 Data which will be compared Logical type true false 3 Functions a The result is true if the data specified at S1 is less than the data specified at S2 b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before comparison is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and it
7. END END For WAIT For other than WAIT Errors 1 The absence of the specified SFC program at a subroutine call start will result in an SFC program error 16005 and stop the call start source SFC program running at the point of error detection 2 If the called started SFC program is already starting at a subroutine call start an SFC program error 16006 will occur and the call start source SFC program running is stopped at the point of error detection 8 Calling starting its own program at a subroutine call start will result in an SFC program error 16110 and stop the call start source SFC program running at the point of error detection 4 When the subroutine to be called started at a subroutine call start in the SFC program 2 which was called started from the SFC program 1 is the SFC program 1 main program an SFC program error 16111 will occur and the call start source SFC program 2 running is stopped at the point of error detection 4 12 4 SFC PROGRAMS Instructions 1 There are no restrictions on the depth of subroutine call start nesting 2 For a subroutine start the start source SFC program continues processing if the start destination SFC program stops due to an error 3 For a subroutine call the call source SFC program stops running as soon as the call destination SFC program stops due to an error 45 4 Clear step Symbol Clear step gram name Stops the running SFC program of the specified progra
8. e 35 5 OPERATION CONTROL PROGRAMS 5 4 2 Addition F ES Number of Basic Steps AE S1 82 1 Usable data Usable Data Word device Constant 32 bit 64 bit 16 bit 32 bit 64 bit oaiculation Bit Sempan integer floating Coasting integer integer floating Supression conditional ditional ype type F KH K H L type K Bit device point timer type type point expression expression 2 Data to be set Data to be Set Data Type of Result S1 Augend data Data type of S1 or S2 Addend data S2 which is greater 3 Functions a The data specified at S2 is added to the data specified at S1 b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before operation is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which assigns the result of adding K123 and 0 to WO WO K123 0 123 wo 579 EM 7 0 456 b Program which assigns the result of adding 0F and 10 to DOL DOL 0F 10 3 2 1 0 12345789 Di DO poL 12468 lt 12468 189 The 64 bit floating point type data are used for addition and the result is converted into the 32 bit integer type and then assigned 5
9. type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result Data whose fractional portion S D f 3 Functions a The largest integer not greater than the data specified at S is found b If the S value is positive the absolute value will be smaller and if it is negative the absolute value will be greater c If S is an integer type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which finds the rounded down fractional portion value of DOF and assigns the result to 0F 0F FIX DOF 3 2 1 HO D3 D2 D DO oo 89 3 Ll a 889 4 b Program which finds the rounded down fractional portion value of DAF and assigns the result to 0F when D4F is a negative number HOF FIX D4F 5 OPERATION CONTROL PROGRAMS 5 6 13 Round up FUP F ES Number of Basic Steps AE FUP S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit ia Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result Data
10. 1 at the Shift Y N or WAIT Y N symbol When no free numbers are found after a search up to 4095 a search is made from 0 to the set G number 1 b When set to automatic numbering Searches for a free number forward or backward in the automatic numbering range starting with the automatically numbered G number 1 or 1 at the Shift Y N or WAIT Y N symbol The searching method is as in the automatic numbering setting 2 Automatic logical NOT program generation feature Automatically generates a program which logically negates the conditional expression block last block of the transition program set at Shift Y N or WAIT Y N The basic is as described below lt Set program conditional expression block gt Conditional expression bit conditional expression or comparison conditional expression lt Logically negated automatically generated program conditional expression block gt IConditional expression bit conditional expression or comparison conditional expression Examples are given below Set program conditional expression block Example 1 0 Bit device ON i Example 2 DO K100 Data register DO is not K100 lt Logically negated automatically generated program conditional expression block gt Example 1 MO Bit device OFF Example 2 1 DO K100 Data register DO is K100 e For the instructions usable in the conditional expressions o
11. 5 Program examples a Program which converts the data of DOL into a signed 64 bit floating point value and assigns the result to 0F 0F FLOAT DOL 3 H2 1 O Di DO es Y e K 10 1a KL HFFFFFFFF 5 OPERATION CONTROL PROGRAMS 5 7 6 Unsigned 64 bit floating point value conversion UFLOAT To Mo UFLOATG 1 Usable data Usable Data Word device Constant 16 bit 32 bit 64 bit 16 bit 32 bit 64 bit Calculation Bit integer integer type type L Compar ison floating Coasting integer integer floating expression conditional ditional xpression 1 PXpressio expression 2 Data to be set Data to be Set Data Type of Result S Data which will be converted into 64 bit floating point type unsigned 64 bit floating point value SR P 3 Functions a The data specified at S is converted into an unsigned 64 bit floating point value b If S is a 64 bit floating point type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5b Program examples a Program which converts the data of DOL into an unsigned 64 bit floating point value and assigns the result to 0F 0F UFLOAT DOL 53 2 O di 0 Di DO K4294967295 0 1 K 1L HFFFFFFFF Unsigned value is K4294967295 5 OPERATION CONTROL PROG
12. Changing the data stored in the specified device during program run allows changing the data used in that instruction e Constant Specify the numerical value used in an operation As the constant is set during program creation it cannot be changed during program run b Destination D 1 As the destination data after operation data is stored 2 To the destination data always set the device for storing the data 4 How to specify data There are the following six different data usable in each instruction Data usable in each instruction Numerical data Integer TS 16 bit integer type data 32 bit integer type data 64 bit floating point type data Bit data Batch bit data Logical data 5 OPERATION CONTROL PROGRAMS a 16 bit integer type data The 16 bit integer type data is 16 bit integral value data Word devices are used in increments of 1 point Data ranges are as indicted below PE Decimal Representation Hexadecimal Representation K 32768 to K32767 H0000 to HFFFF b 32 bit integer type data The 32 bit integer type data is 32 bit integral value data Word devices are used in increments of 2 points specified device number specified device number 1 Data ranges are as indicted below in m Decimal Representation Hexadecimal Representation K 2147483648L to K2147483647L H00000000L to HFFFFFFFFL c 64 bit floating point type data The 64 bit floating point type data
13. Descripti on Example Accessibility Usable Tasks Write Read Normal Event Input Output Internal relay Latch relay Link relay Annunciator Timer contact Timer coil Counter contact Counter coil O xJO x O OJO O O OJOJO O O O O JOJOJOJO O l Special M CAUTION Restrictions on write enabled bit devices 1 Write e g SET RST OUT to the same bit device 16 point increments cannot be performed from both the sequence ladder and motion SFC programs Write operation cannot be guaranteed Hence the side on which write is performed should be managed by the user Minimum increments are 16 points 2 Write to device X is allowed only within the input card non loaded range and to the free numbers outside the link range When the A172SHCPUN is used note that the following read response delay will occur from when the SET RST DOUT instruction is executed by the motion CPU Read CPU Response Delay Do not use for such applications where ON OFF judgment will be made by the motion CPU right after the SET RST DOUT instruction is executed Motion CPU 1 PLC scan PLC CPU None 3 When the I O control method is the direct system A172SHCPUN only performing write to device Y will not provide output to the output card in the PLC slot Use the refresh system to provide output to the PLC slot 4 Special M has predetermi
14. 5 141 2 Notequal 40 215 uiuere m e b E e ai e Ur iere eh eR 5 56 5 14 3 Lessstlidr taa otto ino dean nates 5 57 5 11 4 Less hano caual TO lt a ail el tei a det 5 58 Em More Mais dl dad 5 59 5 11 6 More than or equal to gt iie iiie lat 5 60 5 12 Motion Dedicated Functions CHGV CHGT sse enne nnne nennen 5 61 5 12 1 Speed change request CHGV sse entrent terree 5 61 5 12 2 Torque limit value change request CHGT sss 5 66 513 Other Instruction ee bep Eoi ep Eee a PE p de edi eai Edad 5 68 5 3 1 Eventtask enable S EI n gnat ve veut id e ees 5 68 519 2 Event task disable sD 2 2 dien Eie etd ede dee tea itat fog 5 69 5 13 3 NO operation NOP iine oda di 5 70 5 13 4 Block move BMOV sssssssssssssssssseseeee inneren en ennr intent etri nsns Virada iiaei raedaio 5 71 5 13 5 Time twat TIME Ier en ied pls e n ER E idt 5 74 5 14 Comment Statement esssssssssssssseseeeeee esee enter aa aaa inns en aE a nn ns sinis intense ns 5 76 6 TRANSITION PROGRAM O a a aaae a a e A aaae a a a a Aa aA 6 1 to 6 2 6 1 Transition Programs needed dt eedem eee xta bus eh gna se a XR aia 6 1 7 MOTION CONTROL PROGRAMS ssssssseeseeeenneen enne nc cra nn 7 1to 7 12 FAL Servo Instr ction bist ii IRR OP BUR a a a E aa a A e A i 7 1 7 2 Servo Motor Virtual Servo Motor Shaft Current Value Change ssssseeeee 7 5
15. Be careful not to set too many comments to avoid code area overflow Refer to 3 1 SFC Performance Specifications for the code area sizes 2 You cannot use in comment statements 5 OPERATION CONTROL PROGRAMS 5 OPERATION CONTROL PROGRAMS 5 1 Operation Control Programs 1 Operation control programs a In operation control programs you can set assignment operation express ions motion dedicated functions and bit device control commands b You can set multiple blocks in a single operation control program c There are no restrictions on the number of blocks that may be set in a single operation control program However one program is within 64k bytes d The maximum number of characters in one block is 128 e You cannot set transition conditions Transition conditions may be set only in transition programs An operation control program example is given below 1 block 0 D0 D1 D2 5 Assignment expression four arithmetic operations j WO F SIN H10F Assignment expression standard function CHGV K2 K10 Motion dedicated function irodam SET M100 M0 X0 Bit device control SET prog RST M10 X0 Bit device control RST DIN DO X0 Bit device control DIN NC Comment 2 Priorities of operators and functions Operators and functions have the following priorities Using parentheses allows an operation sequence to be specified freely Priority Item Operator Function Calculation
16. DOL 12222 4 12222 789 5 11 5 OPERATION CONTROL PROGRAMS 5 4 4 Multiplication F ES Number of Basic Steps xc up ss S1 82 1 Usable data Usable Data Word device Constant 32 bit pe E 16 bit 82 bit 64 bit Calculation Bit ison integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K Compar Bit device 2 Data to be set Data to be Set Data Type of Result S1 Multiplicand data Data type of S1 or S2 S2 Multiplier data which is greater 3 Functions a The data specified at S1 is multiplied by the data specified at S2 b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before operation is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which assigns the result of multiplying K123 by 0 to WO wo K123 0 123 WO 56088 a 5 0 456 b Program which assigns the result of multiplying 0F by 10 to DOL DOL 0F 10 3 42 di 40 NC Teger Bet aside Nia 1518532 047 The 64 bit floating point type data are used for multiplication and the result is converted into the 32 bit integer type and then assi
17. SFC Symbol OE E gt IFT1 IFT2 List Representation The selective coupling point and parallel JMP IFEm branch point can be the same IFEm Note that in an SFC chart this type is PABm displayed in order of a selective coupling PAT1 gt a parallel branch as shown on the left CALL Fn n this case you cannot set a pointer Pn between the selective coupling point JMP PAEm IFEm and the parallel branch point PAT2 PABm CALL Fn JMP PAEm PAEm The parallel coupling point and selective JMP PAEm branch point can be the same PAEm Note that in an SFC chart this type is IFBm displayed in order of a parallel coupling gt IFT1 a selective branch as shown on the left SET Gn Execution waits at the parallel coupling point and shifts to the selective branch JMP IFEm e In this case you cannot set a pointer Pn IFT2 between the parallel coupling point SET Gn PAEm and the selective branch point IFBm JMP IFEm IFEm The selective coupling point and selective JMP IFEm branch point can be the same IFEm Note that in an SFC chart this type is IFBm 1 displayed in order of a selective coupling IFT1 gt a selective branch as shown on the SET Gn left e In this case you cannot set a pointer Pn JMP IFEm 1 between the selective coupling point IFT2 IFEm and the selective branch point SET Gn
18. commana Signal Name Signal Direction Refresh Cycle Import Cycle Number Seventh error information in past Status Command 9000 Oldest error information 8008 Sixth error information in past 8016 Fifth error information in past SFC error history Aerei 8024 Fourth error information in past 8 errors O 8032 Third error information in past 64 points pisce 8040 Second error information in past 8048 First error information in past 8056 Latest error information 8064 User unusable 128 points 8191 Signal Name Error SFC program number 8 MOTION DEVICES 3 SFC error history devices The error information which occurred after power on of the CPU is stored as a history of up to eight past errors The latest error is stored in 8056 to 8063 All errors including the SFC control errors and the conventional minor major servo servo program and mode changing errors have been integrated into this history At error occurrence the SFC error detection signal M2039 is also set The error information is as indicated below Description SFC control errors 0 to 255 SFC program number in error 1 Independent of SFC program Conventional errors Error type 1 F FS 2 G 2 SFC chart 1 K or other not any of F FS G and SFC chart Minor major error Output module in real mode virtual mode SV22 only Minor maj
19. do not put your hands and fingers into their gaps Change consumables such as batteries periodically in accordance with the A173UHCPU A172SHCPUN A171SHCPUN user s manual or the A273UHCPU user s manual and the instruction manuals of the products in use Do not touch the IC leads and contactor contacts Do not place the controller and servo amplifiers on metal which may leak electricity or on wood plastic vinyl or the like charged with static electricity Do not test the equipment with a megger measure insulation resistance during inspection After changing the controller or servo amplifier make correct settings of the new unit After changing the controller or absolute position compatible motor zero the axes in either of the following methods Not doing so will cause position shifts 1 After writing the servo data to the PLC using the peripheral software switch power off then on again and perform zeroing operation 2 Using the backup function of the peripheral software load the before replacement backup data At the end of maintenance inspection check whether the absolute position detecting function detects positions properly Do not short recharge overheat burn or disassemble the batteries Since the electromagnetic capacitors emit gas if they fail keep your face away from the controller and servo amplifiers The electromagnetic capacitors and fans will deteriorate Change them periodically to prevent secondary damag
20. n is an integer 5 Program examples a Program which performs the TAN operation of DO and assigns the result to 0F 0F TAN DO 1 0 3 2 Al 0 57735026918963 lt DO 5 OPERATION CONTROL PROGRAMS 5 6 4 Arcsine ASIN F ES Number of Basic Steps AE ASIN S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit ia Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result S SIN value data on which SIN arcsine lcatintddintiios operation will be performed oP yp 3 Functions a SIN arcsine operation is performed on the SIN value data specified at S to find an angle b The SIN value specified at S must be within the range 1 0 to 1 0 c The operation result is in an angle degree unit d If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is outside the range 1 0 to 1 0 or 2 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which performs the SIN arcsine operation of DO and assigns the result to 0F 0F ASIN DO 1 0 3 2 1AL 1 LLL
21. uo fee ete enata hp tte pee pe Pale a ttl aaa a 15 1 15 2 SFC Parameters Error eects ioi e te e PE ina HE stetig pne trii ey dages 15 8 16 LIMIT SWITCH OUTPUT FUNCTION nennen nennen nnn nnn sitter nennen 16 1 to 16 8 UN EO TWIN P UC MEM UR MIDI M T 16 1 16 2 Limit Output Setting Data sssssssssssssssesse esee enne ennt ettet tn niensis tenen nennen neis 16 4 APRENDICES ania alive ei aie EE APP 1 to APP 8 APPENDIX 1 PROCESSING TIMES sse enne nnns enaiis raniad aas APP 1 Appendix 1 1 Operation Control Transition Instruction Processing Times usssssse APP 1 Appendix 1 2 Motion Operation Cycles msec 0ooccoccccnnccconococoncccnonnnonnnno nono nann cnn nn cnn enne APP 8 N 1 OVERVIEW 1 1 1 OVERVIEW Features This is a programming manual for the motion SFC compatible CPU operating system software packages SW3RN SV13 l SW3RN SV22__ designed to run SFC programs on the motion CPU side Conventionally a sequence of machine operations were controlled by the PLC CPU and motion program start and stop control was exercised by the motion CPU under the start and stop commands of the PLC Hence a delay or variation of one PLC scan occurred at the worst between when a command condition enabled until a command was issued limiting the applications where fast response and short tact time are pursued The motion SFC compatible CPU operating system allows m
22. 10 5 OPERATION CONTROL PROGRAMS 5 4 3 Subtraction Format Number of Basic Steps 1 Usable data Usable Data Word device Constant Bit device hi hi m TN Compar 32 bit 64 bit 16 bit 32 bit 64 bit Cal ulation Bit isn integer floating Coasting integer integer floating Supression conditional ditional type L point timer type type point expression expression YP type F K H K H L type K 2 Data to be set Data to be Set Data Type of Result S1 Minuend data Data type of S1 or S2 S2 Subtracted data which is greater 3 Functions a The data specified at S2 is subtracted from the data specified at S1 b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before operation is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which assigns the result of subtracting 0 from K123 to WO wo K123 0 123 WO 333 1 0 456 b Program which assigns the result of subtracting 10 from 0F to DOL DOL 0F 10 3 2 H 0 12345789 i L IL The 64 bit floating point type data are used for subtraction and the result is converted into the 32 bit integer type and then assigned Di DO
23. 12 Year Error month occurr Day ence hour time Minute second The PLC clock data D9025 D9026 D9027 are set BCD code year in its lower 2 digits 8 MOTION DEVICES 4 SFC error detection signal M2039 Refresh cycle UH 10ms SH PLC scan time The SFC error detection signal M2039 turns ON when any of the errors detected by the motion CPU occurs At error occurrence data are set to the error devices in the following procedure a The error code is set to the corresponding axis or error devices b The error detection signal of the corresponding axis or error is turned ON c Error information is set to the above SFC error history devices 8000 to 8063 d The SFC error detection signal M2039 is turned ON In the user program when the SFC error detection signal M2039 turns ON read the error history and then reset the SFC error detection signal M2039 After that at occurrence of a new error SFC error detection signal M2039 turns ON again Resetting the SFC error detection signal M2039 will not reset clear to zero the SFC error history devices 8000 to 8063 After power on they always manage the error history continuously e Set the clock data and clock data read request M9028 in the user program 8 2 Coasting Timer FT Motion Device Item A273UHCPU S3 A172SHCPUN Number of points 1 point FT Data size 32 bits po
24. 16 bit integral value conversion USHORT sse 5 38 5 7 3 Signed 32 bit integral value conversion LONG 5 39 5 7 4 Unsigned 32 bit integral value conversion ULONG Q cccccceecceseeceeeeeeeeeeseeeeeseeeeaeeeeeeesenees 5 40 5 7 5 Signed 64 bit floating point value conversion FLOAT cccccecsscceesesteeeseeseeeeeeaeeesssseeeeeeaas 5 41 5 7 6 Unsigned 64 bit floating point value conversion UFLOAT c ccccccsseeeeesteeeeeeneeeeseseeeesaaes 5 42 5 8 Bit Device Statuisesa viii alee iS 5 43 5 8 1 ON normally open contact None nennen nnns nnn enean 5 43 5 8 2 OFF normally closed contact sssssssssssssssssssseeeeee enne ener nnne nrnn nens 5 44 5 9 Bit Device Gorltrols reda ote et amt eas ettet etat ettet 5 45 5 91 DEVICE Sele SETS Coa et vetet umi Dm TS 5 45 5 9 2 Device reset S TS cine Gee Mt eee qu dp vy cen ev a 5 47 5 9 3 Device output DOUT miali e ennaa ie aaea aa a aa eiea taae aa aai aa baaa a aaaea adeat 5 49 5 9 4 Device input DIN iiu eet di 5 50 5 10 Eogical OperaliOns rr rt dida 5 51 5 10 1 Logical acknowledgement None essen enema 5 51 5 10 2 Logical negation Lerni seite aesti Ee Len peace E ed RE Rd e Dn idR d 5 52 5 10 3 Logica AND 5 Eid id Pe ERE Etape dit piae 5 53 SAO AM Logical Re C LEE 5 54 5 11 Comparison Operations ssssssssssssssssseseeeeee enne en nennen sins interrete ns 5 55 Sn Egua 2n ioc dtm 5 55
25. 4 A Preparations ir pei Step operation control step When active runs SET YO X0 X10 positioning the specified operation control program 7777 D100 W0 W100 p 1 HS Positionin Transition shift Indicates the condition to shift ready chec GO S control to the next step 1 1 777 Y0 M100 z Mm l ABS 1 Execution of KO eenn Step motion control step When active runs Axis 1 D100 positioning the specified servo program Spee d 10000 P MEET ositioning Transition WAIT Indicates the condition to compieuon GI o eeen shift control to the next step 0 Xo y PPS EROR END eee END Indicates a program end When started the above SFC program performs the following operations 1 The step FO is activated and the operation specified at the step FO is performed preparations for positioning A step in such an active state is called an active step 2 Whether the condition specified at the transition GO has enabled or not whether the positioning program can be started or not is checked When the condition enables the active step FO is deactivated and the next step KO is activated servo program KO is started 3 At the transition G1 whether the step KO has completed its operation servo program KO has completed positioning is checked When the operation is completed condition enables control transits to the next step 4 With the transition of an active step as described in above 1 to 3 con
26. 5 3 Subroutine call start step sss enne nentes nnns nennen 4 12 4 5 4 Clear SLOP RN 4 13 4 6 TRANSITIONS ys EE 4 15 4 7 Jump Polnmters sire mte etae Aa ettet eati emet e eqs 4 17 4 9 END AA A hei hen 4 17 4 9 Branches COUPlINQS imovicioi rene dote e dence aa edu ne deuda eo ede d E dia 4 18 4 931 Series trarisitiQn coca ett C tereti aded enti eo tuis 4 18 4 9 2 Selective branch selective coupling sssssssese eene 4 19 4 9 3 Parallel branch parallel coupling seen nennen 4 20 4 10 VIN TransitiOns 22 3 00 sin cient oie Sa te ei iu eai m ert ide a 4 22 Belly OE GC GOMMEMS Eidos 4 26 5 OPERATION CONTROL PROGRAMS cecceeeeeeeeeeeeeeeeeeeeeeeeeaeeesaaeeeeaeeseneeeseaeeeeaeeseaeeteaes 5 1 to 5 76 5 1 Operation Control Programs sssssssssssssssseeeeneenne enne en nennen sinn nr innere ener nnn internen nns 5 1 5 2 Device Descriptions ue item me t tl tpe MEL ae te ve gi exp x Me ree cid 5 5 5 3 Constant Description iia Eee bera pete item ied 5 7 5 4 Binary Operations ns ninini ae Nat eam d cee a i ee ead eh 5 8 5 41 SUBSUTUTON 2 55 e fe t tira 5 8 5 4 2 6 0 08 cdta eere teu dete t or eee rad 5 10 EP ECMECTV oj ftre pP 5 11 5 44 Multiplication icc oii ooi dit entia et T 5 12 at Haaa DIIT e ii ola leads 5 13 Ske Hemailnder O 5 14 5 5 Bit OpEratiONS a aioir ionnan nadadora iora aeia aa ra adaa nerada aaar aaao iaaiaee Raan dak 5 1
27. 64k bytes Number of blocks lines program Max 8192 blocks in the case of 4 steps minimum block Number of characters block line Max 128 characters comments included Number of operand block Max 64 Operand constants word devices and bit devices nesting block Up to 32 levels Indirect device designation nesting Up to 2 levels Separation of one block CR LF Descriptive Operation control program Calculation expression bit conditional expression expression Transition program Calculation expression bit conditional expression comparison conditional expression Comment statement Part after is regarded as a comment Motion control Number of servo programs 4096 KO to K4095 Program steps all programs 13312 14334 Max 13312 steps program pogram Rrogram stepski program for constant speed control speed change control Positioning points Approx 800 points axis Approx 400 points axis Number of multi executed programs Max 256 programs Number of multi active steps Max 256 steps all programs Normal task Executed in motion main cycle Fixed cycle 1 7ms 3 5ms 7 1ms 14 2ms 16 external interrupt points inputs from Al61 interrupt input module installed in motion slot Executed Event task Executed when 1 interrupt point is provided from PLC specifications PLC dedicated instruction ITP is executed Executed
28. 7 11 SFC PARAMETERS e The following operation example assumes that the END operation is continued Program parameters Automatically started e Executed task event 3 5ms Number of consecutive transitions 2 END operation Continued Fe E 1 After M2000 has turned from OFF to ON program is run at 3 5ms intervals first time following event task enable 2 Program is run in 3 5ms cycle second time 3 Program is run in 3 5ms e cycle third time 11 8 4 Program is run in 3 5ms cycle fourth time Jj 5 Program is run in 3 5ms cycle fifth time 6 Program is run in 3 5ms 4 cycle sixth time 12 HOW TO RUN SFC PROGRAM 12 HOW TO RUN SFC PROGRAM 12 1 How to Start SFC Program An SFC program runs while PLC ready M2000 is ON An SFC program may be started by any of the following three methods 1 Automatic start 2 Start from SFC program 3 Start from PLC Set the starting method in the program parameter per SFC program Refer to Chapter 11 SFC Parameters for parameter setting 12 1 1 Automatic start Operations An automatic start is made by turning PLC ready M2000 ON 12 1 2 Start from SFC program Operations A start is made by executing a subroutine call start step in the SFC program For details of the subroutine call start step refer to Chapter 4 SFC Programs 12 1 12 HOW TO RUN SFC PROGRAM 12 1 3 Start from PLC Sequence instr
29. ATAN S 1 Usable data Usable Data Word device Constant 92 bit 64 bit 16 bit 32 bit 64 bit lean Bit pru integer floating Coasting integer integer floating Supression conditional ditional vee ype F K H K H L type K Bit device point timer type type point expression expression 2 Data to be set Data to be Set Data Type of Result TAN value data on which TAN arctangent S Floating point type operation will be performed 3 Functions a TAN arccosine operation is performed on the TAN value data specified at S to find an angle b The operation result is in an angle degree unit c If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which performs the TAN arctangent operation of DOF and assigns the result to 0F 0F ATAN DOF 1 e DO Ae aan a 5 OPERATION CONTROL PROGRAMS 5 6 7 Square root SQRT F ES Number of Basic Steps L xo up as 1 SQRT S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit ia Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K 32 bit Bi
30. CCW 1807 AOOO AJA O A or more Absolute central point specified 8 ABS CN circular interpolation CW AO O OIAA o A G 71 Absolute central point specified 2 ABS MA circular in erpolation CCW AOOO AA A Incremental central point 7 to 22 amp INC specified circular interpolation JOJOJ O A A O A T cw 5 Incremental central point O INC va specified circular interpolation AJO OJOJAJA O A Ccw O Item which must be set A Item which is set when required 1 Only when reference axis speed is specified 2 B indicates a bit device 7 MOTION CONTROL PROGRAMS Table 7 2 Servo Instruction List Continued Positioning Data Common Circular OSC 1 Parameter block lolo oz o ol 0 o of 0 ofsded ofc 13 zu 213 8 25 2 58 298 22 5 2 36438 RIS T a5 x 5 2 gt e o Sl lolsi gt le le ls gt Kese cls el 2 oS e o 5 s gt al21 lt 9S Z lt lt 2 995 c 2 23 o o o gt oO D ol x o 58 Os E 5 2 o o z ES I e Elo S z gE Z E Sig TS a a E S 90 amp ES P i a 9 amp Sla t elt el olo wg 2 2 8 iz 9 a 2 l 2 3 quond 5
31. DOF EXP D4F Absolute value HOF ABS 4F DOF ABS D4F Round off 0F RND 4F DOF RND D4F Round down HOF FIX 4F DOF FIX D4F Round up 0F FUP 4F DOF FUP D4F BCD BIN conversion 0 BIN 1 DO BIN D1 HOL BIN 2L DOL BIN D2L BIN BCD conversion 0 BCD 1 DO BCD D1 0L BCD 2L DOL BCD D2L APP 2 APPENDICES Classification Instruction Conversion into 16 bit integer type signed Operation Expression 0 SHORT 2L A172SHCPUN A173UHCPU S1 Unit us A273UHCPU S3 Unit us 0 SHORT 4F DO SHORT D2L DO SHORT D4F USHORT Conversion into 16 bit integer type unsigned 0 USHORT 2L 0 USHORT 4F DO USHORT D2L DO USHORT D4F Conversion into 32 bit integer type signed 0L LONG 2 HOL LONG 4F DOL LONG D2 DOL LONG D4F Type conversion Conversion into 32 bit integer type unsigned 0L ULONG 2 0L ULONG 4F DOL ULONG D2 DOL ULONG D4F Conversion into 64 bit floating point type signed HOF FLOAT 4 HOF FLOAT 4L DOF FLOAT D4 DOF FLOAT D4L UFLOAT Conversion into 64 bit floating point type unsigned HOF UFLOAT 4 HOF UFLOAT 4L DOF UFLOAT D4 DOF UFLOAT D4L ON normally open contact
32. Data type of S converted into BIN data Integer type 3 Functions a The BCD data specified at S is converted into BIN data b If S is a 16 bit integer type the data range is 0 to 9999 c If S is a 32 bit integer type the data range is O to 99999999 4 Errors a An operation error will occur if 1 A value other than 0 to 9 is in any digit of S or 2 S is an indirectly specified device and its device number is outside the range 5b Program examples a Program which converts the BCD data of DO into BIN data and assigns the result to 40 0 BIN DO BIN 9999 BCD 9999 D1Beeem meme nnn nnn bO Di cate ua tent a bO 80 0 0 1 001 1 1 0 0 0 0 1 1 1 1 D0 1 00 1 1101001 1 00 11 11 0011 XN A Y XK v v A Thousands Hundreds Tens Units 5 OPERATION CONTROL PROGRAMS 5 6 15 BIN BCD conversion BCD Format Number of Basic Steps BCD S 1 Usable data Usable Data Word device Constant Compar Bit device 64 bit floating point type K Bit conditional expression 32 bit integer type K H L 16 bit integer type K H 64 bit floating point type F ison conditional expression Calculation expression 32 bit Coasting integer imer type L 2 Data to be set Data to be Set Data Type of Result S BIN data which will be Data type of S converted into BCD data Integer type 3 Func
33. Definition ITP was executed with PLC ITP was executed with PLC ITP was executed with PLC ready M2000 or PCPU ready ready M2000 or PCPU ready M2000 or PCPU M9074 OFF ready M9074 OFF ready M9074 OFF PLC ready OFF ITSP 12 6 13 SFC PROGRAM CONTROLLING OPERATIONS 13 SFC PROGRAM CONTROLLING OPERATIONS 13 1 Operation Performed at CPU Power Off or Key Reset When the CPU is powered off or a key reset operation is performed SFC programs run as described below 1 When the CPU is powered off or a key reset operation is performed SFC programs stop running 2 At CPU power off or key reset the contents of the motion registers 0 to 7999 are held Initialize them in SFC programs as required 3 After CPU power on or key reset processing SFC programs run as described below e The SFC programs set to start automatically are run from the beginning by turning PLC ready M2000 ON in the sequence program e The other SFC programs are also run from the beginning when started 13 2 Operation Performed when CPU Is Put in RUN Mode When the CPU is set to the RUN mode the following operation is performed 1 When PLC ready M2000 is ON e The SFC programs set to start automatically run from the initial step e The output states are governed by the PLC side STOP RUN time output mode parameter setting 2 When PLC ready M2000 is OFF e The SFC programs do not run until M2000 is turned O
34. GLIST GCODE FLIST FCODE classified by file types are created Also under the SFC sub folders initial files of the project file project name prj and an editing folder temp are created 1 Set the project name on the project management screen 2 The project name is restricted to 256 characters in length 3 The project path name project name are restricted to 256 characters in length Example C Usr project name 14 1 14 USER FILES 14 2 User File List A user file list is indicated below Indicates the file data stored in CPU memory mm Indicates a new file The other files are the same as in the conventional structure Project name folder Folder of user set project name Sub folders fixed Project file Project file name prj x1 pc Ue Information file of correspondence between SFC program numbers 0 to 255 and SFC program names SFC files SFC chart file SFC program name sfc x 256 pcs eet SFC chart edit information and comment information file of one SFC program SFC list file SFC program name txt x 256 pcs een Text file after conversion of SFC chart of one SFC program into list SFC code file SFC program name cod x 256 pcs mm File after conversion of list file of one SFC program into internal codes including comment information G list file g0000 bin to g4095 bin eet List file of transition programs GO to G4095 G code file 90000 cod to g409
35. IFBm 1 JMP IFEm 1 IFEm 1 The parallel coupling point and parallel JMP PAEm branch point can be the same PAEm Note that in an SFC chart this type is PABm 1 displayed in order of a parallel coupling gt PAT1 a parallel branch as shown on the left CALL Fn e Execution waits at the parallel coupling point and shifts to the parallel branch JMP PAEm 1 n this case you cannot set a pointer Pn PAT2 between the parallel coupling point CALL Fn PAEm and the parallel branch point PABm 1 JMP PAEm 1 PAEm 1 4 SFC PROGRAMS 44 SFC Program Names Set SFC program names to SFC program No 0 to No 255 individually Make this setting in the SFC program management window on the SFC program edit screen Set an SFC program name within 16 characters Specify this SFC program name for a subroutine call start step GSUB and clear step CLR SFC programs correspond to No 0 to No 255 and saved in a one program for one file format The preset SFC program name is used as the file name of the SFC program file for user file management Refer to Chapter 14 for full information 1 You can set an SFC program to any of No O to No 255 There are no specific programs which have special roles 2 You cannot use in the first character of an SFC program name 3 You cannot use Y in SFC program names 4 SFC PROGRAMS 45 Steps 4 5 1 Motion control step Symbal Motion control
36. Ln 0 to 2047 0 to 8191 Link relay 0 to 3FF 0 to 1FFF Annunciator 0 to 255 0 to 2047 Timer contact 0 to 255 0 to 2047 Timer coil 0 to 255 0 to 2047 Counter contact 0 to 255 0 to 1023 Counter coil 0 to 255 0 to 1023 Special relay 9000 to 9255 a When using the device in DIN or DOUT as batch bit data specify n as a multiple of 16 5 OPERATION CONTROL PROGRAMS 3 Indirect designation of device numbers In the above word bit device descriptions device numbers n can be specified indirectly a Using word device to specify device number n indirectly 1 You cannot use the word device with which the device number was specified indirectly 2 You can use the 16 and 32 bit integer type word devices for indirect designation You cannot use the 64 bit floating point type Description examples Good Example Bad Example D10 D D5 D 10L F D 4F b Using operation expression to specify device number indirectly 1 Device numbers can be specified indirectly by calculation expressions which use the following data and operators 16 bit integer type word device 32 bit integer type word device Usable data 16 bit integer type constant 32 bit integer type constant Addition Subtraction Multiplication Usable operators Division Remainder Sign inversion 2 You cann
37. RUN SFC PROGRAM 12 2 How to End SFC Program Operations 1 The SFC program is ended by executing END set in itself 2 The SFC program is stopped by turning OFF the PLC ready signal M2000 3 The program can be ended by the clear step For details of the clear step refer to the section of the clear step in Chapter 4 SFC Programs Points 1 Multiple ENDs can be set in a single SFC program 12 3 Clear Step in the SFC Program Executing the clear step set in the SFC program stops the run of the SFC program specified in the clear step 12 4 How to Change from One SFC Program to Another Use a subroutine start to stop the SFC program which is running and switch it to another SFC program SFC program changing example using subroutine start MAIN SUB Sa a END 125 How to Manage the Running Programs There are no specific information that indicates which SFC program is running Use a user program SFC program sequence program to manage the running program 124 12 HOW TO RUN SFC PROGRAM 126 SCPU to PCPU Interrupt Instruction Sequence instruction Executing the following instruction in a sequence program generates an interruption to the motion CPU e PCPU interrupt instruction ITP Usable Devices Error Flag Bit devices Bit devices Digit Designation Number of Steps
38. SFC program Started SFC program SFC error 8056 peed prog M2039 nm ON number number detection signal 8057 Error type 1 8058 Error program number 1 8059 Error block number 1 8060 Error code indicated below 8061 Year month 2 Error 8062 Day hour 22 occurrence Minute 8063 time 22 second Error Factor Definition At a start made by SFCS PLC ready M2000 or PCPU ready M9074 is OFF At an SFC program start made by SFCS the SFC program number specified is outside the range 0 to 255 Corrective Action Error Code Error Factor Corrective Action Provide ON of PLC ready M2000 and PCPU ready M9074 as start interlocks Check the SFC program number and correct it to a correct sequence program PLC ready OFF SFCS SFC program number error SFCS At an SFC program start made by No SFC program SFCS the specified SFC SFCS program does not exist At an SFC program start made by Double start error SFCS the same SFC program SFCS is already starting 12 3 The specified SFC program does not start Check the SFC program number and correct it to a correct sequence program or create an SFC program not yet created Double start should be managed on the user side Provide the user s starting signal as a start interlock in the sequence program 12 HOW TO
39. SV13 only P MR HDP01 60 senal absolute 4 bi synchronous encoder cable Ml E MR HSCBLOM Communication cable SER PEREI A270CDCBLO M MR HENC A270BDCBLOM ES Personal computer External input signals IBM PC AT lt FLS Upper limit switch RLS Lower limit switch Windows NT 98 inate STOP Stop signal x8 DOG CHANGE Proximity dog speed position change SSC I F card board TRA Tracking x1 A30CD PCF A30BD PCF Brake output Motion network cable cta MR H BN MR J2S B MR J2 B Note Tb Max 24 axes Servo amplifier max 32 axes sscneti 41 d2 d3 d8 i lt gt lt b Termination resistor Note The A173UHCPU may be used with 4 channels of SSCNET SSCNET2 i When using the SSC I F card board mmc A30CD PCF A30BD PCF connect it to SSCNETS i SSCNETA and connect the servo amplifiers to SSCNETA Servo amplifier max 8 axes 1 network i SSCNET1 to 3 LLL I In this case up to 24 axes of servo amplifiers can be connected 1 Use the A168B when using the bus connection type GOT 2 Using the A31TU E teaching unit provided with deadman switch requires the exclusively used A31TUCBLO3M connection cable between the CPU module and A31TU E connector The A31TU E will not operate at all if it is connected directly with the RS422 connector of the CPU without using the exclusively used cable Also after disconnecting the A31TU E fit the A31SHORTCON short circuit connector designed
40. SV13X Assembly For automatic IBM PC AT SW3RN SV22C SW3RN SV22A SW3RN SV22W machinery With teaching function SW3RNC GSVE Without teaching function 1 Type definition Operating System SW3RN SV13X Indicates motion SFC compatibility Programming software SW3RN_ GSV13P OS environment Windows NT 98 Device IBM PC AT 100 compatible Indicates conventional OS or motion SFC compatibility 2 OS type version display On the installation screen of the peripheral the OS type version of the connected CPU is displayed as shown below When the A273UHCPU S3 is used this data is also indicated by the CPU front LEDs by performing an indicator reset SFC compatible OS s v 1 3 w VER300AU l 3 U With teaching function WwW A273UH S3 32 axes 2 OS version Blank Without teaching function C or D A172SH 8 axes feature v Indi moti F mpatibility A or B A173UH 32 axes feature fidicatesimotion SEC compatibility Conventional OS S V 1 3 U VIER 0 0 ZU U A273UH 32 axes feature C or D A172SH 8 axes feature A or B A173UH 32 axes feature Indicates conventional OS 3 PERFORMANCE SPECIFICATIONS 3 PERFORMANCE SPECIFICATIONS 3 1 SFC Performance Specifications Table 3 1 SFC Performance Specification List A173UHCPU S1 A273UHCPU S3
41. Special relay M points 256 M9000 to M9255 Special register D points 256 D9000 to D9255 Stand Max 10 blocks vary with Max 10 blocks ard memory iun Sedo Manaos Number of extended file register blocks vary with memory cassette and vary with memory capacity setting Max 47 blocks vary with S1 memory capacity salting memory capacity setting Number of comment points Max 4032 64k bytes 1 point 16 bytes set in increments of 64 Number of extended comment points Note 2 Max 3968 63k bytes 1 point 16 bytes set in increments of 64 Self diagnostic function Detection of watchdog timer memory CPU I O battery and other errors Error time operation mode Selection of stop or continue Output mode switching at STOP RUN Selection of before STOP computation status re output default or after computation output Clock function Year month day hour minute second day of week automatic leap year judgment Note 1 The positioning dedicated device range varies with the OS Note 2 Extended comments are not stored into the internal memory of the CPU 3 PERFORMANCE SPECIFICATIONS 3 3 PCPU Performance Specifications 3 3 1 Motion control specifications Table 3 3 PCPU Performance Specification List Motion Control Specifications A273UHCPU S3 Item A172SHCPUN SEE 32 axis feature 8 axes 2 to 4 multi axes 8 independent axes Linear interpolation max 4 axes circular interpolat
42. a negative number when n specified is a word device b When conversion is made in program editing of the peripheral software an error will occur if 1 S to S n 1 is outside the device range 2 D to D n 1 is outside the device range 3 n is O or a negative number or 4 The 32 bit integer type constant PCPU memory absolute address specified specified at D or S is an odd number when n specified is a constant 5 OPERATION CONTROL PROGRAMS 5 Program examples a Program which batch transfers 5 words of data in devices starting with DO to 5 words of devices starting with 10 BMOV 10 D0 K5 10 12 DO 12 11 34 Batch transfer D1 34 12 56 D2 56 343 78 D3 78 14 90 D4 90 b Program which batch transfers 2048 words of data in devices starting with 0 to the data area of cam No 2 resolution 2048 BMOV N2 0 K2048 Cam data of cam No 2 Oth stroke ratio H0000 Batch 0 H0000 First stroke ratio H0005 transfer 1 H0005 Second stroke ratio H000A 4 2 H000A 2047th stroke ratio H0000 2047 H0000 5 OPERATION CONTROL PROGRAMS 5 13 5 Time to wait TIME F ES Number of Basic Steps TIME S 1 Usable data Usable Data Word device Constant 32 bit 64 bit 16 bit 32 bit 64 bit ies doen Bit pru integer floating Coasting integer integer floating Supression conditional ditional vee ype F K H K H L type
43. a subroutine running task as another task Example No 0 Main SFC program Normal task No 1 Subroutine Event task 3 5ms cycle 10 PROGRAMMING INSTRUCTIONS 10 PROGRAMMING INSTRUCTIONS 10 1 Task Definitions Points Note the following points when SET RST DOUT of the bit devices which are enabled for SET RST DOUT from a sequence program e g M devices is executed in an SFC program 1 The bit devices which are SET RST DOUT in an SFC program should not be SET RST OUT in a sequence program 2 Reversely the bit devices which are SET RST OUT in a sequence program should not be SET RST DOUT in an SFC program 3 The above exclusive control should be exercised for each bit device in increments of consecutive 16 points starting with the device number which begins with a multiple of 16 1 The user should predetermine how to use bit devices e g M112 to M127 SET RST executed on the SFC program side M128 to M143 SET RST executed on the sequence program side 2 Care should be taken since the first command device of each axis does not begin with a multiple of 16 10 2 SET RST Response Delays of Motion Dedicated Bit Devices When command devices among the following motion dedicated bit devices are SET RST in an SFC program there will be a delay in refresh time as indicated below There will also be a refresh delay when devices are SET RST in an SFC program and their results are used in the SFC program A172SHC
44. and NMI tasks Correct the SFC program or change the executed task setting of the SFC parameter to a normal task 16113 Executed task error The number of simultaneously The max number of simultaneously active steps exceeded 256 during active steps is 256 execution Reexamine the SFC program Simultaneously active step count excess 15 2 15 ERROR LISTS Table 15 3 SFC Program Run Errors 16200 to 16299 Error Error Factor Error Processin Code Name Definition J Corrective Action The servo program Kn specified The corresponding SFC Create the specified servo program 16200 No specified program Kn at the motion control step does not program being run exist stops The program Fn FSn specified at For the subroutine the operation control step does not called program the call exist source program being The program Gn specified at the run also stops transition does not exist No specified program Fn FSn 16202 No specified program Gn The SFC program specified at the No specified program clear step does not exist SFC No setting of operation The program Gn specified at the 16204 expression conditional transition does not have a expression conditional expression setting Internal code error in the operation 16205 Fn FSn program code error p program Fn FSn Internal code error in the transition 16206 Gn program code error program Gn 15 3 Cr
45. are no data to be set 3 Functions a The execution of an event task is enabled b This instruction is usable with a normal task only 4 Errors a An operation error will occur if 1 This instruction is used with other than a normal task 5 Program examples a Enables the execution of an event task EI 5 OPERATION CONTROL PROGRAMS 5 13 2 Event task disable DI Number of Basic Steps pf Ane v 1 Usable data Usable Data Bit device Word device Constant 32bit qoem integer 9 int Wbe L npe Coasting timer 16 bit integer type K H 32 bit integer type K H L 64 bit floating point type K Bit Compar Calculation expression ison conditional expression conditional expression 2 Data to be set There are no data to be set 3 Functions a The execution of an event task is disabled b If an external interrupt or PLC interrupt occurs after execution of the DI instruction the corresponding event task is executed once at the execution of the El instruction If two or more external interrupts or PLC interrupts occur during DI the corresponding event task is executed only once at the execution of the EI instruction c During DI a fixed cycle event task is not executed d The execution of an NMI task cannot be disabled e The DI status is established at power on or when a reset is made with the R
46. bit 64bit _ 16bit O PS DU ison integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K Bit device 2 Data to be set Data Type of Result S1 E Data which will be compared Logical type true false 3 Functions a The result is true if the data specified at S1 is greater than the data specified at S2 b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before comparison is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5b Program examples a Program which compares whether 0 is greater than DO or not 0 gt DO 0 400 gt DO 20 gt True 5 OPERATION CONTROL PROGRAMS 5 11 6 More than or equal to gt lo o S1 gt 82 1 Usable data Usable Data Bit device Word device Constant 32 bit 945i 16 bit 32 bit 64 bit j Bi ee integer floating Coasting integer integer floating Expression conditional ditional type L point timer type type point expression e piesci n type F K H K H L type K 2 Data to be set Data Type of Result S1 E Data which will be compared Logic
47. by the normal task is within the range and write it to the outside the range 1 to 30 CPU The set number of consecutive The initial value of 1 is Event task consecutive transitions of the SFC program used for control transition count error started by the event task is outside the range 1 to 10 The set number of consecutive NMI task consecutive transitions of the SFC program transition count error started by the NMI task is outside the range 1 to 10 Table 15 6 SFC Program Start Errors Error Code 17010 to 17019 Error Error Factor Error Processing Corrective Action Code Among the normal event and NMI The initial value Turn PLC ready M2000 OFF tasks more than one or none of normal task make correction and write a correct them has been set is used for control value to the CPU 17011 Executed task setting is Two or more fixed cycles of the illegal event event task have been set 15 8 16 LIMIT SWITCH OUTPUT FUNCTION 16 16 1 LIMIT SWITCH OUTPUT FUNCTION The limit switch output function is designed to output the ON OFF signal corresponding to the data range of the watch data set per output device You can set up to 32 points of output devices Operations 1 The limit switch output function provides an ON output to an output device while the watch data value is in the ON output region set with ON Value and OFF Value a The ON Value OFF Value and watch data value are hand
48. cable MR HSCBLOM erial absolute synchronous encoder x 1 RS422 B MR HENC SV22 only Communication cable External input signal A270CDCBL OM lt FLS Upper limit switch A270BDCBLOM lt RLS Lower limit switch T Personal computer STOP Stop signal IBM PC AT DOG CHANGE Proximity dog speed position change Windows NT 98 TRA Tracking x1 ESGNETS Brake output SSC I F card board Motion network cable A30CD PCF A30BD PCF eae di d2 d3 d8 O D Termination resistor al MR H BN MR J2S B MR J2 B Servo amplifier max 8 axes 1 Use the A168B when setting one or more PLC extension bases 2 The motion slots also accept PLC A1S I O modules The motion slots accept up to 256 I O points Actually the maximum points is 64 point modules 2 128 points The I O numbers of the I O modules loaded in the motion slots should be later than the I O numbers used with the PLC slots The motion slots accept one A1SI61 interrupt input module This module is designed for only event NMI input to the motion CPU and is irrelevant to PLC interrupt programs 2 SYSTEM CONFIGURATION 2 44 Software Package List Operating System Software Package Type Peripheral Programming Software For For For Device Package Type A172SHCPUN A173UHCPU S1 A273UHCPU S3 8 axes feature 32 axes feature 32 axes feature Application Remarks For conveyor IBM PC AT SW3RN SV13D SW3RN SV13B SW3RN
49. can set multiple blocks in a single transition program c There are no restrictions on the number of blocks that may be set in a single transition program Note that one program is within 64k bytes d The maximum number of characters in one block is 128 e You must set a transition condition in the last block of a transition program The transition program is repeated until the transition condition enables and when the transition condition has enabled it shifts to the next step The transition condition may be set only in the last block f As a special transition program you can create a program where only no operation NOP is set in one block Use this program when you want to proceed to the next step on completion of a servo program run and there are no special conditions to be set as interlocks For more information refer to 4 9 Branches Couplings A transition program example is given below 1 block 0 D0 D1 D2 5 Assignment expression four arithmetic operations W0 F SIN 10F Assignment expression standard function CHGV K2 K10 Motion dedicated function SET M100 M0 X0 Bit device control SET 1 program RST M10 D100 gt K10 Bit device control RST DIN DO X0 Bit device control DIN DO gt K100 Standby until transition condition enables y Comment Transition condition What can be set as a transition condition in the last block are bit conditional expressions comparison conditio
50. conversion is made d If S is a 32 bit integer type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 The S data is outside the range 2147483648 to 2147483647 or 2 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which converts the data of DO into a signed 32 bit integral value and assigns the result to 0L OL LONG DO H0 0 Cer x x HFFFFFFFF HFFFF 5 OPERATION CONTROL PROGRAMS 5 7 4 Unsigned 32 bit integral value conversion ULONG F ES Number of Basic Steps L xo up x95 ULONG S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit diesen Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result S Data which will be converted 32 bit integer type into unsigned 32 bit integral value SEYE 3 Functions a The data specified at S is converted into an unsigned 32 bit integral value b The data range of S is 0 to 4294967295 c When S is a 64 bit floating point type its fractional portion is rounded down before conversion is made d If S is a 32 bit integer type its value is returned u
51. data The bit data is the data where a contact coil or similar device is handled in increments of 1 bit It is used in device set SET and device reset RST Example SET MO n Bit data e Batch bit data The batch bit data is the data where bit data is handled in increments of 16 32 points It is used in device input DIN and device output DOUT As indicated below whether the bit data is handled in increments of 16 or 32 points is governed by the data type of the word device used as an input destination output source cer Increments of 16 Points Increments of 32 Points DIN 0 MO DIN 0L MO DOUT MO DO DOUT MO DOL Specified device number to Specified device number to specified device number 15 specified device number 31 MO to M15 in the above program MO to M31 in the above program Program example Used devices example example f Logical data The logical data is a value returned by a bit or comparison conditional expression and indicates whether the result is true or false Normally it is used in the conditional expression of a transition program In an operation control program the logical data is used in a bit conditional expression set to device set SET or device reset RST Example 1 SET MO X10 Es Logical data Bit data Example 2 RST M5 X10 M100 L Logical data Bit data Example 3 transition program DO K100 T ERST Logical data 5 4 5 OPERAT
52. etc Improper wiring can cause the servo motors to run away After wiring reinstall the protective covers such as terminal covers On the output side of the servo amplifier do not fit a power capacitor surge suppressor and radio noise filter FR BIF option Make correct connections on the output side terminals U V W Otherwise the servo motors will run abnormally Do not connect a commercial power supply to the servo motors directly Doing so can cause a failure NMI Mount the surge suppressing diode to the DC relay designed for control output signal such as a brake signal in correct orientation If it is mounted in incorrect orientation the signal may not be output due to a failure disabling the protective circuit Servo amplifier VIN 24VDC Control output N While power is on do not connect or disconnect the sonal module to module connection cables encoder cables and PLC extension cables A Securely tighten the cable connector fixing screws and fixing mechanisms Insecure fixing can cause removal during operation AN Do not bundle the power supply wires and cables 5 For test operation and adjustment N Before starting operation confirm and adjust the programs and parameters A failure to do so may cause some machines to make unexpected motions Never make extreme adjustment changes as they will make operations instable A Always zero the axes when using the absolute position syste
53. from the first step After that in the motion main cycle the program is run continuously by the number of consecutive transitions of the normal task The settings of executed task and number of consecutive transitions of the subroutine called program are invalid The normal task is used for control End control Start control Ends its own program The program is started when it is started again by the SFC start instruction made from within the SFC program GSUB subroutine call start e Program run by event task When automatically started At occurrence of a valid event after PLC ready M2000 has turned from OFF to ON the program is run from the initial first step in accordance with the number of consecutive transitions of the corresponding program from the PLC or by a When not automatically started The program is started by the SFC start instruction SFCS from the PLC or by a subroutine call start GSUB made from within the SFC program When started by the SFCS instruction At occurrence of a valid event after execution of the SFCS instruction the program is run from the initial first step in accordance with the number of consecutive transitions of the corresponding program When subroutine started At occurrence of a valid event after execution of
54. is IEEE formatted 64 bit floating point value data Word devices are used in increments of 4 points specified device number specified device number 1 specified device number 2 specified device number 3 1 The internal bit locations are as shown below 3 2 3 Specified device number 0 A rg V b63b62 lt b52bb1 s e I HI n n ne nn nnne b0 b51 to bO 52 bits Decimal field b62 to b52 11 bits Bias exponent field b63 1 bit Sign bit field 2 The represented value is as follows The bias value is H3FF 1 Sign bit field 1 0 decimal field 2 Bias exponent field bias value 3 Data ranges are as indicted below al Decimal Representation Hexadecimal Representation H0000000000000000 H0010000000000000 to H7FE1CCF385EBC89F H8000000000000000 H8010000000000000 to HFFE1CCF385EBC89F K 1 79E 308 to K 2 23E 308 Data range KO0 0 K2 23E 308 to K1 79E 308 5 OPERATION CONTROL PROGRAMS 4 A round off error may be produced in a 64 bit floating point type data operation Especially when using 64 bit floating point type data in a comparison operation note that a round off error may cause an intended operation Example In the following transition program the result of the comparison operation may not become true depending on the value of 200F due to a round off error 100F SQRT 200F 300F 1 OOF 100F 200F 300F d Bit
55. memory address specified at D or S is outside the SRAM range S to S n 1 is outside the device range D to D n 1 is outside the device range n is O or a negative number The device number which indirectly specifies S is illegal The S data is outside the range 0 to 2147483647 The specified axis number is outside the range The S data is outside the range of the data type of D The device number which indirectly specifies D is illegal 16320 Operation execution error The divisor is 0 16321 Remainder execution error xecution The device number which indirectly 16332 Device set SET e i error Device reset RST 16333 execution error Device set SET 16334 execution error Device reset RST 16335 execution error Device output DOUT 16336 PU execution error specifies D is illegal D is a device which is write disabled 15 4 executed in the normal task only Correct the program Correct the program so that cam data is that of the already registered cam No Correct the program to match n with the cam resolution Correct the program to specify the PCPU memory address with an even number Change n so that the block transfer range is within the device range Change n to a positive number Correct the program so that the device number which indirectly specifies S is proper Correct the program so that the S data is within
56. occurs and the current value change is not made 7 12 8 MOTION DEVICES 8 MOTION DEVICES The motion registers 0 to 8191 and coasting timer FT are available as motion CPU PCPU dedicated devices They can be used in operation control F FS programs or transition G programs They cannot be accessed directly from the PLC When using them on the PLC side assign them to the PLC devices 8 1 Motion Registers 0 to 8191 Motion Device A172SHCPUN A173UHCPU S1 A273UHCPU S3 Number of points 8192 points 0 to 8191 Data size 16 bits point Latched with the exception of SFC dedicated devices All points are cleared by latch clear operation Usable tasks Normal event NMI Motion register Latch Access Read and write enabled in whole range 1 Motion register list a Common to all Operating Systems Device Number Application Remarks User devices Cleared by latch clear 8000 points y Cleared at power on or key reset only H 66 points SFC dedicated devices 192 points Not cleared 126 points The motion registers cannot be set as indirectly specified devices of mechanical system programs 8 MOTION DEVICES Device 2 SFC dedicated devices 8000 to 8191 The SFC dedicated devices are indicated below The device s refresh cycle is indicated when the signal direction is status or its import cycle when the signal direction is
57. of the subroutine called program is the same as that of the call source program Hence this setting is invalid but it is recommended to make the same setting as the call source program 4 END operation Description Set the operation to be performed at execution of the END step to the program run by the event or NMI task This varies the specifications for the following items When Ended When Continued Control at Ends the run of its own program with the f Ends its own program MS execution event interrupt made this time Restarted at occurrence of the next valid event interrupt and run from the initial first step in accordance with the number of consecutive Started by the SFC start instruction SFCS from transitions of the corresponding program the PLC again or started by a subroutine call start Thereafter at occurrence of a valid event interrupt GSUB made from within the SFC program the program is controlled in accordance with the number of consecutive transitions of the corresponding program Restart after execution Restart after end by Started by the SFC start instruction SFCS from the PLC again or started by a subroutine call start clear step CLRI GSUB made from within the SFC program POINT The END operation of the subroutine called program is controlled as an end 11
58. regenerative brake resistors to incombustibles Mounting them directly or near combustibles can cause a fire If the controller or servo amplifier has failed switch power off on the power supply side of the servo amplifier A continuous flow of large current can cause a fire When using a regenerative brake resistor switch power off with an alarm signal A regenerative brake transistor failure or the like can overheat the regenerative brake resistor abnormally causing a fire Provide anti thermal measures such as flame retarding treatment for the control box inside surfaces where the servo amplifiers and regenerative brake resistors are installed and the wires used 3 For injury prevention To each terminal apply only the voltage specified in the A173UHCPU A172SHCPUN A171SHCPUN user s manual or the A273UHCPU user s manual and the instruction manuals of the products in use Not doing so can cause burst damage etc Ensure that the cables are connected to the correct terminals Wrong connection can cause burst damage etc Always make sure that polarity is correct Wrong connection can cause burst damage etc While power is on or for some time after power off do not touch the servo amplifier radiating fins regenerative brake resistors servo motors etc as they are hot and you may get burnt Switch power off before touching the servo motor shaft and the machine coupled there Not doing so can cause injury Stay away from t
59. specified 32 bit batch link relay B n read error Indirectly specified 16 bit batch annunciator F n read error Indirectly specified 32 bit batch annunciator F n read error Indirectly specified 16 bit batch timer contact TT n read error Indirectly specified 32 bit batch timer contact TT n read error Indirectly specified 16 bit batch timer coil TC n read error Indirectly specified 32 bit batch timer coil TC n read error Indirectly specified 16 bit batch counter contact CT n read error Indirectly specified 32 bit batch counter contact CT n read error Indirectly specified 16 bit batch counter coil CT n read error Indirectly specified 32 bit batch counter coil CC n read error Definition The indirectly specified device number is outside the range or is not a multiple of 16 15 7 Error Processing Corrective Action The block processing in Correct the program so that the execution is stopped indirectly specified device number and the next blockis X is proper executed 15 ERROR LISTS 15 2 SFC Parameter Errors Table 15 5 PLC Ready M2000 OFF gt 0N Errors 17000 to 17009 Error Error Factor f 7 y REDE Error Processing Corrective Action Code The normal task s consecutive The initial value of 3is Turn PLC ready M2000 OFF Normal task consecutive transition count of the SFC program used for control make correction to set the value transition count error started
60. starting the servo program continues processing Errors 1 The absence of the SFC program specified at the clear step will result in an SFC program error 16203 Instructions 1 When the SFC program specified at the clear step is not starting an error does not occur specifically and this step is ignored 2 If the SFC program running is stopped by the clear step the output is held 4 14 4 SFC PROGRAMS 46 Transitions You can describe conditional and operation expressions at transitions The operation expression described here is repeated until the transition condition enables as at the scan execution type operation step For the conditional operation expressions that can be described in transition conditions refer to Chapter 6 Transition Programs 1 Combinations with motion control steps a Motion control step shift Operations Kn Does not wait for the servo program Kn started at Gn the motion control step to complete its operation and shifts to the next step when the transition condition Gn enables b Motion control step WAIT Operations Waits for the servo program Kn started at the motion control step to complete its operation and shifts to the next step when the transition condition Gn enables e The operation completion condition of the servo program Kn is not needed in the transition condition Gn An error stop of the started servo program Kn at during a start is al
61. the range 0 to 2147483647 Correct the program so that the specified axis number is within the range Correct the program so that the S data is within the range of the data type of D Correct the program so that the device number which indirectly specifies D is proper Correct the program so that the divisor is other than 0 Correct the program so that the device number which indirectly specifies D is proper Correct the program to set a write enabled device at D 15 ERROR LISTS Table 15 4 Operation Control Transition Execution Errors 16300 to 16599 Continued Error Error Factor Code Name Definition Device input DIN 16337 execution error specifies D is illegal The S data is outside the signed 16 bit integral value range Signed 16 bit integral value conversion SHORT execution error The S data is outside the unsigned 16 bit integral value range Unsigned 16 bit integral value conversion USHORT execution error Signed 32 bit integral value conversion LONG execution error The S data is outside the signed 32 bit integral value range The S data is outside the unsigned 32 bit integral value range S is 90 180 n n is an integer Unsigned 32 bit integral value conversion ULONG execution error Tangent TAN execution error Arcsine ASIN execution error Arccosine ACOS execution error Square root SQRT execution error S is outside
62. this manual IV A Make the sequence function program capacity device capacity latch use range I O assignment and error detection time continued operation enable disable settings which meet the system applications Wrong setting can disable the protective functions Some devices used in programs are fixed in applications Use them under the conditions specified in this manual If communication stops due to a communication error or the like the input devices and data registers assigned to a link hold the data right before a communication stop Always use the error remedying interlock programs specified in the instruction manuals of the products in use For programs written for the special function modules always use the interlock programs specified in the instruction manuals of the special function modules 3 For transportation and installation Transport the products in the correct method which meets their weights Use the hanger of the servo motor to only transport the servo motor Do not use it to transport the servo motor which is being mounted to a machine Do not stack the products over the limit When transporting the controller or servo amplifier do not hold its wires and cables connected When transporting the servo motor do not hold its cables shaft and detector When transporting the controller or servo amplifier do not hold its front casing It may drop When transporting installing or removing the con
63. will be ignored d While the axis is returning in the speed control mode 1 Make a speed change to a positive speed to change the moving direction again 2 Turn ON the stop command to make a stop 3 A speed change is made in the opposite direction if a negative speed change is made again 4 Errors a An operation error will occur and a speed change will not be made if 1 The specified axis number at S1 is outside the range or 2 S2 is an indirectly specified device and its device number is outside the range b A minor error will occur and a speed change will not be made if 1 The axis specified at S1 is zeroing or 2 The axis specified at S1 is decelerating minor error 303 c A minor error will occur and the axis to be controlled at the speed limit value if 1 The absolute value of the speed specified at S2 is greater than the speed limit value Minor error 305 If during constant speed control the absolute value of a negative new speed is higher than the speed specified in the servo program return control is exercised at the speed specified in the program speed clamp control for a speed change during constant speed control At this time an error will not occur 5 OPERATION CONTROL PROGRAMS 5 Program examples a Program which changes the positioning speed of axis 2 CHGV K2 K10 b Return program which changes the positioning speed of axis 1 to a negative value CHGV K
64. will not be made if 1 The specified axis number at S1 is outside the range or 2 S2 is an indirectly specified device and its device number is outside the range b A minor error will occur and a torque limit value change will not be made if 1 The torque limit value specified at S2 is outside the range 1 to 500 minor error 311 or 2 The CHGT instruction is executed for any axis that has not yet been started minor error 312 5 Program examples a Program which changes the torque limit value of axis 2 CHGT K2 K10 1 In the virtual mode the CHGT instruction is invalid ignored When changing the torque limit value during operation in the virtual mode set the torque limit value setting device in the output module parameter of the machine mechanism program 2 There will be a delay of time equivalent to an operation cycle at the maximum in the response time from when the CHGT instruction is executed until the torque limit value is changed actually 5 OPERATION CONTROL PROGRAMS 5 13 Other Instructions 5 13 1 Event task enable El F ES Number of Basic Steps A E 1 Usable data Usable Data Word device Constant 1 64 bit 16 bit 32 bit 64 bit Bit i 16 bit 32 bit Calculation 3 ison integer integer floating Coasting integer integer floating expression sake conditional type type L expression Compar Bit device 2 Data to be set There
65. with operation steps the resultant program is easy for anyone to understand improving maintainability 2 SYSTEM CONFIGURATION 2 SYSTEM CONFIGURATION 2 1 A273UHCPU S3 System Overall Configuration The following system configuration assumes use of the A273UHCPU S3 Motion slots rN AC motor drive modules supply module CPU module Servo external signal module Servo power supply module Dynamic brake CPU base unit A278B A275B 3 Control power A273UH A278 A240 A221 A211 A222AM 20 A230P CPU S3 LX AM 20 AM 20 is lt Battery MAGE BAT Eo eee 4 Regenerative brake resistor R8 Brake output q BRAKE Three phase power supply gt 4 gt 200V Emergency O pBoUf DB iN lt Stop input Q x i DBCCR DS in lt 4 AC100 200V HH o o o Max 16 ADU axes PLC slots Teaching unit k A31TU E A30TU E SV13 only E e jo PLC extension base connection E RS422 cable A370C OOB gt o External input signals 7i Communication cable Upper limit switch 3 A270CDCBLLIM Lower limit switch ACOOB 3 A270BDCBLLIM Stop signal a Proximity dog PLC extension base A68B A65B A62B Speed position change P
66. within parentheses Standard function SIN COS etc Type conversion USHORT LONG etc Bit inversion logical negation sign inversion Multiplication division remainder 96 Addition subtraction Bit left shift lt lt bit right shift gt gt Comparison operators Less than less than or equal to lt more than gt more than or equal to gt Comparison operators Equal to not equal to Bit logical AND amp Bit exclusive OR Bit logical OR Logical AND Logical OR Assignment 5 OPERATION CONTROL PROGRAMS 3 Instruction structure Many of the instructions usable in operation control programs can be divided into instruction and data parts The instruction and data parts are used for the following purposes e Instruction part Indicates the function of that instruction e Data part Indicates the data used in the instruction Assignment structure example DO 0 Lagg part Source S Instruction part Data part Destination D a Source S 1 The source is the data used in an operation 2 It varies with the device specified in each instruction as described below e Bit or word device Specify the device which stores the data used in operation The data must have been stored in the specified device until the operation is executed
67. 0 DO lt D1 SET M1000 0L lt 2L SET M1000 DOL lt D2L SET M1000 0F lt 4F SET M1000 DOF lt D4F operation Less than or equal to when condition enables SET M1000 0 lt 1 SET M1000 DO lt D1 SET M1000 0L lt 2L SET M1000 DOL lt D2L SET M1000 0F lt 4F SET M1000 DOF lt D4F More than when condition enables SET M1000 0 gt 1 SET M1000 DO gt D1 SET M1000 0L gt 2L SET M1000 DOL gt D2L SET M1000 0F gt 4F SET M1000 DOF gt D4F More than or equal to when condition enables SET M1000 0 gt 1 SET M1000 DO gt D1 SET M1000 0L gt 2L SET M1000 DOL gt D2L SET M1000 0F gt 4F SET M1000 DOF gt D4F Speed change request Motion dedicated CHGV K1 0 CHGV K1 DO CHGV K1 0L CHGV K1 DOL function Torque limit value change request CHGT K1 DO CHGT K1 0L CHGT K1 0 CHGT K1 DOL APP 4 APPENDICES A172SHCPUN Classification Instruction Operation Expression A173UHCPU S1 Unit us A273UHCPU S3 Unit us Event task enable El Event task disable DI No operation NOP BMOV 0 100 K10 BMOV DO D100 K10 BMOV 0 100 K100 BMOV DO D100 K100 BMOV N1 0 K512 BMOV N1 DO K512 Block move Time to wa
68. 1 K 1000 The following operation will be performed when a return request is made in constant speed control Servo program Locus CPSTART2 Axis 24 Axis 1 Axis 2 Speed 1000 ABS 2 Axis 1 10000 Axis2 0 ABS 2 Axis 1 10000 Axis 2 10000 ABS 2 Axis 1 20000 Starting point Axis 2 10000 CPEND Start request SVST Start acceptance M200n Speed change request CHGV New speed Combined speed Return operation to point P1 Waiting at point P1 Command in position OFF Speed change 0 accepting flag If a speed change to a negative speed is made during execution of position ing to P2 as shown above the axis returns to P1 along the program specified locus and waits at P1 5 OPERATION CONTROL PROGRAMS Speed changing instructions 1 A speed change may be invalid if it is made from when a servo program start request is made until the positioning start completion signal status changes to ON When making a speed change at almost the same timing as a start always create a program which will execute the speed change after the positioning start completion signal has turned ON 2 A return request which is made while the axis is at a stop waiting for FIN using the M code FIN waiting function during constant speed control will be ignored 3 In the above example if a return request is given right before P2 and the axis passes through P2 during deceleration the axis w
69. 1 at the I O numbers of X YO and later make I O assignment by setting slots 0 to 7 as 0 free points 2 The motion slots accept up to 256 I O points 3 The I O numbers of the I O modules loaded in the motion slots should be later than the I O numbers used with the PLC slots 4 The motion slots accept one Al61 interrupt input module This module is designed for only event NMI input to the motion CPU and is irrelevant to PLC interrupt programs 2 SYSTEM CONFIGURATION 2 2 A173UHCPU S1 System Overall Configuration The following system configuration assumes use of the A1 73UHCPU S1 Motion slots je a gt 3 8 CPU base unit 3 Pulse generator A178B S3 2 synchronous encoder a A178B S2 5 interface module Extension cable GOT A178B S1 i e A1SCLIB For A1S6L1B A168B AVER 8 A1S DNB For A6 OB Battery A173UHCPU A172S A172S A1725 A1725 A1S gt AGBAT amp 2 eo D Emergency 3 stop input a PLC extension base External interrupt input signals For A1S6 LIB up to 1 base AC100 200V 16 points I0 to 115 For A168B GOT compatible up to 1 base Teaching unit O X For A60B_ upto 1 base A31TU E A30TU E Manual pulse generator 3
70. 3 a ped iso 5 oO gj x Processing s S S l 5 El lal lt it els sa El E 3 89 2 S SE 2 3 S I8 SI lgo3 Siel esa la 2 2j E p a 9 88 Sl ae 02 al 5 E o 5 o loosSg ob e E 5 S o o oco sre s 8 Q o ra c ln E 3 E a 3 a 5 oO I3 zZ El 3 ir n lo Virtual enable O O OJ OJO 0 9 0 9 O OJO JO O O O O O O O O O Number of steps 1 1 1 1 1 141 111 1 1 211 1111 1 111 1 1 2 1 2 1 Number of indirect words 1 2 2 1 212 2 1 2 2 1 2 1 1 1 1 211 36 2 118 8 1 ri A E 8 3 E E E 8 Oo O O O 1 111 2 2 2 111 2 1 B ABS 1 OO AJA A A Al2to 10 ABS 2 OO AJA A A Al3 to 11 ABS 3 ojo AJA A A Al4 to 12 ABS 4 OJO AJA A Al Al5to 13 ABS 2 gt OJO AJAJO A A AJ5 to 14 Constant speed control ABS passing point absolute ojo AJA JO A Al JA designati BSCS olo alal lo A Al lA 4 to 13 ABS lt 4 ojo AIA JO A Al A ABS gt OO Alaj JO A Al A E ABS c ofo aja O A al la Q 5to 14 9 ABS va ojo AJA O A A A i a EAS 2 INC 1 olo AJA A Al Al2to 10 o po 5 INC 2 OJO AJA A A A 8to11 2 ca olo Ala A al Alato12 9 inca olo AA A Alto 13 N
71. 3 6 DOL D2L D4L 51 0 66 7 0 1 18 8 22 6 Bit inversion complement put atl 311 0L 2L 26 4 32 4 DOL D2L 41 8 54 9 0 1 amp 2 20 8 25 2 DO D1 amp D2 28 5 32 7 Bit operation amp Bit logical AND SOLCSOL amp SAL 30 6 362 DOL D2L amp D4L 46 1 59 2 0 1 2 20 8 25 2 D0 D1 D2 29 1 32 7 Bit l gi al OR OL 2L 4L 30 0 36 2 DOL D2L D4L 45 5 59 2 APP 1 APPENDICES Classification Bit operation Instruction Bit exclusive OR Operation Expression 30 4 02 A172SHCPUN A173UHCPU S1 Unit us A273UHCPU S3 Unit us D0 D1 D2 OL 2L 4L DOL D2L D4L Bit right shift 0 1 gt gt 2 D0 D1 gt gt D2 0L 2L gt gt 4L DOL D2L gt gt D4L Bit left shift 0 1 lt lt 2 D0 D1 D2 OL 2L lt lt 4L DOL D2L lt lt D4L Sign inversion Complement of 2 0 1 D0 D12 0L 2L DOL D2L 0F 4F DOF D4F Standard function Sine OF SIN 4F DOF SIN D4F Cosine 0F COS 4F DOF COS D4F Tangent HOF TAN 4F DOF TAN D4F Arcsine HOF ASIN 4F DOF ASIN D4F Arccosine HOF ACOS 4F DOF ACOS D4F Arctangent HOF ATAN 4F DOF ATAN D4F Square root 0F SQRT 4F DOF SQRT D4F Natural logarithm HOF LN 4F DOF LN D4F Exponential operation HOF EXP 4F
72. 5 ole 8 S S S 5 5 5 8105 Sw E 0 p Instruction z gg ga 9 ja gele Sla l g 3 E 5 amp S E o a oj o ER fe S Symbol S e 3 Oa ar E oc 8 3 El z c s PE S 8 E E E E z 2 a a B 8 Virtual enable O O O O O Number of steps 1 1 1 2 1 Number of indirect words 1 1 2 2 1 2 Bl amp FEED 1 1 axis fixed pitch feed stat AJO OJOJAJA A 4 to 17 ol 5 2 axis linear interpolation 8 FEED 2 AJOJOJOJAJA A 5 to 19 als fixed pitch feed start E 3 3 axis linear interpolati lt lt 2 axis linear interpolation u o FEED 3 fixed pitch feed start AJO O ALA A 7 to 21 Sks Speed 1 forward 8 2 peed control I forwar e 8 ME rotation start AlO O A A t IL 8 3 to 15 PES Speed control I reverse on als VR rotation start Ajo O A A o Es Speed Il forward s2 peed contro orwar g BS VVF rotation start Ajo JO JAJA A c 8 3 to 16 T 25 VVR Speed control Il reverse Alo Oo AA A 98s rotation start nt 2 EE VPF Speed position control Alolololalala A 9 58 forward rotation start o sige 4to18 Ss 52 Speed position control El 53 VPR __ reverse rotation start AJOJOJOJAJATA 4 S le 8 BUE losa 2 8 VPSTART Speed position control restart O A 2to4 oje VSTART Speed switching control start A A 1to 13 VEND Speed switching control end 1 5 ABS 1 OIOIOIAJAIA A 4to9 Speed switching control end 8 ABS 2 point address OJOJO AJAJA A 5 to 10 ABS 3 OJOJO AJA
73. 5 5 5 1 Bitinversion complement cee secceee esse ia ioiai eir eiae A AENA AEK AENT E 5 15 5 5 2 BitlogiCalbAND Sac aa t ete ute tbt e n taeda tese 5 16 5 5 9 Bitlogical ORC aetatem tenetur 5 17 5 54 BI exclusive QR Anamin a cpu E i vase e decre qe ae best vy eee ee apes 5 18 5 5 5 Bitright SiM aisi UEM eid 5 19 5 976 Bit leftsl ft 2 ieu ve yv eui ee 5 20 5 5 7 Sign inversion complement of 2 Serme aias da aa aaa a aiaa Ean Ea nnns nnns tenen nenas 5 21 5 6 Standard F rictlons inc IEEE e eoe ena m Ene Eire e ieget 5 22 5 6 1 Sine SIN is nena he aetas ue is 5 22 5 6 2 CosSine GOS cbr etu nee Tn ap uro titer duret eh iaa 5 23 5 6 3 Tangent TAN io aaa 5 24 5 6 4 Arcsine ASIN it ete Tte as 5 25 b 6 5 cArccosine ACOS ii uidi ue eed eset RU de da Aia ada 5 26 5 6 6 Arctangent pm 5 27 5 67 Square root SORT A ias 5 28 5 6 8 NaturalllogarithM ELN iie ioi he 5 29 5 6 9 Exponential operation EXP eee id 5 30 5 6 10 Absolute value ABS suco edere tenete tei ebbe hie ete rte e ad ae 5 31 DEIT ROUNG OTT RAND ste eo ete epa te E 5 32 5 6 42 Round down 5 FIX eiae iy esed eed eda nee oe e ne d a ue 5 33 5 56 13 Round up FUP ieu meten Rem Ri 5 34 5 6 14 BCDBIN conversion BIN entente nnns enne enne 5 35 5 06 15 BIN C23BGD conversion BOD summaries 5 36 5 1 Type GonVversioris iii ac as 5 37 5 7 1 Signed 16 bit integral value conversion SHORT sss eene 5 37 5 7 2 Unsigned
74. 5 cod eet File after conversion of transition program GO to G4095 list file fn bin 0 n lt 4095 into internal codes F FS list file f0000 bin to f4095 bin eI List file of operation control programs F FSO to F FSG4095 F FS code file f0000 cod to f4095 cod REID File after conversion of operation control program F FSO to F FS4095 list file fn bin 0 lt n lt 4095 into internal codes SFC program conversion file control code sfcprog cod een File where SFC code G code and F FS code files are combined and converted into CPU s SFC program code memory storage format SFC program conversion file text sfcprog bin een File where G list and F FS list files are combined and converted into CPU s SFC program text memory storage format Note The above two files are always updated simultaneously SFC parameter file sfcprm bin tenes SFC control parameter setting information file K code file svprog bin m Servo program KO to K4095 internal code file file size is fixed in length PLC type file gsvpenf tts CPU type information file System setting data file svsystem bin rue System setting data information file High speed read setting file svlatch bin Servo data file svdata bin Jue Parameter information file svis bin pre Limit switch setting data information file Mechanical system svedidal bin rue Mec
75. 7 For corrective actions for alarms AM Ifa self diagnostic error of the controller or servo amplifier has occurred confirm the check items and recover in accordance with this manual and the instruction manuals of the products in use and recover from the error If itis assumed that a power failure or product failure may result in a hazardous status use a servo motor provided with electromagnetic brake or provide an external brake mechanism for holding purpose to prevent such hazard The electromagnetic brake operation circuit should have a double circuit structure so Shut off by that the electromagnetic brake will also be Shut off by servo on signal emergency stop operated by an external emergency stop OFF alarm or electromagn signal EMG etic brake signal signal Servo motor RA1 Restart operation after removing the cause Electromagnetic i of alarm occurrence and ensuring safety 0 brake s EMG o o olo When power is restored after an instantaneous power failure stay away from the machine as it may restart suddenly Design the machine so that personal safety is secured if it restarts VIII 8 For maintenance inspection and parts replacement Perform daily inspection and periodic inspection in accordance with the instruction manuals Start maintenance inspection after backing up the programs and parameters of the controller and servo amplifiers When opening or closing the doors and covers
76. 7 3 Synchronous Encoder Shaft Current Value Change Control SV22 Only sss 7 8 7 4 Cam Shaft Within One Revolution Current Value Change Control SV22 Only 7 11 9 MOTON DEVICE Sr ett dest tst aL d cM eie 8 1 to 8 5 8 1 Motion Registers 0 to 48191 eene nennen enn nennt ener nnne 8 1 8 2 Coasting TimerdE T nit ds uet 8 4 9 TASICOPERATIONS itu e eeu roit td 9 1 to 9 3 9 1 Task Definitions etre ee t e ee e e te e A ee ei t fons 9 1 9 2 Task Execultion Status ho Ga eh d iei tet ip iden D Rd pe i iaaa piai 9 3 10 PROGRAMMING INSTRUCTIONS sssssssseseeeeeen eren enne enne nnn sentire 10 1 to 10 2 10 1 TaskeDerinitions 5 rdiet idee d dieci dioi 10 1 10 2 SET RST Response Delays of Motion Dedicated Bit Devices ssssssssses 10 1 10 9 Gancel Starts tint ueteri imet eiat cda tte Mate catus 10 2 10 4 Indirect Designation using Motion Devices oonmnocccnnnnocinnonocinononcnnnnnonn cnn n nono cnn rro cnn nano enne 10 2 10 5 Sequence Programs aii a a dace ee eel ek eens i 10 2 11 SEG PARAMETERS 3 eee in ap ie ee a A eee ee 11 1 to 11 8 TET Task Parameters 2i diy caine Ee e il eod oe d E ae e a e ae ee 11 1 11 2 Program ParamelterS oiii pot tette tt er e HERE Rer Wiis 11 3 12 HOW TO RUN SFC PROGRAM sisse nennen entente rnnt rra rra rra 12 1 to 12 6 12 1 How to Start SFC Program ssssssssssssseseseee
77. AB Absolute 2 axis linear Alolololala O A EIE S 2 lin erpolation 5 to 20 zo p m Incremental 2 axis linear 8 ei NC 2 in erpolation AJO O OJAJA o A g ABS 3 Absolute 3 axis linear AlOlOlOlA A O A 2 interpolation 7 to 21 Ije m Incremental 3 axis linear 2 NC 3 interpolation AJO O OJA A o A M Ape Absolute 4 axis linear 8 ABS 4 in erpolation A O O DIA A o A 8 to 22 Incremental 4 axis linear T NC 4 n erpolation AO O OIAA o A 3 Absolute auxiliary point E3 ABS A specified circular interpolation AO O OIAA o A 7 to 22 EM Incremental auxiliary point ES INC v specified circular interpolation AJOJOJOJAIA o A Absolute radius specified ABS C circular interpolation less than AJO O OJAJA O A CW 180 Absolute radius specified ABS py circular interpolation CW 180 A O O O AJA O A gt lor more Absolute radius specified ABS 4 circular interpolation less than AJO OJOJAJA O A o CCW 180 e e Absolute radius specified 5 3 ABS C circular interpolation CCW 1807 AJO O O AJA O A o mE 6 to 21 5 o Incremental radius specified 2 INC Cx circular interpolation less than A OJOIO AJA O A o 8 ew 180 e c Incremental radius specified 2 INC circular interpolation Cw 180 AJO OJO AJA O A E or more S Incremental radius specified e INC lt a circular interpolation less than AJOJOJOJAJA O A l L cow 180 Incremental radius specified INC gt circular interpolation
78. C Ax ojo AJAJO A Al Al5to14 Constant speed control NC passing point incremental OJO AJA JO A Al JA NC lt A Resignation OO AJA O A A A 4to 13 NC C olo Alal JO A Al A NC C OO Alal O Al ABS 34 ojo AJA O A A A 5 to 14 NC Va ojo AJA O A A A CPEND Constant speed control A 162 end Pei FOR TIMES 53 L g3 amp FOR ON Repeat range start setting 2 8 22 FOR OFF 38s eE NEXT Repeat range end setting 3 o 3 S S START Simultaneous start O 2to3 E Zerong ZERO Zeroing start O 2 Lj 22 High speed oscillati osc 9 speed osctiation A Lo A ololo A A 5 to 10 52 start o El Servo virtual servo 5 current value change 2 Encoder current value E change 5 Cam shaft current value s change O Item which must be set A Item which is set when required 1 Only when reference axis speed is specified 2 B indicates a bit device 7 MOTION CONTROL PROGRAMS 7 2 Servo Motor Virtual Servo Motor Shaft Current Value Change In the real mode the current value of the specified axis is changed In the virtual mode the current value of the specified virtual servo motor shaft is changed Items Set on Peripheral Device Circular Parameter block O o 3 3 o 2 e Number of Control Axes processing Circular interpolation error Servo Positioning Instruction Method Parameter block No Address travel Command speed Dwell time Torque limit value Auxiliary p
79. D800L gt D802L OF gt 4F D800F gt D804F APP 6 APPENDICES 3 Processing time taken when F and G are combined program described in F G is NOP F Alone G Alone F G GSUB CLR JMP Coupling l l l CLR P B F f SU 4 P ee ia LE A172SHCPUN A173UHCPU S1 A273UHCPU S3 Parallel Branch 2 Pcs Parallel Branch 5 Pcs At branch At coupling At branch At coupling A172SHCPUN A173UHCPU S1 A273UHCPU S3 Selective Branch 2 Pcs Selective Branch 5 Pcs A172SHCPUN A173UHCPU S1 A273UHCPU S3 Note Varies greatly with the started cleared program Long processing time may cause a PCPU WDT error or servo fault Especially for SFC programs run by event NMI tasks take care so that the processing time will not be too long APP 7 APPENDICES Appendix 1 2 Motion Operation Cycles msec A172SHCPUN A173UHCPU S1 A273UHCPU S3 OS type Set axis 30 to 19 to 22 to count 32 32 32 Operation cycle 14 2ms 14 2ms 14 2ms APP 8 4 4 MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100 TELEX J24532 CABLE MELCO TOKYO NAGOYA WORKS 1 14 YADA MINAMI 5 HIGASHI KU NAGOYA JAPAN IB NA 0300022 A 0012 MEE Printed i
80. Executing the CHGA E instruction changes the current value of the synchronous encoder shaft in the following procedure a The synchronous encoder shaft current value changing flag M2031 M2101 to M2112 corresponding to the specified synchronous encoder shaft is turned ON b The current value of the specified synchronous encoder shaft is changed to the specified address c The synchronous encoder shaft current value changing flag is turned OFF on completion of the current value change 2 The axis number used can be set within the following range A273UHCPU S3 A172SHCPUN A173UHCPU S1 32 axes feature Axist 1 Axis 1 to axis 4 Axis 1 to axis 12 Program example A program for exercising the current value change control of the synchronous encoder shaft will be described under the following conditions 1 System configuration The current value change control of the synchronous encoder P1 axis is performed A172SHCPUN A172S A1S A172B P1 axis EJ MR O B IMR O B MR 0 B MR 0O B MR LI B MR 0 B MR 0 B MR O B Axis 1 Axis 2 Axis 3 Axis 4 Axis 5 Axis 6 Axis 7 Axis 8 M 9 M 9 v 7 MOTION CONTROL PROGRAMS 2 Current value change control conditions a The current value change control conditions are indicated below Item Setting Servo program number No 10 Control axis 1 Indirect designation using D10 D11 New address 3 Operat
81. IFT1 SET Gn CALL Fn JMP IFEm IFT2 SFT Gn CALL Fn JMP IFEm IFEm JMP PAEm PAT2 CALL Fn CALL Kn JMP PAEm PAEm SET Gn e After a selective branch a parallel branch can be performed The selective coupling point can be the same as the coupling point of a parallel coupling for selective branch gt parallel branch Note that in an SFC chart this type is displayed in order of a parallel coupling a selective coupling as shown on the left n this case you cannot set a pointer Pn between the parallel coupling point PAEm and the selective coupling point IFEm After a parallel branch a selective branch can be performed The parallel coupling point can be the same as the coupling point of a selective coupling for parallel branchselective branch Note that in an SFC chart this type is displayed in order of a selective coupling gt a parallel coupling as shown on the left e In this case you cannot set a pointer Pn between the selective coupling point IFEm and the parallel coupling point PAEm 4 SFC PROGRAMS Name SFC Symbal List Representation CALL Kn e After a selective branch a selective IFBm branch can be performed IFT1 SFT Gn Selective EE IFBm 1 branch IFBm IFT1 FTA IFT2 IFBm 1 E SET Gn Selective gt ag E gt rr LC branch JMP IFEm 1 IFT2 SFT Gn JMP IFEm 1 IFEm 1 JMP IFEm The two selecti
82. ION CONTROL PROGRAMS 5 2 Data register Device Descriptions Word and bit device descriptions are indicated below 1 Word device descriptions Device Descriptions Device Number n Specifying Ranges 16 bit integer type 32 bit integer type n is even number 64 bit floating point type n is even number A172SHCPUN 0 to 1023 A173UHCPU S1 A273UHCPU S3 0 to 8191 Link register 0 to 3FF 0 to 1FFF Timer current value 0 to 255 0 to 2047 Counter current value 0 to 255 0 to1023 Special register 9000 to 9255 Motion device 0 to 8191 Coasting timer a For differentiation the 32 bit floating point type is ended by L and the 64 bit floating point type by F F for the link register b The timer current value T and counter current value C may be used only as a 16 bit integer type c For the 32 bit integer type and 64 bit floating point type specify the device number with an even number You cannot use an odd number for setting d The coasting timer FT is incremented per 888us The coasting timer is a 32 bit integer type 2 Bit device descriptions Input relay Device Description Xn PXn Device Number n Specifying Ranges A172SHCPUN 0 to 7FF A173UHCPU S1 A273UHCPU S3 0 to 1FFF Output relay Yn PYn 0 to 7FF 0 to 1FFF Internal relay Mn 0 to 2047 0 to 8191 Latch relay
83. IT transitions e WAITON WAITOFF is not followed by a motion control step However this is permitted to a pointer Pn or jump Pn SFC program error grammatical error 16101 A parallel branch is followed by an END step without a parallel coupling 16104 SFC code error e An mpossibie code is used The internal code is corrupted Internal code list code error in 16105 Jump code error 1 7 jump destination information e Internal code label information 16106 Jump code error 2 error in jump destination information 16107 Jump code error 3 nterna cone aoe nimbi error in jump destination information 16108 Jump code error 4 nterna coge apel doles error in jump destination information The specified pointer does not 16109 Jump destination error d i P f P SA exist at the jump destination Its own program was cannot call its own or main 16110 GSUB setting error 1 3 prog called started by GSUB Th i Correct the SFC program 16111 GSUB setting error 2 Dealers arene prog called started by GSUB e Nesting of parallel branches The nesting of parallel branch is up within a parallel branch route to four levels exceeded four levels Subroutine the branch destination processing and correct the program Parallel branch nesting excess e An attempt was made to execute Motion control steps cannot be set a motion control step K with an in SFC programs run by the event event or NMI task
84. JA A 7to 12 o 3 INC 1 OJOJOJAJAJA A 4to9 m Travel up to speed switching Ed INC 2 control end point O OIOIAJAIA A 5 to 10 TA INC 3 OIOIOIA JAJA A 7 to 12 Speed switching point VABS absolute designation ojo AJA 4to6 Speed switching point VINC incremental designation oo AJA o 2 3 o E PESTART Position follow up control start AJOJO O A A 4 to 16 2 0 3 o a CPSTART1 he constant speed control AlO O A A 3 t0 15 o o lo ayi E 2 3 CPSTART2 in constant speed control AlO O A A 3 to 17 pecas 5 3 8 CPSTART3 eg constant speed control AIO O A A 9 4 to 17 o CPSTART4 ny constant speed control AlO O A A O Item which must be set A Item which is set when required 1 Only when reference axis speed is specified 2 B indicates a bit device 7 MOTION CONTROL PROGRAMS Positioning Control Instruction Symbol Table 7 2 Servo Instruction List Continued Positioning Data Common Circular OSC 1 Parameter block Others A E e al se 3 8 2 8 se 5 3 8 393 3 2 2 e seage sisigla sle sik 2 3 015 8 a S SJE 2 2 51 Sel S El iE 89 0121212 2 5 6 so x 5 Q 9 S amp S O l L w a S 2 s SESE o go EIES o 592 2 Tg agxSeizsssis3s el els O Z o 9 ajel gizz a Ss SE 8 S ES 8 stt sss 0
85. K Bit device point timer type type point expression expression 2 Data to be set Data to be Set Data Type of Result S Waiting time 0 to 2147483647 ms Logical type true false 3 Functions a A wait state continues for the time specified at S The result is false when the elapsed time is less than the preset time or the result is true and execution transits when the preset time has elapsed b When a 16 bit integer type word device is used to specify any of 32768 to 65535ms at S convert it into an unsigned 16 bit integral value with USHORT Refer to the program example 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range or 2 Data device data when device is indirectly specified at S is outside the range 0 to 2147483647 5 Program examples a Program which sets a wait of 60 seconds when constant is specified TIME K60000 b Program for a case where there may be a wait of 32768 to 65535ms for 16 bit integer type indirect designation 0 TIME USHORT 4O c Program which SETS RSTs a bit device when the specified time has elapsed SET M100 TIME K60000 5 OPERATION CONTROL PROGRAMS 1 When the waiting time setting is indirectly specified with a word device the value imported first is used as the device value for exercising control The set time cannot be changed if the devi
86. L 5 OPERATION CONTROL PROGRAMS Arccosine ACOS I FFS 1 Usable data Format ACOS S Usable Data Number of Basic Steps Word device Constant Bit device 64 bit floating point type F 32 bit integer type L 16 bit integer type K H Coasting timer 32 bit integer type K H L 64 bit floating point type K Bit conditional expression Calculation expression Compar ison conditional expression 2 Data to be set Data to be Set Data Type of Result COS value data on which COS arccosine Floating point type operation will be performed oP yp 3 Functions a cos arccosine operation is performed on the COS value data specified at S to find an angle b The COS value specified at S must be within the range 1 0 to 1 0 c The operation result is in an angle degree unit d If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is outside the range 1 0 to 1 0 or 2 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which performs the cos assigns the result to 0F arccosine operation of DOF and 0F ACOS DOF iH Dt DO c wr je 3 5 OPERATION CONTROL PROGRAMS Arctangent ATAN Number of Basic Steps
87. LC extension bases up to 7 bases Base number setting base 1 to base 7 Personal computer IBM PC AT Windows NT 98 MR H BN MR J2S B MR J2 B SSCNET4 Tape Max 32 axes including those of ADU a Max 24 axes SSC I F card board A30CD PCF A30BD PCF sscneTt d1 d2 d3 d8 PO gt b O Termination resistor i M i SSCNET2 E i SSCNETS Servo amplifier max 8 axes 1 network A i Motion extension base gt 1 connection cable LOTT 1 ACOOB 5 2 o E EB 8 amp Sof 2 o S 3s E E Py 829 5 2 o 2 cC68 2 o 5 2 Set 2 5 o o DOS amp o o o Seige ES o ZES 2 E hz E e pr 5 sia 8 iz E 8 8 82 B amp RlAoO Motion extension base unit o A268B A62P A273 Al61 AXCIL AYEICIAH42 gt EX A42XY Manual pulse generatorx3 P rial z MR HDPO1 Scie External interrupt input signals Serial absolute encoder cable 16 points IO to 115 MR HSCBLLIM synchronous encoder x3 MR HENC SV22 only External input signal TRA Tracking x3 Gace nA ung oes 1 pun SSCNET Servo System Controller NETwork Y 2 SYSTEM CONFIGURATION 1 I O assignment e When no I O assignment is made the I O numbers of the PLC extension base 1 start from X Y80 e When you want to use the PLC extension base
88. MITSUBISHI MOTION CONTROLLER SV13 22SFC Programming Manual type A172SHCPUN A173UHCPU S1 A273UHCPU S3 MITSUBISHI ELECTRIC INTORODUCTION Thank you for choosing the motion controller Before using the equipment please read this manual carefully to use it to its optimum Please forward this manual to the end user Safety Instructions Do not attempt to install operate maintain or inspect this product until you have read through these safety instructions carefully and can use the equipment correctly Do not use this product until you have a full knowledge of the equipment safety information and instructions In this manual the safety instruction levels are classified into WARNING and CAUTION lt WARNING WARNING Denotes that incorrect handling may cause hazardous conditions resulting in death or severe injury CAUTION Denotes that incorrect handling may cause hazardous CAUTION conditions resulting in medium or slight injury or may cause physical damage only CAUTION Denotes that incorrect handling may cause hazardous conditions resulting in medium or slight injury or may cause physical damage only SAFETY PRECAUTIONS 1 For Electric Shock Prevention D D D SO OS SF Oo While power is on or the equipment is running do not open the front casing and terminal cover Doing so can cause an electric shock Do not run the equipment with the front casing and terminal cover remove
89. N e The output states are governed by the PLC side STOP gt RUN time output mode parameter setting 13 3 Operation Performed when CPU Is Switched from RUN to STOP 1 When the CPU is placed in the STOP mode SFC programs stop 2 When SFC programs are stopped in the STOP mode all outputs turn OFF 13 4 Operation Performed when CPU is set to PAUSE or STEP RUN When the CPU is set to PAUSE or STEP RUN SFC programs continue processing without stopping 13 1 13 SFC PROGRAM CONTROLLING OPERATIONS 13 5 Operation Performed when PLC Ready M2000 Turns OFF ON M2000 OFF gt 0N M2000 ON gt OFF Points If there is no fault when PLC ready M2000 turns from OFF to ON the PCPU ready flag M9074 turns ON When this PCPU ready flag M9074 turns ON SFC programs can be run When PLC ready M2000 turns OFF SFC programs stop running and the PCPU ready flag M9074 turns OFF Since outputs are held turn OFF necessary outputs in the sequence program after the PCPU ready flag M9074 has turns OFF 1 While the PCPU ready flag M9074 is ON the outputs Y of the PBUS do not provide data to actual outputs if write is performed from the sequence program However while the PCPU ready flag M9074 is OFF the outputs Y of the PBUS provide data to actual outputs when write is performed from the sequence program When the PLC ready signal M2000 turns OFF SFC programs stop but outputs Y in the SFC programs do not turn OFF Turn the
90. O O JO O JO O JOJO O JO O JO O JO O JOJO O JO O JO Logical AND Logical OR O conditional expression Calculation expression calculation expression Calculation expression calculation expression l lessihan calculation expression lt Comparison calculation expression operation Less than or equal Calculation expression to lt calculation expression Calculation expression gt calculation expression More than or equal Calculation expression to gt calculation expression h Motion Speed change cHaVv St S2 dedicated us limit value function CHGT S1 S2 change request Event task enable El Event task disable DI No operation NOP Block move BMOV D S n Time to wait TIME S Equal to Not equal to More than 2 Rough calculation expression for operation control transition program s single program code size 2 1 total number of basic steps in 1 block number of 32 bit constants 1 block x 1 number of 64 bit constants 1 block x 3 x number of blocks steps 1 step 2 bytes 4 SFC PROGRAMS 4 SFC PROGRAMS 4 1 SFC Program Structure As shown below an SFC program consists of START steps transitions END and others Operation Program ess START Indicates a program entry start E name LX
91. ON CONTROL PROGRAMS 5 4 6 Remainder o o S1 S2 1 Usable data Usable Data Word device Constant 92 bit 64 bit 16 bit 32 bit 64 bit lean Bit ee floating Coasting integer integer floating Supression conditional point timer type type point expression type F K H K H L type K Bit device integer type L conditional expression Dividend data Data type integer type of 81 or S2 which is greater Integer type Divisor data 3 Functions a The data specified at S1 is divided by the data specified at S2 to find a remainder b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before operation is performed 4 Errors a An operation error will occur if 1 S2 is 0 or 2 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which divides K123 by 0 and assigns a remainder to WO WO K123 0 e 325 5 14 5 OPERATION CONTROL PROGRAMS 5 5 Bit Operations 5 1 Bit inversion complement EY E Number of Basic Mee eee Sees 1 Usable data Usable Data Word device Constant 16 bit 32 bit 64 bit 16 bit 32 bit 64 bit Gale lation Bit integer integer type type L Compar ison floating Coasting integer integer floating expression conditional ditiona
92. PUN M2000 to M2015 M2016 to M2047 A173UHCPU S1 A273UHCPU S3 32 axes feature Note END indicates a sequence program scan time M2000 to M2047 M2048 to M2095 10 1 10 PROGRAMMING INSTRUCTIONS 10 3 Cancel Start When a cancel start has been set in the setting items of the servo program which was started at the motion control step of an SFC program the cancel of the running servo program is valid but the servo program specified to start after a cancel is ignored without being started The following example shows an SFC program which exercises control equivalent to acancel start KO Selective branch cco Providing transition G1 with cancel device condition specified in servo program KO will cancel run of servo program KO and allow Ki Servo program K1 to start 10 4 Indirect Designation using Motion Devices The motion registers 0 to 8191 cannot be used to make indirect designation in servo and mechanical system programs When using the motion register values in servo or mechanical system programs assign them to PLC devices 10 5 Sequence Programs 1 You cannot use the SVST CHGV CHGA and CHGT DSFRP and DSFLP also included when the A172SHCPUN is used motion dedicated instructions in sequence programs Doing so will cause an error INSTRUCT CODE ERR in the PLC 2 When reading and using 2 word monitor data such as a feed current value or 2 word data written with an SFC program al
93. RAMS 5 8 Bit Device Statuses 5 8 1 ON normally open contact None NON BERE Number of Basic leek Sees 1 Usable data Usable Data Word device Constant 16 bit 32 bit dl Dt bit Calculation __ B integer integer type L Compar ison Coasting integer integer Aeres don conditional ditional xpression s expressio expression 2 Data to be set Data to be Set Data Type of Result Bit device used in bit S Logical type true false conditional expression B i 3 Functions a True is returned when the bit device specified at S in a bit conditional expression is ON 1 or false is returned when that bit device is OFF 0 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which sets M100 when either of MO and X0 is ON 1 SET M100 MO XO MO Ta 9 tease mue 5 OPERATION CONTROL PROGRAMS 5 8 2 I FFS OFF normally closed contact Number of Basic Steps 1 Usable data Usable Data Word device Constant Bit device 64 bit floating point type F 32 bit integer type L Coasting timer 16 bit integer type K H 32 bit integer type K H L 64 bit floating point type K Calculation expression Bit conditional expression Compar i
94. SFC program No 10 event Fixed cycle 3 5ms SFC program No 20 event Fixed cycle 1 7ms external interrupt 16 SFC program No 30 event External interrupts 17 115 SCPU interrupt When you have set the NMI task you can set multiple interrupt inputs out of the external interrupts for NMI task Example Interrupt setting Inputs for NMI task IO I1 12 I3 14 15 SFC program No 10 NMI IO SFC program No 20 NMI 11 12 SFC program No 30 NMI 15 Errors This parameter is imported when PLC ready M2000 turns from OFF to ON and is checked at an SFC program start automatic start start from PLC or subroutine start When the value is unauthorized either of the following SFC errors is set and the initial value is used for control Error Factor F Error Code S Error Processing Corrective Action Definition Among the normal event and NMI tasks more than one or none Turn PLC ready M2000 OFF of them has been set The initial value normal task y E UTER ie used for conta make correction and write a xecuted tas HON Two or more fixed cycles of the correct value to the CPU setting is illegal event task have been set event Executed task setting is illegal 1 Since the executed task setting can be made per SFC program number multiple programs need not be written for single control machine operation to divide execution timing based processings For example th
95. Starts a servo program Kn step Specifying range KO to K4095 Operations 1 The start acceptance flag of the axis specified in the specified servo program Kn n 0 to 4095 turns ON 2 The specified servo program Kn n 0 to 4095 starts Execution timing Transition condition enables Start acceptance flag M200n Errors 1 The absence of the specified servo program Kn will result in an SFC program error 16200 and stop the SFC program running at the point of error detection Instructions 1 To make a current value change in the SFC program specify the CHGA instruction in the servo program and call it at the motion control step 2 If the servo program has stopped due to a major minor error which occurred at or during a start of the servo program specified at the motion control step the SFC program continues running To stop the SFC program at error detection provide an error detection condition at the transition transition condition 4 10 4 SFC PROGRAMS 4 5 2 Operation control step Symbal Operation Fn FSn Runs an operation control program Fn FSn control step Specifying range FO to F4095 FSO to FS4095 Operations 1 Once execution type operation control step Fn Fn runs the specified operation control program Fn n 0 to 4095 once 2 Scan execution type operation control step FSn FSn repeats the specified operation control program FSn n 0 to 4095 until the next transiti
96. The speed of the axis specified at S1 is changed to the speed specified at S2 3 The speed changing flag is turned OFF b The axis number that may be set at S1 is within the following range A173UHCPU S1 A172SHCPUN A273UHCPU S3 32 axis feature 1 to 32 For interpolation control set any one of the interpolation axes When linear interpolation control is exercised a speed change varies as described below with the positioning speed designation method set in the servo program Positioning Speed Designation Method Combined speed A speed change is made so that the combined speed becomes designation the speed specified at S2 Operation Longest axis A speed change is made so that the longest axis speed becomes designation the speed specified at S2 Reference axis speed A speed change is made so that the reference axis speed becomes designation the speed specified at S2 c Operation varies with the sign of the specified speed set at S2 Positive Speed change 0 Temporary stop Negative Return 5 OPERATION CONTROL PROGRAMS d The specified speed that may be set at S2 is within the following range 1 Real mode mm inch degree PULSE Setting range 0 to 600000000 x10 mm min Speed change request Setting range 0 to 600000000 x10 inch min Setting range 2147483647 Unit x10 degree min Setting range Unit 0 to 10000000 0 to x10 mm m
97. UN STOP switch 4 Errors a An operation error will occur if 1 This instruction is used with other than a normal task 5 Program examples a Program which disables the execution of an event task 5 OPERATION CONTROL PROGRAMS 5 13 3 No operation NOP Number of Basic Steps 1 Usable data Usable Data Bit device Word device Constant 16 bit integer 64 bit floating 32 bit integer type L 16 bit Coasting integer 32 bit integer 64 bit floating Bit conditional expression Calculation expression Compar ison conditional expression type 2 Data to be set There are no data to be set 3 Functions a This is a no operation instruction and does not affect the preceding operations 4 Errors a There are no operation errors for no operation NOP 5 OPERATION CONTROL PROGRAMS 5 13 4 Block transfer BMOV F FS Number of Basic Steps BMOV D S n 1 Usable data Usable Data Word device Constant 32 bit OE 16bit 32bit 64bit PS Bt ison integer floating Coasting integer integer floating expression PO conditional type L point timer type type point pi expression type F K H K H L type K Bit device Note When a 32 bit integer type constant is specified at D or S the number specified is the absolute address of the PCPU m
98. al type true false 3 Functions a The result is true if the data specified at S1 is greater than or equal to the data specified at S2 b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before comparison is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which compares whether 0 is greater than or equal to DO or not 0 gt DO 0 400 gt gt True DO 20 5 OPERATION CONTROL PROGRAMS 5 12 Motion Dedicated Functions CHGV CHGT 5 12 1 Speed change request CHGV Number of Basic Steps A A CHGV S1 52 1 Usable data Usable Data Word device Constant a bi bi bi bi ompar 16 bit 32 bit na es Rs ol hs a acum Calculation BV ison oating oasting integer integer oating exoression conditional expression Bit device integer integer i timer type i expression type type L 2 Data to be set Data to be Set Data Type of Result Axis number to which speed change request will be given Specified speed 3 Functions a A speed change is made in the following procedure 1 The speed changing flag M2021 to M2028 M2061 to M2092 corresponding to the axis specified at S1 is turned ON 2
99. amic brakes are used the coasting distance must be taken into consideration in the system If a vertical shaft drop can cause a problem at an emergency stop servo off or power off in the system use the dynamic brakes and electromagnetic brakes together Use dynamic brakes for only an error which will occur at an emergency stop or servo off and do not use them for normal braking N The brakes electromagnetic brakes built in the servo motors are designed for holding Do not use them for normal braking Configure up the system to ensure that it has such mechanical allowances that the axes can stop if they pass through stroke end limit switches at maximum speeds The wires and cables used should have the wire diameters heat resistance and flex resistance conforming to the system The wires and cables used should have the lengths specified in the A173UHCPU A172SHCPUN A171SHCPUN user s manual or the A273UHCPU user s manual and the instruction manuals of the products in use The parts other than the controller servo amplifiers and servo motors used with the system should be compatible in ratings and characteristics with the controller servo amplifiers and servo motors To ensure that the rotary parts of the servo motors can never be touched during operation provide the shafts with covers or the like Due to its life or mechanical structure e g when a ballscrew and the servo motor are coupled via a timing belt the electromagnetic brake may n
100. asting integer integer sesion conditional ditional xpression s expressio expression 2 Data to be set Data to be Set Data Type of Result S Angle data on which SIN sine Eidatinaxdinttva operation will be performed SP m 3 Functions a SIN sine operation is performed on the data specified at S b The data specified at S is in an angle degree unit c If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which performs the SIN operation of DO and assigns the result to HOF HOF SIN DO 0 3 2 1 App o 5 OPERATION CONTROL PROGRAMS 5 6 2 Cosine COS F ES Number of Basic Steps E COS S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit diesen Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result S Angle data on which COS cosine amaia operation will be performed oP yp 3 Functions a COS cosine operation is performed on the data specified at S b The data specified at S is
101. at the S data is within the signed 16 bit integral value range Correct the program so that the S data is within the unsigned 16 bit integral value range Correct the program so that the S data is within the signed 32 bit integral value range Correct the program so that the S data is within the unsigned 32 bit integral value range Correct the program so that S is not 90 180 n n is an integer Correct the program so that S is within the range 1 0 to 1 0 Correct the program so that S is a positive number Correct the program so that each digit of S is O to 9 Correct the program so that the S value is within the range Correct the program so that S is a positive number Correct the program so that the indirectly specified device number is proper 15 ERROR LISTS Table 15 4 Operation Control Transition Execution Errors 16300 to 16599 Continued Error Error Factor E Error Processing Corrective Action Code Name Definition Indirectly specified 16 bit The indirectly specified device The block processing in Correct the program so that the 16468 link register W n read number is outside the range execution is stopped indirectly specified device number error and the next block is is proper Indirectly specified 32 bit The indirectly specified device executed 16469 link register W n L read number is outside the range or an error odd number Indirectly specified 64 bit link re
102. bed under the following conditions 1 Current value change control conditions a The current value change control conditions are indicated below Item Setting Servo program number Output shaft number New address 7 11 7 MOTION CONTROL PROGRAMS 2 Servo program lt K 10 gt CHGA C Cam shaft within one revolution Axis 2 current value change control Output shaft number 1 New address 0 1 Cam shaft within one revolution current value changing instructions e If a new within one revolution current value is outside the range 0 to one revolution pulse count 1 a minor error 6120 occurs and a current value change is not made e Set the cam shaft within one revolution current value change program within the virtual mode program number range set in program mode assignment e When PLC ready M2000 or PCPU ready M9074 is OFF a minor error 100 occurs and a current value change is not made elf a cam shaft within one revolution current value change is executed in the real mode a servo program error 903 or 905 occurs and the current value change is not made 903 when the current value change servo program is set to within the virtual mode program number range or 905 when it is set to within the real mode program number range e f a current value change is made during mode changing a servo program error 907 realvirtual changing or 908 virtual gt real switching
103. ce value is changed during a wait state 2 The TIME instruction is equivalent to a conditional expression and therefore may be set on only the last line of a transition G program 3 When the transition program Gn of the same number having the TIME instruction setting is used in multiple SFC programs avoid running them at the same time If they are run simultaneously the waiting time in the program run first will be illegal 5 OPERATION CONTROL PROGRAMS 5 14 Comment Statement ES Number of Basic Steps p A A 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit lean Bit pru floating Coasting integer integer floating Supression conditional ditional expression expression 16 bit 32 bit Bit device integer integer type type L 2 Data to be set There are no data to be set 3 Functions a A character string from after to a block end is a comment 4 Errors a There are no operation errors for comment 5 Program examples a Example which has commented an assignment program DO D1 Assigns the DO value 16 bit integer data to D1 6 TRANSITION PROGRAMS 6 TRANSITION PROGRAMS 6 1 Transition Programs 1 Transition programs a In transition programs you can set assignment operation expressions motion dedicated functions bit device control commands and transition conditions b You
104. d The exposed high voltage terminals and charging part can cause an electric shock If power is off do not remove the front casing and terminal cover except for wiring or periodic inspection The controller and servo amplifier insides are charged and can cause an electric shock Before starting wiring or inspection switch power off wait for more than 10 minutes and check that there are no residual voltages with a tester or the like Not doing so can cause an electric shock Use the class 3 or higher grounding method to earth the controller servo amplifiers and servo motors In addition do not share grounding with other equipment Any person who is involved in the wiring or inspection of this equipment should be fully competent to do the work Start wiring after installing the controller servo amplifiers and servo motors Not doing so can cause an electric shock or injury Operate the switches with dry hands to prevent an electric shock Do not subject the cables to scratches excessive stress heavy loads or pinching Doing so can cause an electric shock While power is on do not touch the terminal blocks of the controller servo amplifiers and servo motors Doing so can cause an electric shock Do not touch the internal power supplies internal grounds and signal wires of the controller and servo amplifiers Doing so can cause an electric shock 2 For fire prevention Mount the controller servo amplifiers servo motors and
105. dd site b0 D 111 1 gt A 9 9M dd Rc ic had D eed a b15 eerren DEMEURE MUT bO 5 18 5 OPERATION CONTROL PROGRAMS 5 5 5 Bit right shift gt gt F ES Number of Basic Steps E 0 81 gt gt 82 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit lean Bit ee floating Coasting integer integer floating Supression conditional ditional type L point timer type type point expression a oression YP type F K H K H L type K 32 bit integer Bit device 2 Data to be set Data Type of Result S1 Data to be right shifted Data type of S1 S2 Number of right shifts Integer type 3 Functions a The data specified at S1 is shifted to the right by the number of times specified at S2 b If the most significant bit of S1 is 1 1 enters the most significant bit of the right shift result If the most significant bit of S1 is O O enters the most significant bit of the right shift result c When S1 is a 16 bit integer type and S2 is a negative number or not less than 16 the result is 0 d When S1 is a 32 bit integer type and S2 is a negative number or not less than 32 the result is 0 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program
106. ded by an operation control step execution shifts to the low step when the transition condition enables after operation has been performed or shifts to the right connected step when the condition does not enable same operation as in Shift When this transition is preceded by a subroutine call start step execution waits for completion of the subroutine operation and shifts to the lower step when the transition condition enables or shifts to the right connected step when the condition does not enable 14 e Jumps to the specified pointer Pn PO to P16383 within its own program Pointer 8 e Indicates a jump destination pointer label e This pointer can be set at a step transition branch point or coupling point e PO to P16383 can be set in a single program The same numbers may also be used in other programs Branch and Coupling Chart List Name Code size byte Series transition Correspond ing symbol size Selective branch Number of branches 2 x 10 Selective coupling Parallel branch Number of branches x 22 number of coupling points x2 12 Parallel coupling Jump transition Correspond ing symbol size 4 SFC PROGRAMS The following are branch and coupling patterns which specify step and transition sequences in SFC charts
107. direction Not doing so can cause oil leakage AX Store and use the equipment under the following environmental conditions A Conditions Environment y zm Control unit servo amplifier Servomotor Ambient 0 C to 55 C 0 C to 40 C temperature Non freezing Non freezing As in the instruction manual of the 80 RH or less Ambient humidity corresponding product Non condensing Storage As in the instruction manual of the 20 C to 465 C temperature corresponding product AEShare Indoors no direct sunlight p Free from corrosive gas flammable gas oil mist dust and dirt Altitude Max 1000mm above sea level As in the instruction manual of the corresponding product N When coupling do not give impact to the shaft end of the synchronous encoder or servo motor e g do not hit it with a hammer Doing so can cause a detector failure AX Do not give the servo motor shaft with loading of greater than the permissible Such loading can cause the shaft to be broken N When the equipment will not be used for an extended period of time remove the power supply wires from the controller and servo amplifiers AX Store the controller and servo amplifiers in antistatic vinyl bags Ati they have been stored for an extended period of time consult the service center or service station 4 For wiring N CAUTION Wire the equipment correctly and securely After wiring recheck for wrong connections insufficient terminal screw tightening
108. e Consult the system service or service station for replacement 9 Disposal N Dispose of this product as general industrial waste N Do not disassemble the controller servo amplifier and servo motor parts N Dispose of the batteries in the method prescribed in the corresponding municipality 10 General instruction All illustrations given in this manual may have been drawn with covers or safety guards removed to provide in depth description Before starting operation of the product always return the covers and guards into original positions as specified and operate the equipment in accordance with this manual Ix Revisions The manual number is given on the bottom left of the back cover Print Date_ Manual Number Dec 2000 IB NA 0300022 A First edition This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual 2000 Mitsubishi Electric Corporation CONTENTS OVERVIEW al ll leo 1 1 1 1 ul 5 LIO IEEE 1 1 2 SYSTEM CONFIGURATION c ccceeceeeeeeeeeeeeeeeee eae eecaaeeeeaeeseeeeeeeeaesseaaeseeeeeseaeeesaeeseaeeseeeeetaas 2 1to2 5 2 1 A273UHCPU S3 System Overall Configuration sss 2 1 2 2 A173UHCPU S1 System Overall Config
109. e limit value that may be set at S2 is within the range 1 to 500 9 e The torque limit value specified here and the one specified in the servo program have the following relationships At a normal start the torque limit value is given to the servo of the start axis according to P torque set in the servo program or the torque limit value of the specified parameter block For an interpolation start the torque limit value is given to the number of axes to be interpolated i Executing the CHGT instruction gives the preset torque limit value to only the specified axis y Thereafter the torque limit value given to the servo at a servo program start or JOG start is made valid only when it is lower than the torque limit value specified in CHGT This torque limit value clamp processing is performed per axis 5 OPERATION CONTROL PROGRAMS 1 If the following torque limit value has been set it will not be changed to higher than the torque limit value specified in the CHGT instruction e Torque limit value at a midway point in constant speed control or speed change control e Torque limit value at the point of switching to position control in speed position changing control e Torque limit value in speed control Il 2 The CHGT instruction accepts a torque limit value which is higher than the torque limit value set in the servo program or parameter block 4 Errors a An operation error will occur and a torque limit value change
110. eate the specified operation control program Create the specified transition Correct the specified SFC program name or create the specified SFC program Always set a conditional expression in the last block of the transition program The SFC program code is corrupted Turn PLC ready M2000 OFF and write the SFC program again or change the battery A6BAT if it has reached the end of its life 15 ERROR LISTS Table 15 4 Operation Control Transition Execution Errors 16300 to 16599 Error Error Factor ENS Corrective Action Code Name Definition Error Processing Event task enable was executed in The block processing in Event task enable may be executed other than the normal task execution is stopped in the normal task only Correct the and the next block is program Event task enable El execution error Event task disable was executed in executed Event task disable may be Event task disable DI execution error Block transfer BMOV execution error Time to wait TIME execution error 6308 Speed change request CHGV execution error Torque limit value change 16309 request CHGT execution error Assignment execution error other than the normal task The cam data of the cam No specified at D or S is not yet registered to the motion controller The resolution of the cam No specified at D or S differs from the number of transferred words specified at n The PCPU
111. eee enne nennen sn trnr etre n terns nnns entes en nene 12 1 12 41 Automatic tati t aeo erbe eee re eet 12 1 12 4 2 Startfrom A O O 12 1 12 1 3 Start from PLC Sequence instruction SFCS 12 2 112 2 HOW to End SFG PrOGEalm iiec e td dd is 12 4 12 3 Clear Step in the SFC Program esses enne enne nre trn innen nnns nente tn nennen 12 4 12 4 How to Change from One SFC Program to Another sssssssseeeeeeennenes 12 4 12 5 How to Manage the Running Programs sse eene nennen nnne 12 4 12 6 SCPU to PCPU Interrupt Instruction Sequence instruction ITP sssssessss 12 5 13 SFC PROGRAM CONTROLLING OPERATIONS sse 13 1 to 13 3 13 1 Operation Performed at CPU Power Off or Key Reset sssssseeeenen emen 13 1 13 2 Operation Performed when CPU Is Put in RUN Mode seem 13 1 13 3 Operation Performed when CPU Is Switched from RUN to STOP 13 1 13 4 Operation Performed when CPU is set to PAUSE or STEP RUN eee 13 1 13 5 Operation Performed when PLC Ready M2000 Turns OFF ON eene 13 2 13 6 Error Time Operation 13 3 14 USER FILES eases ee Re teg crest ert eee desde va a a A Aaea 14 1 to 14 2 14 1 Projects eH ER e eee Mi E ete er Aion c dele n dae rep in 14 1 14 2 User Fleitas 14 2 TOs ERRORES TS A A a nie ete et Pee tie re utet 15 1 to 15 8 15 T SEG Program Erttots
112. eger integer floating Supression conditional nditional point timer type type point expression le oression type F K H K H L type K Bit device integer type L 2 Data to be set Data to be Set Data Type of Result S Data which will be logically negated Logical type true false 3 Functions a The data specified at S is logically negated 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which sets M100 when either of MO and XO is not ON 1 i e when MO and XO are both OFF 0 SET M100 MO X0 w raso True False w 9 rosa 5 OPERATION CONTROL PROGRAMS 5 10 3 Logical AND F ES Number of Basic Steps E 0 S1 82 1 Usable data Usable Data Word device Constant 92 bit 64 bit 16 bit 32 bit 64 bit lean Bit pru integer floating Coasting integer integer floating Supression conditional ditional typelL type F K H K H L type K Bit device point timer type type point expression expression 2 Data to be set Data to be Set Data Type of Result S1 S2 Data which will be ANDed Logical type true false 3 Functions a The data specified at S1 and the data specified at 82 are ANDed 4 Errors a An operation er
113. emory Specify the absolute address with an even number 2 Data to be set Data to be Set Description Data Type of Result Transfer destination device starting number Transfer source device starting number Number of words to be transferred 3 Functions a n words of data in word devices starting with the one specified at S are batch transferred to n words of word devices starting with the one specified at D b Data can be transferred if the word devices of the transfer source and destination overlap Data are transferred from the devices starting with the one at S for transfer of data from devices of larger numbers to those of smaller numbers or starting with the one at S n 1 for transfer of data from devices of smaller numbers to those of larger numbers c Specifying Nn cam number at D or S enables batch transfer of cam data In the motion controller the cam data of the same cam number must already have been registered The number of transferred words specified at n should match the resolution of the specified cam number Operations performed at write and read of cam data are as described below e For A172SHCPUN The cam data storage area is rewritten e For A173UHCPU S1 A273UHCPU S3 The cam data is stored into the extended file register block 10 and later but this instruction rewrites the cam data import area in the PCPU The extended file register contents are not changed Therefo
114. ess as a multiple of 4 Specify the absolute address as a multiple of 8 16 6 16 LIMIT SWITCH OUTPUT FUNCTION 3 ON region setting a Set the data range where the output device is turned ON OFF in response to the watch data b The following devices can be used as the ON Value and OFF Value of the data range The data type of the device constant to be set is the same as the type of the watch data A Number Setting Range Item A173UHCPU S1 ANESHORUN A273UHCPU S3 4 Output enable disable bit a Set the status of the output enable disable bit when you want to disable the limit switch outputs during operation 1 The following control is exercised Output Enable Disable Bit Status Without setting always enable Limit switch outputs are turned ON OFF on the basis of the ON region setting ON Value OFF l ON enable 9 gl With setting Value OFF disable Limit switch outputs are turned OFF b Usable devices CURE Number Setting Range Item A173UHCPU S1 ANPSHORUN A273UHCPU S3 16 7 16 LIMIT SWITCH OUTPUT FUNCTION 5 Forced output bit a Set the forced output bit when you want to forcibly provide the limit switch outputs during operation This setting overrides OFF disable of the above output enable disable bit 1 The following control is exercised Forced Output Bit Without setting Limit switch outputs are turned ON OFF on the basis of the ou
115. et Bit data for device reset Bit logical type true false Condition data which determines whether device reset will be performed or not 3 Functions a If the data specified at S is true the bit data specified at D is reset b S can be omitted At this time the format is RST D and device reset is made unconditionally c When this instruction is set as a transition condition in the last block of a transient program whether the data specified at S is true or false is returned as logical type data In this case S cannot be omitted 4 Errors a An operation error will occur if 1 D or S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which resets M100 when either of MO and XO is 1 RST M100 MO X0 w s M100 Ne True AMECA 5 OPERATION CONTROL PROGRAMS b Program which resets M100 when 0 is equal to DO RST M100 0 DO M100 0 0 fT T l l E o 209 c Program which resets YO unconditionally RST YO w s True 5 OPERATION CONTROL PROGRAMS Device output DOUT Ere M car Number of Basic Steps DOUT D S 1 Usable data Usable Data Word device Constant api S4bit 16 bit 32 bit 64 bit Bit compar floating Coasting integer integer floating eulation conditional Son integer type L Bit device exp
116. examples a Program which shifts 0 two bit positions to the right and assigns the result to DO DO 0 gt gt K2 D15 siete eua eon bO DUS E E TE b0 D0 0 0 0101 0 0 1 0 1 000 1 1 0 1 0 00 1 0 0101 0 0 1111101 000 5 19 5 OPERATION CONTROL PROGRAMS 5 5 6 Bit left shift lt lt F ES Number of Basic Steps S1 lt lt 82 1 Usable data Usable Data Word device Constant d hi hi hi hi n ompar 32 bit 64 bit 16 bit 32 bit 64 bit Cal ulation Bit expression ison conditional expression Bit device floating Coasting integer integer floating point timer type type point type F K H K H L type K conditional integer expression type L 2 Data to be set Data to be Set Data Type of Result S1 Data to be left shifted Data type of S1 S2 Number of left shifts Integer type 3 Functions a The data specified at S1 is shifted to the left by the number of times specified at S2 b O enters the least significant bit of the left shift result c When S1 is a 16 bit integer type and S2 is a negative number or not less than 16 the result is 0 d When S1 is a 32 bit integer type and S2 is a negative number or not less than 32 the result is 0 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outs
117. execution interlocks interrupt is not processed the specified SFC program does When started by or create an SFC program not yet not exist GSUB the start created At an SFC program start made by source SFC program Double start should be managed on automatic start setting or GSUB being run also stops the user side 16006 Double start error At an SFC program start made by The specified SFC Check the SFC program number automatic start setting or GSUB program does not start and correct it to a correct program 16005 No SFC program the same SFC program is already Provide the user s starting signal as starting a transition condition 15 1 15 ERROR LISTS Table 15 2 SFC Interpreter Detection Errors 16100 to 16199 Error Error Factor Error Processing Corrective Action Code Name Definition The code exists but is The corresponding SFC The SFC program code is grammatically erroneous program No being run corrupted Though not within branch stops Turn PLC ready M2000 OFF and 16100 coupling a label jump code within For the subroutine write the SFC program again or selective branch coupling or a called program the call change the battery A6BAT if it has label jump code within parallel source program being reached the end of its life branch coupling exists run also stops e Selective branch destinations are all headed by other than SFT or WA
118. f Shift Y N or WAIT Y N transition programs refer to Section 3 3 2 1 Operation control transition instruction list 4 SFC PROGRAMS 3 Instructions for SFC charts Any SFC chart that will be meaningless to or conflict with the definition of Y N transitions will result in an error at the time of editing or SFC chart conversion Their patterns and instructions will be given below a When Shift Y N or WAIT Y N is connected as a selective branch or parallel branch Error e Shift Y N used as selective branch e WAIT Y N used as selective branch L x x LIE BN e Shift Y N and WAIT Y N used as e Shift or WAIT Y N used with other parallel branch step transition as parallel branch or selective branch L x mod X b When a coupling precedes Shift Y N or WAIT Y N Provide coupling branch continuation in between Direct coupling with Shift Y N or e Provide coupling branch WAIT Y N is not allowed continuation in between oi i 4 SFC PROGRAMS c The following patterns may be set e End END from Shift Y N or WAIT e Jump from Shift Y N or WAIT Y N Y N e Continuation from Shift Y N or WAIT Y N to Shift Y N or WAIT Y N selective branch selective branch lo EE E END e When there are two or more connection lines from Y N side of Sh
119. f X0 XF to DO DIN DO XO DB nisse reed aie dete tenance bO ee ee ee eee YO 4 Dopjo 0 10 01 1 1 0 0 0 0 1 1 1 1 mm 00 1 00 1111 000 01 1 1 5 OPERATION CONTROL PROGRAMS 5 10 Logical Operations 5 10 1 Logical acknowledgement None F ES Number of Basic Steps A 2 EE E ee 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit Bit Gompa 2 j E Calculation a ison floating Coasting integer integer floating A iprescion conditional ditional i i expression expression 16 bit 32 bit integer integer type type L 2 Data to be set Data to be Set Data Type of Result S Data which will be logically acknowledged Logical type true false 3 Functions a Whether the logical type data specified at S is true or false is returned unchanged Logical acknowledgement 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which sets M100 when either of MO and X0 is ON 1 SET M100 MO XO EM EL M100 1 xo mue 5 OPERATION CONTROL PROGRAMS 5 10 2 Logical negation F ES Number of Basic Steps L xe up Os jj IS 1 Usable data Usable Data Word device Constant 32 bit 64bit TEBE 320 amp amp bit Teia Bt Seen floating Coasting int
120. for A31TUCBL The motion slots also accept PLC A1S I O modules The motion slots accept one A1SI61 interrupt input module This module is designed for only event NMI input to the motion CPU and is irrelevant to PLC interrupt programs The motion slots accept up to 256 I O points The I O numbers of the I O modules loaded in the motion slots should be later than the I O numbers used with the PLC slots 2 SYSTEM CONFIGURATION 2 3 A172SHCPUN System Overall Configuration The following system configuration assumes use of the A172SHCPUN co oo 0 o gt gt S238 Bxx goo X Input module A1SXLILI 2 o 5 E vL o en e gt E 50 o ga o 5 o o E on Motion slots PLC slots gt o ia 2 L9 8 E 883 E Uo co c e o oO B E coe e 0230 gt OOo a gsi B o 20 E ces g gt 3 Battery 1A172SHCPUN A172S A1S gt A6BAT ENC 61 Bo az CO Extension o e Emergency cable E stop input e A1SC OB a FA CPU base unit A178B S1 A17 OB PLC extension base ForA168B upto 3 bases AC100 200V Manual pulse External interrupt input signals For A1S6 OB up to 1 base Teaching unit P generator x 1 16 points IO to 115 A31TU E A30TU E MR HDP01 SV13 only Serial absolute synchronous encoder
121. gister W n F read error Indirectly specified 16 bit The indirectly specified device timer present value T n number is outside the range read error Indirectly specified 16 bit 16472 counter present value C n read error Indirectly specified input relay X n read error Indirectly specified output relay Y n read error Indirectly specified 16488 internal latch relay M n L n read error Indirectly specified link relay B n read error 16486 16487 16489 16490 Annunciator F n read error Timer contact TT n read error 492 Counter contact CT n read error Counter coil CC n read error Indirectly specified 16 bit The indirectly specified device batch input relay X n read number is outside the range or is error not a multiple of 16 m o R o E o ER o R c Indirectly specified 32 bit batch input relay X n read error Indirectly specified 16 bit batch output relay Y n read error Indirectly specified 32 bit batch output relay Y n read error Indirectly specified 16 bit 16520 batch internal latch relay M n L n read error EM o R oO AR 15 6 15 ERROR LISTS Table 15 4 Operation Control Transition Execution Errors 16300 to 16599 Continued Error Error Factor Code Name Indirectly specified 32 bit batch internal latch relay M n L n read error Indirectly specified 16 bit batch link relay B n read error Indirectly
122. gned 5 12 5 OPERATION CONTROL PROGRAMS 5 45 Division lo o S82 1 Usable data Usable Data Word device Constant 32 bit 64bit 16bit O AS DU ison integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K Bit device 2 Data to be set Data to be Set Data Type of Result S1 Dividend data Data type of S1 or S2 S2 Divisor data which is greater 3 Functions a The data specified at S1 is divided by the data specified at S2 to find a quotient b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before operation is performed 4 Errors a An operation error will occur if 1 S2 is 0 or 2 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which divides K123 by 0 and assigns a quotient to WO wo K123 0 w 3 of 3023 b Program which divides 0F by 10 and assigns a quotient to DOL DOL 0F 10 3 2 1 0 Di DO 112345789 DOL wo A 100 3722683 a The 64 bit floating point type data are used for division and the quotient is converted into the 32 bit integer type and then assigned 5 13 5 OPERATI
123. hanging the values of these parameters turn PLC ready M2000 OFF POINT The settings of executed task number of consecutive transitions and END operation are invalid for the subroutine called program For the subroutine called program executed task and number of consecutive transitions depend on the call source program setting END operation is controlled as end 11 SFC PARAMETERS Start control 1 Start setting Description The following control is governed by automatically started or not setting e Program run by normal task When automatically started In the main cycle after PLC ready M2000 has turned from OFF to ON the program is run from the initial first step in accordance with the normal task s consecutive transition count When not automatically started The program is started by the SFC start instruction SFCS from the PLC or by a subroutine call start GSUB made from within the SFC program When started by the SFCS instruction In the main cycle after execution of the SFCS instruction the program is run from the initial first step in accordance with the normal task s consecutive transition count When subroutine started In the next main cycle after execution of GSUB the program is run from the first step in accordance with the normal task s consecutive transition count e When subroutine called The program is run in the same cycle
124. hanical system program edit information file pages 1 to 8 program editing file svedida2 bin Note Mechanical system program edit information file pages 9 to 16 Note T 92 axes feature svedtda3 bin Note pues Mechanical system program edit information file pages 17 to 24 y svedtda4 bin Note jv Mechanical system program edit information file pages 25 to 32 Mechanical system svmchprm bin sd File after conversion of mechanical system program edit For program conversion file information file svedtdan bin into internal codes SV22 only Cam data conversion file svcamprm bin sd Cam data file of cam No 1 to No 64 svcamprm3 bin Note Cam data file of cam No 201 to No 264 Note For 32 axes feature svcamprm2 bin Note Cam data file of cam No 101 to No 164 d svcamprm4 bin Note pews Cam data file of cam No 301 to No 364 Backup data file svbackupbin sd Information file 1 for backup and load svbackup2 bin Information file 2 for backup and load Motion device file modevice bin rd 0 to 8191 read file 16KB For write only user device range 0 to 7999 is written temp fer Program editing temporary directory 14 2 15 ERROR LISTS 15 ERROR LISTS Eight errors that occurred in the past during SFC control are stored into the error history devices 8000 to 8039 of the motion registers The error codes in them indicate the following definitions The conventional minor errors major er
125. he machine while it is being test run or taught for example Not doing so can cause injury 4 Additional Instructions Also note the following points Incorrect handling can cause a failure injury electric shock or the like 1 For system construction Install earth leakage breakers for the power supplies of the controller and servo amplifiers N When the instruction manuals of the servo amplifiers and like used specify that powering off magnetic contactors must be installed for error occurrence install magnetic contactors To ensure an immediate operation stop and power off install an external emergency stop circuit When using the controller servo amplifiers servo motors and regenerative brake resistors combine them as specified in the A173UHCPU A172SHCPUN A171SHCPUN user s manual or the A273UHCPU user s manual and the instruction manuals of the products in use Not doing so can cause a fire or failure When the system using the controller servo amplifiers and servo motors has safety standards e g safety rules for robots the system must satisfy the safety standards If the abnormal operations of the controller and servo amplifiers differ from the safety direction operation of the system configure up remedial circuits outside the controller and servo amplifiers Use dynamic brakes with the servo motors if the coasting of the servo motor can cause a problem at an emergency stop servo off or power off in the system Even if dyn
126. ide the range 5 Program examples a Program which shifts 0 one bit position to the left and assigns the result to DO DO 0 lt lt K1 Dias b0 DDN b0 D0 0 1 0 0 1 0 1 0 011 110 110 0 O lt 0 00 11001 0 100 111 01 00 5 OPERATION CONTROL PROGRAMS 5 5 7 I FFS Sign inversion complement of 2 I BE Number of Basic lime cee See __ 1 Usable data Usable Data Word device Constant 16 bit integer type 64 bit floating 32 bit integer type L 16 bit Coasting integer 32 bit integer 64 bit floating Bit conditional expression Calculation expression Compar ison conditional expression 2 Data to be set Data to be Set Data Type of Result Data type of S Data whose sign will be inverted S 3 Functions a The sign inverted value of the data specified at S is found 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which assigns the sign inverted value of 0 to DO DO 0 0 5 OPERATION CONTROL PROGRAMS 5 6 Standard Functions 5 6 1 Sine SIN F ES Number of Basic Steps pud SIN S 1 Usable data Usable Data Word device Constant 16 bit 32 bit TODS rcge Dt bit Calculation Bl integer integer type L Compar ison Co
127. ift Y N or WAIT Y N selective branchselective branch or parallel branch continues E O an oe AA H T ES JEJE i por mu 4 SFC PROGRAMS 4 11 SFC Comments A comment can be set to each symbol of the step transition in an SFC chart Comments are shown in an SFC chart by changing the display mode to Comment display on the SFC program edit screen Since SFC comments are stored into the CPU code area performing read from PLC displays the SFC chart with comments Classification Symbol Comment Setting Program name Program start end Comment setting cannot be made Motion control step Program name ESPE Kn Once execution type operation control step Scan execution type operation control step Subroutine call start step gt gt Clear step CURE rogram name Shift preread Max 80 characters transition Displayed in 20 characters x 4 lines WAITON ON bit device Transition WAITOFF OFF bit device ERECEEE WAIT Y N h Gn Gn Max 64 characters Pn Displayed in 16 characters x 4 lines Pointer Pointer Mm iss 4 SFC PROGRAMS 1 SFC comments are stored into the CPU code area The CPU code area stores the SFC chart codes operation control F FS program codes transition G program codes and SFC comments
128. ill Axis 24 return to P2 4 The speed change 0 acceptance Return request _ flag is not available for the posi was given here tioning dedicated devices on the A172SHCPUN 5 There will be a delay of time equivalent to an operation cycle at Starting point the maximum in the response time from when the CHGV instruction is executed until the speed begins to change actually 5 OPERATION CONTROL PROGRAMS 5 12 2 Torque limit value change request CHGT E 0 CHGT S1 82 1 Usable data Usable Data Word device Constant 32 bit 64 bit 16 bit 32 bit 64 bit lean Bit Compar integer floating Coasting integer integer floating conditional Bit device expression conditional point timer type type point expression expression type L type F K H K H L type K Axis number to which torque limit value change request will be given Specified torque limit value 3 Functions a The torque limit value of the axis specified at S1 is changed to the torque limit value axis specified at S2 b In the real mode any axis that has completed a servo startup can be changed in torque limit value any time independently of the status starting stopping servo ON or servo OFF c The axis number that may be set at S1 is within the following range A173UHCPU S1 A172SHCPUN ONSON A273UHCPU S3 32 axes feature 1 to 32 d The torqu
129. in 1to R eturn request 600000000 x1 0 inch min 1to 600000000 2 Virtual mode PULSE Setting range Speed change request 0 to 10000000 1 to 10000000 2147483647 x1 0 degree min 1 to 10000000 1 to e Specifying a negative speed and making a speed change request during starting allows the axis to start deceleration at that point and return in the opposite direction upon completion of deceleration Operation varies with the servo instruction as described below Control Mode Linear control Servo Instruction Circular interpolation control ABS circular INC circular Fixed pitch feed Operation On completion of deceleration the axis reverses its moving direction returns to the positioning starting point at the absolute value of the specified speed and stops waits there For circular interpolation the axis returns in the circular path Constant speed control CPSTARTI J CPSTART2 CPSTART3 CPSTART4 On completion of deceleration the axis reverses its moving direction returns to the preceding point at the absolute value of the specified speed and stops waits there Speed control 1 Speed control Il On completion of deceleration the axis reverses its moving direction at the absolute value of the specified Speed The axis does not stop until a stop command is input Speed position control P
130. in the corresponding range 16 5 16 LIMIT SWITCH OUTPUT FUNCTION 2 Watch data a This data is used to perform the limit switch output function This data is comparison data to output the ON OFF signal The output device is ON OFF controlled according to the ON region setting b As the watch data motion control data or any word device data can be used 1 Motion control data Axis Number Setting Range Item A173UHCPU S1 AT728HCPUN Z3UHCPU S3 32 bit f integer type Motor current i 16 bit Command output voltage ACF imeger type 1to8 1 to 32 Motor speed Cam shaft within one revolution current value Feed current value temporary 32 bit After differential current value PULSE integer temporary type After differential encoder current 1 1 to 12 Encoder current value 2 Word device data Device Number Setting Range Item A173UHCPU S1 ATTeDHOFMN A273UHCPU S3 Data register DO to D1023 DO to D8191 Link register WO to W3FF WO to W1FFF 0 to 8191 0 to 8191 pesos HO to HFFFFFFFF HO to HFFFFFFFF address 1 1 If the specified absolute address is outside the SRAM range of the motion controller limit switch output control for the corresponding watch data is not exercised 3 When you have set any device data specify the following data type as the data type to be compared Data Type 16 bit integer type Specify the absolute address as an even number Specify the absolute addr
131. in an angle degree unit c If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which performs the COS operation of DO and assigns the result to 0F 0F COS D0 Hi 0 3 2 E ME gt X d o s LLL L 5 OPERATION CONTROL PROGRAMS 5 6 3 Tangent TAN F ES Number of Basic Steps Lx up Os TAN S 1 Usable data Usable Data Word device Constant 32 bit 64 bit 16 bit 32 bit 64 bit oaiculation Bit pru integer floating Coasting integer integer floating expression conditional ditional eel ype F K H K H L type K Bit device point timer type type point expression expression 2 Data to be set Data to be Set Data Type of Result Angle data on which TAN tangent t S Floating point type operation will be performed EUM 3 Functions a TAN tangent operation is performed on the data specified at S b The data specified at S is in an angle degree unit c If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range or 2 S is 90 180 n
132. int 2147483648 to 2147483647 Latch No latch Cleared to zero at power on or key reset Coasting timer FT Usable tasks Normal event NMI Access Read only enabled Timer specifications o Current value FT is incremented by 1 per 888us 9 TASK OPERATIONS 9 TASK OPERATIONS 9 1 Task Definitions When to execute SFC program processing can be set only once in the program parameter refer to Chapter 11 SFC Parameters per program These processing timing brackets are called tasks Roughly classified there are the following three different tasks Task Type Description Normal task Executed in motion main cycle free time Event task 1 Executed in fixed cycle 1 7ms 3 5ms 7 1ms 14 2ms 2 Executed when the input set to the event task factor among external interrupts 16 points of Al61 turns ON 3 Executed by an interrupt from the PLC NMI task Executed when the input set to the NMI task factor among external interrupts 16 points of Al61 turns ON 1 Normal task Operations An SFC program is run in the main cycle free time of the motion side CPU PCPU processing The processing is outlined as follows Normal task execution cycle SFC program running cycle gt SFC program run SFC program run H System main control PBUS s X PX is refreshed to PLC device PBUS s actual X PX read PBUS s actual Y PY write Points a The SFC program which includes m
133. integer type unsigned USHORT S LONG Converted into 32 bit integer type signed LONG S ULONG Converted into 32 bit integer type unsigned ULONG S O O O O OOO OJO O OO OJO OOO OJO O JOJOJOJOJO O OJO IO OJO O O O O O OOO OJO O OO OJO OOO OJO O OJO JO OJO O OJO IO OJO O O O O O OOO OJO O OO OJO OOO OJO O OJOJ OJOIO O OJO IO OJO O FLOAT Regarded as signed data and converted into 64 bit floating point type FLOAT S O O O UFLOAT Regarded as unsigned data and converted into 64 bit floating point type UFLOAT S Bit device status ON normally open contact Bit conditional expression OFF normally closed contact Bit conditional expression 3 PERFORMANCE SPECIFICATIONS Usable Usable Expressions Programs Classification Function Number of Basic Calculation expression Bit conditional expression Comparison conditional expression YIN transition s conditional expression SET D Device set SET D conditional expression Bit device RST D control Device reset RST D conditional expression Device output DOUT D S Device input DIN D S Logical acknowledgement Logical negation conditional expression Conditional expression conditional expression Conditional expression Conditional expression O JO O JOJO O J
134. internal area when PLC ready M2000 turns from OFF to ON Thereafter in each motion operation cycle the word device contents are imported to control the limit switch outputs c You can set multiple outputs up to 32 points to one piece of watch data In each setting the output device may be the same If multiple ON region settings have been made to the same output device the logical add of the output results in the regions is output OFF ON OFF ON OFF Value em ON region setting No 2 ON Value OFF Value ON region setting No il CUT alue Watch data value 2 You can set an output enable disable bit to enable disable the limit switch outputs point by point Limit switch output control is exercised when the output enable disable bit is ON and the output is OFF when it is OFF When there is no setting the outputs are always enabled 8 You can set a forced output bit to forcibly provide turn ON the limit switch outputs point by point The output is ON when the forced output bit is ON This setting overrides OFF disable of the output enable disable bit When there is no setting no forced outputs are always provided 16 2 16 LIMIT SWITCH OUTPUT FUNCTION 4 When multiple pieces of watch data ON region output enable disable bit and forced output bit are set to the same output device the logical add of the output results of the settings is output M9074 ON Without ou
135. ion 2 axes PTP Point To Point speed control speed position control fixed pitch feed constant speed control position follow up control speed change control high speed oscillation control current value change mm inch degree PULSE Dedicated instructions servo program PTP Absolute method incremental method selection Speed position control fixed pitch feed Incremental method Constant speed control speed change control Absolute method incremental method may be mixed Position follow up control current value change Absolute method Can be selected per axis Control Unit Command Unit A173UHCPU S1 Number of control axes 32 axes 2 to 4 multi axes 32 independent axes Interpolation function Control method Control unit Programming language Method Address Setting Range Travel Setting Range x10 um x 10 inch x 10 degree PULSE Position command 2147483648 to 2147483647 2147483647 0 to 35999999 eile 836 2147483648 to 2147483647 Positioning x1 mm 0 01 to 6000000 00 mm min inch 0 001 to 600000 000 inch min degree 0 001 to 2147483 647 degree min PULSE 1 to 10000000 PLS s Time Fixed Acceleration Deceleration Acceleration deceleration time 1 to 5000ms Enabled for constant speed control only Speed command command unit Automatic trapezoidal acceleration deceleration Acceleration time 1 to 65535ms Automatic tra
136. ion timing CHGA E instruction Synchronous encoder shaft current value changing flag Current value change completion 4 Servo program Cam shaft within one revolution current value change control Output shaft number 1 New address 0 CHGA C Axis 2 0 7 MOTION CONTROL PROGRAMS 1 Synchronous encoder current value changing instructions e The current value change of a synchronous encoder is executed if operation is being performed in the virtual mode during pulse input from the synchronous encoder When the current value is changed the feed current value of the synchronous encoder continues from the new value e The current value change of the synchronous encoder does not affect the current value of the output module e Set the synchronous encoder shaft s current value change program within the virtual mode program number range set in program mode assignment e When PLC ready M2000 or PCPU ready M9074 is OFF a minor error 100 occurs and a current value change is not made e If a synchronous encoder current value change is executed in the real mode a servo program error 903 or 905 occurs and the current value change is not made 903 when the current value change servo program is set to within the virtual mode program number range or 905 when it is set to within the real mode program number range e f a current value change is made during mode changing a
137. is can be achieved easily by subroutine starting the areas to be run in fixed cycle and to be run by external interrupt partially in an SFC program run by the normal task The executed task of the subroutine called program is controlled like that of the call source program Hence this setting is invalid but it is recommended to make the same setting as the call source program 11 6 11 SFC PARAMETERS 3 Number of consecutive transitions Description Set the number of consecutive transitions to each program run by the event or NMI task Refer to Section 11 1 for the number of consecutive transitions Errors This parameter is imported when PLC ready M2000 turns from OFF to ON and is checked at an SFC program start automatic start start from PLC or subroutine start When the value is unauthorized either of the following SFC errors is set and the initial value is used for control Error Factor Error Code HUE Error Processing Corrective Action Name Definition Event task The set number of consecutive consecutive transitions of the SFC program transition count started by the event task is Turn PLC ready M2000 error outside the range 1 to 10 The initial value of 1 is used OFF make correction to set NMI task for control the value within the range consecutive NMI task consecutive transition and write it to the CPU transition count count error error The number of consecutive transitions
138. it APP 5 APPENDICES Classification Bit device status 2 Transition conditional expressions Instruction ON normally open contact when condition enables Operation Expression MO A172SHCPUN A173UHCPU S1 Single Operation Expression Processing Time A273UHCPU S3 Single Operation Expression Processing Time us X100 PXO OFF normally closed contact when condition enables IMO 1X100 IPXO Logical operation Logical AND MO M1 X100 X101 PXO PX1 Logical OR MO M1 X100 X101 PXO PX1 Comparison operation Equal to when condition enables 0 1 D800 D801 0L 2L D800L D802L 0F 4F D800F D804F Not equal to when condition enables 0 1 D800 D801 0L 2L D800L D802L 0F 4F D800F D804F Less than when condition enables 0 lt 1 D800 lt D801 OL lt 2L D800L lt D802L HOF lt 4F D800F D804F Less than or equal to when condition enables 0 lt 1 D800 lt D801 0L lt 2L D800L lt D802L OF lt 4F D800F lt D804F More than when condition enables 0 gt 1 D800 gt D801 OL gt 2L D800L gt D802L OF gt 4F D800F gt D804F More than or equal to when condition enables 0 gt 1 D800 gt D801 0L gt 2L
139. ition condition enables after operation has been performed When this transition is preceded by a subroutine call start step execution does not wait for completion of the subroutine operation and shifts to the next step when the transition condition enables WAIT Gn When this transition is preceded by a motion control step execution waits for completion of the motion operation and shifts to the next step when the transition condition Gn GO to G4095 enables When this transition is preceded by an operation control step execution shifts to the next step when the transition condition enables after operation has been performed same operation is performed as in Shift When this transition is preceded by a subroutine call start step execution waits for completion of the subroutine operation and shifts to the next step when the transition condition enables WAITON ON bit device WAITON bit device Prepares for starting the next motion control step and when the specified bit device turns ON issues a command immediately Always pair this transition with a motion control step one for one WAITOFF WAITOFF bit device Prepares for starting the next motion control step and when the specified bit device turns OFF issues a command immediately Always pair this transition with a motion control step one for one Shift Y N When condition does not enable Gn INI When Y condition enables
140. l xpression s expressio expression 2 Data to be set Data to be Set Data Type of Result Data type of S S Data whose bits will be inverted E S Integer type 3 Functions a The bit inverted value of the data specified at S is found 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which finds the bit inverted value of 0 and assigns the value to DO DO 0 D15 vu EUER bO E RARE bO D0 1 1 0 1 1 0 1 0 1 1 0 0 1 0 1 1 4 H0j0 0 1 00 1 0 1001 1 01 0 0 5 15 5 OPERATION CONTROL PROGRAMS 5 2 Bit logical AND amp ES Number of Basic Steps S1 amp S2 1 Usable data Usable Data Word device Constant api S4bit 16 bit 32 bit 64 bit Bit Compar floating Coasting integer integer floating culation conditional Son Bit device integer type L expression conditional point timer type type point R expression type F K H K H L type K expression Data type of S1 or S2 Data which will be ANDed bit by bit which is greater Integer type 3 Functions a The bit by bit logical product of the data specified at S1 and the data specified at S2 is found b When S1 and S2 differ in data type the data of the smaller data type is co
141. le when the transition condition enables Consecutive transition control indicates that transition destination steps are executed one after another in the same one execution cycle when their transition conditions have enabled single basic operation is performed consecutively Set the number of consecutive transitions in this case Control exercised is common to the SFC programs run by normal tasks Set the number of consecutive transitions to each of the SFC programs run by event and NMI tasks Errors These parameters are imported and checked when PLC ready M2000 turns from OFF to ON When the value that was set is outside the setting range the following SFC error is set and the initial value is used to exercise control Error Factor Error Code ET Error Processing Corrective Action Definition Normal task The normal task s consecutive The initial value of 3 is used Turn PLC ready M2000 consecutive transition count of the SFC for control OFF make correction to set transition count program run by the normal task is the value of within the range error outside the range 1 to 30 and write it to the CPU 11 1 11 SFC PARAMETERS 2 Interrupt setting Description Set whether 16 interrupt input points IO to 115 of the Al61 interrupt input module loaded in the motion slot are used as NMI or event task inputs Setting can be made freely per point All points default to event tasks Erro
142. led as signed data The ON output region where an ON output is provided to the output device is governed by the magnitude relationship between ON Value and OFF Value as indicated below Relationship between ON Value and ON Output Region OFF Value P d ON Value OFF Value ON Value watch data value OFF Value ON Value watch data value N Val FF Val Nao S ORE Malte Watch data value OFF Value ON Value OFF Value Output OFF in whole region 1 If ON Value OFF Value Output device OFF ON OFF OFF Value ON region setting Watch data value ON Value hi ON Value lt watch data value OFF Value 2 If ON Value OFF Value Output device ON OFF ON ON Value ON region setting OFF Value Watch data value el Watch data value lt OFF Value ON Value lt watch data value 16 1 16 LIMIT SWITCH OUTPUT FUNCTION 3 If ON Value OFF Value Output device ON Value OFF in whole region ON region setting ON Value OFF Value Watch data value b The limit switch outputs are controlled on the basis of each watch data in the PCPU ready status M9047 ON after PLC ready M2000 has turned from OFF to ON When the PCPU ready flag M9047 turns OFF all points turn OFF When ON Value and OFF Value are specified with word devices the word device contents are imported to the
143. logarithm of the data specified at S is found b Only a positive number may be specified at S Operation cannot be performed with a negative number c If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is 0 or a negative number or 2 S is an indirectly specified device and its device number is outside the range 5b Program examples a Program which finds the natural logarithm of DOF and assigns the result to HOF 0F LN DOF REAU eU DO 2 302585 3025850929940 10 En 5 OPERATION CONTROL PROGRAMS Exponential operation EXP res Number of Basic Steps EXP S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit ia Bit pru floating Coasting integer integer floating expression conditional ditional expression expression 16 bit 32 bit integer integer type type L 2 Data to be set Data to be Set Data Type of Result S Data on which exponential A operation will be performed oP yp 3 Functions a Exponential operation is performed on the base e data specified at S b If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the
144. lt in an SFC program error 16113 and stop the SFC program that is running 3 NMI task Operations An SFC program is run as soon as the input set to the NMI task factor among the external interrupts 16 points of the Al61 turns ON Points a Among the normal event and NMI tasks the NMI task has the highest priority b If the event task is disabled DI by the normal task the interruption of the NMI task is executed without being masked Errors During an NMI task a motion control step cannot be executed Presence of a motion control step during an NMI task will result in an SFC program error 16113 and stop the SFC program which is running 9 TASK OPERATIONS 9 2 Task Execution Status The following example gives how the SFC programs run by multiple tasks are executed 3 5ms NMI interrupt NMI interrupt r When there are programs which are run by the NMI task 3 5ms fixed cycle even task and normal task 1 The 3 5ms fixed cycle event task run its program at intervals of 3 5ms 2 The NMI task runs its program with the highest priority when an NMI interrupt is input and 3 The normal task runs its program at free time as shown above NMI task run program 3 5ms event task run program E L LJ Normal task run program Points A single SFC program can be run partially by another task by setting the area to be executed by another task as a subroutine and setting
145. m name Operations 1 Stops the specified SFC program running 2 After stopped the clear specified SFC program will not start automatically if it has been set to start automatically 3 The specified program may be its own program 4 If the specified program is being subroutine called the subroutine program called is also stopped See below When the main program MAIN is cleared Even if the subroutine SUB is running both the main program MAIN and subroutine SUB stop running TRE When the subroutine SUB is cleared WAIT If the subroutine SUB is running the subroutine SUB stops running and execution returns to the main program MAIN MAIN SUB If the program has been subroutine called as shown on the left v a Cz UJ JE S 5 When the specified program has been subroutine started the subroutine program started continues processing See below MAIN sus If the program has been subroutine started as shown on the left When the main program MAIN is cleared Even if the subroutine SUB is running the main program MAIN stops running but the started subroutine SUB continues processing Shifi END When the subroutine SUB is cleared If the subroutine SUB is running only the subroutine SUB stops running N i lb m Z UO at 4 13 4 SFC PROGRAMS 6 When the servo program started from the specified program is
146. m OFF as required in the sequence program 2 SFC program run governed by RUN STOP and M2000 ON OFF PLC Ready M2000 Is ON PLC Ready M2000 Is OFF Ea FC programs SFC programs stop Turn ON OFF ding t Outputs ae AS _ held program SFC mal SFC programs stop stop Ee Program All outputs turn OFF SFC programs set to start STOP SFC programs automatically restart from SFC programs remain stopped y beginning id STOP gt RUN time output mode STOP RUN time output mode 13 2 13 SFC PROGRAM CONTROLLING OPERATIONS 13 6 Error Time Operation Outputs are held if SFC programs stop due to error occurrence To turn OFF outputs at error occurrence run the following SFC program Processing for SFC program A Lat 0 3 Whether error occurred in corresponding SFC program i or not is judged by SFC error detection signal M2039 and 8056 latest error SFC program number Processing for SFC program B Outputs which must be turned OFF are turned OFF SFC error detection signal M2039 is turned OFF At SCPU WDT ERROR occurrence all SFC programs running stop and all outputs turn OFF 13 3 14 USER FILES 14 USER FILES This chapter provides a user file list and directory structure 14 1 Projects User files are managed on a project basis When you set a project name a project name folder is created as indicated on the next page and under that sub folders SFC
147. m function after making a new startup or after changing the controller absolute value compatible motor or the like VII 6 For usage AN f any of the controller servo amplifiers and servo motors has emitted smoke unusual noise unusual odor or the like immediately switch power off After any program or parameter setting change or maintenance inspection always perform AN test operation before starting actual operation A Any person who is involved in the disassembly or repair of this equipment should be fully competent to do the work N Do not modify the equipment Install noise filters or shield the wiring for example to minimize the influence of electromagnetic interference Electromagnetic interference may be given to the electronic equipment used near the controller and servo amplifiers AX As for use with CE mark compatible installations refer to the EMC Installation Guidelines data number IB NA 67320 for motion controllers and to the corresponding EMC guideline data for other equipment such as servo amplifiers and inverters A Use the equipment under the following operating conditions As in the specifications of the Input power A173UHCPU A1 72SHCPUN A273UHCPU 32 axes feature As in the specifications of the Input frequency A173UHCPU A172SHCPUN A273UHCPU 32 axes feature Permissible As in the specifications of the instantaneous power A173UHCPU A172SHCPUN A273UHCPU failure time 32 axes feature
148. make a jump setting from outside parallel branch parallel coupling to within parallel branch parallel coupling Bad example 2 given below e You cannot make a setting where a label and a jump will continue Bad example 3 given below Bad example 1 Bad example 2 Bad example 3 m L Eie s 48 END Operations Instructions END e Ends a program e Making a subroutine call will return to the call source SFC program e END may be set a multiple number of times within a single program e END cannot be specified between a parallel branch and a parallel coupling e The output is held after the SFC program is ended by END 4 17 4 SFC PROGRAMS 4 9 Branches Couplings 4 9 1 Series transition Shifts execution to the subsequent step or transition connected in series 1 To start a servo program or subroutine and shift execution to the next without waiting for operation completion Set Shift at a transition In this case the transition shift may be omitted When you omitted the transition an unconditional shift transition is performed K1 Starts servo program K1 Without waiting for servo program K1 to complete operation shifts to next when condition set at transition G1 enables K2 Starts servo program K2 POINT When a subroutine start is made it own program and a subroutine program are processed in parallel 2 To start a servo program or subrou
149. n Japan Specifications subject to change without notice
150. n control data word device 16 bit integer 32 bit integer 64 bit floating point Number of read Specified data fast points read function PLC input module 8 points Max 9 points A172SENC s TRA input 1 point one motion slot Max 11 points A273EX s TRA input 3 points one motion slot PLC input module 8 points Data latch timing Leading edge of TRA input signal Within 0 8ms from leading edge of input signal to PLC input module Absolute position system Made compatible by fitting battery to servo amplifier Absolute or incremental system can be specified per axis 3 PERFORMANCE SPECIFICATIONS 3 3 2 Operation control transition control specifications Table 3 4 PCPU Performance Specification List Operation Control Transition Control Specifications Specifications Remarks Returns a numeric result Expressions for calculating indirectly specified data using constants and word devices Calculation expression D100 1 SIN D100F etc Bit conditional Returns a true or false result MO MO M1 MO 2 Sonal i Expression for judging ON or OFF of bit devi tional expression xpression for judging or of bit device M1 M2 x M3 M4 etc expres ee Expressions for comparing indirectly specified data and calculation D100 100 sion expression expressions using constants and word devices D10 lt D102 D10 etc Specifiable PLC devices bit devices
151. nal expressions and device set SET device reset RST which return logical data values true false In the case of device set SET device reset RST whether the bit or comparison conditional expression specified at S is true or false is a transition condition and when the transition condition enables device set reset is carried out and execution shifts to the next step Transition condition description examples are given below Classification Description Example MO IMO X10 M100 Bit conditional expression C i ditional E DO gt K100 D100L K20L expression Device set SET SET YO M100 Device reset RST RST M10 D0 K100 6 TRANSITION PROGRAMS 1 A transition program differs from an operation control program in that a transition condition is set in the last block Other settings are the same as those of the operation control program 2 When setting device set SET device reset RST in the last block as a transition condition you cannot omit the bit or comparison conditional expression to be specified at S 3 You cannot set only the bit or comparison conditional expression in other than the last block You can set device set SET device reset RST in other than the last block 7 MOTION CONTROL PROGRAMS 7 MOTION CONTROL PROGRAMS 7 1 Servo Instruction List Table 7 2 lists servo instructions used in servo programs Refer to Sections 7 2 to 7 4 for details of the pre
152. nchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 The S data is outside the range 0 to 4294967295 or 2 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which converts the data of DO into an unsigned 32 bit integral value and assigns the result to 0L 0L ULONG DO H0 0 K65535L lt p Kk HOOOOFFFF HFFFF Unsigned value is K65535 5 OPERATION CONTROL PROGRAMS 5 7 5 Signed 64 bit floating point value conversion FLOAT To Mo FLOAT S 1 Usable data Usable Data Word device Constant 32 bit i d integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K Compar 64 bit 16 bit 32 bit 64 bit Bit Calculation ison Bit device 2 Data to be set Data to be Set Data Type of Result S Data which will be converted 64 bit floating point type into signed 64 bit floating point value gP yP 3 Functions a The data specified at S is converted into a signed 64 bit floating point value b If S is a 64 bit floating point type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range
153. ned applications in the system Do not perform write to other than the user set device Note 1 SET RST is disabled in the following device ranges SET RST Disable Range Remarks M2001 to M2008 M2001 to M2032 A172SHCPUN A173UHCPU S1 A273UHCPU S3 DOUT output is disabled in the following device ranges DOUT Output Disable Range Designation including M2000 to M2047 M9000 to M9255 Designation including M2000 to M2127 M9000 to M9255 Start accepting device Remarks Dedicated devi A172SHCPUN edicated device Special M Dedicated device A173UHCPU S1 A273UHCPU S3 Special M e Each device range points varies with the CPU Refer to 3 2 SCPU Performance Specifications Inputs X outputs Y on the PLC slot side are represented as SBUS and those on the motion slot side as PBUS In the operation control program transition program they are automatically represented as PX PY according to the system setting information The input response of device X and the output response of Y differ between the SBUS PLC slot and PBUS motion slot For details refer to the next page 3 PERFORMANCE SPECIFICATIONS Table 3 4 PCPU Performance Specification List Operation Control T ransition Control Specifications Continued Specifiable PLC device word device Device Data register Specifications Accessibility Usable Tasks Descrip Normal Li
154. nk register Timer current value Counter current value ICAUTION lt Restrictions on write enabled word devices gt 1 Special D has predetermined applications in the system Do not perform write to other than the user set device tion Event Example Remarks Motion device word device Number of 8192 points 0 to 8191 Motion register points 8000 to 8191 are SFC dedicated devices Data 16 bits point Oo Number of 4 point FT Coasting timer FT points Data 32 bits point 2147483648 to 2147483647 Device Symbol Accessibility Usable Tasks Description Read Write Normal Motion register o O FT Coasting timer CAUTION Event NMI Example 1 The motion device cannot be accessed directly from the sequence ladder When you want to read perform read via the PLC device after assignment A273UH S3 A173UH S1 and A172SH have the same specifications None 16bit integer type Signed 32768 to 32767 K10 D100 etc 16 bit integer type unsigned 0 to 65535 Data type L 32 bit integer type signed 2147483648 to 2147483647 2147283647 W100L etc 32 bit integer type unsigned 0 to 4294967295 p ee oit noating point type IEEE format 1 23 10F etc double precision real number type Decimal The above data type symbol L or decimal point pr
155. nt pi expression type F K H K H L type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result Data whose fractional portion D f will be rounded off uio 3 Functions a The rounded off fractional portion value of the data specified at S is found b If S is a negative number the absolute value of S is found and its fractional portion is rounded off and signed c If S is an integer type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which finds the rounded off fractional portion value of DOF and assigns the result to 0F 0F RND DOF 3 2 H 40 D3 D2 D DO e l 8 b Program which finds the rounded off fractional portion value of DAF and assigns the result to 0F when D4F is a negative number 0F RND D4F 3 2 r y id n m 2 I jr n 7 2 ee 11 pe Es ui Tm 5 OPERATION CONTROL PROGRAMS 5 6 12 Round down FIX F ES Number of Basic Steps Lx o qe s FIX S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit diesen Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L
156. nverted into that of the greater type before operation is performed At this time note that signed data is converted 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which ANDs 0 and 1 and assigns the result to DO DO 0 amp 1 5 16 5 OPERATION CONTROL PROGRAMS Bit logical OR ES S1 52 1 Usable data Usable Data Word device Constant api S4bit 16 bit 32 bit 64 bit Bit Compar floating Coasting integer integer floating culation conditional Son integer type L Bit device d 8 j expression conditional point timer type type point R expression H expression type F K H K H L type K Data type of S1 or S2 Data which will be ORed bit by bit which is greater Integer type 3 Functions a The bit by bit logical add of the data specified at S1 and the data specified at S2 is found b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before operation is performed At this time note that signed data is converted 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the
157. ode the current value of the specified axis is changed a The current value change control conditions are indicated below Item Setting Servo program number Control axis New address 3 Operation timing CHGA instruction Start acceptance flag Current value change completion 4 The axis number used can be set within the following range lt K 10 gt CHGA Current value change control Axis 2 Used axis Axis 2 New address 50 7 MOTION CONTROL PROGRAMS 1 Current value changing instructions e When PLC ready M2000 or PCPU ready M9074 is OFF a minor error 100 occurs and a current value change is not made e This change is made only during a stop If a current value change is made while the specified axis is starting a minor error 101 start acceptance signal of the corresponding axis is ON occurs and the current value change is not made e If the servo of the corresponding axis is not READY a major error 1004 occurs and the current value change is not made e If the corresponding axis is in a servo error a major error 1005 occurs and the current value change is not made For SV22 e Set the virtual servo motor shaft s current value change program within the virtual mode program number range set in program mode assignment e Set the servo motor output shaft s current value change program within the real mode program number range e lf a
158. of S is 32768 to 32767 c When S is a 64 bit floating point type its fractional portion is rounded down before conversion is made d If S is a 16 bit integer type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 The S data is outside the range 32768 to 32767 or 2 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which converts the data of DOL into a signed 16 bit integral value and assigns the result to 0 0 SHORT DOL D1 DO 0 K 30000 4 K 30000L H8ADO HFFFF8ADO 5 OPERATION CONTROL PROGRAMS 5 7 2 Unsigned 16 bit integral value conversion USHORT x5 iesus USHORTS 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit lean Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result S Data which will be converted ie bi integere into unsigned 16 bit integral value SEYE 3 Functions a The data specified at S is converted into an unsigned 16 bit integral value b The data range of S is 0 to 65535 c When S is a 64 bit floating poin
159. of Basic Steps pepe D S 1 Usable data Usable Data Word device Constant 16 bit 32 bit 64 bit 16 bit 32 bit Bit Calculation a ison integer integer floating pac integer integer expression T conditional type type L Compar Bit device expression Word device constant calculation expression to be assigned Word device which will store the operation result Data type of D 3 Functions a The data value specified at S is assigned to the specified word device b When S and D differ in data type the data at S is converted into the data type of D and the resultant data is assigned When D is a 16 or 32 bit integer type and S is a 64 bit floating point type the fraction part of S is discarded 4 Errors a An operation error will occur if 1 The data at S is outside the data type range of D or 2 D or S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which assigns the DO value to 0 0 DO 5 OPERATION CONTROL PROGRAMS b Program which assigns K123456 789 to DOL DOL K123456 789 D1 DO DOL 123456 123456 789 The 64 bit floating point type is converted into the 32 bit integer type and the result is assigned c Program which assigns the result of adding K123 and 0 to WO WO K123 0 wo 579 lt lt A
160. oint Central point Control unit Speed limit value Acceleration time Deceleration tim Sudden stop deceleration time Torque limit value STOP input time deceleration permissible range S pattern ratio Speed Change Absolute Disabl O Item which must be set A Item which is set when required Controls Control using CHGA instruction 1 Executing the CHGA instruction changes the current value in the following procedure a The start acceptance flag M2001 to M2008 M2001 to M2032 corresponding to the specified axis is turned ON b The current value of the specified axis is changed to the specified address c Start acceptance is turned OFF on completion of the current value change 2 In the real mode the current value of the specified axis is changed 3 In the virtual mode the current value of the specified virtual servo motor shaft is changed 4 The axis number used can be set within the following range A173UHCPU S1 A172SHCPUN ME A273UHCPU S3 32 axis feature Axis 1 to axis 8 Axis 1 to axis 32 Program example A program for exercising current value change control in the real mode will be described under the following conditions 1 System configuration The current value change control of axis 2 is performed A172SHCPUN A1728 A1S A172B 7 MOTION CONTROL PROGRAMS 2 In the real m
161. on condition enables Errors 1 The absence of the specified operation control program Fn FSn will result in an SFC program error 16201 and stop the SFC program running at the point of error detection Instructions 1 For operation expressions that may be described in operation control programs refer to Chapter 5 Operation Control Programs 2 The SFC program continues running if an operation or similar error occurs during execution of the operation control program 4 11 4 SFC PROGRAMS 4 5 3 Subroutine call start step Symbal Subroutine Calls starts the SFC program of the specified program call start step name 1 Calls starts the SFC program of the specified program name 2 Control varies with the type of the transition coupled next to the subroutine call start step a For WAIT A subroutine call is performed When the subroutine call step is executed control shifts to the specified program as shown below and when END of the called program is executed control returns to the call source program b For other than WAIT A subroutine start is performed When the subroutine start step is executed control starts the specified program and then shifts to the next as shown below Hence the start source and destination SFC programs are run in parallel The started program ends when END is executed CARTA eA SUB MAIN xd SUB Y 3 y 3 5 E ans 0 5 O Shift 2 END 1 n 1 A
162. or error virtual servo motor shaft SV22 only Minor major error synchronous encoder shaft SV22 only Servo error Servo program error Mode change error SV22 only 9 Manual pulse generator axis setting error 10 Test mode request error 11 PCPU WDT error 12 Personal computer link communication error Error program number 0 to 4095 F FS G K program number Oto 255 GSUB program number 1 Independent of F FS G K GSUB 0 to 4095 Servo program number when error type is 3 in real mode 4 or 7 1 Others including no start JOG manual pulse generator or test mode zeroing servo startup servo diagnostic start Error block number SFC list line number axis number 0 to 8191 F FS or G program s block number line number when error type is 1 or 2 SFC list line number when error type is 2 1 Independent of block when error type is 1 or error type is 1 or 2 0 to 8188 1 to 32 Corresponding axis number when error type is any of 3 to 6 1 Others Error code 16000 and later Refer to 15 Error List Conventional error code less than 16000 when error type is any of 3 to 6 Error code stored in D9190 when error type is 7 Error code stored in D9193 A273UH S3 D9195 A172SH when error type is 8 1 when error type is 9 or 10 Error code stored in D9184 when error type is 11 Error code stored in D9196 when error type is
163. osition follow up control Speed change control JOG operation The axis cannot return The speed change request is regarded as a normal Speed change request Minor error 305 will occur and the axis will be controlled at the speed limit value High speed oscillation A speed change cannot be made Minor error 310 will occur Zeroing A speed change cannot be made Minor error 301 will occur Reference Minor error 301 A speed change was made during zeroing Minor error 305 The preset speed is outside the range 0 to speed limit value Minor error 310 A speed change was made during high speed oscillation 5 OPERATION CONTROL PROGRAMS Controls a If a speed change is made to a negative speed control varies with the control mode during starting as indicated in the table in Section 5 12 1 3 e b The returning command speed is the absolute value of a new speed c When the axis is waiting at the return position 1 Signal states e Start acceptance M200n ON unchanged from before execution of CHGV execution e Positioning start completion M16m0 ON unchanged from before execution of CHGV execution Positioning completion M16m1 OFF e In position M16m2 ON e Command in position M16m3 OFF e Speed change 0 accepting flag ON 2 Make a speed change to a positive speed for a restart 3 Turn ON the stop command to terminate positioning 4 A negative speed change made again
164. ot provide sufficient holding force Install a stopping device to ensure safety on the machine side 2 For parameter setting and programming Set parameter values which meet the controller servo amplifier servo motor and regenerative brake resistor types and system applications Wrong setting can disable the protective functions Set the regenerative brake resistor type and capacity parameter values which match the operation mode servo amplifiers and servo power supply module Wrong setting can disable the protective functions Set the mechanical brake output and dynamic brake output used unused parameter values which meet the system applications Wrong setting can disable the protective functions Set the stroke limit input used unused parameter values which meet the system applications Wrong setting can disable the protective functions Set the servo motor encoder type incremental absolute position type etc parameter values which meet the system applications Wrong setting can disable the protective functions Set the servo motor capacity and type standard low inertia pancake etc parameter values which meet the system applications Wrong setting can disable the protective functions Set the servo amplifier capacity and type parameter values which meet the system applications Wrong setting can disable the protective functions The program instructions used in programs should be used under the conditions specified in
165. ot use the word device with which the device number was specified indirectly 3 Only one operator may be used Description examples Good Example Bad Example D10 K5 D D5 F K20 D 10L H6L F D 4L lt lt K2 Note When you want to use the result of calculation other than the above to specify the device number indirectly describe it in two blocks as shown below DO SHORT ASIN 0F WO DO 5 OPERATION CONTROL PROGRAMS 5 3 Constant Descriptions The constant descriptions of the 16 bit integer type 32 bit integer type and 64 bit floating point type are indicated below 16 Bit Integer Type 32 Bit Integer Type 64 Bit Floating Point Type K 1 79E 308 to K 2 23E 308 Peacimal K 32768 to K32767 K 2147483648L to K2147483647L K0 0 representation K2 23E 308 to K1 79E 308 Hexadecimal representation H0000 to HFFFF H00000000L to HFFFFFFFFL 1 The 32 bit integer type is ended by L and the 64 bit floating point type is provided with a decimal point and exponent part E to denote their data types explicitly 2 The constant without the data type is regarded as the applicable minimum type 3 The constant in decimal representation is headed by K and the one in hexadecimal representation by H K can be omitted 4 The 64 bit floating point type cannot be represented in hexadecimal 5 OPERATION CONTROL PROGRAMS 5 4 Binary Operations 5 4 1 Substitution F ES Number
166. otion control steps should be set to a normal task b During execution of an event or NMI task the execution of the normal task is suspended Note that since the normal task allows the event task disable instruction DI to be described in an operation control step the event task can be disabled in the area enclosed by the event task disable instruction DI and event task enable instruction El 9 TASK OPERATIONS 2 Event task Operations An event task runs an SFC program at occurrence of an event There are the following events a Fixed cycle An SFC program is run periodically in any of 1 7ms 3 5ms 7 1ms and 14 2ms cycles b External interrupt 16 points of IO to 115 Among 16 points of the Al61 16 point interrupt module loaded in the motion slot an SFC program is run when the input set for an event task turns ON c PLC interrupt An SFC program is run when the instruction is executed in the sequence program Points a You can set plural events to one SFC program However you cannot set plural fixed cycles b Multiple SFC programs can be run by one event c Motion control steps cannot be executed during the event task d The event task cannot be executed when it is disabled by the normal task The event that occurred during event task disable is executed the moment the event task is enabled Errors An attempt to execute a motion control step in an SFC program set to the event task will resu
167. otion side programs to be written in SFC Sequential Function Chart which conforms to IEC1131 3 to control a sequence of machine operations In addition it also enables event control which runs a program at an interrupt input from an external sensor Mainly performing the processings irrelevant to sequential control the PLC controls ladder programs by constant scan execution 1 Since the motion CPU judges whether a transition condition enabled or not to make a start there are no response delays or variations affected by PLC scan time 2 The SFC step processing system only active steps are executed ensures rapid processing and fast response 3 The motion CPU can perform not only a motion program start but also numerical operations device SET RST etc making operations via the PLC unnecessary and improving tact time 4 The motion specific transition condition description allows a command to be given to the servo amplifier immediately after a start condition enables 5 The motion specific transition condition description allows a transition to the next step to be made after a start without waiting for positioning completion 6 You can set programs written in SFC which run in fast response to external interrupt inputs NMI 7 You can set programs written in SFC which run in a short cycle 1 777ms 3 555ms 7 111ms 14 222ms 8 As a sequence of machine operations can be written in correspondence
168. ovided at the end Constant R constant indicates the Boe The constant Ma ile dr is regarded as 1190 URS eie H Hexadecimal i UN K may be omitted constant e applicable minimum type Binary operation 6 Bit operation 6 Sign 1 Standard function 15 Type conversion 6 Number of instructions Bit device status 2 57 in total Bit device control 4 Logical operation 4 Comparison operation 6 Motion dedicated function 2 Others 5 inb isspuns Direct road control at instruction sia execution put X and output Y of PBUS Read response of input X on motion CPU Input module in motion slot Response to PLC device Refresh is made at instruction execution and in normal task cycle SBUS Refresh mode Input response 1 sequence scan put module Direct nidos Input response 1 sequence scan in PLC slot A172SH only P P 3 Response to PLC device At instruction execution PBUS Direct write control at Actual output response 3 Writ instruction execution me Tesponse 2 Response to PLC device At instruction execution output Y on motion CPU Refresh mode s SBUS Actual output response Refreshed at PLC s END Direct mode Response to PLC device At instruction execution A172SH only Actual output response Not output 3 5 the PBUS are always under direct control independently of the PLC s I O control method CAUTION Output Y of the PBUS is write enabled from only the motion CPU Do not perform
169. pezoidal acceleration decel eration Acceleration decel X Deceleration time 1 to 65535ms eration control S curve acceleration decel eration Backlash compensation Electronic gear S curve ratio 0 to 100 0 to 65535 x position command unit 0 to 65535 PULSE with unit converted into PULSE Compensation Function to compensate for actual travel error against command value Not in absolute position system Proximity dog type or count type can be selected In absolute position system Data setting type proximity dog type or count type can be selected Available Three pulse generators can be connected Zeroing function JOG operation function One pulse generator can be Three pulse generators can be Manual pulse generator operation function connected Up to 3 axes can be operated simultaneously With smoothing scale factor setting Input scale factor setting 1 to 100 One A172SENC is required per pulse generator Up to 3 axes can be operated simultaneously With smoothing scale factor setting Input scale factor setting 1 to 100 connected Up to 3 axes can be operated simultaneously With smoothing scale factor Input scale factor setting 1 to 100 M function With M code output function With M code completion waiting function Skip function Available Number of output Limit switch output points 32 points function Watch data Motio
170. r of Basic Steps DIN D S 1 Usable data Usable Data Word device Constant 32 bit 64 bit 16 bit 32 bit 64 bit oaiculation Bit elas integer floating Coasting integer integer floating Supression conditional ditional vee ype F K H K H L type K Bit device point timer type type point expression expression Note T and C are write disabled and cannot be used at D 2 Data to be set Data to be Set Data Type of Result D Input destination data Data type of D S Input source bit data Integer type 3 Functions a The bit data specified at S is input to the data specified at D b Specify a multiple of 16 as the device number of the bit data specified at S c If the type of D is a 16 bit integer type 16 points of the D data starting at the least significant bit are input in order to the bit devices headed by the one specified at S d If the type of D is a 32 bit integer type 32 points of the D data starting at the least significant bit are input in order to the bit devices headed by the one specified at S 4 Errors a An operation error will occur if 1 D or S is an indirectly specified device and its device number is outside the range 2 S is an indirectly specified device and its device number is not a multiple of 16 5 Program examples a Program which inputs the data o
171. ram running will stop at the point of error detection e An error will not occur if the jump destination immediately after WAITON WAITOFF is a motion control step Left below e A pointer may exist immediately after WAITON WAITOFF Right below e f a servo program specified at a motion control step could not be started due to a major minor error an SFC program continues running and execution shifts to the next independently of the WAITON WAITOFF bit device status To stop the SFC program at error detection provide an error detection condition at the next transition transition condition 2 Combination with operation control step Operations e At an operation control step both Shift and Fn WAIT perform the same operation and after Gn an operation control program Fn is run execution shifts to the next step when the transition condition Gn enables 3 Combination with subroutine call start step Refer to the section of 4 5 3 Subroutine call start step 4 16 4 SFC PROGRAMS 4 7 Jump Pointer Operations Instructions Jump Pointer e Setting a jump will cause a jump to the pointer Pn specified in its own program e You can set pointers at steps transitions branch points and coupling points e You can set pointers Pn PO to P16383 in a single program e You cannot make a jump setting which will exit from within parallel branch parallel coupling Bad example 1 given below e You cannot
172. range 5 Program examples a Program which ORs 0 and 1 and assigns the result to DO DO 40 1 biS erann dao seresneeeetee b0 0 00 1 0 0 1 0 1 0 0 1 1 0 1 0 0 5 17 5 OPERATION CONTROL PROGRAMS 5 4 Bit exclusive logical OR E Number of Basic Steps S1 82 1 Usable data Usable Data Word device Constant 30 bit S4bit 16 bit 32 bit 64 bit Bit Compar floating Coasting integer integer floating culation conditional Ison integer type L Bit device expression conditional point timer type type point expression type F K H K H L type K expression Data type of S1 or S2 which is greater Integer type Data which will be EXCLUSIVE ORed bit by bit 3 Functions a The bit by bit exclusive logical add of the data specified at S1 and the data specified at S2 is found b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before operation is performed At this time note that signed data is converted 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which EXCLUSIVE ORs 0 and 1 and assigns the result to DO DO 0 1 Dic
173. range 5 Program examples a Program which performs exponential operation of DOF and assigns the result to 0F E 0F EXP DOF BL NUM DO 442413 142413 39200892 to EE o 5 OPERATION CONTROL PROGRAMS 5 6 10 Absolute value ABS F ES Number of Basic Steps EA ABS S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit lean Bit pru floating Coasting integer integer floating Supression conditional ditional expression expression 16 bit 32 bit integer integer type type L 2 Data to be set Data to be Set Data Type of Result Data on which absolute value S Data t f S conversion will be performed ata type of S 3 Functions a The absolute value of the data specified at S is found 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which finds the absolute value of DOF and assigns the result to 0F 0F ABS DOF 3 2 H 0 D3 D2 D DO Ro nn eS DN UA 33 0 33 0 EA EA L L 5 OPERATION CONTROL PROGRAMS 5 6 11 Round off RND F ES Number of Basic Steps E EDEN RND S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit lean Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type poi
174. re turning the cam data limit switch output data batch change request flag M2056 OFF then ON or powering on the controller and resetting it with the key returns the cam data import area to the extended file register contents 5 OPERATION CONTROL PROGRAMS e Transfer of data to the cam data area is also executed during cam operation Be careful not to perform write while operation is being performed with the same cam number At cam data read e The cam data in the currently set status are read d The word devices that may be set at D S and n are as indicated below Cam Number Word Devices Data to Be Set Designation Nn Note e Nn indicates the cam number You cannot use T C and special D You cannot specify the device numbers indirectly e The cam number that may be set as Nn is within the following range A173UHCPUC S1 A273UHCPU S3 1 to 64 101 to 164 201 to 264 301 to 364 A172SHCPUN 4 Errors a An operation error will occur if 1 The cam data of the cam number specified at D or S are not yet registered to the motion controller 2 The resolution of the cam number specified at D or S differs from the number of transferred words specified at n 3 The PCPU memory address specified at D or S is outside the SRAM range 4 S to S n 1 is outside the device range 5 D to D n 1 is outside the device range or 6 n is O or
175. ression conditional point timer type type point R expression expression type F K H K H L type K Note PX TT CT and special M cannot be used at D e At D you cannot use the range including M2000 to M2127 with the A273UH S3 or the range including M2000 to M2047 with the A172SH 2 Data to be set Data to be Set Data Type of Result D Output destination bit data Batch bit S Output source data 3 Functions a The data specified at S is output to the bit data specified at D b Specify a multiple of 16 as the device number of the bit data specified at D c If the type of S is a 16 bit integer type 16 points of the S data starting at the least significant bit are output in order to the bit devices headed by the one specified at D d If the type of S is a 32 bit integer type 32 points of the S data starting at the least significant bit are output in order to the bit devices headed by the one specified at D 4 Errors a An operation error will occur if 1 D or S is an indirectly specified device and its device number is outside the range 2 D is an indirectly specified device and its device number is not a multiple of 16 5 Program examples a Program which outputs the data of DO to YO YF DOUT YO DO oa a ooo aa 5 OPERATION CONTROL PROGRAMS 5 9 4 Device input DIN F ES Numbe
176. roe ing Caleulation SER Run integer integer ing S 9 9 expression opression conditional type type L expression Bit device 2 Data to be set Data to be Set Data Type of Result S1 F Data which will be compared Logical type true false 3 Functions a The data specified at S1 and the data specified at S2 are compared and the result is true if they are equal b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before comparison is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which compares whether 0 and DO are equal or not 0 DO 0 1 o o gt True o o DO 1 5 OPERATION CONTROL PROGRAMS 5 11 2 Not equal to F ES Number of Basic Steps E 0 1 62 1 Usable data Usable Data Word device Constant 32 bit 64 bit 16 bit 82 bit 64 bit Calculation ell pond floating Coasting integer integer floating a conditional ditional point timer type type point expression expression type F K H K H L type K Bit device integer type L 2 Data to be set Data Type of Result 51 S2 Data which will be compared Logical type true false
177. ror will occur if 1 S is an indirectly specified device and its device number is outside the range 5b Program examples a Program which sets M100 when MO and XO are both 1 SET M100 MO X0 MO wo 1 The X0 5 OPERATION CONTROL PROGRAMS 5 10 4 Logical OR F ES Number of Basic Steps E EDEN S1 82 1 Usable data Usable Data Word device Constant 92 bit 64 bit 16 bit 32 bit 64 bit lean Bit pru integer floating Coasting integer integer floating Supression conditional ditional typelL type F K H K H L type K Bit device point timer type type point expression expression 2 Data to be set Data to be Set Data Type of Result S1 S2 Data which will be ORed Logical type true false 3 Functions a The data specified at S1 and the data specified at 82 are ORed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5b Program examples a Program which sets M100 when either of MO and XO is 1 SET M100 MO XO MO x t True 5 OPERATION CONTROL PROGRAMS 5 11 Comparison Operations 5 11 1 Equal to F ES Number of Basic Steps pS S1 S2 1 Usable data Usable Data Word device Constant a bi bi bi bi ompar 16 bit Sep fail Coastin noe
178. rors servo errors servo program errors mode change errors SV22 only and similar errors remain unchanged 15 1 SFC Program Errors Table 15 1 SFC Program Start Errors 16000 to 16099 Error Error Factor T mE Error Processing Corrective Action Code At a start made by SFCS PLC The specified SFC Provide ON of PLC ready M2000 16000 PLC ready OFF SFCS ready M2000 or PCPU ready program does not start and PCPU ready M9074 as start M9074 is OFF interlocks At an SFC program start made by Check the SFC program number 16001 SFC program number error SFCS the SFC program number and correct it to a correct sequence SFCS specified is outside the range 0 to program 255 At an SFC program start made by Check the SFC program number SFCS the specified SFC program and correct it to a correct sequence 16002 No SFC program SFCS does not exist program or create an SFC program not yet created At an SFC program start made by Double start should be managed on SFCS the same SFC program is the user side Provide the user s 16003 Double start error SFCS f already starting starting signal as a start interlock in the sequence program ITP was executed with PLC ready The SFC program s Provide ON of PLC ready M2000 M2000 or PCPU ready M9074 lactive step to be and PCPU ready M9074 as 16004 PLC ready OFF ITSP OFF executed at a PLC ITP
179. route after their processing completions following a selective branch will be a selective coupling However you can also make a setting where no coupling will be made as shown below mm Jump transition normal jump END Program END IFE1 4 19 4 SFC PROGRAMS 4 9 3 Parallel branch parallel coupling 1 Parallel branch Simultaneously executes multiple steps connected in parallel A parallel branch destination may be started by either a step or a transition WAIT GO F10 After operation completion of preceding step steps K2 to F10 connected in parallel are executed when A condition set at transition GO enables Thereafter routes are executed simultaneously up to parallel G255 coupling point l le Shift or WAIT can be set to a transition preceding a parallel branch WAITON and WAITOFF cannot be set 2 Parallel coupling A parallel branch must be coupled by a parallel coupling A jump setting to another branch route can be made within parallel branch parallel coupling In this case a jump destination is a midway parallel coupling point coupling jump You cannot set a jump to exit from within parallel branch parallel coupling Parallel branch point a Coupling jump ON M100 OE After servo program K3 has completed stopping execution waits until condition set at transition G3 enables and servo program K4 completes starting On completion of waiting execution
180. rs None 11 2 11 SFC PARAMETERS 11 2 Start setting Program Parameters Set the following parameters per SFC program Setting Range Automatically started or not Initial Value Not Executed task Only one of normal event and NMI tasks Normal task When you have set the event task further set the event which will be enabled Always set any one of the following 1 to 3 1 Fixed cycle One or none of 1 7ms 3 5ms 7 1ms and 14 2ms 2 External interrupt make selection from those set to event task More than one interrupt can be set from among I0 11 12 13 14 15 16 17 18 19 110 111 112 113 114 and 115 3 PLC interrupt OR may also be used to set 1 to 3 The same event may be shared among multiple SFC programs When you have set the NMI task further set the interrupt input which will be enabled 1 External interrupt make selection from those set to NMI task More than one interrupt can be set from among I0 11 12 13 14 15 16 17 18 19 110 111 112 113 114 and 115 Number of consecutive transitions 1 to 10 Set the number of consecutive transitions to the program set to the event or NMI task END operation End continue Set the operation mode of the END step to the program set to the event or NMI task 11 3 Remarks These parameters are imported when PLC ready M2000 turns from OFF to ON and used for control thereafter When setting c
181. run from the first step in accordance with the number of consecutive transitions of the corresponding program When subroutine called The program is run immediately from the first step After that at occurrence of a valid event the program is run continuously by the number of consecutive transitions of the corresponding program The subroutine called program is controlled in accordance with the executed task and number of consecutive transitions of the call source program End control As specified for END operation Errors None When you want to automatically restart the program run by the normal task from the initial step at end of a single cycle operation write the program so END that it is not ended by but it returns to the starting step by a jump 11 5 11 SFC PARAMETERS 2 Executed task Description Set the timing task to run a program Specify whether the program will be run by only one of the normal task main cycle event task fixed cycle external interrupt SCPU interrupt and NMI task external interrupt When you have set the event task you can set multiple events out of the fixed cycle external interrupt for event task and SCPU interrupt Note that multiple fixed cycles cannot be set to a single SFC program Example Interrupt setting Inputs for event task I6 17 18 I9 110 111 112 113 114 and 115
182. s No 1 to No 6 are set together as one point Import Refresh No Item Setting Range Remarks of tom ego OOO O Cycle Cycle Pemas Operation 1 Output device Bit device X Y M L B cycle Motion control data word device D W absolute address Operation 16 bit integer type 32 bit integer type cycle 64 bit floating point type Operation cycle Operation OFF Value Word device D W constant K H Suele ON Enable OFF Disable None Always enable Output enable disable Bit device X Y M L B F TT TC CT CC special M Operation none default i 4 None No forced Bit device X Y M L B F TT TC CT CC special M Operation Forced output bit output always provided none default OFF status 1 Output device a Set the bit device which outputs the ON OFF signal in response to the preset watch data b As the output device you can use the following devices Device Number Setting Range Item A173UHCPU S1 pes EEN A273UHCPU S3 Note 1 As PX is write disabled it cannot be used as the output device For X only the free numbers within the input card non loading range and outside the link range may be used Note that when the A172SHCPUN is used there will be a read response delay as indicated below Read CPU Response Delay Motion CPU PLC CPU None 16 4 16 LIMIT SWITCH OUTPUT FUNCTION Nore 2 Note the following points when set
183. s device number is outside the range 5 Program examples a Program which compares whether 0 is less than DO or not 0 lt DO 0 10 lt gt True DO 20 5 OPERATION CONTROL PROGRAMS 5 11 4 Less than or equal to lt lo o S1 lt 52 1 Usable data Usable Data Bit device Word device Constant 32 bit 945i 16 bit 32 bit 64 bit j Bi eompar integer floating Coasting integer integer floating Expression conditional ditional type L point timer type type point expression expression type F K H K H L type K 2 Data to be set Data Type of Result S1 E Data which will be compared Logical type true false 3 Functions a The result is true if the data specified at S1 is less than or equal to the data specified at S2 b When S1 and S2 differ in data type the data of the smaller data type is converted into that of the greater type before comparison is performed 4 Errors a An operation error will occur if 1 S1 or S2 is an indirectly specified device and its device number is outside the range 5 Program examples a Program which compares whether 0 is less than or equal to DO or not 0 lt DO 7 lt gt True o e 5 OPERATION CONTROL PROGRAMS 5 11 5 More than gt lo o S1 gt 82 1 Usable data Usable Data Word device Constant 32
184. sent value change control CHGA CHGA E CHGA C which are newly available For other servo instructions refer to the Motion Controller SV13 SV22 Programming Manual Real Mode 1 Guide to servo instruction list Table 7 1 Guide to Servo Instruction List 3 4 5 6 7 8 Positioning Data t Common Circular OSC Parameter block Others o 5 9 E o g ole lo g ls E E i E Ise le Sos Sle REE EIS Ss sg 2 o E c 8 SIS B o 2 8 03 Ssi8 8 8 S gt le8 s 312 285 oO 65 2 2 2 2288235 02 3 o Ese E 8 5123 5 o c E szi issesl2sssissji szsgs csis im sS SO E o6 oO o S E amp Z S x S EVES o s sls isi 8 9 g 8 E O o 5 8 a 8 J2 Ss 3 9 88 18 al 8 88 E S 3 8 e Fl Je j eels js E 3 S 3 5 z o c a E Virtual enable OJOJOJO JO Q OOjJoO 2oJo Jo r Jo o2o oo o Number of Steps 1 11111 1 111 1 2 141 1 1 1 14 1 1 1 2 2 Neta 14 x 2 2 1 2 tennant aes 21 Absolute 1 axis o ABS 1 Dositioning AOJOO A AAJAALALA A A x Is ncremental 1 axis lal INC 1 positionii A AIAIAIAJA A A E M A A A A A A A alt 3 aL Instruction symbol Gives the servo instructions usable in servo programs Processing Gives the processing outlines of the servo instructions 1 Indicates posi
185. servo program error 907 real gt virtual changing or 908 virtual gt real switching occurs and the current value change is not made 7 10 7 MOTION CONTROL PROGRAMS 7 4 Cam Shaft Within One Revolution Current Value Change Control SV22 Only Servo Instruction Controls Positioning Method Absolute Program example Items Set on Peripheral Device Circular Parameter block Q o 3 3 o 2 me processing Circular interpolation error Number of Control Axes Parameter block No Address travel Command speed Dwell time Torque limit value Auxiliary point Central point Control unit Speed limit value Acceleration time Deceleration ti Torque limit value STOP input time deceleration permissible range S pattern ratio Speed Change Sudden stop deceleration time O Item which must be set A Item which is set when required Control using CHGA C instruction 1 Executing the CHGA C instruction changes the within one revolution current value of the specified cam shaft to the specified address 2 The cam shaft may be starting 3 The axis number used can be set within the following range A173UHCPU S1 A172SHCPUN A273UHCPU S3 32 axes feature Axis 1 to axis 8 Axis 1 to axis 32 A program for exercising the within one revolution current value change control of the cam shaft will be descri
186. shifts to the next lower part ON M100 He eheee PAE1 Parallel coupling point g 4 2 o 4 SFC PROGRAMS The number of parallel branches need not match that of couplings at a parallel coupling point In the example of the diagram in Section 4 9 3 2 the number of parallel branches is 3 and that of couplings is 2 When a WAIT transition is set right after a parallel coupling the stop completions of the axes are not included in the waiting conditions if the parallel coupling is preceded by motion control steps To perform a parallel coupling on stop completions set WAIT transitions before a parallel coupling K2 K3 K4 K5 f I 4 Parallel coupling G1 If this is WAIT stop completions of axes started in K2 to K5 are not included in waiting conditions K2 K3 K4 K5 When you want to perform a coupling on stop completions of axes started in __ K2 to K5 set WAIT transition in h route to make parallel coupling lt G Parallel coupling mm 4 SFC PROGRAMS 4 10 Y N Transitions When you want to branch to routes when a transition condition enables and does not enable Shift Y N transition or WAIT Y N transition will be useful Symbol Function When condition does not enable e When a transition condition set at Gn enables i Sn IN execution shifts to the lower step When that transition When condition Y
187. so regarded as an operation completion c WAITON WAITOFF motion control step Operations Prepares for the start of the motion control step next to WAITON WAITOFF and makes a start immediately when the specified bit turns ON OFF When the motion control step is executed without being used with WAITON WAITOFF preparations for a start are made after the transition condition preceding the motion control step enables This will cause a variation of delay starting time between when the transition condition enables and when a start is made but a combination with WAITON WAITOFF can eliminate the variation of the above delay starting time ON MO OFF MO Kn Kn e Specifiable bit devices A172SHCPUN X0 to X7FF A173UHCPU S1 A273UHCPU S3 X0 to X1FFF X Y YO to Y7FF YO to Y1FFF M MO to M2047 MO to M8191 Special M M9000 to M9255 M9000 to M9255 LO to L2047 LO to L8191 BO to BSFF BO to B1FFF F0 to F255 FO to F2047 TC timer coil TCO to TC255 TCO to TC2047 TT timer contact TTO to TT255 TTO to TT2047 CC counter coil CCO to CC255 CCO to CC1023 CT counter contact CTO to CT255 4 15 CTO to CT1023 4 SFC PROGRAMS Instructions e Always pair a transition with a motion control step one for one If the step following WAITON WAITOFF is not a motion control step an SFC program error 16102 will occur and the SFC prog
188. son conditional expression 2 Data to be set Data to be Set Data Type of Result Bit device used in bit S Logical type true false conditional expression POR i 3 Functions a True is returned when the bit device specified at S in a bit conditional expression is OFF 0 or false is returned when that bit device is ON 1 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which resets M100 when MO is OFF 0 RST M100 IM wo 9 w i cr 5 OPERATION CONTROL PROGRAMS 5 9 Bit Device Controls 9 1 Device set SET EN Number of Basic Steps SET D S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit TN h e ielation Bit Sempan floating Coasting integer integer i conditional expression S conditional xpression y timer expressio expression 16 bit 32 bit integer integer Bit device type type L Note PX TT and CT are write disabled and cannot be used at D At D you cannot use M2001 to M2032 with the A273UH S3 or M2001 to M2008 with the A172SH 2 Data to be set Bit data for device set Bit logical type true false Condition data which determines whether device set will be performed or not 3 Functions a If the data specified at S is
189. t device 2 Data to be set Data to be Set Data Type of Result S Data on which square root Easting Somes operation will be performed oP m 3 Functions a The square root of the data specified at S is found b Only a positive number may be specified at S Operation cannot be performed with a negative number c If S is an integer type it is converted into a floating point type before operation is performed 4 Errors a An operation error will occur if 1 S is a negative number or 2 S is an indirectly specified device and its device number is outside the range 5b Program examples a Program which finds the square root of DOF and assigns the result to 0F 0F SQRT DOF H1 40 Di DO 3 2 D3 D2 5 OPERATION CONTROL PROGRAMS Natural logarithm IX FFS LN 1 Usable data Format Usable Data Number of Basic Steps Word device Constant Bit device 64 bit floating point type F 32 bit integer type L 16 bit integer type K H Coasting timer 32 bit integer type K H L 64 bit floating point type K Bit conditional expression Calculation expression Compar ison conditional expression 2 Data to be set Data to be Set Data Type of Result Data on which natural logarithm S nn Floating point type operation will be performed 3 Functions a The base e natural
190. t type its fractional portion is rounded down before conversion is made d If S is a 16 bit integer type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 The S data is outside the range 0 to 65535 or 2 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which converts the data of DOL into an unsigned 16 bit integral value and assigns the result to 0 0 USHORT DOL D1 DO 0 K 5536 K60000L HEA60 HOO00EA60 Unsigned value is K60000 5 OPERATION CONTROL PROGRAMS 5 7 3 Signed 32 bit integral value conversion LONG F ES Number of Basic Steps L xo as 1 LONG S 1 Usable data Usable Data Word device Constant 64 bit 16 bit 32 bit 64 bit diesen Bit pru integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K 32 bit Bit device 2 Data to be set Data to be Set Data Type of Result S Data which will be converted 32 bit integer type into signed 32 bit integral value SEYE 3 Functions a The data specified at S is converted into a signed 32 bit integral value b The data range of S is 2147483648 to 2147483647 c When S is a 64 bit floating point type its fractional portion is rounded down before
191. task Execution can be masked 16 external interrupt points inputs from Al61 interrupt input module installed in NMI task moron slot 16 points with event tasks and NMI tasks combined use SFC parameters to set tasks 3 PERFORMANCE SPECIFICATIONS 3 2 SCPU Performance Specifications Table 3 2 SCPU Performance Specification List A172SHCPUN A173UHCPU S1 Control method Repeated operation using stored program lO controlm thod Refresh mode direct mode Refresh mode selectable direct mode can be used partially in accordance with the instruction Programming language Sequence control dedicated language relay symbol language logic symbolic language MELSAP II SFC Sequence instructions 26 22 Basic instructions 131 249 Number of Application instructions 102 instructions Dedicated instructions 204 Motion dedicated 2 instructions Processing speed Direct mode 0 25 to 1 9us step PLC instruction Refresh mode 0 25us step 0 15us step Real I O points 2048 X YO to X Y7FF 8192 X YO to X YAFFF Number of actual VO points 1024 X VO to X YSFF Mine e ae ie 2048 X YO to X Y7FF Watchdog timer WDT 10 to 2000ms 200ms Stand 192k bytes Memory capacity built in RAM 192k bytes E Tei RE equivalent _ A3NMCA 96 equivalent Main sequence Max 30k steps Program capaci
192. the range 1 0 to 1 0 S is a negative number tiv Any digit of S has a value other than O to 9 The S value is outside the range where BIN data can be converted into BCD data S is 0 or a negative number FER ae o o o o ES R o o Ke Ke Dv o fo BCD BIN conversion BIN execution error Em o ER e wo BIN gt BCD conversion 16404 gt BCD execution error Natural logarithm LN 16405 d EN execution error The indirectly specified device 1 number is outside the range 1 Indirectly specified 16 bit 6462 motion device n read error Indirectly specified 32 bit The indirectly specified device 6463 motion device n L read number is outside the range or an error odd number Indirectly specified 64 bit 16464 motion device n F read error Indirectly specified 16 bit 16465 data register D n read error Indirectly specified 32 bit 16466 data register D n L read error Indirectly specified 64 bit 16467 data register D n F read error The indirectly specified device number is outside the range The indirectly specified device number is outside the range or an odd number 15 5 Error Processing execution is stopped and the next block is executed Corrective Action The device number which indirectly The block processing in Correct the program so that the device number which indirectly specifies D is proper Correct the program so th
193. the servo instructions available for servo programs and the positioning data set in servo instructions Table 7 2 Servo Instruction List Positioning Data Common Circular OSC 1 Parameter block Others e lt ol pum 23298922 335E 3 5s 9293552888235B83 225 9 9 9 3 e s es9sssssisss oss scsiss3S9 2 8 5 6 so ER x S 22 8 2 esectsaESesgs5icc s Sie se eg 2g ES 9 8 Zle gizle atip 2 2 8 s ojo sjebal 5535 90 865 2 5 Processing s s 2 Elz El ol SE sls lE E 29 92 k 2 9 15 9 x 9 ojo Slo 2188 28 si 0 oO S S E 9 lol 8 cl 18 2121 3 9 ls H l SIT o Instruction ol E gt 0 2 o 8 8 2 018 ls nv ol 13 sz 6 Symbol E S 5 E 2olo s k g e a E 5 S ymbol S o pad o ajajaj s 2 g E 2 s ra 5 E 8 E 3 n 3 s E z a S 8 i z Virtual enable O O jo O OJOI O O O O I O OJ O O O I 2 O O O O I OJ O O OJO Number of steps 111 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 111 1 1 2 2 1 2 1 2 Number of indirect words 1 2 2 2 1 1 1 2 2 2 1 2 2 2 1 1 2 1 1 1 1 1 2 1 2 lis e 1 B ABS 1 Absolute 1 axis positioning AJO JOJOJAJA A 4 4 to 17 T NC 1 Incremental 1 axis positioning A O OJO JAJA A P
194. tine and proceed to the next step on operation completion Set WAIT at a transition K1 Starts servo program K1 IU Shifts to next when start axis in servo program K1 stops G1 start acceptance flag turns OFF and condition set at transition E enables K2 Starts servo program K2 1 The above start acceptance flag of the axis started in the next servo program K2 is not included in interlocks To use it as an interlock the user should set it in the transition condition G1 2 WAIT must be set to proceed to the next step on operation completion However when there are specifically no conditions to be set as interlocks set NOP No Operation in the transition program Gn 4 18 4 SFC PROGRAMS 4 9 2 Selective branch selective coupling 1 Selective branch Executes only the route whose condition was judged to have enabled first among the conditions of multiple transitions connected in parallel Transitions must be all Shifts or WAITs Example For WAIT After start axis in servo program G255 K1 has stopped start acceptance AA flag has turned OFF conditions of transitions G1 to G255 are K2 K3 K4 judged and execution shifts to route whose condition enables Is gt 1 Transition condition judgment is not always executed from left to right 2 Using Shift and WAIT together will cause a parallel branch 2 Selective coupling Recoupling of routes into a single
195. ting Y as the output device e When Y is set response will be as indicated below Y Classification PLC device PBUS Motion operation cycle Actual output PLC device Motion operation cycle Refresh system P y Actual output Motion UPS OTT DEM cycle PLC scan time SBUS Direct system PLC device Motion operation Motion operation cycle A172SHCPUN Eee Actual output Not provided e When the STOP gt RUN time output mode of the PLC is set to before operation performing the following operation to change the output device setting may cause the ON OFF status of the previously set output device to be output continuously resulting in an unexpected output status If such operation must be performed set the STOP RUN time output mode of the PLC to after 1 scan run Key switch RUN STOP Limit output setting data rewritten on peripheral device Key switch STOP RUN Note 3 As the output devices M2001 to M2032 cannot be used with the A173UHCPU S1 A273UHCPU S3 and M2001 to M2008 with the A172SHCPUN While PCPU ready M9074 is ON do not perform write from the sequence ladder to the 16 point range which begins with a multiple of 16 including the output device Such write operation will not be guaranteed The other devices in this range should be used in motion SFC operation control transition control programs SET RST DOUT Device range example When the output device is M10 MO to M15 are
196. tioning data which can be set in servo instructions a O Item which must be set if this data is not set servo instruction cannot be executed b A Item which is set when required when this data is not set default value is used for control 2 Allows direct or indirect designation except axis number a Direct designation Set with numerical value b Indirect designation Set with word device D W 2 e Servo program run is controlled using the preset word device contents Each setting item may either be 1 or 2 word data For 2 word data set the first device number 3 Number of steps As there are more setting items there are more number of instruction steps The number of steps is displayed when a Servo program is created The instruction O item comprise the minimum steps and one A item increases the number of steps by 1 3 Items common to the servo instructions 4 Items set in circular interpolation starting servo programs 5 Items set for high speed oscillation Set when changing the parameter block default value when not set data set in the servo program to exercise control The parameter block data are not changed 7 Setting items other than the common circular and parameter block items Items to be set vary with the servo instruction 8 Indicates the number of steps of each servo instruction 7 MOTION CONTROL PROGRAMS 2 Servo instruction list Table 7 2 indicates
197. tions a The BIN data specified at S is converted into BCD data b If S is a 16 bit integer type the data range is O to 9999 c If S is a 32 bit integer type the data range is O to 99999999 4 Errors a An operation error will occur if 1 The data is other than 0 to 9999 when S is a 16 bit integer type 2 The data is other than 0 to 99999999 when S is a 32 bit integer type or 3 S is an indirectly specified device and its device number is outside the range 5b Program examples a Program which converts the BIN data of DO into BCD data and assigns the result to 40 0 BCD DO BCD 9999 BIN 9999 b15 da bo DIS MIRI bO 0 110 0 1110 00 11 1 00 1111 001 4 Dojo 0 10 0111 1 00 0 0 11 1 1 Thousands Hundreds Tens Units 5 OPERATION CONTROL PROGRAMS 5 7 Type Conversions 5 7 1 Signed 16 bit integral value conversion SHORT 1 Usable data Format Number of Basic Steps SHORT S Usable Data Constant 16 bit 32 bit bi caleuistion Bit integer integer i q conditional bea expression Word device 16 bit 32 bit integer integer type L Compar ison conditional expression Coasting 2 Data to be set Data to be Set Data Type of Result S Data which will be converted 16 bitinfedar bs into signed 16 bit integral value SPP 3 Functions a The data specified at S is converted into a signed 16 bit integral value b The data range
198. tions of all routes are completed A coupling may be preceded and followed by either a step or a transition When this coupling is preceded by an FS Step scans are executed during waiting After waiting is complete scans are not executed 1 Normal jump After the step or transition preceding this jump transition is executed execution shifts to the pointer Pn specified within its own program The jump destination may either be a step or transition When a jump takes place from an FS step to a transition scans are executed during waiting for the transition condition of the jump destination to enable 2 Coupling jump When a jump to the other route within a parallel branch takes place after the parallel branch a coupling jump takes place and execution waits at the jump destination 4 SFC PROGRAMS Combining the basic type branches couplings provides the following application types which are defined as in the basic types Name SFC Symbol List Representation Selective branch Parallel branch Parallel coupling Selective coupling Parallel branch Selective branch Selective coupling Parallel coupling Ee A ETA CALL Kn IFBm IFT1 SFT Gn PABm PAT1 CALL Fn JMP PAEm PAT2 CALL Fn JMP IFEm PAEm JMP IFEm IFT2 SET Gn CALL Fn JMP IFEm IFEm SET Gn SFT Gn PABm PAT1 CALL Fn IFBm
199. tput enable disable bit and ON ON enable i With setting region setting ON Value OFF Value OFF disable Limit switch outputs are turned ON b Usable devices aa Number Setting Range Item A173UHCPU S1 MTaSHOPUN A273UHCPU S3 16 8 APPENDICES APPENDICES APPENDIX 1 PROCESSING TIMES Appendix 1 1 Operation Control Transition Instruction Processing Times 1 Operation instructions A172SHCPUN Classification Instruction Operation Expression A173UHCPU S1 dg ec qe 1 Unit us Unit us 0 1 16 9 20 9 DO D1 24 6 27 9 2 Substitution 0L 2L 24 3 30 1 DOL D2L 38 9 51 6 OF 4F 26 0 32 0 DOF D4F 42 9 55 7 0 1 2 21 3 25 4 DO D1 D2 30 1 33 0 da OL 2L 4L 30 5 37 1 Addition DOL D2L D4L 45 8 60 9 OF 4F 8F 37 3 41 7 DOF D4F D8F 55 8 68 3 0 1 2 21 2 25 4 DO D1 D2 30 1 33 0 E S bbsengn HOL H2L H4L 30 6 36 5 DOL D2L D4L 45 3 59 5 Binary operation 0F 4F 8F 37 6 41 7 DOF D4F D8F 55 6 67 6 O 1 2 21 1 25 4 DO D1 D2 30 2 33 0 Multiplication OL 2L K 4L 30 9 36 5 DOL D2L DAL 46 8 59 5 OF 4F 8F 38 0 41 7 DOF D4F D8F 56 7 67 6 0 1 2 25 4 32 7 DO D1 D2 34 1 41 7 d 0L 2L 4L 34 8 44 9 Division DOL D2L D4L 51 1 69 0 OF 4F 8F 43 7 44 3 DOF D4F D8F 61 1 70 1 O 1 2 24 0 32 5 oL Homainder DO D1 D2 32 9 40 1 OL 2L 4L 34 2 4
200. tput enable disable bit and forced output bit settings i A A A Output device Y 4 OFF Value ON region setting ON Value Watch data value With output enable disable bit and forced output bit settings 5 A A A Output device i y Output OFF Output control based on Output ON Output OFF ON Value and OFF Value Forced output Enable disable bit gt e gt Output OFF Output control based on Output OFF ON Value and OFF Value Forced output bit 4 Output ON Forced output b The conventional limit output function cannot be used The following settings and devices are all invalid e Limit output module in system settings e Limit output used unused setting in fixed parameters e Limit switch output enable of each axis command device e Limit switch output disable setting registers A172SHCPUN D1008 to D1011 A173UHCPU S1 D760 to D775 A273UHCPU S3 D760 to D775 e Limit switch output status registers A172SHCPUN D9180 to D9183 A173UHCPU S1 D776 to D791 A273UHCPU S3 D776to D791 e Limit switch output used unused setting in mechanical system output module parameters 16 3 16 LIMIT SWITCH OUTPUT FUNCTION 16 2 Limit Output Setting Data Limit output data are listed below You can set up to 32 points of output devices The following item
201. trol is exercised and ends at END Refer to Chapter 9 Task Operations for details of the run timing of the SFC program such as above The number of steps which can be active steps simultaneously is up to 256 with those of all SFC programs combined Excess of 256 will result in an SFC program error 16120 4 SFC PROGRAMS 4 2 SFC Chart Symbol List Parts acting as SFC program components are shown below In an SFC program these parts are connected by directed lines to represent an operation sequence and transition control Symbol Code size byte List Representation Function Classification e Indicates a program entry with a program name Specify this program name for a subroutine call Only one program name may be used with one program Program name Program name Program start end e Indicates a program end exit e When a subroutine called is made execution returns to the call source program Multiple or no symbols may be set within one program Motion control CALL Kn step e Starts a servo program Kn KO to K4095 Once execution CALL Fn e Runs an operation control program Fn FO to operation F4095 once control step ole type Repeats an operation control program FSn operation CALL FSn FSO to FS4095 until the next transition condition enables control step GSUB followed by WAIT performs a subroutine call and shifts control to the specified program When END is exec
202. troller or servo amplifier do not hold its edges When installing the equipment choose the place which will bear their weights and mount them in accordance with the A173UHCPU A172SHCPUN A171SHCPUN user s manual or the A273UHCPU user s manual and the instruction manuals of the products in use Do not stand or rest heavy objects on the product Check that the mounting orientation is correct Leave the specified clearances between the controller or servo amplifier and the control box inside surface between the controller and the servo amplifier and between the controller or servo amplifier and the other equipment Do not install or operate the controller servo amplifiers and servo motors if they are damaged or have parts missing Do not block the suction and exhaust ports of the servo motor provided with a cooling fan Prevent screws metal fragments or other conductive bodies or oil or other flammable substance from entering the controller servo amplifiers and servo motors The controller servo amplifiers and servo motors are precision machines Do not drop them or give them hard impact A Securely fix the controller and servo amplifiers to the machinery in accordance with the A173UHCPU A172SHCPUN A171SHCPUN user s manual or the A273UHCPU user s manual and the instruction manuals of the products in use Insecure fixing may lead to removal during operation A Always install the servo motor provided with reduction gear in the specified
203. true the bit data specified at D is set b S can be omitted At this time the format is SET D and device set is made unconditionally c When this instruction is set as a transition condition in the last block of a transient program whether the data specified at S is true or false is returned as logical type data In this case S cannot be omitted 4 Errors a An operation error will occur if 1 D or S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which sets M100 when either of MO and XO is 1 SET M100 MO XO MO 0 mo quo X0 1 5 OPERATION CONTROL PROGRAMS b Program which sets M100 when 0 is equal to DO SET M100 0 DO c Program which sets YO unconditionally SET YO Y8 5 OPERATION CONTROL PROGRAMS 9 2 Device reset RST res Number of Basic Steps RST D S 1 Usable data Usable Data Word device Constant 32 bit OE _ 16bit 32bit 64bit PS Bt ison integer floating Coasting integer integer floating expression d conditional type L point timer type type point pi expression type F K H K H L type K Bit device Note PX TT and CT are write disabled and cannot be used at D At D you cannot use M2001 to M2032 with the A273UH S3 or M2001 to M2008 with the A172SH 2 Data to be s
204. ty Sub sequence Max 30k steps Microcomputer program Max 58k steps 1000 a Internal relay M points Note 1 MO to M999 MO to M999 Total 2048 M2048 to M8191 f Total 8192 Latch relay L points 1048 setin 1046 set in parameters M1000 to M2047 parameters M1000 to M2047 0 points 0 Step relay S points ads to none defaults to none Link relay B points 1024 BO to B3FF 8192 BO to B1FFF Annunciator F points 256 FO to F255 2048 FO to B2047 Number of points 256 2048 Timer T a 100ms timer TO to T199 setting time 0 1 to 3276 78 set in 52 10ms timer T200 to T255 setting time 0 01 to 327 678 parameters 25 100ms retentive timer Defaults to none setting time 0 1 to 3276 75 e Extended timer T256 to T2047 setting time Depends on D W R Ej Number of points 256 2048 A Counter C Normal counter CO to C255 setting range 1 to 32767 Gern m 5 Nterrupt program C244 to C255 defaults to none setting range 1 to 32767 parameters 8 counter Extended counter C256 to C1023 count value setting Depends on D W R Data register D points Note 1 1024 DO to D1023 8192 DO to D8191 Link register W points 1024 WO to W3FF 8192 WO to W1FFF File register R points Max 8192 RO to R8191 set in parameter Accumulator A points 2 A0 A1 Index register V Z points 2 V Z 14 V V1 to V6 Z Z1 to Z6 Pointer P points 256 PO to P255 Interrupt pointer I points 32 IO to 131
205. uction SFCS The SFC program can be started by executing the following instruction in the sequence program e SFC program start request instruction SFCS Usable Devices Error Flag Bit devices Bit devices Digit Designation Number of Steps Sequence program Execution condition Execution command Settings Setting Range SFC program number to be 0 to 255 started A173UHCPU A172SHCPUN S1 A273UHCPU S3 DO to D1023 DO to D8191 WO to W3FF WO to W1FFF RO to R8191 RO to R8191 SFC program number to be started When specified indirectly 1 word Controls A request to start the specified SFC program is given on the leading edge OFF ON of the SFCS instruction execution command in the sequence program The SFC program to be started may be run by any of the normal task event task and NMI task 1 This instruction is always valid in any of the real mode virtual mode and mode changing status Execution instruction SFCS instruction 12 2 12 HOW TO RUN SFC PROGRAM Errors At occurrence of any of the following errors an SFC error is set to the SFC dedicated devices SFC error history devices 8000 to 8039 and SFC error detection M2039 and the SFC program is not started lt SFC error history devices gt Error
206. ui condition does not enable execution shifts to the Shift Y N enables When condition right connected step WAIT Y N does not enable e Differences between Shift Y N and WAIT Y N a are the same as those between Shift and transition When condition Y WAIT enables A Y N transition is designed to describe the following two route selective branch program easily GO and G1 programs should be different only in Conventional description acknowledgement negation of the conditional expressions Example 1 Example 2 G 0 1 DOI K100 D0 K100 New description e As a GO program set the GO program shown in above Example 1 or Example 2 e The SFC program list codes after conversion are the same as in the conventional description different only in SFC chart representation Therefore automatic search for free G number automatic generation of program whose conditional expression part is logically negated is performed during program editing to occupy two G programs Using Program editor to delete a Y N transition does not delete the automatically generated G program G1 below Use Program use list to delete that program 4 SFC PROGRAMS 1 Automatic free G number search feature a When not set to automatic numbering Searches for a free number forward starting with the set G number
207. uration esssssseseeeeen enne 2 3 2 3 A172SHCPUN System Overall Configuration esses rca rana 2 4 24 Software Package List uod e eee dose eee ene ee d ee Eae LE dea e Vg EE ape epe 2 5 3 PERFORMANCE SPECIFICATIONS sss enne en rca 3 1 to 3 7 3 1 SFC Performance Specifications essssssssssssseseeeeeee eene enhn nnns nnne ntn nns 3 1 3 2 SCPU Performance Specifications ccccceccceceeeceeseeeeeeeeceeeeeeaaeseeneeceaeeecaaeseeaaeseeneeseaeessaaesseneseaeeeeaas 3 2 3 3 PCPU Performance Specifications cccceccceceeceeeeeceeeeeceeeeeeaeeeeeeeseeeeesaaeeseaaeseeeeeseaeeesaeeseeeeneeesaas 3 3 3 3 1 Motion control specifications esii eiir i nnnm en nnnm enne 3 3 3 3 2 Operation control transition control specifications seen 3 4 4 SEG PROGRBAMS de om tiet td At A taa 4 1 to 4 27 4 1 SFC Program Structure sssssssssssssessseseeee enne snnt entente rst tesi nennen resin nnne nnns entrent 4 1 4 2 FG Ghart Symbol bist iid reete aaa 4 2 4 3 Branch and Coupling Chart Lit true terrre iii 4 5 4 4 SFC Program Names ssssssssssssseseeeeen nenne en thne en res nnns intr tesi tent nsn sss nrt sententiis nsn nnns nitens 4 9 A i ages epERTpede A eee a a E nde tec e ee ee PE ee 4 10 4 9 1 Motion Control step iue e e p e eite tue ER tede dd 4 10 4 5 2Operation control step cite t ER il ser ERR ae 4 11 4
208. uted control returns to the call source program GSUB followed by other than WAIT performs a subroutine start starts the specified program and shifts execution to the next lower part The start source and destination programs are run at the same time and when END is executed the call destination program ends e Stops and ends the specified program being run After an end restarting the program starts it from the initial start step When the specified program is being subroutine called the subroutine program CER dora name being run is also stopped Clear step g CLR program name e After the specified program has been subroutine started the subroutine program being run is not stopped When clear is performed on the subroutine called subroutine the specified subroutine being run is stopped and execution returns to the call source program and shifts to the next Subroutine Program name call start step GSUB program name 4 SFC PROGRAMS Classification Transition Shift Pre read transition Symbol Code size byte List Representation Function e When this transition is preceded by a motion control step execution does not wait for completion of the motion operation and shifts to the next step when the transition condition Gn GO to G4095 enables When this transition is preceded by an operation control step execution shifts to the next step when the trans
209. ve coupling points for selective branchselective branch can be the same Note that in an SFC chart this type is s displayed in order of a selective coupling coupling E a selective coupling as shown on the IFEm 1 n left IFE Selective E e In this case you cannot set a pointer Pn coupling JMP IFEm i i between the selective coupling point IFEm 1 and the selective coupling point IFEm Selective IFT2 IFEm SET Gn SFT Gn e After a parallel branch a parallel branch PABm can be performed PAT1 A parallel branch can be nested up to four CALL Fn levels PABm 1 Parallel branch PABm PAT1 PABm 1 CALL Fr Parallel branch JMP PAEm 1 PAT2 CALL Fn JMP PAEm 1 PAEm 1 JMP PAEm The two parallel coupling points for parallel branch gt parallel branch can be the same Note that in an SFC chart this type is displayed in order of a parallel coupling gt Parallel sii a parallel coupling as shown on the left coupling ER is e In this case you cannot set a pointer Pn m PET CALL Ka between the parallel coupling point PAEm 1 and the parallel coupling point coupling JMP PAEm PAEm l PAEm 1 PAEm SET Gn Selective coupling Parallel branch Parallel coupling Selective branch Selective coupling Selective branch Parallel coupling Parallel branch 4 SFC PROGRAMS
210. virtual servo motor shaft current value change is executed in the real mode a servo program error 903 occurs and the current value change is not made e If a servo motor output shaft current value change is executed in the virtual mode a servo program error 904 occurs and the current value change is not made e f a current value change is made during mode changing a servo program error 907 real gt virtual changing or 908 virtual gt real switching occurs and the current value change is not made 7 MOTION CONTROL PROGRAMS 7 3 Synchronous Encoder Shaft Current Value Change Control SV22 Only Servo Instruction Controls The current value of the synchronous encoder shaft specified in the virtual mode is changed Items Set on Peripheral Device Circular Parameter block o o 3 3 o 2 e processing Circular interpolation error Number of Control Axes Positioning Method Address travel Dwell time Auxiliary point Central point Control unit permissible range S pattern ratio Speed Change Torque limit value Acceleration time STOP input time deceleration Parameter block No Command speed Torque limit value Speed limit value Deceleration tim Sudden stop deceleration time Absolute O Item which must be set A Item which is set when required Control using CHGA E instruction 1
211. ways import it into a user device once using the DMOV P instruction and perform magnitude comparison or similar operation using the device that imported the data 10 2 11 SFC PARAMETERS 11 SFC PARAMETERS Two different SFC parameters are available task parameters designed to control the tasks normal task event task NMI task and program parameters to be set per SFC program Their details will be explained below 11 1 Task Parameters Setting Item Initial Value Remarks Number of These parameters are imported when PLC consecutive Normal task 1 to 30 ready M2000 turns from OFF to ON and transitions used for control thereafter Set whether the event task When setting changing the values of these or NMI task is used for parameters turn PLC ready M2000 OFF Interrupt setting i Event task external interrupt inputs 10 to 115 1 Number of consecutive transitions Description With execution of active step judgment of next transition condition gt transition processing performed when condition enables transition of active step defined as a single basic operation of SFC program running control in the execution cycle of the corresponding task this operation is performed for the number of active steps to terminate processing once The same operation is then repeated in the next cycle to perform processing In this case the transition destination step is executed in the next cyc
212. when condition enables SET M1000 MO SET M1000 X100 SET M1000 PXO Bit device status OFF normally closed contact when condition enables SET M1000 MO SET M1000 X100 SET M1000 PXO Device set SET M1000 SET Y100 SET PYO Device reset RST M1000 RST Y100 RST PYO Bit device control Device output DOUT MO 0 DOUT MO 0L DOUT Y100 0 DOUT Y100 0L DOUT PYO 0 DOUT PYO 0L Device input DIN 0 MO DIN 0L MO DIN 0 XO DIN 0L XO DIN 0 PXO DIN 0L PXO APP 3 APPENDICES Classification Instruction Logical AND Operation Expression SET M1000 MO M1 A172SHCPUN A173UHCPU S1 Unit us A273UHCPU S3 Unit us SET M1000 X100 X101 SET M1000 PXO PX1 Logical operation Logical OR SET M1000 MO M1 SET M1000 X100 X101 SET M1000 PX0 PX1 Equal to when condition enables SET M1000 0 1 SET M1000 DO D1 SET M1000 0L 2L SET M1000 DOL D2L SET M1000 0F 4F SET M1000 DOF D4F Not equal to when condition enables SET M1000 0 1 SET M1000 DO D1 SET M1000 0L 2L SET M1000 DOL D2L SET M1000 0F 4F SET M1000 DOF D4F Less than when condition enables Comparison SET M1000 0 lt 1 SET M100
213. whose fractional S Data t f portion will be rounded up A 3 Functions a The smallest integer not less than the data specified at S is found b If the S value is positive the absolute value will be greater and if it is negative the absolute value will be smaller c If S is an integer type its value is returned unchanged with no conversion processing performed 4 Errors a An operation error will occur if 1 S is an indirectly specified device and its device number is outside the range 5 Program examples a Program which finds the rounded up fractional portion value of DOF and assigns the result to 0F 0F FUP DOF 3 2 1 40 D3 D2 D DO 3 Ll 5 389 5 b Program which finds the rounded up fractional portion value of DAF and assigns the result to 0F when D4F is a negative number 0F FUP D4F 3 2 0 D7 D6 D5 D4 1 a ie es OT e GU NE 5 OPERATION CONTROL PROGRAMS 5 6 14 BCD gt BIN conversion BIN F ES Number of Basic Steps Lx up Os BIN S 1 Usable data Usable Data Word device Constant 32 bit 64 bit 16 bit 32 bit 64 bit RR Bit pru integer floating Coasting integer integer floating expression conditional ditional eel ype F K H K H L type K Bit device point timer type type point expression expression 2 Data to be set Data to be Set Data Type of Result S BCD data which will be
214. write from the PLC CPU output is not provided to real output 3 PERFORMANCE SPECIFICATIONS Classification 1 Operation control transition instruction list Function Substitution Format Number of Basic Usable Programs Usable Expressions Calculation expression Bit conditional expression Comparison conditional expression YIN transition s conditional expression Addition Subtraction Multiplication Division Remainder Bit operation Bit inversion complement Bit logical AND Bit logical OR Bit exclusive OR Bit right shift lt lt Bit left shift Sign inversion complement of 2 Standard function SIN Sine SIN S COS Cosine COS S TAN Tangent TAN S ASIN Arcsine ASIN S ACOS Arccosine ACOS S ATAN Arctangent ATAN S SQRT Square root SQRT S LN Natural logarithm LN S EXP Exponential operation EXP S ABS Absolute value ABS S RND Round off RND S FIX Round down FIX S FUP Round up FUP S BIN BCD BIN conversion BIN S BCD BINBCD conversion BCD S Type conversion SHORT Converted into 16 bit integer type signed SHORT S 4 4 4 4 4 4 2 4 4 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 USHORT Converted into 16 bit
Download Pdf Manuals
Related Search
Related Contents
KS-1 取扱説明書(For KS-15/32, etc.) Kenmore 625.39376 Water System User Manual PROJET réalisé par PROJET encadré par - DUNE BANCO DE CAPACITORES Topografia_Ing Geociencias Copyright © All rights reserved.
Failed to retrieve file