background image

FC5A

SERIES

FC9Y-B1273(1)

User’s Manual   Advanced Volume

Summary of Contents for MICROSmart FC5A Series

Page 1: ...FC5A SERIES FC9Y B1273 1 User s Manual Advanced Volume ...

Page 2: ......

Page 3: ...from falling while moving or transporting the MicroSmart otherwise damage or malfunction of the MicroSmart will result Prevent metal fragments and pieces of wire from dropping inside the MicroSmart housing Put a cover on the MicroSmart modules during installation and wiring Ingress of such fragments and chips may cause fire hazard damage or malfunc tion Use a power supply of the rated value Use of...

Page 4: ...D32S3 FC5A D12K1E FC5A D12S1E Note 1 HMI Module Upgrade Note 2 110 or higher 110 or higher 101 or higher Basic Vol 5 60 FC5A SIF2 Expansion RS232C Communi cation Module Compatibility Note 3 110 or higher 5 1 or higher Basic Vol 2 86 25 1 Modbus Master Upgrade Note 4 Basic Vol 12 6 Modbus Slave Upgrade Note 4 110 or higher 110 or higher Basic Vol 12 14 32 bit Data Storage Setting 5 2 or higher Basi...

Page 5: ...or higher 210 or higher 210 or higher 5 3 or higher 5 19 Decrement Jump Non zero DJNZ 11 5 N Data Search Instruction NDSRC 19 5 Clock Instructions TADD TSUB HTOS STOH and HOUR 20 1 All in one 12V DC Power CPU Modules Basic Vol 2 1 Analog I O Modules Upgrade Version 200 or higher Any Any Any Basic Vol 2 56 Modbus TCP Communication 210 or higher 210 or higher 210 or higher 5 3 or higher 23 1 Modbus ...

Page 6: ...munication Index Alphabetical listing of key words IMPORTANT INFORMATION Under no circumstances shall IDEC Corporation be held liable or responsible for indirect or consequential damages resulting from the use of or the application of IDEC PLC components individually or in combination with other equipment All persons using these components must be willing to accept responsibility for choosing the ...

Page 7: ...al teaching timer instructions intelligent module access instructions trigono metric function instructions logarithm power instructions file data process ing instructions clock instructions computer link communication modem communication Modbus TCP communication expansion RS232C RS485 communication modules and AS Interface master modules FC9Y B1268 FC5A Series MicroSmart Pentra User s Manual Basic...

Page 8: ...Preface 6 FC5A MicroSmart User s Manual FC9Y B1273 ...

Page 9: ...OV Block Move 3 9 IBMV Indirect Bit Move 3 10 IBMVN Indirect Bit Move Not 3 12 NSET N Data Set 3 13 NRS N Data Repeat Set 3 14 XCHG Exchange 3 15 TCCST Timer Counter Current Value Store 3 16 CHAPTER 4 Data Comparison Instructions CMP Compare Equal To 4 1 CMP Compare Unequal To 4 1 CMP Compare Less Than 4 1 CMP Compare Greater Than 4 1 CMP Compare Less Than or Equal To 4 1 CMP Compare Greater Than ...

Page 10: ... Convert Data Type 8 19 DTDV Data Divide 8 21 DTCB Data Combine 8 22 SWAP Data Swap 8 23 CHAPTER 9 Week Programmer Instructions WKTIM Week Timer 9 1 WKTBL Week Table 9 2 Using Clock Cartridge 9 5 Setting Calendar Clock Using WindLDR 9 6 Setting Calendar Clock Using a User Program 9 6 Adjusting Clock Using a User Program 9 7 Adjusting Clock Cartridge Accuracy 9 8 CHAPTER 10 Interface Instructions D...

Page 11: ... 1 Application Examples 14 18 CHAPTER 15 Dual Teaching Timer Instructions DTML 1 sec Dual Timer 15 1 DTIM 100 ms Dual Timer 15 1 DTMH 10 ms Dual Timer 15 1 DTMS 1 ms Dual Timer 15 1 TTIM Teaching Timer 15 3 CHAPTER 16 Intelligent Module Access Instructions RUNA READ Run Access Read 16 2 RUNA WRITE Run Access Write 16 3 STPA READ Stop Access Read 16 4 STPA WRITE Stop Access Write 16 5 CHAPTER 17 Tr...

Page 12: ...ons for Using Modem 22 9 Programming Data Registers and Internal Relays 22 9 Setting Up the CPU Module 22 9 Programming WindLDR 22 10 Operating Procedure for Modem Mode 22 11 Sample Program for Modem Originate Mode 22 12 Sample Program for Modem Answer Mode 22 13 Troubleshooting in Modem Communication 22 14 CHAPTER 23 Modbus TCP Communication Modbus TCP Communication General Information 23 1 Modbu...

Page 13: ...TABLE OF CONTENTS FC5A MICROSMART USER S MANUAL FC9Y B1273 v Operator Interface Communication 25 6 User Communication 25 9 Troubleshooting 25 13 INDEX ...

Page 14: ...TABLE OF CONTENTS vi FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 15: ...mparison Greater than or equal to comparison of counter current value Basic Vol 7 19 CDP Dual Pulse Reversible Counter Dual pulse reversible counter 0 to 65 535 Basic Vol 7 12 CDPD Double word Dual Pulse Reversible Counter Double word dual pulse reversible counter 0 to 4 294 967 295 Basic Vol 7 16 CNT Adding Counter Adding counter 0 to 65 535 Basic Vol 7 12 CNTD Double word Adding Counter Double w...

Page 16: ...Basic Vol 7 4 SFR Shift Register Forward shift register Basic Vol 7 23 SFRN Shift Register Not Reverse shift register Basic Vol 7 23 SOTD Single Output Down Falling edge differentiation output Basic Vol 7 27 SOTU Single Output Up Rising edge differentiation output Basic Vol 7 27 TIM 100 ms Timer Subtracting 100 ms timer 0 to 6553 5 sec Basic Vol 7 8 TIMO 100 ms Off delay Timer Subtracting 100 ms o...

Page 17: ... 4 1 CMP Compare Unequal To X X X X X 4 1 CMP Compare Less Than X X X X X 4 1 CMP Compare Greater Than X X X X X 4 1 CMP Compare Less Than or Equal To X X X X X 4 1 CMP Compare Greater Than or Equal To X X X X X 4 2 ICMP Interval Compare Greater Than or Equal To X X X X X 4 6 LC Load Compare Equal To X X X X X 4 8 LC Load Compare Unequal To X X X X X 4 8 LC Load Compare Less Than X X X X X 4 8 LC ...

Page 18: ...play 10 1 DGRD Digital Read 10 3 User Communication TXD1 Transmit 1 Basic Vol 10 6 TXD2 Transmit 2 Basic Vol 10 6 TXD3 Transmit 3 Basic Vol 10 6 TXD4 Transmit 4 Basic Vol 10 6 TXD5 Transmit 5 Basic Vol 10 6 TXD6 Transmit 6 Basic Vol 10 6 TXD7 Transmit 7 Basic Vol 10 6 RXD1 Receive 1 Basic Vol 10 15 RXD2 Receive 2 Basic Vol 10 15 RXD3 Receive 3 Basic Vol 10 15 RXD4 Receive 4 Basic Vol 10 15 RXD5 Re...

Page 19: ...imer 15 1 DTMS 1 ms Dual Timer 15 1 TTIM Teaching Timer 15 3 Intelligent Module Access RUNA Run Access X X 16 2 STPA Stop Access X X 16 4 Trigonometric Function RAD Degree to Radian X 17 1 DEG Radian to Degree X 17 2 SIN Sine X 17 3 COS Cosine X 17 4 TAN Tangent X 17 5 ASIN Arc Sine X 17 6 ACOS Arc Cosine X 17 7 ATAN Arc Tangent X 17 8 Logarithm Power LOGE Natural Logarithm X 18 1 LOG10 Common Log...

Page 20: ...V X X X X X MOVN X X X X X IMOV X X X X X IMOVN X X X X X BMOV X X X X X IBMV X X X X X IBMVN X X X X X NSET X X X X X NRS X X X X X XCHG X X X X X TCCST X X X X X Data Comparison CMP X X X X X CMP X X X X X CMP X X X X X CMP X X X X X CMP X X X X X CMP X X X X X ICMP X X X X X LC X X X X X LC X X X X X LC X X X X X LC X X X X X LC X X X X X LC X X X X X Binary Arithmetic ADD X X X X X SUB X X X X...

Page 21: ... X X X DECO X X X X X BCNT X X X X X ALT X X X X X CVDT X X X X X DTDV X X X X X DTCB X X X X X SWAP X X X X X Week Programmer WKTIM X X X X X WKTBL X X X X X Interface DISP X X X DGRD X X X User Communication TXD1 X X X X X Note 1 TXD2 X X X X X TXD3 X Note 2 X X TXD4 X Note 2 X X TXD5 X Note 2 X X TXD6 X X TXD7 X X RXD1 X X X X X Note 1 RXD2 X X X X X RXD3 X Note 2 X X RXD4 X Note 2 X X RXD5 X N...

Page 22: ... RAMP1 X X RAMP2 X ZRN1 X X ZRN2 X X ZRN3 X PID Instruction PID X X X Dual Teaching Timer DTML X X X X X DTIM X X X X X DTMH X X X X X DTMS X X X X X TTIM X X X X X Intelligent Module Access RUNA X Note 1 X X STPA X Note 1 X X Trigonometric Function RAD X X X X X DEG X X X X X SIN X X X X X COS X X X X X TAN X X X X X ASIN X X X X X ACOS X X X X X ATAN X X X X X Logarithm Power LOGE X X X X X LOG1...

Page 23: ...cates the remaining time As described above when a timer is designated as a source device of an advanced instruction the current value or the remaining time of the timer is read as source data Adding counters CNT start counting at 0 and the current value is incremented up to the preset value Reversible counters CDP and CUD start counting at the preset value and the current value is incremented or ...

Page 24: ...ts 2 0 to 4 294 967 295 Long Signed 31 bits L 32 bits 2 2 147 483 648 to 2 147 483 647 Float Floating point F 32 bits 2 3 402823 1038 to 3 402823 1038 Data Type Result of Addition Hexadecimal Storage Result of Subtraction Hexadecimal Storage Word 0 65535 131071 0000 FFFF CY FFFF 65535 0 1 65535 65536 FFFF 0000 BW FFFF BW 0001 BW 0000 Integer 65534 32768 32767 0 1 32767 32768 32769 65535 CY 7FFE CY...

Page 25: ...der bit 31 contains the sign bit s The table below shows the correspondence between the values of the three constituent fields s e and f and the value represented by the single format bit pattern When any value out of the bit pattern is entered to the advanced instruction or when execution of advanced instructions such as division by zero has produced any value out of the bit pattern a user progra...

Page 26: ...areas and do not continue with each other Advanced instructions execute operation only on the available devices in the valid area If a user program syntax error is found during programming WindLDR rejects the program instruction and shows an error message NOP No Operation Details of all other advanced instructions are described in the following chapters 305419896 Double word Data High Word D10 123...

Page 27: ...ial internal relays M8000 through M8157 all in one type CPU or M8317 slim type CPU When T timer or C counter is used as S1 the timer counter current value TC or CC is read out When T timer or C counter is used as D1 the data is written in as a preset value TP or CP which can be 0 through 65535 When F float data type is selected only data register and constant can be designated as S1 and only data ...

Page 28: ...through M7 and M10 through M17 M0 is the LSB least significant bit M17 is the MSB most significant bit MOV W 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 1 MSB M0 LSB M17 M7 M10 I0 REP 810 D2 When input I0 is on constant 810 designated by source device S1 is moved to data register D2 desig nated by destination device D1 D1 D0 810 D2 810 S1 810 D1 D2 MOV W I0 REP 810 D2 D3 When input I0 is on constant 810 designa...

Page 29: ... as many as the repeat cycles starting with the device designated by S1 are moved to the same quantity of devices starting with the device designated by D1 Note The BMOV block move instruction has the same effect as the MOV instruction with both the source and destination designated to repeat Data Type Word 111 D11 110 D10 112 D12 D21 112 D20 D22 Source Repeat 3 Destination Repeat 0 I1 REP 3 S1 R ...

Page 30: ...the source and destination areas overlap each other then the source data in the overlapped area is also changed 111 D11 110 D10 112 D12 111 D21 110 D20 112 D22 Source Repeat 3 Destination Repeat 3 I6 REP 3 S1 R D10 D1 R D20 MOV D 113 D13 113 D23 114 D14 115 D15 114 D24 115 D25 Invalid D12 D13 1 5 D10 D11 3 44 D14 D15 11 1 D22 D23 1 5 D20 D21 3 44 D24 D25 Source Repeat 3 Destination Repeat 3 I1 REP...

Page 31: ...timer C counter or D data register is designated as the source or destination 1 point word or integer data type or 2 points double word or long data type are used When repeat is designated for a word device the quantity of device words increases in 1 or 2 point increments M10 NOT M50 When input I0 is on the 16 internal relays starting with M10 designated by source device S1 are inverted bit by bit...

Page 32: ... special internal relay M8004 and the ERR LED on the CPU module Valid Data Types FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Base address to move from X X X X X X X 1 99 S2 Source 2 Offset for S1 X X X X X X X D1 Destination 1 Base address to move to X X X X X 1 99 D2 Destination 2 ...

Page 33: ...offset to data regis ter D10 designated by destination device D1 D 10 20 D30 As a result when input I0 is on the data in data register D24 is moved to data register D30 D23 D22 6450 D24 6450 D30 D21 D20 20 D25 4 C10 I0 REP S1 D20 D1 D10 IMOV W S2 C10 D2 D25 D20 D50 D10 D51 If data register D50 contains a value of 2 the source data is determined by adding the offset to data register D20 designated ...

Page 34: ...en input is on the values contained in devices designated by S1 and S2 are added to determine the source of data The 16 or 32 bit data so determined is inverted and moved to des tination which is determined by the sum of values contained in devices designated by D1 and D2 REP S1 R D1 R IMOVN S2 D2 When a bit device such as I input Q output M internal relay or R shift register is designated as the ...

Page 35: ...1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 First device address to move X X X X X X X N W N words Quantity of blocks to move X X X X X X X X D1 Destination 1 First device address to move to X X X X X W word X I integer D double word L long F float S1 S1 1 S1 2 S1 N 1 D1 D1 1 D1 2 D1 N 1 When input is on N blocks of 16 bit word data starting with device designated by S...

Page 36: ...determine the source and destination devices As a result when input I0 is on the ON OFF status of internal relay M15 is moved to output Q44 FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Base address to move from X X X X X 0 or 1 1 99 S2 Source 2 Offset for S1 X X X X X X X 0 65535 D1 ...

Page 37: ...13 12 11 10 9 8 7 6 5 4 3 2 1 0 D10 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 D20 S1 R M10 I1 IBMV S2 5 D1 R Q30 SOTU REP 3 D2 9 M10 5 Q30 9 Repeat 3 M27 M10 M17 M20 M15 5th from M10 Q47 Q30 Q37 Q41 9th from Q30 Q44 Since source device S1 is internal relay M10 and the value of source device S2 is 5 the source data is 3 internal relays starting with M15 Since destination device D1 is output Q30 and...

Page 38: ...urce and destination devices As a result when input I0 is on the ON OFF status of internal relay M30 is inverted and moved to output Q22 FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Base address to move from X X X X X 0 or 1 1 99 S2 Source 2 Offset for S1 X X X X X X X 0 65535 D1 Des...

Page 39: ... address to move X X X X X X X X D1 Destination 1 First device address to move to X X X X X W word X I integer X D double word X L long X F float X S1 S2 S3 Sn D1 D2 D3 Dn When input is on N blocks of 16 or 32 bit data in devices designated by S1 S2 S3 Sn are moved to N blocks of destinations starting with device designated by D1 This instruction is available on upgraded CPU modules with system pr...

Page 40: ...2K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat N W N blocks Quantity of blocks to move X X X X X X X X S1 Source 1 First device address to move X X X X X X X X D1 Destination 1 First device address to move to X X X X X W word X I integer X D double word X L long X F float X S1 D1 D2 D3 Dn 1 When input is on 16 or 32 bit data designated by S1 is set to N blocks of ...

Page 41: ...nd D2 are exchanged with each other This instruction is available on upgraded CPU modules with system program version 210 or higher XCHG D1 D2 When a bit device such as Q output M internal relay or R shift register is designated as the desti nation 16 points word data type or 32 points double word data type are used When a word device such as D data register is designated as the destination 1 poin...

Page 42: ...o X X 1 99 W word X I integer D double word X L long F float S1 D1 When input is on 16 or 32 bit data designated by S1 is read out and stored to the current value of device designated by D1 This instruction is available on upgraded CPU modules with system program version 200 or higher REP S1 R D1 R TCCST When a bit device such as I input Q output M internal relay or R shift register is designated ...

Page 43: ... or I S1 S2 D1 on Data type D L or F S1 S1 1 S2 S2 1 D1 on When input is on 16 or 32 bit data designated by source devices S1 and S2 are compared When S1 data is equal to S2 data destination device D1 is turned on When the condition is not met D1 is turned off REP S1 R D1 R CMP AND OR S2 R Data type W or I S1 S2 D1 on Data type D L or F S1 S1 1 S2 S2 1 D1 on When input is on 16 or 32 bit data desi...

Page 44: ... Source 1 Data to compare X X X X X X X X 1 99 S2 Source 2 Data to compare X X X X X X X X 1 99 D1 Destination 1 Comparison output X 1 99 W word X I integer X D double word X L long X F float X Data type W or I S1 S2 D1 on Data type D L or F S1 S1 1 S2 S2 1 D1 on When input is on 16 or 32 bit data designated by source devices S1 and S2 are compared When S1 data is greater than or equal to S2 data ...

Page 45: ...CMP W S2 D20 56 D20 50 D20 Q0 turned off Q0 turned on S2 D1 42 D10 127 D10 S1 I1 REP S1 D30 D1 Q1 CMP I S2 D40 3 D40 3 D40 Q1 turned off Q1 turned on S2 D1 4 D30 12 D30 S1 I2 REP S1 D50 D1 Q2 CMP D S2 D60 S2 D1 S1 23456789 D50 D51 12345678 D60 D61 Q2 turned on 23456789 D50 D51 34567890 D60 D61 Q2 turned off I3 REP S1 D70 D1 Q3 CMP L S2 D80 S2 D1 S1 12345678 D70 D71 12345678 D80 D81 Q3 turned on 12...

Page 46: ...ical Operation OR Data Type Double Word Repeat Logical Operation AND Repeat Two Source Devices When S1 source and S2 source are designated to repeat source devices as many as the repeat cycles starting with the devices designated by S1 and S2 are compared with each other The comparison results are ANDed or ORed and set to the destination device designated by D1 Data Type Word Repeat Logical Operat...

Page 47: ...the input to the data comparison instruction is off If the comparison output is on the on status is maintained when the input is turned off as demonstrated by this program This program turns the output off when the input is off I0 REP 3 S1 R D10 D1 R M10 CMP W S2 R D20 20 D21 0 D20 100 D22 M11 turned on M10 turned on M12 turned off S2 Repeat 3 D1 Repeat 3 20 D11 10 D10 30 D12 S1 Repeat 3 D22 D23 D...

Page 48: ... or M8152 indicates the result of the instruc tion that was executed last FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Data to compare X X X X X X X X S2 Source 2 Data to compare X X X X X X X X S3 Source 3 Data to compare X X X X X X X X D1 Destination 1 Comparison output X W word X...

Page 49: ... by source devices S1 S2 and S3 are compared When the condition is met internal relay Q1 designated by destination device D1 is turned on When the condition is not met Q1 is turned off S1 D10 I0 ICMP W S2 D11 S3 D12 SOTU D10 D11 D12 Q1 goes on 15 D11 S2 17 D10 S1 15 D12 S3 Q1 goes on D1 M8151 M8152 M8004 M8150 OFF OFF OFF OFF 18 D11 15 D10 19 D12 Q1 goes off ON ON OFF ON ...

Page 50: ... is not met the output is turned off LC Data type W or I S1 S2 Data type D L or F S1 S1 1 S2 S2 1 This instruction constantly compares 16 or 32 bit data designated by S1 and S2 When S1 data is not equal to S2 data the output to the following instructions is turned on When the condi tion is not met the output is turned off LC Data type W or I S1 S2 Data type D L or F S1 S1 1 S2 S2 1 This instructio...

Page 51: ...OFF C2 ON OFF Output Q1 ON OFF Output Q0 99996 99997 99998 ON OFF 99999 100000 Instruction Data LOD LOD CNTD LC D OUT LC D OUT I0 I1 C2 100000 C2 99997 Q0 C2 99996 Q1 Program List Output Q0 is on when counter C2 current value is 99997 Output Q1 is turned on when counter C2 cur rent value reaches 99996 and remains on until counter C2 is reset Q0 Q1 99995 Ladder Diagram 2 LC I D10 2 I2 Instruction D...

Page 52: ...4 DATA COMPARISON INSTRUCTIONS 4 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 53: ...ata designated by source device S1 The result is set to destination device D1 and borrow M8003 REP S1 R D1 R SUB S2 R Data type W or I S1 S2 D1 D1 1 Data type D L or F S1 S1 1 S2 S2 1 D1 D1 1 When input is on 16 or 32 bit data designated by source device S1 is multiplied by 16 or 32 bit data designated by source device S2 The result is set to destination device D1 When the result exceeds the valid...

Page 54: ... operation a carry or bor row occurs and special internal relay M8003 is turned on FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Data for calculation X X X X X X X X 1 99 S2 Source 2 Data for calculation X X X X X X X X 1 99 D1 Destination 1 Destination to store results X X X X X 1 99...

Page 55: ...put Q0 is set as a warning indicator When the acknowledge pushbutton input I1 is pressed the warning indicator is reset Acknowledge Pushbutton S1 D2 ADD W Q0 S Q0 R I0 REP S2 D20 D1 D30 S1 D10 ADD I 4 D10 15 D30 11 D20 I0 REP S2 D20 D1 D30 S1 D10 ADD D 1957400 D10 D11 4112600 D20 D21 6070000 D30 D31 I0 REP S2 D20 D1 D30 S1 D10 ADD L 216283 D10 D11 964355 D20 D21 748072 D30 D31 I0 REP S2 D20 D1 D30...

Page 56: ...D1 When using a bit device such as internal relay for destination 32 internal relays are required so internal relay M2521 or a larger number cannot be used as destination device D1 I1 REP S2 D20 D1 D30 S1 D10 MUL W D10 300000 000493E0h 500 01F4h 600 0258h D20 D30 D31 When input I1 is on data of D10 is multiplied by data of D20 and the result is set to D30 and D31 D31 37856 93E0h D30 4 0004h I1 REP...

Page 57: ... for destination 64 internal relays are required so M2481 or a larger number cannot be used as destination device D1 Data Type Long Note Since the destination uses four word devices in the division operation of long data type data registers D1997 through D1999 cannot be used as destination device D1 When using a bit device such as internal relay for destination 64 internal relays are required so M...

Page 58: ...g and Float When only D1 destination is designated to repeat the same result is set to 3 devices starting with D1 D1 1 Repeat Two Source Devices Data Type Word and Integer When S1 and S2 source are designated to repeat the final result is set to destination device D1 Data Type Double Word Long and Float When S1 and S2 source are designated to repeat the final result is set to destination device D1...

Page 59: ...ecial internal relay M8003 carry borrow is turned on when a carry or borrow occurs in the last repeat operation When a user program execution error occurs in any repeat operation special internal relay M8004 user program execution error and the ERR LED are turned on and maintained while operation for other instructions is continued I1 REP 3 S1 R D10 D1 R D30 15 D11 10 D10 20 D12 S1 Repeat 3 D1 Rep...

Page 60: ...on is designated to repeat the same result is set to 3 devices starting with D1 D1 1 Data Type Word and Integer Data Type Double Word Long and Float Repeat Two Source Devices When S1 and S2 source are designated to repeat the final result is set to destination device D1 D1 1 Data Type Word and Integer Data Type Double Word Long and Float I1 REP 3 S1 R D10 D1 D30 D10 S1 Repeat 3 D1 Repeat 0 S2 D20 ...

Page 61: ...D1 D1 1 Data Type Word and Integer Data Type Double Word Long and Float I1 REP 3 S1 R D10 D1 R D30 D10 S1 Repeat 3 D1 Repeat 3 S2 D20 S2 Repeat 0 D20 D11 D12 D20 D20 SOTU MUL W D32 D33 D30 D31 D34 D35 I1 REP 3 S1 R D10 D1 R D30 D12 D13 D10 D11 D14 D15 S1 Repeat 3 D1 Repeat 3 S2 D20 S2 Repeat 0 D32 D33 D30 D31 D34 D35 D20 D21 D20 D21 D20 D21 SOTU MUL D I1 REP 3 S1 R D10 D1 R D30 D10 S1 Repeat 3 D1 ...

Page 62: ...sult is set to destination devices D1 D1 1 Repeat Destination Device Only Data Type Word and Integer When only D1 destination is designated to repeat the same result is set to 6 devices starting with D1 Data Type Double Word and Long When only D1 destination is designated to repeat the same result is set to 6 devices starting with D1 D1 1 Data Type Float When only D1 destination is designated to r...

Page 63: ...signated to repeat different results are set to 3 devices starting with D1 D1 1 I1 REP 3 S1 R D10 D1 D30 D10 S1 Repeat 3 D1 Repeat 0 S2 R D20 S2 Repeat 3 D30 D20 D31 D11 D12 D21 D22 D30 D30 D31 D31 Quotient Remainder SOTU DIV W I1 REP 3 S1 R D10 D1 D30 D10 D11 S1 Repeat 3 D1 Repeat 0 S2 R D20 S2 Repeat 3 D30 D31 D20 D21 D32 D33 D12 D13 D14 D15 D22 D23 D24 D25 D30 D31 D30 D31 D32 D33 D32 D33 Quotie...

Page 64: ...ogram execution error occurs in any repeat operation special internal relay M8004 user program execution error and the ERR LED are turned on and maintained while operation for other instructions is continued I1 REP 3 S1 R D10 D1 R D30 D10 S1 Repeat 3 D1 Repeat 3 S2 R D20 S2 Repeat 3 D30 D20 D33 D11 D12 D21 D22 D31 D32 D34 D35 Quotient Remainder SOTU DIV W I1 REP 3 S1 R D10 D1 R D30 D10 D11 S1 Repe...

Page 65: ... D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S D Source Destination Device to increment data X W word X I integer X D double word X L long X F float Data type W or I S D 1 S D Data type D or L S D S D 1 1 S D S D 1 When input is on one is added to the 16 or 32 bit data designated by device S D and the result is stored to the same device...

Page 66: ...urned on the data of D10 is incremented by one If the SOTU is not programmed the data of D10 is incremented in each scan I0 INC W SOTU 100 D10 101 D10 1 S D D20 I1 DEC W SOTU When input I1 is turned on the data of D20 is decremented by one If the SOTU is not programmed the data of D20 is decremented in each scan 100 D20 99 D20 1 ...

Page 67: ...store results X W word X I integer D double word X L long F float X Data type W When input is on the square root of device designated by S1 is extracted and is stored to the destination designated by D1 The square root is calculated to two decimals omitting the figures below the second place of decimals and multiplied by 100 Data type D When input is on the square root of device designated by S1 S...

Page 68: ... X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 First device address to calculate X X X S2 Source 2 Quantity of data blocks X X D1 Destination 1 Destination to store results X Calculation ADD XOR W word X X I integer X D double word X L long X F float X Operation W word I integer D double word L long F float ADD S1 S2 1 word device D1 2 word devices S1 D1 2 word devices S2 1 w...

Page 69: ...o 4 294 967 295 L long 1 Out of the range between 2 147 483 648 to 2 147 483 647 F float 1 See the figure below M8003 Execution Result Value 1 0 Overflow out of the range between 3 402823 1038 and 3 402823 1038 1 0 Not zero within the range between 1 175495 10 38 and 1 175495 10 38 0 0 Zero 0 1 175495 10 38 M8003 1 1 1 175495 10 38 0 3 402823 1038 0 Execution Result 1 Overflow 0 1 3 402823 1038 Ov...

Page 70: ... 4566 FFFFEE2Ah D100 D101 D1 D100 S1 D0 I0 SUM D ADD S2 4 SOTU 1000000 000F4240h D100 D101 100000 000186A0h D0 D1 200000 00030D40h D2 D3 300000 000493E0h D4 D5 400000 00061A80h D6 D7 D1 D100 S1 D0 I0 SUM L ADD S2 4 SOTU 10253086 FF638CE2h D100 D101 500000 FFF85EE0h D0 D1 123456 0001E240h D2 D3 9876543 FF694BC1h D4 D5 1 00000001h D6 D7 D1 D100 S1 D0 I0 SUM F ADD S2 4 SOTU D100 D101 12 345 D0 D1 D2 ...

Page 71: ...dorandom numbers X X S2 Source 2 Maximum value of pseudorandom numbers X X D1 Destination 1 Destination to store results X W word X I integer D double word L long F float When input is on pseudorandom numbers are generated Source devices S1 and S2 specify the minimum and maximum values of the gen erated pseudorandom numbers respectively S2 value must be larger than S1 value S1 and S2 values must b...

Page 72: ...5 Binary Arithmetic Instructions 5 20 FC5A MicroSmart User s Manual FC9Y B1273 ...

Page 73: ...evices S1 and S2 are ANDed bit by bit The result is set to destination device D1 S1 1 1 1 0 0 1 S2 1 0 1 1 0 0 D1 1 0 1 0 0 0 S1 S2 D1 0 0 0 0 1 0 1 0 0 1 1 1 REP S1 R D1 R ANDW S2 R S1 S2 D1 When input is on 16 or 32 bit data designated by source devices S1 and S2 are ORed bit by bit The result is set to destination device D1 S1 1 1 1 0 0 1 S2 1 0 1 1 0 0 D1 1 1 1 1 0 1 S1 S2 D1 0 0 0 0 1 1 1 0 1...

Page 74: ... results X X X X X 1 99 W word X I integer D double word X L long F float When a bit device such as I input Q output M internal relay or R shift register is designated as the source or destination 16 points word data type or 32 points double word data type are used When repeat is designated for a bit device the quantity of device bits increases in 16 or 32 point incre ments When a word device such...

Page 75: ... 3 devices starting with D1 Data Type Double Word When only D1 destination is designated to repeat the same result is set to 3 devices starting with D1 D1 1 Repeat Two Source Devices Data Type Word When S1 and S2 source are designated to repeat the final result is set to destination device D1 Data Type Double Word When S1 and S2 source are designated to repeat the final result is set to destinatio...

Page 76: ...When a user program error occurs in any repeat operation special internal relay M8004 user program execution error and the ERROR LED are turned on and maintained while operation for other instructions is continued For the advanced instruction which has caused a user program execution error results are not set to any destination I1 REP 3 S1 R D10 D1 R D30 S2 D20 SOTU ANDW W D10 S1 Repeat 3 D1 Repea...

Page 77: ... For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays M0 through M2557 can be designated as S1 Special internal relays cannot be designated as S1 Since the SFTL instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D...

Page 78: ... 1 1 1 0 1 0 0 0 1 1 1 0 0 0 After second shift D10 43688 CY M8003 MSB LSB D10 SFTL MOV W Shift to the left S2 0 N_B 16 S2 M8120 is the initialize pulse special internal relay When the CPU starts operation the MOV move instruc tions set 0 and 65535 to data registers D10 and D11 respec tively Each time input I0 is turned on 32 bit data of data registers D10 and D11 is shifted to the left by 2 bits ...

Page 79: ...ce 1 First data for bit shift X X X S2 Source 2 Data to shift into the MSB X X X X 0 or 1 N_B Number of bits in the data string X 1 65535 Bits Quantity of bits to shift 1 15 S1 CY When input is on N_B bit data string starting with source device S1 is shifted to the right by the quantity of bits designated by device Bits The result is set to source device S1 and the last bit status shifted out is s...

Page 80: ...2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 After second shift D20 1 CY M8003 MSB LSB D10 1 0 0 Shift to the right S2 0 N_B 16 M8120 is the initialize pulse special internal relay When the CPU starts operation the MOV move instruc tions set 65535 and 0 to data registers D10 and D11 respec tively Each time input I0 is turned on 32 bit data of data registers D10 and D11 is shifted to the right by 1 bit as d...

Page 81: ...on I Q M R T C D Constant Repeat S1 Source 1 Data for BCD shift X S2 Source 2 Quantity of digits to shift X X X X X X X 1 7 W word I integer D double word X L long F float When input is on the 32 bit binary data designated by S1 is converted into 8 BCD digits shifted to the left by the quantity of digits designated by S2 and converted back to 32 bit binary data Valid values for each of S1 and S1 1...

Page 82: ...binary data of data registers D10 and D11 designated by S1 is converted into 8 BCD digits shifted to the left by 1 digit as designated by device S2 and converted back to 32 bit binary data Zeros are set to the lowest digits as many as the digits shifted Before shift After first shift 0 2 3 1 D10 D11 Shift to the left 4 6 7 5 0 1 3 4 2 5 7 0 6 0 REP SOTU I0 S1 4567 D1 D11 S1 D10 S2 1 BCDLS MOV W M8...

Page 83: ...ted up to the next 16 bit positions At the same time the data designated by device S1 is moved to device designated by D1 S2 specifies the quantity of blocks to move WSFT S1 D1 S2 When S2 3 quantity of blocks to shift First 16 bit data D1 0 Second 16 bit data D1 1 Third 16 bit data D1 2 Fifth 16 bit data D1 4 Fourth 16 bit data D1 3 S1 data D1 0 First 16 bit data D1 1 Second 16 bit data D1 2 Fifth...

Page 84: ... L long F float Before rotation 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 1 After rotation 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 1 Rotate to the left S1 bits When input is on 16 or 32 bit data of the designated source device S1 is rotated to the left by the quantity of bits designated by device bits The result is set to the source device S1 and the last bit status rotated out...

Page 85: ...ut I0 is turned on 16 bit data of data register D10 is rotated to the left by 1 bit as designated by device bits The status of the MSB is set to a carry special internal relay M8003 SOTU I0 S1 40966 D1 D10 S1 D10 bits 1 ROTL W MOV W Each time input I1 is turned on 32 bit data of data registers D10 and D11 is rotated to the left by 1 bit as designated by device bits The status of the MSB is set to ...

Page 86: ...L long F float Before rotation 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 0 After rotation 1 1 1 0 0 0 0 1 1 0 0 1 0 1 1 CY M8003 MSB LSB S1 1 Rotate to the right S1 bits When input is on 16 or 32 bit data of the designated source device S1 is rotated to the right by the quantity of bits designated by device bits The result is set to the source device S1 and the last bit status rotated ou...

Page 87: ...turned on 16 bit data of data register D20 is rotated to the right by 2 bits as designated by device bits The last bit status rotated out is set to a carry special internal relay M8003 SOTU I1 S1 13 D1 D20 S1 D20 bits 2 ROTR W MOV W Each time input I1 is turned on 32 bit data of data registers D20 and D21 is rotated to the right by 1 bit as designated by device bits The last bit status rotated out...

Page 88: ...7 SHIFT ROTATE INSTRUCTIONS 7 12 FC5A MicroSmart User s Manual FC9Y B1273 ...

Page 89: ...out When T timer or C counter is used as D1 the data is written in as a preset value TP or CP which can be 0 through 65535 Valid values for the source device are 0 through 9999 270Fh for the word data type and 0 through 9999 9999 5F5 E0FFh for the double word data type Make sure that the source designated by S1 is within the valid value range If the source data is out of the valid range a user pro...

Page 90: ...20 S1 D10 I1 HTOB W Binary SOTU 0 D10 0000h BCD 0 D20 0000h 1234 D10 04D2h 4660 D20 1234h 9999 D10 270Fh 39321 D20 9999h D1 D20 S1 D10 I2 HTOB D SOTU 0 D10 0000h 0 D11 0000h 0 D20 0000h 0 D21 0000h Binary BCD 188 D10 00BCh 24910 D11 614Eh 4660 D20 1234h 22136 D21 5678h 1525 D10 05F5h 57599 D11 E0FFh 39321 D20 9999h 39321 D21 9999h ...

Page 91: ... BTOH instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 BCD data to convert X X X X X X X X D1 Destination 1 Destination to store conversion res...

Page 92: ...20 S1 D10 I1 BTOH W BCD SOTU 0 D10 0000h Binary 0 D20 0000h 4660 D10 1234h 1234 D20 04D2h 39321 D10 9999h 9999 D20 270Fh D1 D20 S1 D10 I2 BTOH D SOTU 0 D10 0000h 0 D11 0000h 0 D20 0000h 0 D21 0000h BCD Binary 188 D10 00BCh 24910 D11 614Eh 4660 D20 1234h 22136 D21 5678h 1525 D10 05F5h 57599 D11 E0FFh 39321 D20 9999h 39321 D21 9999h ...

Page 93: ...C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary data to convert X X X X X X X X S2 Source 2 Quantity of digits to convert X X X X X X X 1 4 D1 Destination 1 Destination to store conversion results X W word X I integer D double word L long F float S1 D1 D1 1 D1 2 D1 3 When input is on the 16...

Page 94: ...1 D20 S1 D10 I0 HTOA W S2 4 SOTU Binary 4660 D10 1234h ASCII 49 D20 0031h 50 D21 0032h 51 D22 0033h 52 D23 0034h D1 D20 S1 D10 I1 HTOA W S2 3 SOTU Binary 4660 D10 1234h ASCII 50 D20 0032h 51 D21 0033h 52 D22 0034h D1 D20 S1 D10 I2 HTOA W S2 2 SOTU Binary 4660 D10 1234h ASCII 51 D20 0033h 52 D21 0034h D1 D20 S1 D10 I3 HTOA W S2 1 SOTU Binary 4660 D10 1234h ASCII 52 D20 0034h ...

Page 95: ...in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 ASCII data to convert X S2 Source 2 Quantity of digits to convert X X X X X X X 1 4 D1 Destination 1 Destination to st...

Page 96: ...1 D1 D20 S1 D10 I0 ATOH W S2 4 SOTU Binary 4660 D20 1234h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h D1 D20 S1 D10 I1 ATOH W S2 3 SOTU Binary 291 D20 0123h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h D1 D20 S1 D10 I2 ATOH W S2 2 SOTU Binary 18 D20 0012h ASCII 49 D10 0031h 50 D11 0032h D1 D20 S1 D10 I3 ATOH W S2 1 SOTU Binary 1 D20 0001h ASCII 49 D10 0031h ...

Page 97: ...16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary data to convert X X X X X X X X S2 Source 2 Quantity of digits to convert X X X X X X X 1 5 1 10 D1 Destination 1 Destination to store conversion results X W word X I integer D double word X L long F float Word data type S1 D1 D1 1 D1 2 D1 3 D1 4 Double...

Page 98: ...0 0031h 50 D21 0032h 51 D22 0033h 52 D23 0034h Binary 53 D24 0035h D1 D20 S1 D10 I1 BTOA W S2 4 SOTU BCD 12345 D10 3039h ASCII 50 D20 0032h 51 D21 0033h 52 D22 0034h 53 D23 0035h Binary D1 D20 S1 D10 I2 BTOA W S2 3 SOTU BCD 12345 D10 3039h ASCII 51 D20 0033h 52 D21 0034h 53 D22 0035h Binary D1 D20 S1 D10 I3 BTOA W S2 2 SOTU BCD 12345 D10 3039h ASCII 52 D20 0034h 53 D21 0035h Binary D1 D20 S1 D10 I...

Page 99: ...I 49 D20 0031h 50 D21 0032h 51 D22 0033h 52 D23 0034h Binary 53 D24 0035h 54 D25 0036h 55 D26 0037h 56 D27 0038h 57 D28 0039h 48 D29 0030h D10 D11 D1 D20 S1 D10 I1 BTOA D S2 6 SOTU ASCII 53 D20 0035h 54 D21 0036h 55 D22 0037h 56 D23 0038h 57 D24 0039h 48 D25 0030h BCD Binary D10 D11 1234567890 499602D2h D1 D20 S1 D10 I2 BTOA D S2 3 SOTU ASCII 56 D20 0038h 57 D21 0039h 48 D22 0030h BCD Binary D10 D...

Page 100: ...is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 ASCII data to convert X S2 Source 2 Quantity of digits to convert X X X X X X X 1 5 1 10 D1 Destination 1 Destination to store conversion resul...

Page 101: ...49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h Binary 53 D14 0035h D1 D20 S1 D10 I1 ATOB W S2 4 SOTU BCD 1234 D20 04D2h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h Binary D1 D20 S1 D10 I2 ATOB W S2 3 SOTU BCD 123 D20 007Bh ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h Binary D1 D20 S1 D10 I3 ATOB W S2 2 SOTU BCD 12 D20 0018h ASCII 49 D10 0031h 50 D11 0032h Binary D1 D20 S1 D10 I4...

Page 102: ...1 0032h 51 D12 0033h 52 D13 0034h 53 D14 0035h 54 D15 0036h 55 D16 0037h 56 D17 0038h 57 D18 0039h 48 D19 0030h BCD 1234567890 499602D2h Binary D20 D21 D1 D20 S1 D10 I1 ATOB D S2 6 SOTU BCD 123456 0001E240h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h Binary 53 D14 0035h 54 D15 0036h D20 D21 D1 D20 S1 D10 I2 ATOB D S2 3 SOTU BCD 123 0000007Bh ASCII 49 D10 0031h 50 D11 0032h 51 D12 003...

Page 103: ... D1 Destination 1 Destination to store search results X X X Bits Quantity of bits searched 1 256 When input is on a bit which is on is sought The search begins at S1 until the first point which is set on is located The quantity of points from S1 to the first set point offset is stored to the destination designated by device D1 If no point is on in the searched area 65535 is stored to D1 ENCO Bits ...

Page 104: ...RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Offset X X X X X 0 255 D1 Destination 1 First bit to count offset X X X When input is on the values contained in devices designated by S1 and D1 are added to determine the destination and the bit so determined is turned on DECO S1 D1 D1 M104 S1 D20 I0 DECO M117 M100 M137 M120 M157 M140 M177 M160...

Page 105: ... D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 First bit to start search X X X X X S2 Source 2 Quantity of bits searched X X X X X X X 1 256 D1 Destination 1 Destination to store quantity of ON bits X X X X X When input is on bits which are on are sought in an array of consecutive bits starting at the point designated by source devic...

Page 106: ...estination 1 Bit to turn on and off X X X When input is turned on output internal relay or shift register bit designated by D1 is turned on and remains on after the input is turned off When input is turned on again the designated output internal relay or shift register bit is turned off The ALT instruction must be used with a SOTU or SOTD instruction otherwise the desig nated output internal relay...

Page 107: ...d X I integer X D double word X L long X F float X S1 D1 When input is on the data type of the 16 or 32 bit data designated by S1 is converted and stored to the destination designated by device D1 Data types can be designated for the source and destination separately When the same data type is designated for both source and destination the CVDT instruction has the same function as the MOV instruct...

Page 108: ...source data exceeds the range of destination data type the destination stores a value closest to the source data within the destination data type I0 REP D1 D2 SOTU When input I0 is turned on 3 is stored to data register D2 Device Data Type Value Source F 3 141593 Destination W 3 S1 D0 CVDT FTOW 3 D2 D1 S1 3 141593 D0 D1 I0 REP D1 D2 SOTU When input I0 is turned on 65535 is stored to data register ...

Page 109: ...peat S1 Source 1 Binary data to divide X X X X X X X X D1 Destination 1 Destination to store results X W word X I integer D double word L long F float S1 D1 D1 1 When input is on the 16 bit binary data designated by S1 is divided into upper and lower bytes The upper byte data is stored to the destination designated by device D1 The lower byte data is stored to the device next to D1 This instructio...

Page 110: ...ine X D1 Destination 1 Destination to store results X X X X X W word X I integer D double word L long F float S1 S1 1 D1 When input is on the lower byte data is read out from 2 consecutive sources starting with device designated by S1 and combined to make 16 bit data The lower byte data from the first source device is moved to the upper byte of the destination designated by device D1 and the lower...

Page 111: ...esignated by destination device D1 FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary data to swap X 1 99 D1 Destination 1 Destination to store conversion result X 1 99 W word X I integer D double word X L long F float S1 D1 When input is on upper and lower byte or word data of a wo...

Page 112: ...8 DATA CONVERSION INSTRUCTIONS 8 24 FC5A MicroSmart User s Manual FC9Y B1273 ...

Page 113: ...2 or S3 on the special day programmed in the WKTBL the designated output or internal relay is turned on S2 or turned off S3 2 Skip days in the week table On the special day programmed in the WKTBL the designated output or internal relay is not turned on or off even when the cur rent day and time reach the presets for S1 S2 and S3 Note When 1 or 2 is set for MODE program special days in the week ta...

Page 114: ...n the day designated by S1 remains on across 0 a m and turns off at S3 on the next day For example if S2 is 2300 S3 is 100 and Monday is included in S1 then the output designated by D1 turns on at 23 p m on Mon day and turns off at 1 a m on Tuesday Make sure that the values set for MODE S1 S2 and S3 are within the valid ranges If any data is over the valid value a user program execution error will...

Page 115: ... output is turned on from 10 30 a m to 11 10 p m on every Saturday and Sunday Without regard to the day of week the output is also turned on December 31 through January 3 With Skip Days in the Week Table MODE 2 On the special days programmed in the WKTBL the designated output is not turned on or off while the designated out put is turned on and off every week as designated by device S1 of WKTIM In...

Page 116: ...utput on from 8 a m on every Monday to 7 p m on every Friday D1 Q0 S1 38 M8125 WKTIM 0 S2 2000 S3 600 M8125 is the in operation output special internal relay S1 38 specifies Monday Tuesday and Friday The WKTIM turns on output Q0 at 20 00 on Monday Tuesday and Fri day and turns off output Q0 at 6 00 on the next day Sun Mon Tue Wed Thu Fri Sat 20 00 6 00 ON Output Q0 20 00 6 00 ON 20 00 6 00 ON D1 M...

Page 117: ...dules The Function Area Settings dialog box for Cartridges and Modules appears 2 Click the check box to use the clock cartridge 3 Click the OK button 4 Download the user program to the CPU module and turn off and on the power to the CPU module After removing the clock cartridge do not run the user program with the Function Area Settings programmed to use the clock cartridge otherwise clock IC erro...

Page 118: ...k in the Time box and type a new value or use the up down keys When new values are entered click the OK button to transfer the new values to the clock cartridge Setting Calendar Clock Using a User Program Another way of setting the calendar clock data is to store the values in special data registers dedicated to the calendar and clock and to turn on special internal relay M8016 M8017 or M8020 Data...

Page 119: ...to the clock cartridge installed on the CPU module M8020 Calendar Clock Data Write Flag When M8020 is turned on data in data registers D8015 through D8021 calendar clock new data are set to the clock cartridge installed on the CPU module M8120 REP 4 S1 R D0 MOV W D1 R D8015 I0 SOTU M8120 is the initialize pulse special internal relay When the CPU starts seven MOV W instructions store calendar cloc...

Page 120: ...gs dialog box for Cartridges and Modules appears 2 Click the check box to enable the clock cartridge adjustment and type the adjustment value found on the clock cartridge in the Adjustment Value field 3 Click the OK button 4 Download the user program to the CPU module and turn off and on the power to the CPU module Clock Cartridge Backup Duration The clock cartridge data is backed up by a lithium ...

Page 121: ...of required output points is 4 plus the quantity of digits to display When displaying 4 digits with output Q0 designated as the first output number 8 consecutive output points must be reserved starting with Q0 through Q7 Display Processing Time Displaying one digit of data requires 3 scan times after the input to the DISP instruction is turned on Keep the input to the DISP instruction for the peri...

Page 122: ...D3S F31N connected to the transistor sink output module Output Wiring Diagram When input I0 is on the 4 digit current value of counter C10 is displayed on 7 segment digital display units I0 DAT LAT H L S1 C10 Q Q30 DISP BCD4 Latch A B C D 24V DC Power Supply Latch A B C D Latch A B C D Latch A B C D 103 102 101 100 8 Transistor Sink Upper Digit Lower Digit FC4A T08K1 Output Module Q30 Q31 Q32 Q33 ...

Page 123: ...les have a fixed filter value of 4 ms For Input Filter see page 5 42 Basic Vol Output Points Outputs are used to select the digits to read The quantity of required output points is equal to the quantity of digits to read When connecting the maximum of 5 digital switches 5 output points must be reserved starting with the output number designated by device Q For example when output Q0 is designated ...

Page 124: ...gram to read data from four digital switches IDEC s DFBN 031D B to a data register in the CPU module using a 8 point DC input module and a 16 point transistor sink output module I O Wiring Diagram Minimum Required Scan Time Scan time Filter time 6 ms Input Terminals Filter Time I0 through I7 on CPU Modules Filter value selected in the Function Area Settings default 3 ms See Input Filter on page 5 ...

Page 125: ...re included in the user program If a matching label does not exist a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat Label number Tag for LJMP and LCAL 0 127 0 255 FC5A C10R2 C D FC5A ...

Page 126: ... the jump for the rising or falling edge transi tion to be recognized When input I0 is on program execution jumps to label 0 When input I1 is on program execution jumps to label 1 When input I2 is on program execution jumps to label 2 M8121 is the 1 sec clock special internal relay When jump occurs to label 0 output Q0 oscillates in 1 sec increments M8122 is the 100 ms clock special internal relay...

Page 127: ...n I Q M R T C D Constant Repeat When input is on the address with label 0 through 127 all in one type CPU or 0 to 255 slim type CPU designated by S1 is called When input is off no call takes place and program execu tion proceeds with the next instruction The LCAL instruction calls a subroutine and returns to the main program after the branch is exe cuted A LRET instruction see below must be placed...

Page 128: ...ion returns to the instruction following the LCAL instruction I0 LCAL S1 0 REP S1 D0 D1 D1 MOV W REP S1 D20 D1 D21 MOV W Correct I0 LCAL S1 0 REP S1 D0 D1 D1 MOV W REP S1 D20 D1 D21 MOV W Incorrect Separate the ladder line for each LCAL instruction I0 status may be changed by the subroutine upon return M0 S M0 S I0 When input I0 is on program execution jumps to label 0 When input I1 is on program ...

Page 129: ...umbers are included in the user program If a matching label does not exist a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Decrement value X S2 Source 2 Label number to j...

Page 130: ...ycles IMOV moves D0 data 1049 to D1049 in the first cycle DEC decrements D0 data to 1048 DJNZ jumps to label 255 until D1 value reduces to 0 LABEL 255 M8120 END M8120 REP S1 D0 D1 D99 IMOV W S2 D2 D1 REP S1 1049 D1 D0 MOV W REP S1 50 D1 D1 MOV W S D D0 DEC W S2 255 S1 D1 DJNZ 1049 D0 Destination D99 50 D149 1049 D149 50 D1 1st cycle 1048 D0 Destination D99 49 D148 1048 D148 49 D1 2nd cycle 1047 D0...

Page 131: ...n error will result turning on special internal relay M8004 and the ERR LED on the CPU module Special Internal Relays M8140 M8144 Interrupt Status Special internal relays M8140 through M8144 are provided to indicate whether interrupt inputs and timer interrupt are enabled or disabled Programming WindLDR In the Disable Interrupt DI or Enable Interrupt EI dialog box click the check box on the left o...

Page 132: ...n End of the main program When input I2 is on program execution jumps to label 0 M8125 is the in operation output special internal relay ALT turns on or off the output Q2 internal memory IOREF immediately writes the output Q2 internal memory status to actual out put Q2 Program execution returns to the main program When input I3 is on program execution jumps to label 1 M8125 is the in operation out...

Page 133: ... cuted as in the normal scanning then the filter value has effect as designated in the Function Area Settings See page 5 42 Basic Vol FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 I O for refresh X X Input Device Internal Relay Input Device Internal Relay I0 M300 I10 M310 I1 M301 I11 ...

Page 134: ...internal relay D8032 stores 0 to designate jump destination label 0 for interrupt input I2 When input I2 is on program execution jumps to label 0 M8125 is the in operation output special internal relay IOREF immediately reads input I0 status to internal relay M300 M300 turns on or off the output Q0 internal memory Another IOREF immediately writes the output Q0 internal memory status to actual outp...

Page 135: ...h speed counter current value For the high speed counter function see page 5 7 Basic Vol HSCRF M8120 is the initialize pulse special internal relay D8036 stores 0 to designate jump destination label 0 for timer inter rupt The interrupt program is separated from the main program by the END instruction While the CPU is running program execution jumps to label 0 repeat edly at intervals selected in t...

Page 136: ...agram the latest value of the fre quency measurement can be read out within 250 ms regardless of the input frequency For the frequency measurement function see page 5 30 Basic Vol FRQRF M8120 is the initialize pulse special internal relay D8036 stores 0 to designate jump destination label 0 for timer inter rupt The interrupt program is separated from the main program by the END instruction While t...

Page 137: ...For details see page 5 43 Basic Vol FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2D FC5A C24R2 C FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X Expansion RS232C RS485 Communication Module COMRF Maximum Execution Time Note 1 FC5A SIF2 Approx 4 ms FC5A SIF4 Note 2 Approx 10 ms The COMRF instruction refreshes the send and receive data in the expansion communication buffers for port 3 through port 7 ...

Page 138: ...11 PROGRAM BRANCHING INSTRUCTIONS 11 14 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 139: ...XY con version can be set Xn X value Yn Y value Enter values for the X and Y coordinates Two different data ranges are available depending on the data type FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Format number 0 to 5 all in one CPU 0 to 29 slim CPU X0 through Xn X value X X X X ...

Page 140: ... relay M8004 and the ERR LED on the CPU module S2 X value Enter a value for the X coordinate to convert within the range specified in the XYFS instruction Valid Coordinates W word X I integer X D double word L long F float FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Format number 0 ...

Page 141: ...ations a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Data Type Word Integer S2 X value 0 to 65535 0 to 65535 D1 Y value 0 to 65535 32768 to 32767 Valid Coordinates W word X I integer X D double word L long F float FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Funct...

Page 142: ...o the destination Valid Data Types Data Conversion Error The data conversion error is 0 5 Data Type Word Integer S2 Y value 0 to 65535 32768 to 32767 D1 X value 0 to 65535 0 to 65535 Valid Coordinates W word X I integer X D double word L long F float Y 0 65535 65535 X Y 0 32767 32768 X 65535 When a bit device such as I input Q output M internal relay or R shift register is designated as S2 or D1 1...

Page 143: ...es two points When input I0 is on CVXTY converts the value in D10 and stores the result in D20 When input I1 is on CVYTX converts the value in D11 and stores the result in D21 M8120 XYFS I Y1 4000 END I0 CVXTY I D1 D20 I1 CVYTX I S1 D21 S1 0 X0 0 Y0 0 X1 8000 S1 0 S2 D10 S1 0 S2 D11 X0 Y0 X1 Y1 X Y 0 D10 D21 D20 1000 D11 2500 The graph shows the linear relationship that is defined by the two point...

Page 144: ...defined by the first two points has priority in these cases The line between points X0 Y0 and X1 Y1 that is the line between 0 100 and 100 0 has pri ority in defining the relationship for Y to X conversion X Y 100 Therefore if the value in data register D95 is 40 the value assigned to D30 is 60 not 180 Exactly the same two line segments might also be defined by the XYFS instruction except that the...

Page 145: ...ated by D1 When the sampling exceeds 65535 cycles the average maximum and minimum values at this point are set to 3 devices starting with device designated by D1 and sampling continues When the sampling end input is turned on before the sampling cycles designated by device S3 have been completed sampling is stopped and the results at this point are set to 3 devices starting with device designated ...

Page 146: ... long X F float X When a bit device such as I input Q output M internal relay or R shift register is designated as the source 16 points word or integer data type or 32 points double word or long data type are used When a word device such as T timer C counter or D data register is designated as the source 1 point word or integer data type or 2 points double word long or float data type are used M81...

Page 147: ...ol The ZRN instruction for zero return control The PULS PWM RAMP and ZRN instructions can be used on all slim type CPU modules except that PULS3 PWM3 RAMP2 and ZRN3 instructions can not be used on the FC5A D16RK1 and FC5A D16RS1 Instruction PULS PWM RAMP ZRN Pulse Output Port Q0 PULS1 PWM1 RAMP1 ZRN1 Q1 PULS2 PWM2 ZRN2 Q2 PULS3 PWM3 RAMP2 ZRN3 Q3 Output Frequency 10 Hz to 100 kHz 14 49 Hz 45 96 Hz...

Page 148: ...Constant Repeat S1 Source 1 Control register X D1 Destination 1 Status relay X Device Function Description R W S1 0 Operation mode 0 10 Hz to 1 kHz 1 100 Hz to 10 kHz 2 1 kHz to 100 kHz 3 200 Hz to 100 kHz Note 2 R W S1 1 Output pulse frequency When S1 0 operation mode 0 to 2 1 to 100 1 to 100 of the maximum frequency of selected mode S1 0 When S1 0 operation mode 3 20 to 10 000 10 Hz Note 3 R W W...

Page 149: ...rror is 5 maximum S1 2 Pulse Counting Pulse counting can be enabled for the PULS1 and PULS3 instruction only With pulse counting enabled PULS1 or PULS3 generates a predetermined number of output pulses as designated by devices S1 3 and S1 4 With pulse counting dis abled PULS1 PULS2 or PULS3 generates output pulses while the start input for the PULS instruction remains on 0 Disable pulse counting 1...

Page 150: ...ulse Output Complete The internal relay designated by device D1 1 turns on when the PULS1 or PULS3 instruction has completed generating a predetermined number of output pulses or when either PULS instruction is stopped to generate output pulses When the start input for the PULS instruction is turned on the internal relay designated by device D1 1 turns off D1 2 Pulse Output Overflow The internal r...

Page 151: ... updated every scan D1 M50 I0 PULS 1 S1 D200 D202 1 enable pulse counting Output Pulse Q0 Output Pulse Frequency D201 PV1 FR1 Start Input I0 When input I0 is turned on PULS1 starts to generate output pulses at the frequency designated by the value stored in data register D201 While the output pulses are sent out from output Q0 internal relay M50 remains on When the quantity of generated output pul...

Page 152: ... value stored in data register D101 While the output pulses are sent out from output Q1 internal relay M20 remains on When input I1 is turned off PULS2 stops generating output pulses immediately then internal relay M20 turns off and inter nal relay M21 turns on If the output pulse frequency value in D101 is changed while generating output pulses the change takes effect in the next scan When changi...

Page 153: ... Preset value low word S1 5 Current value high word 0 to 60 000 D5 D6 S1 6 Current value low word Same device address as S1 for the PULS1 instruc tion M8120 REP S1 50 MOV W D1 D1 M101 SOTU M8120 is the initialize pulse special internal relay When the CPU starts PULSST macro designates parameters for pulse output in the first stage Pulse data update flag M1 is reset pulse data not updated Pulse out...

Page 154: ...1 Destination 1 Status relay X When input is on the PWM1 instruction generates a pulse output The output pulse frequency is selected from 14 49 45 96 or 367 65 Hz and the output pulse width ratio is determined by source device S1 PWM1 sends out output pulses from output Q0 PWM1 can be programmed to generate a predetermined number of output pulses When pulse counting is disabled PWM1 generates outp...

Page 155: ...enerates a predetermined number of output pulses as designated by devices S1 3 and S1 4 With pulse count ing disabled the PWM instruction generates output pulses while the start input for the PWM instruction remains on 0 Disable pulse counting 1 Enable pulse counting PWM1 PWM3 only When programming PWM2 store 0 to the data register designated by S1 2 Device Function Description R W S1 0 Output pul...

Page 156: ...enerates output pulses When the start input for the PWM instruction is turned off or when the PWM1 or PWM3 instruction has completed generating a predetermined number of output pulses the internal relay designated by device D1 0 turns off D1 1 Pulse Output Complete The internal relay designated by device D1 1 turns on when the PWM1 or PWM3 instruction has completed generating a predetermined numbe...

Page 157: ...he preset value designated by data registers D203 and D204 PWM1 stops generating output pulses Then internal relay M50 turns off and internal relay M51 turns on If the pulse width ratio value in D201 is changed while generating output pulses the change takes effect in the next scan When changing the pulse width ratio make sure that the timing of the change is much slower than the output pulse fre ...

Page 158: ...e width is determined by the value stored in data register D101 While the output pulses are sent out from output Q1 internal relay M20 remains on When input I1 is turned off PWM2 stops generating output pulses immediately then internal relay M20 turns off and inter nal relay M21 turns on If the pulse width ratio value in D101 is changed while generating output pulses the change takes effect in the...

Page 159: ...word D4 S1 5 Current value high word Not used D5 S1 6 Current value low word D6 S1 7 Error status D7 D1 0 Pulse output ON 0 Pulse output OFF 1 Pulse output ON M100 D1 1 Pulse output complete 0 Pulse output not complete 1 Pulse output complete M101 D1 2 Pulse output overflow 0 Overflow not occurred 1 Overflow occurred PWM1 PWM3 only M102 Same device address as S1 for the PWM2 instruc tion M8120 I0 ...

Page 160: ...number of output pulses from output Q0 The output frequency changes in a trapezoidal pattern deter mined by source device S1 After starting the RAMP1 instruction the output pulse fre quency increases linearly to a predetermined constant value remains constant at this value for some time and then decreases linearly to the original value The frequency change rate or the frequency change time can be ...

Page 161: ...z to 1 kHz 1 100 Hz to 10 kHz 2 1 kHz to 100 kHz 3 200 Hz to 100 kHz Note 2 R W S1 1 Steady pulse frequency When S1 0 operation mode 0 to 2 1 to 100 1 to 100 of the maximum frequency of selected mode S1 0 When S1 0 operation mode 3 20 to 10 000 10 Hz Note 3 R W S1 2 Initial pulse frequency When S1 0 operation mode 0 to 2 1 to 100 1 to 100 of the maximum frequency of selected mode S1 0 When S1 0 op...

Page 162: ...al pulse frequency can be set in incre ments of 10 Hz The output frequency error is 5 maximum S1 3 Frequency Change Rate Frequency Change Time When S1 0 is set to 0 through 2 the value stored in the data register designated by device S1 3 determines the rate of pulse output frequency change for a period of 10 ms in percent of the maximum of the frequency range selected by S1 0 Valid values for dev...

Page 163: ...d While the RAMP1 or RAMP2 instruction is executed to generate output pulses the output pulse count is stored in two consecutive data registers designated by devices S1 8 high word and S1 9 low word The current value can be 1 through 100 000 000 05F5 E100h and is updated in every scan S1 4 Value Reversible Control Description 0 Reversible control disabled Output Q0 or Q2 generates output pulses us...

Page 164: ... 1 through 100 Mode 3 S1 3 stores other than 10 through 10 000 6 Reversible control enable designation error S1 4 stores other than 0 through 2 7 Control direction designation error S1 5 stores other than 0 and 1 8 The number of pulses for the frequency change areas calculated from the steady pulse frequency S1 1 initial pulse frequency S1 2 and frequency change rate time S1 3 exceeds the preset v...

Page 165: ...lse Output Overflow The internal relay designated by device D1 3 turns on when the RAMP instruction has generated more than the prede termined number of output pulses S1 6 7 When an overflow occurs the current value S1 8 9 stops at the preset value S1 6 7 When the start input for the RAMP instruction is turned on the internal relay designated by device D1 3 turns off Special Data Registers for Pul...

Page 166: ...ata register D201 internal relay M52 turns off When the output pulse frequency starts to decrease internal relay M52 turns on again When the quantity of generated output pulses reaches the preset value designated by data registers D206 and D207 RAMP1 stops generating output pulses Then internal relay M50 and M52 turn off and internal relay M51 turns on If the parameter values in D200 through D207 ...

Page 167: ...pulse frequency reaches the steady pulse frequency designated by the value stored in data register D201 internal relay M52 turns off When the output pulse frequency starts to decrease internal relay M52 turns on again When the quantity of generated output pulses reaches the preset value designated by data registers D206 and D207 RAMP1 stops generating output pulses Then internal relay M50 and M52 ...

Page 168: ...ady pulse frequency designated by the value stored in data register D201 internal relay M52 turns off When the output pulse frequency starts to decrease internal relay M52 turns on again When the quantity of generated output pulses reaches the preset value designated by data registers D206 and D207 RAMP1 stops generating output pulses Then internal relay M50 and M52 turn off and internal relay M51...

Page 169: ... frequency 300 Hz D2 30 S1 3 Frequency change time 2 000 ms D3 2000 S1 4 Reversible control enable Reversible control disabled D4 0 S1 5 Control direction Not used no effect D5 S1 6 Preset value high word 48 000 D6 D7 48000 S1 7 Preset value low word S1 8 Current value high word 0 to 48 000 D8 D9 S1 9 Current value low word S1 10 Error status D10 D1 0 Pulse output ON 0 Pulse output OFF 1 Pulse out...

Page 170: ... Description Device Address Value S1 0 Operation mode Frequency range 200 Hz to 100 kHz D0 3 S1 1 Steady pulse frequency 10 kHz D1 1000 S1 2 Initial pulse frequency 500 Hz D2 50 S1 3 Frequency change time 2 000 ms D3 2000 S1 4 Reversible control enable Reversible control with single output D4 1 S1 5 Control direction Forward D5 0 S1 6 Preset value high word 100 000 D6 D7 100000 S1 7 Preset value l...

Page 171: ...alue S1 0 Operation mode Frequency range 1 kHz to 100 kHz D0 2 S1 1 Steady pulse frequency 30 kHz D1 30 S1 2 Initial pulse frequency 10 kHz D2 10 S1 3 Frequency change time 2 000 ms D3 2000 S1 4 Reversible control enable Reversible control with dual output D4 2 S1 5 Control direction Forward D5 0 S1 6 Preset value high word 1 000 000 D6 D7 1000000 S1 7 Preset value low word S1 8 Current value high...

Page 172: ... C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X ZRN1 and ZRN2 X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Control register X S2 Source 2 Deceleration input X D1 Destination 1 Status relay When input is on the ZRN1 instruction sends out a pulse output of a predeter mined high frequency from output Q0 When a deceleration input turns on the output ...

Page 173: ...ode 1 or 1 kHz to 100 kHz operation mode 2 When S1 0 is set to 3 200 Hz to 100 kHz valid values for device S1 1 are 20 through 10 000 and the S1 1 value multi plied by 10 determines the output pulse frequency thus the output pulse frequency can be set in increments of 10 Hz The pulse frequency error is 5 maximum S1 2 Creep Operation Mode The value stored in the data register designated by device S...

Page 174: ...turn off when the deceleration input turns on The deceleration input is available in two types depending on the designated device address High speed Deceleration Input I2 I3 I4 I5 The high speed deceleration input uses interrupt processing to read the deceleration input signal immediately without regard to the scan time When I2 through I5 are used as a deceleration input for the ZRN instruction de...

Page 175: ...tion input for the ZRN instruction is turned off to stop generating output pulses the internal relay designated by device D1 0 turns off D1 1 Pulse Output Complete The internal relay designated by device D1 1 turns on when the deceleration input for the ZRN instruction is turned off to stop generating output pulses When the start input for the ZRN instruction is turned on the internal relay design...

Page 176: ...gister D203 When deceleration input I2 is turned off ZRN1 stops generating output pulses immediately Then internal relay M10 turns off and internal relay M11 turns on If parameter values in D200 through D203 are changed while generating output pulses the change takes effect when start input I0 is turned on for the next cycle If start input I0 is turned off while generating output pulses of either ...

Page 177: ...s shown below Device Settings Device Function Description Device Address Value S1 0 Initial operation mode Frequency range 100 Hz to 10 kHz D0 1 S1 1 Initial pulse frequency 10 kHz 30 3 kHz D1 30 S1 2 Creep operation mode Frequency range 10 Hz to 1 kHz D2 0 S1 3 Creep pulse frequency 1 kHz 80 800 Hz D3 80 S1 4 Error status D4 S2 Deceleration input High speed deceleration input I3 D1 0 Pulse output...

Page 178: ...13 PULSE INSTRUCTIONS 13 32 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 179: ...0V DC or current 4 to 20 mA DC output can be generated PID PID Control Applicable CPU Modules and Quantity of PID Instructions A maximum of 32 or 56 PID instructions can be used in a user program depending on the CPU module type Special technical knowledge about the PID control is required to use the PID function of the MicroSmart Use of the PID function without understanding the PID control may c...

Page 180: ... data type of analog input modules ranging from 0 to 60 000 Destination device D1 manipulated variable stores 32768 through 32767 that is a calculation result of the PID action For details see page 14 16 Module Type Depending on the analog I O module select 0 4095 or 0 50000 These values determine the data range of the process variable S4 and the output manipulated variable for analog output modul...

Page 181: ...n 1 to 10000 0 01 to 100 00 0 designates 0 01 10001 designates 100 00 When S1 4 control mode 2 or 3 proportional band 1 to 10000 0 01 to 100 00 0 designates 0 01 10001 designates 100 00 R W S1 8 Integral time 1 to 65535 0 1 sec to 6553 5 sec 0 disables integral action R W S1 9 Derivative time 1 to 65535 0 1 sec to 6553 5 sec 0 disables derivative action R W S1 10 Integral start coefficient S1 4 is...

Page 182: ...to represent 0 through 90 minutes The time code remains 9 after 90 minutes has elapsed When the operation mode S1 3 is set to 1 AT PID the time code is reset to 0 at the transition from AT to PID Status codes 100 and above indicate an error stopping the auto tuning or PID action When these errors occur a user program execution error will result turning on the ERR LED and special internal relay M80...

Page 183: ...r than 4095 or 50000 depending on the analog I O module type 106 When the linear conversion is enabled S1 4 set to 1 or 3 the set point S3 is set to a value larger than the linear conversion maximum value S1 5 or smaller than the linear conversion minimum value S1 6 107 When the linear conversion is disabled S1 4 set to 0 or 2 the set point S3 is set to a value larger than 4095 or 50000 depending ...

Page 184: ...sion is disabled S1 4 set to 0 or 2 the analog input data 0 through 4095 or 50000 depending on the analog I O module type from the analog I O module is stored to the process variable S4 and the same value is stored to the process variable S1 0 without conversion Enable linear conversion The linear conversion function is useful for scaling the process variable to the actual measured value in engine...

Page 185: ... value for the linear conversion minimum value to represent the minimum value of the input signal to the analog I O module When the linear conversion is disabled S1 4 set to 0 or 2 you do not have to set the linear conversion minimum value Example When type K thermocouple is connected the analog input data ranges from 0 through 4095 To convert the analog input data to actual measured temperature v...

Page 186: ...the PID action is in progress the proportional term value can be changed by the user S1 8 Integral Time When only the proportional action is used a certain amount of difference offset between the set point S3 and the process variable S1 0 remains after the control target has reached a stable state An integral action is needed to reduce the offset to zero The integral time is a parameter to determi...

Page 187: ...tart coefficient is too large the offset becomes smaller but overshooting may occur To enable the integral start coefficient turn off the integral start coefficient disable relay S2 3 To disable the integral start coefficient turn on the integral start coefficient disable relay S2 3 When the control mode S1 4 proportional term is proportional gain Specify a value between 1 and 100 1 to 100 0 or 10...

Page 188: ...rol period S1 13 and the output manipulated variable S1 1 Example Control period 5 sec S1 13 is set to 50 S1 14 High Alarm Value The high alarm value is the upper limit of the process variable S1 0 to generate an alarm When the process variable is higher than or equal to the high alarm value the high alarm output control relay S2 4 is turned on When the process variable is lower than the high alar...

Page 189: ...ut manipulated vari able upper limit S1 16 must be larger than the output manipulated variable lower limit S1 17 To enable the manipulated variable upper limit turn on the output manipulated variable limit enable control relay S2 2 When S2 2 is turned off the output manipulated variable upper limit S1 16 has no effect S1 16 Value 10001 through 10099 disables Output Manipulated Variable Lower Limit...

Page 190: ...uning To enable auto tuning set four parameters for auto tuning before executing the PID instruction such as AT sampling period S1 19 AT control period S1 20 AT set point S1 21 and AT output manipulated variable S1 22 When advanced auto tuning is selected with the operation mode S1 3 set to 3 advanced AT PID or 4 advanced AT most AT parameters are determined automatically and do not have to be des...

Page 191: ...ration mode S1 3 set to 1 AT PID or 3 advanced AT PID the PID action follows imme diately When the operation mode S1 3 is set to 1 AT PID 2 AT or 4 advanced AT set a required AT set point to the data register designated by S1 21 When the operation mode S1 3 is set to 3 advanced AT PID the AT set point is deter mined automatically and does not have to be set by the user When the linear conversion i...

Page 192: ... derivative gain can be selected from 0 through 100 When the derivative gain is set to a small value the output manipulated variable S1 1 is susceptible to an external noise or a change in the set point When the derivative gain is set to a large value the output manipulated variable S1 1 becomes less susceptible to an external noise or a change in the set point but stability is adversely affected ...

Page 193: ... manual mode control relay S2 1 When using manual mode set a required value to the manual mode output manipulated variable S1 18 before enabling manual mode In manual mode the out put manipulated variable S1 1 stores the manual mode output manipulated variable S1 18 and the output manipu lated variable for analog output module S1 24 stores a value of 0 through 4095 or 50000 converted from the manu...

Page 194: ...an or equal to the linear conversion maximum value S1 5 When an invalid value is designated as a set point the PID action is stopped and an error code is stored to the data regis ter designated by S1 2 See Operating Status on page 14 4 Source Device S4 Process Variable before Conversion The PID instruction is designed to use analog input data from an analog I O module as process variable The analo...

Page 195: ...a program to monitor the process variable S4 separately When a PID execution error occurs S1 2 stores 100 or more or when auto tuning is completed the manipulated variable D1 stores 0 and the control output S2 6 turns off Do not use the PID instruction in program branching instructions LABEL LJMP LCAL LRET JMP JEND MCS and MCR The PID instruction may not operate correctly in these instructions The...

Page 196: ...ntrol the temperature to 200 C using the derived PID parameters Example 1 ON OFF Control Using Relay Output The heater is turned on and off according to the output manipulated variable calculated by the PID action When the heater temperature is higher than or equal to 250 C an alarm light is turned on by the high alarm output The analog input operating status is also monitored to force off the hea...

Page 197: ... 4 High alarm output ON When temperature 250 C OFF When temperature 250 C M4 S2 6 Control output Remains on during advanced auto tuning Goes on and off according to the control period S1 13 and output manipulated variable S1 1 during PID action M6 S3 Set point 200 C D100 2000 S4 Process variable Analog input data of analog I O module 1 analog input channel 0 stores 0 through 4095 D760 Analog input...

Page 198: ...nternal relay When the CPU starts the ANST analog macro instruction stores parameters for the analog I O module function The PIDST PID macro instruction also stores parameters for the PID function D760 is the analog input data of analog I O module 1 analog input channel 0 stores 0 through 4095 When internal relay M4 high alarm output is turned on or M11 is turned on analog input operating status i...

Page 199: ...Box S1 3 Operation mode S1 14 High alarm value S1 4 Control mode S1 15 Low alarm value S1 5 Linear conversion maximum value S1 25 Proportional band offset value S1 6 Linear conversion minimum value S1 26 Derivative gain S1 10 Integral start coefficient S2 2 Output manipulated variable limit enable S1 11 Input filter coefficient S2 3 Integral start coefficient disable S3 Set point S1 3 S2 3 S3 S1 1...

Page 200: ...og I O module 1 analog input channel 0 stores 0 through 4095 D760 Analog input operating status Stores 0 through 5 D761 Analog input signal type Type K thermometer D762 2 Analog input data type 12 bit data 0 to 4095 D763 0 Output Analog output data 0 to 4095 D772 Analog output operating status Stores 0 through 4 D773 Analog output signal type Voltage output 0 to 10V DC D774 0 Analog output data ty...

Page 201: ...o convert the output manipulated variable for analog output module S1 24 and store the result to the data register designated as analog output data of the analog output module The following example demonstrates a program for analog input module FC4A J4CN1 to convert Pt1000 or Ni1000 analog input data in D410 to a value within the range between 0 and 50 000 and store the result to D510 M8120 M8120 ...

Page 202: ...14 PID INSTRUCTION 14 24 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 203: ...e CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X While input is on destination device D1 repeats to turn on and off for a duration designated by devices S1 and S2 respectively The time range is 0 through 65535 sec S1 D1 DTML S2 D2 While input is on destination device D1 repeats to turn on and off for a duration designated by devic...

Page 204: ...user program execution error will result turning on spe cial internal relay M8004 and the ERR LED on the CPU module Examples DTML DTIM DTMH DTMS For the timer accuracy of timer instructions see page 7 9 Basic Vol Device Function I Q M R T C D Constant S1 Source 1 ON duration X 0 65535 S2 Source 2 OFF duration X 0 65535 D1 Destination 1 Dual timer output X X D2 Destination 2 System work area X Inst...

Page 205: ...ation of input I0 and to use the ON duration as a preset value for 100 ms timer instruction TIM FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant D1 Destination 1 Measured value X While input is on the ON duration is measured in units of 100 ms and the measured value is stored to a data register designated ...

Page 206: ...15 DUAL TEACHING TIMER INSTRUCTIONS 15 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 207: ...on reads data from the designated address in the intelligent module and stores the read data to the designated device when the CPU module is stopped The Stop Access Write instruction writes data from the designated device to the designated address in the intelligent module when the CPU module is stopped While the CPU module is running and the input is on RUNA READ is exe cuted to read data from th...

Page 208: ...e used ADDRESS Specify the first address in the intelligent module to read data from BYTE Specify the quantity of data to read in bytes The RUNA READ instruction cannot be used in an interrupt program If used a user program execution error will result turning on spe cial internal relay M8004 and the ERR LED on the CPU module Valid Data Types FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2D FC5A C24R2 C F...

Page 209: ...e used ADDRESS Specify the first address in the intelligent module to store the data BYTE Specify the quantity of data to write in bytes The RUNA WRITE instruction cannot be used in an interrupt program If used a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Valid Data Types FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2D FC5A C24R2 C ...

Page 210: ...e first address in the intelligent module to read data from BYTE Specify the quantity of data to read in bytes The STPA READ instruction cannot be used in an interrupt program If used a user program execution error will result turning on spe cial internal relay M8004 and the ERR LED on the CPU module If a STPA READ instruction is programmed between MCS and MCR instructions the STPA READ instructio...

Page 211: ...first address in the intelligent module to store the data BYTE Specify the quantity of data to write in bytes The STPA WRITE instruction cannot be used in an interrupt program If used a user program execution error will result turning on spe cial internal relay M8004 and the ERR LED on the CPU module If a STPA WRITE instruction is programmed between MCS and MCR instructions the STPA WRITE instruct...

Page 212: ...ions When the CPU module stops STPA instructions programmed between MCS and MCR instructions are executed whether the input to the MCS instructions is on or off For MCS and MCR instructions see page 7 28 Basic Vol Status Code Status Description RUNA STPA 0 Normal Intelligent module access is normal X X 1 Bus error The intelligent module is not installed correctly Power down the MicroSmart modules ...

Page 213: ...starting at D9 Status code is stored in data register D100 I0 DATA D9 SLOT 1 STATUS D100 BYTE 5 ADDRESS 1 READ RUNA W 02h D9 04h D10 D11 High 01h Low 03h 05h 00h Address 0 01h Address 1 02h Address 2 03h Address 3 04h Address 4 05h Address 5 CPU Module Intelligent Module 1 While input I1 is on data in data register D19 is writ ten to the 5 byte area starting at address 1 in intelli gent module 1 S...

Page 214: ...16 INTELLIGENT MODULE ACCESS INSTRUCTIONS 16 8 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 215: ... the RAD instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Example RAD FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Degree value to convert into radian X X D1 Destination 1 Destination to s...

Page 216: ...or SOTD instruction should be used as required Valid Data Types Example DEG FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Radian value to convert into degree X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X S1 S1 1 rad 180 ...

Page 217: ...1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Radian value to convert into sine value X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X sin S1 S1 1 D1 D1 1 When input is on the sine of the radian value designated by source device S1 is stored to the destination designated by device ...

Page 218: ...FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Radian value to convert into cosine value X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X cos S1 S1 1 D1 D1 1 When input is on the cosine of the radian value designated by source device S1 is stored to the destination designated by devic...

Page 219: ...OTU or SOTD instruction should be used as required Valid Data Types Example TAN FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Radian value to convert into tangent value X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X tan S...

Page 220: ...ction I Q M R T C D Constant Repeat S1 Source 1 Arc sine value to convert into radian X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X asin S1 S1 1 D1 D1 1 rad When input is on the arc sine of the value designated by source device S1 is stored in radians to the destination designated by device D1 The S1 S1 1 value must be within the fol...

Page 221: ...ion I Q M R T C D Constant Repeat S1 Source 1 Arc cosine value to convert into radian X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X acos S1 S1 1 D1 D1 1 rad When input is on the arc cosine of the value designated by source device S1 is stored in radians to the destination designated by device D1 The S1 S1 1 value must be within the f...

Page 222: ...C5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Arc tangent value to convert into radian X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X atan S1 S1 1 D1 D1 1 rad When input is on the arc tangent of the value designated by source device S1 is stored in radians to the destination designa...

Page 223: ...required Valid Data Types Example LOGE FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary data to convert into natural logarithm X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X loge S1 S1 1 D1 D1 1 When input is on the n...

Page 224: ...R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary data to convert into common logarithm X X D1 Destination 1 Destination to store conversion results X W word I integer D double word L long F float X log10 S1 S1 1 D1 D1 1 When input is on the common logarithm of the binary data designated by source device S1 is stored t...

Page 225: ...04 and ERR LED on the CPU module Since the EXP instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Example EXP FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary data of exponent X X D1 Dest...

Page 226: ...o 0 The data designated by source device S1 or S2 does not comply with the normal floating point format Since the POW instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Example POW FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M ...

Page 227: ...ed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat N File Number File Number 0 9 S1 Source 1 Quantity of data registers per record 1 255 S2 Source 2 Quantity of records 2 255 D1 ...

Page 228: ...OEX instruction is executed the data at the position indi cated by the FIFO pointer is retrieved and stored to the data registers starting with the device designated by D1 of the FOEX instruction and the FO pointer is incremented by 1 to indicate the position to retrieve the next data When the FO pointer indicates the last record of the FIFO data file and an FOEX instruction is executed the FO poi...

Page 229: ... CPU module Since the FOEX instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat N File Number File number 0 9 S1 Source 1 First data register to store data to FIFO data file X ...

Page 230: ... 2 2 FO Pointer D101 0 0 1 Record 0 D102 through D104 D10 D11 D12 D10 D11 D12 Record 1 D105 through D107 D20 D21 D22 D20 D21 D22 Record 2 D108 through D110 Record 3 D111 through D113 When a D data register is designated as the destination data registers as many as the value stored in device S1 of the corresponding FIFOF instruction are used I0 S1 D10 FIEX W 2 M8120 SOTU Ladder Diagram M8120 is the...

Page 231: ...quired Valid Data Types Quantity of Source and Destination Devices Depending on the data type source devices S1 and S2 use a different quantity of devices Source device S3 and destina tion device D1 always use 1 word without regards to the data type FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Constant Repeat S...

Page 232: ...1 D200 Result 2 D201 Offset of first match Quantity of matches I0 D1 D200 S1 D10 S3 5 NDSRC D S2 D100 Offset 0 2 match 4 6 match 8 match Search 2 D200 Result 3 D201 12345678 D98 D99 Offset of first match Quantity of matches 12345678 D10 D11 1459997 D100 D101 12345678 D102 D103 4584557 D104 D105 12345678 D106 D107 12345678 D108 D109 1234457 D110 D111 I0 D1 D200 S1 D10 S3 5 NDSRC F S2 D100 Offset 0 ...

Page 233: ...s When Mode 1 is selected source device S1 and destination device D1 occupy 7 consecutive data registers starting with the designated device Data registers D0 D1993 D2000 D7993 and D10000 D49993 can be designated as these devices Source device S2 occupies 3 consecutive data registers starting with the designated device Data registers D0 D1997 D2000 D7997 and D10000 D49997 can be designated as sour...

Page 234: ... For source 1 Year data can be 0 through 99 Month data 1 through 12 Day data 1 through 31 Hour data 0 through 23 Minute and sec ond data 0 through 59 Year data 0 through 99 is processed as year 2000 through 2099 For source 2 Hour data can be 0 through 65535 Minute and second data can be 0 through 59 Destination 1 The day of week is calculated automatically from the resultant year month and day and...

Page 235: ...lay M8003 carry Source 1 15 D0 Hour 50 D1 Minute 40 D2 Second Source 2 10 D10 Hour 20 D11 Minute 30 D12 Second Destination 1 2 D20 Hour 11 D21 Minute 10 D22 Second SOTU I0 D1 D200 S1 D8008 S2 D100 TADD 1 Source 2 10 D100 Hour 15 D101 Minute 25 D102 Second Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 10 D8012 Hour 20 D8013 Minute 30 D8014 Second D8011 Note 7 D200 Year 8 D201 Month...

Page 236: ...is incremented Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 20 D8012 Hour 30 D8013 Minute 40 D8014 Second 4 D8011 D of W 7 D200 Year 8 D201 Month 25 D202 Day 3 D204 Hour 5 D205 Minute 55 D206 Second 6 D203 D of W Note Note D8011 in source 1 is not used for execution and need not be designated The day of week is calculated automatically from the resultant year month and day and st...

Page 237: ... with the designated device Data registers D0 D1997 D2000 D7997 and D10000 D49997 can be designated as source device S2 Since the TSUB instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Device Function I Q M R T C D Cons...

Page 238: ...p years For source 1 Year data can be 0 through 99 Month data 1 through 12 Day data 1 through 31 Hour data 0 through 23 Minute and sec ond data 0 through 59 Year data 0 through 99 is processed as year 2000 through 2099 For source 2 Hour data can be 0 through 65535 Minute and second data can be 0 through 59 Destination 1 The day of week is calculated automatically from the resultant year month and ...

Page 239: ...nal relay M8003 borrow Source 1 8 D0 Hour 10 D1 Minute 5 D2 Second Source 2 10 D10 Hour 30 D11 Minute 30 D12 Second Destination 1 21 D20 Hour 39 D21 Minute 35 D22 Second SOTU I0 D1 D200 S1 D8008 S2 D100 TSUB 1 Source 2 5 D100 Hour 15 D101 Minute 25 D102 Second Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 10 D8012 Hour 20 D8013 Minute 30 D8014 Second 4 D8011 D of W 7 D200 Year 8 D...

Page 240: ...is decremented Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 20 D8012 Hour 30 D8013 Minute 40 D8014 Second 4 D8011 D of W 7 D200 Year 8 D201 Month 22 D202 Day 13 D204 Hour 49 D205 Minute 50 D206 Second 3 D203 D of W Note Note D8011 in source 1 is not used for execution and need not be designated The day of week is calculated automatically from the resultant year month and day and ...

Page 241: ...not executed Since the HTOS instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Examples HTOS The following examples demonstrate the HTOS instruction to convert time data in hours minutes and seconds into sec onds and store the results to two consecutive data registers FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16R...

Page 242: ...n special internal relay M8003 carry Since the STOH instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Examples STOH The following examples demonstrate the STOH instruction to convert time data in seconds into hours minutes and sec onds and store the results to three consecutive data registers FC5A C10R2 C D FC5A C16R2 C ...

Page 243: ...nother measuring cycle with the comparison output remaining on When any of the hour minute or second data of source device S1 is out of the valid range a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module but the input ON duration is measured When any of the hour minute or second data of source device S1 is changed to an invalid value...

Page 244: ... in data registers D0 D1 D2 designated by source device S1 When the measured value reaches the preset value output Q2 des ignated by destination device D2 is turned on Data registers D1900 and D1901 designated by destination device D3 are reserved for system work area 35 D1 Minute 55 D2 Second I0 D3 D1900 S1 50 HOUR Destination 1 3 D100 Hour 25 D101 Minute 45 D102 Second D1 D100 D2 Q2 Source 1 50 ...

Page 245: ...RS485 communication module FC4A HPC3 next to the slim type CPU module Connect the RS232C RS485 converter to the RS485 terminals A B and SG on every CPU module using a shielded twisted pair cable as shown below The total length of the cable for the computer link system can be extended up to 200 meters 656 feet Connect the RS232C port on the computer to the RS232C RS485 converter using the RS232C ca...

Page 246: ...ect Configuration Comm Ports The Function Area Settings dialog box for Communication Ports appears 2 In the Communication Mode pull down list for Port 1 or 2 select Maintenance Protocol 3 Click the Configure button The Communication Parameters dialog box appears Change settings if required 4 Click the OK button Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 115200 Data Bits 7 or 8 Parity Even...

Page 247: ...hange the communication settings for WindLDR access the Communication Settings dialog box from the Configure menu as shown below When communicating in the 1 N computer link system for monitoring or downloading select the network number of the CPU module also in the Communication Settings dialog box Monitoring PLC Status The following example describes the procedures to monitor the operating status...

Page 248: ...21 COMPUTER LINK COMMUNICATION 21 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 249: ... mode depends on the modem functions and telephone line situations The modem mode does not prevent intrusion or malfunctions of other systems For practical applications confirm the communication function using the actual system setup and include safety provisions While communicating through modems the telephone line may be disconnected unexpectedly or receive data errors may occur Provisions again...

Page 250: ...ster D8109 When the command is completed successfully the completion IR is turned on and the command is not executed for the remaining cycles Failure The command is transmitted repeatedly but failed in all trials as many as the retry cycles specified in data regis ter D8109 Status Internal Relays Note While M8077 line connection is off the MicroSmart cannot send and receive maintenance communicati...

Page 251: ...tion D8103 Online Mode Protocol Selection The D8103 value selects the protocol for the RS232C port 2 after telephone line is con nected 0 other than 1 Maintenance protocol 1 User protocol D8109 Retry Cycles default 3 The D8109 value selects how many retries will be made until the operation initiated by a start internal relay M8050 M8056 is completed 0 No retry 1 65535 Executes a specified number o...

Page 252: ...the ATZ command to the modem following the initialization string when M8050 is turned on The ATZ command can also be issued separately by turning M8051 on followed by the dial command to be executed automatically ATZ Command ATZ When the ATZ command has been completed successfully internal relay M8061 is turned on If the ATZ command fails internal relay M8071 is turned on When the subsequent diali...

Page 253: ...ake sure of an approximately 1 second interval before executing the TXD or RXD instruction until the tele phone line connection stabilizes Note When the MicroSmart is stopped while the telephone line is connected the RS232C port 2 protocol changes to the maintenance protocol even if D8103 is set to 1 user protocol in the online mode then the telephone line remains connected When the MicroSmart is ...

Page 254: ...stored to data registers D8145 D8169 at the END processing of the first scan To send the initialization string from the data registers to the modem turn M8055 on then the ATZ command is issued subsequently Default Initialization String ATE0Q0V1 D2 C1 V0X4 K3 A0 N5S0 2 W As described in the Originate Mode the initialization string can be modified to match your modem For details of modify ing the in...

Page 255: ...Z originate mode 32 Waiting for re dialing 33 Waiting for re disconnecting line 34 Waiting for resending AT command 35 Waiting for resending initialization string answer mode 36 Waiting for resending ATZ answer mode 40 Line connected Telephone line is connected Only M8053 disconnect line can be turned on 50 AT command completed successfully Command started by M8054 M8056 is completed success fully...

Page 256: ...ough a command is executed correctly This command must be included in the initialization string D2 Hang up and disable auto answer on DTR detection When the DTR signal turns off the telephone line is disconnected The MicroSmart uses this function to dis connect the telephone line This command must be included in the initialization string C1 DCD ON with carrier from remote modem DCD tracks the stat...

Page 257: ...l selection to select maintenance protocol or user pro tocol for the RS232C port 2 after telephone line is connected 3 Program the destination telephone number if dialing is required Enter the ASCII values of the telephone number to data registers starting with D8170 telephone number Store two characters each in one data register Enter 0Dh at the end of the telephone number See page 22 4 4 If you ...

Page 258: ... 2 select Modem Protocol 3 Click the Configure button The Communication Parameters dialog box appears Change settings if required The default communication parameters shown below are recommended 4 Click the OK button Baud rate 9600 bps Only when the modem connected on the communication line uses differ ent communication parameters than the default values of the MicroSmart set the matching communic...

Page 259: ...tion turn on M8050 to send the initialization string the ATZ command and the dial command If the initialization string has been stored in the non volatile memory of the modem turn on M8051 to start with the ATZ command followed by the dial command When answering an incoming call turn on M8055 to send the initialization string and the ATZ command If the initialization string has been stored in the ...

Page 260: ...truction stores 1 to D8103 to enable user protocol after telephone line is connected MOV instructions set a dial command ATD1234 12 3132h 12594 D8170 34 3334h 13108 D8171 CR 0D00h 3328 D8172 to enter at the end of the telephone number When input I0 is turned on M8050 initialization string is turned on to send the initialization string ATZ and dial com mand to the modem M8077 line connection status...

Page 261: ...med using WindLDR with parameters shown below Source S1 Data register D10 No conversion 2 digits Repeat 10 M8120 is the initialize pulse special internal relay When the MicroSmart starts to run M8055 is turned on to send the ini tialization string for the modem answer mode The MOV instruction stores 1 to D8103 to enable user protocol after telephone line is connected M8077 line connection status i...

Page 262: ...TZ completes successfully Cause The initialization string is not valid for the modem Solution Refer to the user s manual for the modem and correct the initialization string When a dial command is sent a result code NO DIALTONE is returned and the telephone line is not connected Cause 1 The modular cable is not connected Solution 1 Connect the modular cable to the modem Cause 2 The modem is used in...

Page 263: ...in Modbus server devises through communication port 2 In the Modbus TCP slave communication a Modbus master device can change or monitor device values in the MicroSmart CPU module through communication port 1 or port 2 Modbus TCP master communication functions and configuration are described on page 23 2 Modbus TCP slave commu nication functions and configuration are described on page 23 5 To use ...

Page 264: ...fies the maximum period of time before receiving a response frame from a slave 3 D8054 is a special data register for Modbus communication transmission wait time 1 ms Using D8054 can delay transmission from the MicroSmart Mode Modbus TCP Master Communication Applicable Communication Port Port 2 Baud Rate 1 9600 19200 38400 57600 bps Data Bits 1 8 bits fixed Parity 1 Even Odd None Stop bits 1 1 2 b...

Page 265: ...ings relate to the user program the user program must be downloaded to the MicroSmart after changing any of these settings 1 From the WindLDR menu bar select Configuration Comm Ports The Function Area Settings dialog box for Communication Ports appears 2 In the Communication Mode pull down list for Port 2 select Modbus TCP Master Client The Modbus TCP Master Request Table Port 2 appears The Modbus...

Page 266: ...request numbers When deleting a request or changing the order of requests the relationship of the request to the request execution devices and error status data register is changed If the internal relay or data register is used in the user program the device addresses must be changed accordingly After completing the changes download the user program again 5 When editing the Modbus TCP Master Reque...

Page 267: ...from the Modbus TCP master the Modbus TCP slave reads or writes devices according to the request The request is processed at the END processing of the user program The web server module FC4A SX5ES1E is used to set up a Modbus TCP slave Web Server Module FC4A SX5ES1E RS232C Communication Mod ule FC4A HPC1 Slim Type CPU Module Ethernet Web Server Module FC4A SX5ES1E All in one Type CPU Module Modbus...

Page 268: ...cation error occurs the error code is stored to special data register D8053 The data in D8053 is valid only for the 1 scan time when M8080 is on When a communication error occurs communication error special internal relay M8005 also turns on for 1 scan time immediately after the error Mode Modbus TCP Slave Server Communication Applicable Communication Port Port 1 Port 2 Baud Rate 1 9600 19200 3840...

Page 269: ...nication Mode pull down list for Port 1 or Port 2 select Modbus TCP Slave Server The Modbus TCP Slave dialog box appears The Modbus TCP Slave dialog box can also be opened by clicking the Configure button for Port 1 or Port 2 3 Change the communication settings if required 4 Click the OK button to return to the Communication tab page 5 Click the OK button to save changes 6 Download the user progra...

Page 270: ... the web server module see the web server module user s manual FC9Y B919 1 Set the function selector switch on the web server module to USER 2 Select the same parameters values set in the Communication Settings 3 On the Advanced tab page enter a value 10 ms or larger in the field under Send after the following number of idle millisec onds ...

Page 271: ...h request the response was returned When confirmation is not required designate 0 as an transaction ID Protocol ID Designate 0 to identify Modbus TCP protocol Message Length Designate the length of the following message in bytes Unit ID Designate a Modbus TCP slave address 1 through 247 to identify the unit Function Code Designate a function code such as 01 read coil status and 02 read input statu...

Page 272: ...23 MODBUS TCP COMMUNICATION 23 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 273: ...upply AS Interface employs a simple yet efficient wiring system and features automatic slave address assignment function while installation and maintenance are also very easy Applicable Sensors and Actuators for AS Interface AS Interface Compatible Sensors and Actuators AS Interface compatible sensors and actuators communicate using the built in AS Interface function and serve as AS Interface slav...

Page 274: ...face master modules can be connected to the CPU module If more than two AS Interface master modules are connected an error occurs and special data register D8037 quantity of expansion I O modules stores error code 40 hex Normally a maximum of four expansion I O modules can be connected to the all in one 24 I O type CPU module But when one or two AS Interface master modules are connected only a tot...

Page 275: ...face cable with polarity Ordinary two wire flat cable Applicable Cable Specifications Note When using single wires the maximum cable length is 200 mm See Maximum Communication Distance on page 24 1 Use a VLSV very low safety voltage to power the AS Interface bus The normal output voltage of the AS Interface power supply is 30V DC Input Voltage Output Voltage Output Wattage Type No 100 to 240V AC 3...

Page 276: ... at factory before shipment The address of a slave can be changed using the addressing tool Using WindLDR the addresses of slaves connected to the AS Interface master modules 1 and 2 can also be changed see page 24 35 When a slave fails during operation and needs to be replaced if the auto addressing function is enabled on the master module just replace the slave with a new one with address 0 and ...

Page 277: ...to 300m AS Interface Bus Cycle Time The AS Interface bus cycle time is the amount of time required for a master to cycle through every slave on the bus The information for each slave is continuously transmitted over the bus in sequence so the AS Interface bus cycle time depends on the quantity of active slaves When up to 19 slaves are active the bus cycle time is 3 ms When 20 to 62 slaves are acti...

Page 278: ...bles to match the color labels on the terminal block Tighten the terminal screws to a torque of 0 5 to 0 6 N m Insert the terminal block to the connector on the AS Interface master module and tighten the mounting screws to a torque of 0 3 to 0 5 N m Name Type No Description FC5A MicroSmart Slim Type CPU Module FC5A D16RK1 MicroSmart AS Interface Master Module FC4A AS62M WindLDR FC9Y LP2CDW Version...

Page 279: ...PU module power supply first Five seconds later turn on the AS Interface power supply When turning off the power to the CPU module also turn off the AS Interface power supply If the CPU module is powered down and up while the AS Interface power remains on AS Interface com munication may stop due to a configuration error resulting in a communication error Turn on the AS Interface power supply no la...

Page 280: ...elect Configuration Cartridges Modules The Function Area Settings dialog box for Cartridges Modules appears 2 Make sure of a check mark in the check box on the left of Use AS Interface Master Module This check box is checked as default If FC5A D12K1E or FC5A D12S1E is selected under PLC Selection the check box is not displayed because this setting is permanently enabled Since this setting relates ...

Page 281: ...ollect slave information and update the screen display When configuration in the master module is complete you do not have to press Refresh since the screen display is updated automatically On the Configure AS Interface Master dialog box slave address 0 is shaded with yellow This means that the master mod ule has found slave address 0 on the AS Interface bus The CDI for address 0 shows 07F7 ID 0 I...

Page 282: ...s PB1 and PB2 together for 3 seconds CMO LED turns off and LMO LED turns on protected mode 3 Press pushbutton PB2 for 3 seconds CNF LED flashes configuration mode 4 About 5 seconds later press pushbutton PB1 for 3 seconds All I O LEDs blink once to complete configuration 5 Shut down the CPU module and AS Interface master module and power up again Check that FLT LED is off which indicates that conf...

Page 283: ...ration automatically stores the information of slaves found on the AS Interface bus to the EEPROM in the master module and this completes configuration Another method of configuration is manual configuration as fol lows 2 Click the PCD value FFFF of slave address 01 to open the Configure Slave 01A dialog box 3 Enter the same value as CDI 07F7 in the PCD field Set FFFF to PCD values of all unused s...

Page 284: ...rface Slaves dialog box appears Active slaves are indicated with blue shade Next step is to change output status of the active slave 2 Click the output of slave address 01 to open the Slave Status 01A dialog box 3 Click the On or Off button to change the statuses of outputs O0 through O3 and parameters PI P0 through P3 as required The selected parameters PI are in effect until the CPU module is sh...

Page 285: ...com pleted either disconnect and reconnect the AS Interface connector or turn off and on the AS Interface power supply LMO LED is on local mode The CPU module fails to communicate with the AS Interface master module Check the fol lowing points Is the CPU module compatible with AS Interface Check the Type No of the CPU module Is a check mark put in the check box Use AS Interface Master Module in Wi...

Page 286: ...ta to the AS Interface master module EEPROM Short Press A short press takes effect when you press either pushbutton PB1 or PB2 for 0 5 second or less Use the short press to change the slave address when monitoring slave I O status on the AS Inter face master module LED indicators Transition of AS Interface Master Module Modes Using Pushbuttons 1 Pushbutton operation or execution of the ASI command...

Page 287: ...a Exchange To return to normal protected mode and resume data communication execute the ASI command Enable Data Exchange For details about the ASI commands see page 24 30 When auto configuration or manual configuration is executed on WindLDR the AS Interface master module enters this mode during configuration Local Mode In local mode the CPU module does not communicate with the AS Interface master...

Page 288: ...e Indicates the mode of the AS Interface master module Goes on when the AS Interface master module is in connected mode Goes off when the AS Interface master module is in local mode OFF Offline Indicates the operating status of the AS Interface master module Goes on when the AS Interface master module is in normal protected offline CNF Configuration Indicates the configuration status of the AS Int...

Page 289: ...e last address 31B another short press will return to the first address 0A A short press on PB2 decre ments the address At the first address 0A another short press will return to the last address 31B The figures below illustrate what happens when you press the PB1 button while the address LEDs indicate 25A The address LEDs increment to 26A where a slave is assigned Note that the address LEDs flash...

Page 290: ...devices are also updated in every scan only when analog I O are connected to the AS Interface bus The processing times for these AS Interface devices are shown in the table on page 24 19 Other AS Interface data registers are updated when an ASI command is executed in the CPU module For the processing times of the ASI commands see page 24 30 For AS Interface master module 2 AS Interface objects are...

Page 291: ...erface Master Module 2 When using two AS Interface master modules the AS Interface objects for the second AS Interface master module can be assigned to any internal relays and data registers and accessed using RUNA or STPA instructions See page 24 32 MicroSmart CPU Module Device Address Precessing Time ms 1 Read Write AS Interface Master Module EEPROM Device Updated Device AS Interface Master Modu...

Page 292: ...A or STPA instruction dialog box Device Address Data Format AS Interface Master Module 1 AS Interface Master Module 2 7 DI3 6 DI2 5 DI1 4 DI0 3 DI3 2 DI2 1 DI1 0 DI0 M1300 0 low byte Slave 1 A Slave 0 M1310 0 high byte Slave 3 A Slave 2 A M1320 1 low byte Slave 5 A Slave 4 A M1330 1 high byte Slave 7 A Slave 6 A M1340 2 low byte Slave 9 A Slave 8 A M1350 2 high byte Slave 11 A Slave 10 A M1360 3 l...

Page 293: ...A Slave 24 A M1750 6 high byte Slave 27 A Slave 26 A M1760 7 low byte Slave 29 A Slave 28 A M1770 7 high byte Slave 31 A Slave 30 A M1780 8 low byte Slave 1B M1790 8 high byte Slave 3B Slave 2B M1800 9 low byte Slave 5B Slave 4B M1810 9 high byte Slave 7B Slave 6B M1820 10 low byte Slave 9B Slave 8B M1830 10 high byte Slave 11B Slave 10B M1840 11 low byte Slave 13B Slave 12B M1850 11 high byte Sla...

Page 294: ...ata for programming because this value is reserved for a special meaning as follows Unused channel on a slave allocated to analog slave For a channel on a slave not allocated an analog slave the corresponding data register holds an indefinite value Data overflow Communication between the master and analog slave is out of synchronism When using analog slaves read the user s manual for the analog sl...

Page 295: ...738 6 Channel 3 D1739 7 Channel 4 D1740 8 Channel 1 3rd data AO2 D1741 9 Channel 2 D1742 10 Channel 3 D1743 11 Channel 4 D1744 12 Channel 1 4th data AO3 D1745 13 Channel 2 D1746 14 Channel 3 D1747 15 Channel 4 D1748 16 Channel 1 5th data AO4 D1749 17 Channel 2 D1750 18 Channel 3 D1751 19 Channel 4 D1752 20 Channel 1 6th data AO5 D1753 21 Channel 2 D1754 22 Channel 3 D1755 23 Channel 4 D1756 24 Cha...

Page 296: ...rmal protected mode or protected mode or when a slave address is changed to 0 while the AS Interface master module is in normal protected mode Device Address Status Description AS Interface Master Module 1 AS Interface Master Module 2 ON OFF M1940 0 low byte Config_OK Configuration is complete Configuration is incomplete M1941 LDS 0 Slave address 0 is detected on the AS Interface bus Slave address...

Page 297: ...t be recognized by the AS Interface master module on the AS Interface bus M1944 Configuration M1944 indicates whether the AS Interface master module is in configuration mode on or other mode off While con figuration mode is enabled M1944 remains on and the CNF LED flashes M1945 Normal_Operation_Active M1945 remains on while the AS Interface master module is in normal protected mode M1945 is off wh...

Page 298: ...on status of each slave When a bit is on it indicates that the corresponding slave has been detected by the master List of Peripheral Fault Slaves LPF For AS Interface master module 1 data registers D1772 through D1775 are allocated to read the LPF You can check the register bits to determine the fault status of each slave When a bit is on it indicates that the corresponding slave is faulty Device...

Page 299: ...respectively For AS Interface master module 2 the slave identification information can not be accessed using RUNA or STPA instruc tions Configuration Data Image CDI For AS Interface master module 1 data registers D1780 through D1843 are allocated to read the CDI of each slave The CDI is the current slave configuration data collected by the AS Interface master module at power up and stored in the A...

Page 300: ...data collected by the AS Inter face master module at power up and stored in the AS Interface master module To change the PI settings use WindLDR Slave Status dialog box or execute the ASI command Change Slave PI The ASI command Read PI can be used to read PI data to data registers D1908 through D1923 After changing the PI set tings execute the ASI command Read PI then you can use the updated PI da...

Page 301: ...D1 settings store a required value in D1940 and execute the ASI command Write Slave 0 ID1 The ASI com mand Read Slave 0 ID1 can be used to read slave 0 ID1 data to data register D1940 After changing the slave 0 ID1 set tings execute the ASI command Read Slave 0 ID1 then you can use the updated slave 0 ID1 data for program execution Device Address Data Format AS Interface Master Module 1 AS Interfa...

Page 302: ... D1945 Read LPS 1 0 3 Reads LPS to D1776 D1779 010B 084C 0000 0000 0001 Read CDI 10 4 3 Reads CDI to D1780 D1843 010C 4050 0000 0000 0001 Read PCD 10 4 3 Reads PCD to D1844 D1907 010E 4090 0000 0000 0001 Read PI 3 0 3 Reads PI to D1908 D1923 0107 20D0 0000 0000 0001 Read PP 3 0 3 Reads PP to D1924 D1939 0108 20E0 0000 0000 0001 Read Slave 0 ID1 0 7 3 Reads slave 0 ID1 to D1940 0109 02F0 0000 0000 ...

Page 303: ...Description Note 00h Initial value at power up While D1945 lower byte stores 01h 02h or 08h do not write any value to D1945 otherwise the ASI command is not executed correctly The CPU module stores all values automatically except for 01h 01h Request 02h Processing ASI command 04h Completed normally 08h Executing configuration 14h Peripheral device failure 24h ASI command error 74h Impossible to ex...

Page 304: ...ontinuously in every scan the scan time increases by 10 ms 2 These AS Interface device data can be read or written using WindLDR For details see page 24 34 While performing master configuration or slave monitoring for AS Interface master module 2 using WindLDR RUNA and STPA instructions for AS Interface master module 2 cannot be executed ASI commands cannot be used for AS Interface master module 2...

Page 305: ...anent parameter PP Programming Procedure 1 Determine the AS Interface objects to access and the MicroSmart devices to assign the AS Interface objects 2 Confirm the slot number where AS Interface module 2 is mounted For the system setup of this sample program see page 24 18 Slots are numbered from 1 in the order of increasing distance from the CPU module All expansion modules are included in number...

Page 306: ...ears Dialog Box Button Description Configure AS Interface Master Auto Configuration Writes the currently connected AS Interface slave configuration LDS CDI PI information to the AS Interface master module ROM LPS PCD PP Manual Configuration Writes the slave PCD and parameters configured by the user to the AS Interface master module ROM LPS PCD PP Refresh Refreshes the screen display Switch Slave S...

Page 307: ...ut not enabled to operate OFF ON OFF OFF Red Shade An error was found in the slave ON OFF ON OFF ON ON OFF Duplicate slave addresses Each slave must have a unique address Do not connect two or more slaves with the same address otherwise the AS Interface master module cannot locate the slave correctly When two slaves have the same address and different identification codes ID I O ID2 ID1 the AS Int...

Page 308: ...CDI If the PCD is different from the CDI for a slave then that slave does not function correctly Set FFFFh to the PCD of vacant slave numbers After entering a PCD value and selecting parameter statuses click OK At this point the configuration data are not stored to the AS Interface master module ROM To store the changes click Manual Configuration on the Configure AS Interface Master dialog box The...

Page 309: ...in the Monitor AS Interface Slaves dialog box Then click the On or Off button to change the statuses of outputs DO0 through DO3 and parameters P0 through P3 as required Click Store to save the changes to the slave module If the command is not processed correctly the error message AS Interface Master Error and an error code will appear See page 24 38 The output statuses and parameters cannot be cha...

Page 310: ...in offline mode attempt was made to perform auto config uration or manual configuration An incorrect command was sent 7 While slave address 0 existed on the bus attempt was made to perform auto configuration or manual configuration The AS Interface master module is in local mode 8 The slave you are trying to change does not exist A slave of the designated new address already exists While a standar...

Page 311: ... Selector Key selector Lever 2 position 1 in 0 X2 1 1 Selector Key selector Lever 3 position 2 in X3 X3 1 1 Illuminated selector 2 position 1 in 1 out 0 X2 1 1 X1 Illuminated selector 3 position 2 in 1 out X3 X3 1 1 X1 1 The AS Interface master uses bit DO3 for addressing A B slaves 2 In the above table bits marked with X1 X2 and X3 are used for SwitchNet I O data 3 X1 When pushbutton is pressed i...

Page 312: ...umi nated selector switches depend on the operator position as shown below 5 X3 The input data from 3 position selector key selector and illumi nated selector switches depend on the operator position as shown below As shown in the table and figure 3 position selector key selector and illuminated selector switches use two communication blocks Each communication block must have a unique address ther...

Page 313: ...422 Slave 25 A M1426 M1744 M1426 M1744 M1426 Slave 26 A M1432 M1750 M1432 M1750 M1432 Slave 27 A M1436 M1754 M1436 M1754 M1436 Slave 28 A M1442 M1760 M1442 M1760 M1442 Slave 29 A M1446 M1764 M1446 M1764 M1446 Slave 30 A M1452 M1770 M1452 M1770 M1452 Slave 31 A M1456 M1774 M1456 M1774 M1456 Slave 1B M1466 M1784 M1466 M1784 M1466 Slave 2B M1472 M1790 M1472 M1790 M1472 Slave 3B M1476 M1794 M1476 M179...

Page 314: ...1750 M1433 M1432 M1750 Slave 27 A M1437 M1436 M1436 M1754 M1437 M1436 M1754 Slave 28 A M1443 M1442 M1442 M1760 M1443 M1442 M1760 Slave 29 A M1447 M1446 M1446 M1764 M1447 M1446 M1764 Slave 30 A M1453 M1452 M1452 M1770 M1453 M1452 M1770 Slave 31 A M1457 M1456 M1456 M1774 M1457 M1456 M1774 Slave 1B M1467 M1466 M1466 M1784 M1467 M1466 M1784 Slave 2B M1473 M1472 M1472 M1790 M1473 M1472 M1790 Slave 3B M...

Page 315: ...44 M1426 Slave 26 A M1432 M1750 M1432 M1750 M1432 Slave 27 A M1436 M1754 M1436 M1754 M1436 Slave 28 A M1442 M1760 M1442 M1760 M1442 Slave 29 A M1446 M1764 M1446 M1764 M1446 Slave 30 A M1452 M1770 M1452 M1770 M1452 Slave 31 A M1456 M1774 M1456 M1774 M1456 Slave 1B M1466 M1784 M1466 M1784 M1466 Slave 2B M1472 M1790 M1472 M1790 M1472 Slave 3B M1476 M1794 M1476 M1794 M1476 Slave 4B M1482 M1800 M1482 M...

Page 316: ...1412 M1730 M1412 M1730 Slave 23 A M1416 M1416 M1734 M1416 M1734 Slave 24 A M1422 M1422 M1740 M1422 M1740 Slave 25 A M1426 M1426 M1744 M1426 M1744 Slave 26 A M1432 M1432 M1750 M1432 M1750 Slave 27 A M1436 M1436 M1754 M1436 M1754 Slave 28 A M1442 M1442 M1760 M1442 M1760 Slave 29 A M1446 M1446 M1764 M1446 M1764 Slave 30 A M1452 M1452 M1770 M1452 M1770 Slave 31 A M1456 M1456 M1774 M1456 M1774 Slave 1B...

Page 317: ...munication module in combination with function modules listed below When using the expansion RS232C RS485 communication module and these function modules use the slim type CPU module Allocating Communication Port Number When expansion RS232C RS485 communication modules are mounted port number starts with port 3 and ends with port 7 when a maximum of five expansion RS232C RS485 communication module...

Page 318: ...l and 21 1 System Setup Example Cable Connection and Pinouts FC5A SIF2 Expansion RS232C Communication Module Ð 24VDC PWR SD RD RS232C RS ER SD RD DR SG NC Computer Link Cable 4C FC2A KC4C 3m 9 84 ft long To Port 3 RS232C To Port 1 RS232C CPU Module The communication cable is prepared by the user refer ring to the diagram shown below For the wiring precautions see page 2 89 Basic Vol Expansion RS23...

Page 319: ...fer mode to ASCII To download or upload the user program CPU modules with system program version 220 or higher and FC5A SIF4 are required Run Time Program Download cannot be used on port 3 through port 7 Parameter Optional Range Default Communication Mode Maintenance communication Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 115200 Note 9600 Data Bits 7 or 8 7 Parity Even Odd None Even Stop...

Page 320: ... WindLDR menu bar select Configuration Comm Ports The Function Area Settings dialog box for Communication Ports appears 3 In the Communication Mode pull down list for Port 3 through Port 7 select Maintenance Protocol 4 The Communication Parameters dialog box appears Change settings if required 5 Click the OK button to save changes The Communication Parameters dialog box closes and the Communicatio...

Page 321: ...n The user program is downloaded to the CPU module Note When downloading a user program all values and selections in the Function Area Settings are also downloaded to the CPU module 9 Connect the PC to communication port 3 through port 7 on the expansion RS232C RS485 communication module For terminal arrangement and wiring diagram see page 2 89 and 2 90 Basic Vol 10 Start WindLDR on the PC connect...

Page 322: ...2S HG series operator interfaces applicable to port 1 through port 7 can be used Ð 24VDC NC NC PWR SD RD RS232C RS ER SD RD DR SG NC NC Computer Link Cable 4C FC2A KC4C 3m 9 84 ft long To Port 3 RS232C To Port 1 RS232C CPU Module The communication cable is prepared by the user refer ring to the diagram shown below For the wiring precautions see page 2 89 Basic Vol Expansion RS232C Communication Mo...

Page 323: ...t Communication Mode Maintenance communication Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 115200 Note 9600 Data Bits 7 or 8 7 Parity Even Odd None Even Stop Bits 1 or 2 1 Receive Timeout ms 10 to 2550 10 ms increments Receive timeout is disabled when 0 is selected 500 Network Number 0 to 31 0 Mode Selection Input Any input number Disabled HG series Operator Interface Pin Description HG3G ...

Page 324: ...RS485 communication module The operating procedures for operator interface communication are as follows 1 Change the Function Area Settings if required and download the user program through communication port 1 or 2 RS232C on the CPU module See step 1 through step 8 shown on pages 25 4 and 25 5 2 Connect the operator interface to communication port 3 through port 7 on the expansion RS232C RS485 co...

Page 325: ...user program to the CPU module the CPU module can communicate with the printer through the expansion RS232C communication module The operating procedures for user communication are as follows 1 Change the Function Area Settings if required and download the user program through communication port 1 or 2 RS232C on the CPU module See step 1 through step 8 shown on pages 25 4 and 25 5 2 Connect the pr...

Page 326: ...tion Parameters dialog box closes and the Communication page becomes active 7 Click the OK button to save changes to the Function Area Settings The Function Area Settings dialog box closes and the ladder editing screen becomes active 8 Download the user program through communication port 1 or 2 RS232C on the CPU module For the ladder program to control the printer see page 25 12 Baud Rate bps 1200...

Page 327: ... any wiring to the NC no connection pins otherwise the MicroSmart and the printer may not work correctly and may be damaged Special DR Value Description D8105 24 011 While DSR is on not busy the CPU sends data While DSR is off busy the CPU stops data transmission If the off duration exceeds a limit 5 sec a transmission busy timeout error will occur and the remaining data is not sent The transmit s...

Page 328: ...pecial internal relay CMP W compares the D8014 second data with 0 When the D8014 data equals 0 second M0 is turned on Counter C2 current value is moved to D31 D8012 hour data is moved to D20 D8013 minute data is moved to D21 When M0 is turned on TXD3 is executed to send 73 byte data through the RS232C port 3 to the printer D20 hour data is converted from BCD to ASCII and 2 digits are sent D21 minu...

Page 329: ...nd expan sion communication port the same Set the same communication parameters for WindLDR and expansion communication port 25 4 Is the CPU module system program version applicable to the expansion RS232C RS485 communication module Upgrade the CPU module system program version to 110 or higher to use the FC5A SIF2 or to 220 or higher to use the FC5A SIF4 To download or upload a user program upgra...

Page 330: ...n device D2 transmit status repeatedly Change the duplicate device to another data regis ter Basic Vol 10 6 Are inputs to more than 5 TXD instructions on simultane ously Correct the program to make sure that inputs to more than 5 TXD instructions do not go on simulta neously Basic Vol 10 6 Is duration of the busy signal at the remote terminal less than 5 sec Make sure that the busy signal at the r...

Page 331: ...e external device 25 10 Is the same data register designated as destination device D2 receive status repeatedly Change the duplicate device to another data regis ter Basic Vol 10 15 Is a start delimiter specified in the RXD instruction Are inputs to more than 5 RXD instructions on simultane ously Correct the program to make sure that inputs to more than 5 RXD instructions do not go on simulta neou...

Page 332: ...25 EXPANSION RS232C RS485 COMMUNICATION 25 16 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 333: ...MOV 3 9 BTOA 8 9 BTOH 8 3 CMP 4 1 CMP 4 1 CMP 4 1 CMP 4 1 CMP 4 1 CMP 4 2 COMRF 11 13 COS 17 4 CVDT 8 19 CVXTY 12 2 CVYTX 12 3 data types 2 8 DEC 5 13 DECO 8 16 DEG 17 2 DGRD 10 3 DI 11 7 DISP 10 1 DIV 5 1 DJNZ 11 5 DTCB 8 22 DTDV 8 21 DTIM 15 1 DTMH 15 1 DTML 15 1 DTMS 15 1 EI 11 7 ENCO 8 15 EXP 18 3 FIEX 19 3 FIFOF 19 1 FOEX 19 3 FRQRF 11 12 HOUR 20 11 HSCRF 11 11 HTOA 8 5 HTOB 8 1 HTOS 20 9 IBM...

Page 334: ...ogy and maximum length 24 5 cable 24 3 wiring 24 6 devices 24 18 objects 24 19 power supply 24 3 standard cable 24 3 system setup 24 6 assigning a slave address 24 9 AT 14 12 command execution 22 2 result code 22 3 string 22 3 general command mode 22 2 22 5 ATAN 17 8 ATOB 8 12 ATOH 8 7 ATZ 22 2 22 4 22 6 auto tuning 14 12 Auto_Address_Assign 24 25 Auto_Address_Available 24 25 average 12 7 AVRG 12 ...

Page 335: ... 5 convert data type 8 19 X to Y 12 2 Y to X 12 3 coordinate conversion instructions 12 1 COS 17 4 cosine 17 4 CVDT 8 19 CVXTY 12 2 CVYTX 12 3 cycle time 24 5 D data combine 8 22 comparison instructions 4 1 conversion error 12 3 12 4 instructions 8 1 divide 8 21 phase 10 1 swap 8 23 type 2 7 types for advanced instructions 2 8 data register double word data move 3 2 devices 2 10 Data_Exchange_Acti...

Page 336: ... IBMV 3 10 IBMVN 3 12 ICMP 4 6 ID code 24 4 ID1 code 24 4 of slave 0 24 29 ID2 code 24 4 identification 24 4 IDI 24 20 IMOV 3 6 IMOVN 3 8 INC 5 13 increment 5 13 indirect bit move 3 10 bit move not 3 12 move 3 6 move not 3 8 initialization string 22 2 22 3 22 6 commands 22 8 input condition for advanced instructions 2 7 data 24 39 24 40 LEDs 24 16 points 10 3 instructions binary arithmetic 5 1 Boo...

Page 337: ...85 communication 21 1 monitor AS Interface slave 24 37 monitoring digital I O and changing output status 24 12 PLC status 21 3 mounting position communication block 24 40 MOV 3 1 move 3 1 instructions 3 1 not 3 5 MOVN 3 5 MUL 5 1 multiplication 5 1 N N data repeat set 3 14 search 19 5 set 3 13 natural logarithm 18 1 NDSRC 19 5 network number 21 3 no operation 2 10 NOP 2 10 normal protected data ex...

Page 338: ...ital switch data 10 3 receive slave data 24 39 24 40 timeout 21 2 25 3 25 4 25 7 25 9 25 10 repeat cycles 2 7 designation 2 7 operation ADD and SUB instructions 5 6 ANDW ORW and XORW instructions 6 3 data comparison instructions 4 4 DIV instruction 5 10 indirect bit move instruction 3 11 move instructions 3 3 MUL instruction 5 8 request and result codes 24 31 table 23 4 resetting modem 22 4 22 6 r...

Page 339: ...tchNet data I O port 24 39 slaves internal relays 24 41 system requirements 24 2 setup 24 6 modem mode 22 1 T TADD 20 1 TAN 17 5 tangent 17 5 TCCST 3 16 teaching timer 15 3 telephone number 22 3 22 4 time addition 20 1 subtraction 20 5 timer instruction using with program branching 11 2 or counter as destination device 2 7 as source device 2 7 timer counter current value store 3 16 timing chart di...

Page 340: ...viii FC5A MicroSmart User s Manual FC9Y B1273 INDEX XY format set 12 1 XYFS 12 1 Z zero return 13 26 ZRN1 13 26 ZRN2 13 26 ZRN3 13 26 ...

Page 341: ...NOTE FC5A MICROSMART USER S MANUAL FC9Y B1273 1 ...

Page 342: ...NOTE 2 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 343: ... 6 6398 2527 Fax 81 6 6398 2547 E mail marketing idec co jp CHINA IDEC SHANGHAI CORPORATION Room 701 702 Chong Hing Finance Center No 288 Nanjing Road West Shanghai 200003 P R C Tel 86 21 6135 1515 Fax 86 21 6135 6225 E mail idec cn idec com IDEC BEIJING CORPORATION Room 211B Tower B The Grand Pacific Building 8A Guanghua Road Chaoyang District Beijing 100026 PRC TEL 86 10 6581 6131 FAX 86 10 6581...

Reviews: