Home
IDEC FC5A Advanced Manual
Contents
1. MsB D11 D10 LSB S2 lt x 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 0 0 0 0 0 0 0 0 0 000 0 0 0 0 1 M8003 Shift to the left After shift MSB D11 D10 LSB 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 00 0 0 00 0 0 0 0 0 111 M8003 7 2 FC5A MicroSmart User s Manual FC9Y B1273 IDE 7 SHIFT ROTATE INSTRUCTIONS SFTR Shift Right 1 CY SFTR S1 52 N B Bits kkkkk When input is N_B bit data string starting with source device 51 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 set to a carry special internal relay M8003 Zero or 1 designated by source device S2 is set to the MSB e 2 0 N B 16 Bits 1 52 MSB S1 LSB Before shift 01 11 0 0 1 111 0 11 0 1111 110 0 111 0 Shift to the right gt 8003 MSB S1 LSB cy After shift 0 11101 0 11110 1 011111110 0 111 0 8003 Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 First data for bit shift
2. a HMA On 3 position selector key selector and illuminated selector switches communication blocks 1 and 2 are mounted in positions shown above Write_Parameter Settings Settings LED Brightness Control Data Remarks P2 P1 PO 100 1 1 Default 50 1 DOO 0 1 25 0 DO1 1 0 12 596 0 0 IDEC 24 AS INTERFACE MASTER COMMUNICATION eInternal Relays for SwitchNet Slaves AS Interface Master Module 1 L6 Series Slave Number Pushbutton Pilot Light Illuminated Pushbutton 2 Input DI2 Output DOO Input DI2 Output DOO Input DI2 Slave 0 M1302 M1620 M1302 M1620 M1302 Slave 1 A M1306 M1624 M1306 M1624 M1306 Slave 2 A M1312 M1630 M1312 M1630 M1312 Slave 3 A M1316 M1634 M1316 M1634 M1316 Slave 4 A M1322 M1640 M1322 M1640 M1322 Slave 5 A M1326 M1644 M1326 M1644 M1326 Slave 6 A M1332 M1650 M1332 M1650 M1332 Slave 7 A M1336 M1654 M1336 M1654 M1336 Slave 8 A M1342 M1660 M1342 M1660 M1342 Slave 9 A M1346 M1664 M1346 M1664 M1346 Slave 10 A M1352 M1670 M1352 M1670 M1352 Slave 11 A M1356 M1674 M1356 M1674 M1356 Slave 12 A M1362 M1680 M1362 M1680 M1362 Slave 13 A M1366 M1684 M1366 M1684 M1366 Slave 14 A M1
3. MSB S1 LSB 52 Before shift 1 0 0 1 1 0 1 0 1 1 1 0 0 1 1 0 O M8003 Shift to the left cy MSB S1 LSB After shift 1 0 001 1 0 1 0 1 1 1 0 0 1 1 0 0 M8003 Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 First data for bit shift X S2 Source 2 Data to shift into the LSB X X X X Oor1 N B Number of bits in the data string SX 1 65535 Bits Quantity of bits to shift 1 15 For the valid device address range see pages 6 1 6 2 Basic Vol Internal relays MO 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 IDEC FC5A MicroSmart User s Manual FC9Y B1273 7 1 7 SHIFT ROTATE INSTRUCTIONS Examples SFTL e N_B 16 bits M8120 is the initialize pulse special internal relay MOV W Sl Di 43690 D10 When the CPU starts operation the MOV move instruction sets 43690 to data register D10 Each time input IO is turned on 16 bit data of data register D10 is shifted to the left by 1 bit as designated by
4. Result Result FC5A MicroSmart UsER s MANUAL FC9Y B1273 Offset of first match Quantity of matches D200 D201 D200 D201 Offset of first match Quantity of matches Offset of first match Quantity of matches IDEC 20 CLOCK INSTRUCTIONS Introduction TADD time addition and TSUB time subtraction instructions perform addition or subtraction of two time data respec tively The data can be selected from time hour minute and second or date time year month day day of week hour minute and second HTOS HMS to sec and STOH sec to HMS instructions perform conversion of time data between hours minutes sec onds and seconds HOUR hour meter instruction measures the on duration of the input and compares the total duration to a preset value When the preset value is reached an output or internal relay is turned on TADD Time Addition S1 S2 D1 CY TADD S1 S2 D1 Mode dokokekek When input is on time data designated by source device S2 are added to date time data designated by source device S1 depending on the selected mode The result is stored to destination device D1 and carry M8003 This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D
5. Data Type S1 has a larger data range than D1 When the source data exceeds the range of destination data type the destination stores a value closest to the source data within the destination data type H SOTU CVDT S1 D1 REP Device Data Type Value 10 DTOW DO D2 Source D 4294967295 Destination WwW 65535 When input 10 is turned on 65535 is stored to data register D2 S1 D1 DO D1 4294967295 D2 65535 8 20 FC5A MicroSmart User s Manual FC9Y B1273 IDE 8 DATA CONVERSION INSTRUCTIONS DTDV Data Divide S1 01 01 1 D1 s When input is the 16 bit binary data designated by 51 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 instruction is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Binary data to divide X X X X X X X X D1 Destination 1 Destination to store results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as S1 the timer counter curren
6. Source Device Destination Device Double word Data 4660 4660 High Word D10 1234h T 1234h High Word D20 gt gt 22136 12345678h 22136 Low Word D11 5678h 5678h Low 021 Note The above example is the default setting of the FCSA MicroSmart The order of two devices be selected CPU modules with system program version 110 or higher See page 5 46 Basic Vol Discontinuity of Device Areas Each device area is discrete and does not continue for example from input to output or from output to internal relay In addition special internal relays M8000 through M8157 all in one type CPU or M8317 slim type CPU are in a separate area from internal relays MO through M2557 Data registers DO through D1999 expansion data registers D2000 through D7999 slim type CPU only and special data registers D8000 through D8199 all in one type CPU or D8499 slim type CPU are in separate areas and do not continue with each other The internal relay ends at M2557 Since the MOV move instruction reads 16 MOV W S1 D1 REP AP internal relays the last internal relay exceeds the valid range resulting in a user M8125 M2550 DO program syntax error DIV W 7 Sa T REP This program results in a user program syntax error The destination of 0100 D200 01999 the DIV division instruction requires two data registers D1999 and D2000 Si
7. 020 25 021 35 D22 45 When 51 and S2 source are designated to repeat the final result is set to destination device 01 01 1 sotu 0 0 518 528 Di 1 D10 030 3 D10 D11 D12 D13 D14 D15 5 6 FC5A MicroSmart User s Manual FC9Y B1273 S1 Repeat 3 S2 Repeat 3 D20 D21 D22 D23 D24 D25 D1 Repeat 3 D30 D31 D32 D33 D34 D35 D1 Repeat 0 30 35 D30 50 D30 65 D1 Repeat 0 D30 D31 D30 D31 D30 D31 IDEC 5 Binary Arithmetic Instructions Repeat Source and Destination Devices Data Type Word and Integer When 51 source and 01 destination are designated to repeat different results are set to 3 devices starting with D1 S1 Repeat 3 S2 Repeat 0 D1 Repeat 3 SOTU ADD W S1R 52 D1R REP 11 D10 D20 D30 3 D10 10 D20 25 D30 35 D11 15 D20 25 D31 40 D12 20 D20 25 D32 45 Data Type Double Word Long and Float When S1 source and 01 destination are designated to repeat different results are set to 3 devices starting with 01 01 1 51 Repeat 3 52 Repeat 0 D1 Repeat 3 SOTU ADD D S1R 52 D1R REP 11 D10 D20 D30 3 D10 D11 20 021 LR D30 D31 D12 D13 20 021 D32 D33 D14 D15 20 021 t D34 D35 Re
8. Default 4 The Communication Parameters dialog box appears Change settings if required Maintenance Protocol Port3 1200 2400 4800 9600 19200 38400 Baud Rate bps Baud Rate bps 57600 115200 Data Bits Data Bits 70r8 Parity Parity Even Odd None Stop Bits B d Stop Bits 10r2 Receive Timeout ms 10 to 2550 10 ms increments NAE Receive Timeout ms Receive timeout is disabled when 0 is d selected E Mode Selection Input Network Number 0to31 f OK Default Mode Selection Input Any input number Note When a mode selection input has been designated and the mode selection input is turned on the selected communication parameters are enabled When communication parameters are changed without designating a mode selection input the changed communication parameters take effect immediately when the user program is downloaded 5 Click the OK button to save changes The Communication Parameters dialog box closes and the Communication Ports page becomes active 25 4 FC5A MicROSMART User s MANUAL FC9Y B1273 25 EXPANSION RS232C RS485 COMMUNICATION 6 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 Next download the user program through port 1 or 2 to the CPU module
9. STPA READ is executed to read data pet from the intelligent module and STPA STPA WRITE to write data to the intel WRITE x ligent module IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 16 1 16 INTELLIGENT MODULE ACCESS INSTRUCTIONS RUNA READ Run Access Read H RUNA DATA STATUS SLOT ADDRESS READ While input is on data is read from the area starting at ADDRESS in the intelligent module designated by SLOT and stored to the device designated by DATA BYTE designates the quantity of data to read STATUS stores the operating status code Applicable CPU Modules 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 Valid Devices Run Access Read Device Function I QM T C D Constant Repeat DATA First device address to store read data X X X X X STATUS Operating status code eX SLOT Intelligent module slot number 1 7 ADDRESS First address in intelligent module to read data from Sa SSS 0 127 BYTE Bytes of data to read 1 127 For the valid device address range see pages 6 1 and 6 2 Basic Vol DATA STATUS SLOT ADDRESS BYTE Specify the first device address to store the data read from the intelligent module Internal relays MO through M2557 b
10. X For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as S1 the timer counter current value TC or CC is read out When F float data type is selected only data register can be designated as S1 For source S2 1 word is always used without regard to the data type When F float data type is selected and S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module When S2 is 0 or out of the correct value range for the selected device a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Valid Data Types Calculation ADD W word X X integer X D double word X L long X F float X When ADD is selected all data types can be used When XOR is selected only W word data type can be used When a word device such as T 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 long or float data type are used Quantity of Source and Destination Devices Depending on the ADD or XOR operation for W word and integer data types the destination uses a different quantity of devices Operation W word 1 integer D double word L long
11. 8 16 BONT Bit COU earne rei eut en ende Dd nen a a PM tmt DRE ta 8 17 ALT Alternate Output 25 o eves ae eat Rura ee AR eR Ob Spe d Red ran a a Rab 8 18 CVDT Convert Data tre ek ane ae ad Reda RES RR RR RR Us 8 19 DIDV ten UH ERR UH AE e RE ERR 8 21 DICB Data Combin8 2 ad o done o PER RR 8 22 SWAP Data SWAD xxu UR dba de Ba e d c d 8 23 Week Programmer Instructions ea RA RR 9 1 WKIBL Week Table Pi aden tana aiden ACRES Ab 9 2 54 Geach deka dew aa eee CROP XR Ren 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 9 8 Interface Instructions DISP Dis Olay 10 1 DGRD Digital Read ERR ttm BE Hue E Ra d RR RR 10 3 Program Branching Instructions LABEL 1 2 2 2 2 2222222222 2 2 22 24 24 24
12. Device Function Description R W 0 Pulse output OFF 01 0 Pulse output ON 1 Pulse output ON R 0 tput not let D1 1 Pulse output complete dae R 1 Pulse output complete 0 Overflow not occurred D1 2 Pul tput fl R 1 Overflow occurred PWM1 PWM3 only D1 0 Pulse Output ON The internal relay designated by device D1 0 remains on while the PWM instruction generates output pulses When the start input for the PWM instruction is turned off or when the PWM1 PWM3 instruction has completed generating a predetermined number of output pulses the internal relay designated by device D1 0 turns off 01 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 number of output pulses or when either PWM instruction is stopped to generate output pulses When the start input for the PWM instruction is turned on the internal relay designated by device D1 1 turns off 01 2 Pulse Output Overflow The internal relay designated by device D1 2 turns on when the PWM1 PWM3 instruction has generated more than the predetermined number of output pulses When the start input for the PWM instruction is turned on the internal relay designated by device D1 2 turns off 13 10 FC5A MICROSMART UstER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Timing Chart for Enable Pulse Counting This program de
13. Error Code Description 0 Normal 1 Operation mode designation error S140 stores other than 0 through 3 2 Output pulse frequency designation error S1 1 stores a value that is not within the frequency range of the output pulse 3 Pulse counting designation error S1 2 stores other than O and 1 4 Preset value designation error S1 3 S144 store other than 1 through 100 000 000 5 Invalid pulse counting designation for PULS2 S1 2 stores 1 Destination Device D1 Status Relay Three internal relays starting with the device designated by 01 indicate the status of the PULS instruction These devices are for read only Device Function Description R W 0 Pulse output OFF D1 0 Pulse output ON 1 Pulse output ON R 01 1 Pulse output complete O pulse complete R 1 Pulse output complete 0 Overflow not occurred D1 2 Pul tput fl R 1 Overflow occurred PULS1 PULS3 only D1 0 Pulse Output ON The internal relay designated by device D1 0 remains on while the PULS instruction generates output pulses When the start input for the PULS instruction is turned off or when the PULS1 or PULS3 instruction has completed generating a pre determined 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 PULS1 or PULS3 instruction has completed generating a predetermined number
14. 1 15 1 31 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as S1 Special internal relays cannot be designated as 51 The quantity of bits to rotate can be 1 through 15 for the word data type or 1 through 31 for the double word data type Since the ROTR 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 W word X When a bit device such as Q output M internal relay or R shift register is designated as the source 16 points word data type or 32 points double word data type are used integer D double word X When a word device such as D data register is designated as the source 1 point word data type or 2 points double word data type are used L long F float 7 10 FC5A MicroSmart User s Manual FC9Y B1273 IDE 7 SHIFT ROTATE INSTRUCTIONS Example ROTR Data Type Word M8120 is the initialize pulse special internal relay D1 D20 REP S1 13 MOV W When the CPU starts operation the MOV move instruction sets 13 to data reg ister D20 Each time input 11 is turned on 16 bit data of data register D20 is rotated to the right by 2 bits as designated by device bits ROTR W S1 bits D20 2 The last bit status rotated out is set to a carry special
15. L long F float X Example POW When input I1 is on the data of data registers D10 and D11 desig H nated by source device S1 is raised to the power 020 020 1 desig B nated by source device S2 and the operation result is stored to data registers D30 and D31 designated by destination device D1 4125 5 656856 S1 52 D1 D10 D11 4 0 020 021 1 25 30 31 5 656856 18 4 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 19 FILE DATA PROCESSING INSTRUCTIONS Introduction File data processing instructions implement the first in first out FIFO data structure FIFOF FIFO Format instructions initialize the FIFO data files storing the data FIEX First In Execute instructions store new data to the FIFO data files and FOEX First Out Execute instructions retrieve the stored data from the FIFO data files The first data to be stored to the FIFO data files by FIEX instructions will be the first data to be retrieved by FOEX instructions NDSRC N Data Search instruction has been added to search a designated value through a specified range FIFOF FIFO Format When input is on FIFOF instruction initializes an FIFO data file Each FIFOF W 51 S2 D1 D2 data file has unique number 0 through 9 A maximum of 10 data files KKK KK can be used user program This instruction is available on upgraded C
16. D10 10 D11 15 D12 20 S1 Repeat 3 D10 D11 D12 D13 D14 D15 S2 Repeat 0 D20 25 D20 25 D20 25 S2 Repeat 0 D20 D21 D20 D21 D20 D21 gt When only D1 destination is designated to repeat the same result is set to 3 devices starting with D1 sotu H ADD W S1 52 DIR REP 1 D10 D30 3 e Data Type Double Word Long and Float S1 Repeat 0 D10 10 D10 10 D10 10 S2 Repeat 0 p2o 25 D20 25 D20 25 D1 Repeat 0 D30 35 D30 40 D30 45 D1 Repeat 0 D30 D31 D30 D31 D30 D31 D1 Repeat 3 pso 35 D31 35 D32 35 When only 01 destination is designated to repeat the same result is set to 3 devices starting with D1 D1 1 sotu H ADD D 51 52 REP 1 D10 030 3 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 sotu HH ADD W SIR 528 Di 1 D10 030 3 e Data Type Double Word Long and Float S1 Repeat 0 010 011 010 011 010 011 S1 Repeat 3 010 10 011 15 012 20 S2 Repeat 0 020 021 020 021 020 021 S2 Repeat 3
17. For the valid device address range see pages 6 1 and 6 2 Basic Vol When the operation result is not within the range between 3 402823 108 and 1 175495 10 8 or between 1 175495 10 to 3 402823 x 103 special internal relay M8003 carry or borrow is turned on except when the result is 0 When the operation result is between 1 175495 x 10 and 1 175495 x 107 the destination device designated by 01 stores 0 When the operation result is less than 3 402823 x 103 or greater than 3 402823 x 10 causing an overflow the destination device designated by D1 stores a value of minus or plus infinity When one of the following conditions occurs a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module The data designated by source device S1 is less than O and the data designated by source device S2 is not an integer data designated by source device S1 is 0 and the data designated by source device S2 is less than or equal to 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word
18. 1 1 1 1 0 0 1 s2 1 o o o 1 1 p 9 9 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 XORW Exclusive OR Word 1082 gt D1 XORW S1 R S2 R D1 R REP RK When input is on 16 32 bit data designated by source devices 51 and S2 are exclusive ORed bit by bit The result is set to destination device D1 52 LL Applicable 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 IDEC FC5A MicroSmart User s Manual FC9Y B1273 6 1 6 BOOLEAN COMPUTATION INSTRUCTIONS Valid Devices Device Function R T C D Constant Repeat S1 Source 1 Data for computation X X X X X X X 1 99 S2 Source 2 Data for computation X X X X X X X X 1 99 D1 Destination 1 Destination to store results X X X X X 1 99 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S1 or S2 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 Since the Boolean computation instructions are executed in each scan while input is on a pulse input from a SOTU or SOTD instruction
19. D1 2 D1 S1 1 Record 0 The first record to store the data D1 S1 2 D1 S1x2 1 Record 1 The second record to store the data nn amaa m D1 S1x S2 1 2 Record 52 1 The last record to store the data D1 S1xS241 Destination Device D2 FIFO Status Output When FIEX or FOEX instructions are executed the following internal relays are turned on or off according to the execu tion status Device Function Description When the value stored in the FI pointer D1 0 is equal to the value stored in the D2 0 Data file full output FO pointer D1 1 1 the FIFO data file is full no more data can be stored If an FIEX instruction is executed when the FIFO data file is full no operation is executed and the data file full output D2 0 will be turned on D2 1 Data file empty output When the value stored in the FI pointer D1 0 is equal to the value stored in the FO pointer D1 1 the FIFO data file is empty If an FOEX instruction is executed when the FIFO data file is empty no operation is executed and the data file empty output D2 1 will be turned on D2 2 Pointer out of range output The value stored in the or FO pointer can be 0 through 52 1 When an FIEX or FOEX instruction is executed while the FI or FO pointer value is out of the valid range no operation is executed and the pointer out of range output D2 2
20. XOR DO 4 0100 0105h g 04FCh 758 D1 02F6h D2 D3 775 02 0307h 1032 D3 0408h XOR Operation DO 0105h 0000 0001 0000 0101 01 02F6h 0000 0010 1111 0110 D2 0307h 0000 0011 0000 0111 XOR D3 0408h 0000 0100 0000 1000 0100 04FCh 0000 0100 1111 1100 IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 17 5 Binary Arithmetic Instructions Data Type Integer SOTU SUM I S1 52 D1 10 ADD DO 4 0100 Data Type Double Word SOTU SUM D S1 52 D1 10 ADD DO 4 0100 Data Type Long SOTU SUM L S1 52 D1 10 ADD DO 4 D100 Data Type Float SOTU SUM F 1 2 D1 io ADD DO 4 0100 5 18 DO D1 02 03 D4 D5 06 07 DO D1 02 03 D4 D5 06 07 0 1 02 03 D4 D5 D6 D7 500 FEOCh 25 D1 0019h 4095 02 Foo1h 4 D3 0004h y gt 100000 000186A0h 200000 00030D40h 300000 000493E0h 400000 00061A80h 500000 FFFS5EEOh 123456 0001E240h 9876543 FF694BC1h 1 00000001h 12 345 gt 1 56 0 9876 3 5 FC5A MicroSmart User s Manual FC9Y B1273 D100 D101 F
21. F float 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 Example FIFOF FIEX and FOEX This program demonstrates a user program of the FIFOX FIEX and FOEX instructions to use an FIFO data file File number 2 Quantity of data registers per record 3 Quantity of records 4 FIFO Data file FIFO status outputs Ladder Diagram MOV W FIFOF W 51 FIFO Data File 51 0 52 4 D100 through D113 3x4 2 data registers M100 through M102 M8120 is the initialize pulse special internal relay When the CPU starts MOV sets to FI and FO pointers and FIFOF ini tializes FIFO data file 2 DIR REP D100 2 D1 D2 D100 M100 S1 When input IO is turned on the data in D10 through D12 are stored to the FIFO data file 2 FIEX W 2 D10 FIEX W 51 2 D20 When input I1 is turned on the data in D20 through D22 are stored to the FIFO data file 2 When input I2 is turned on the first data is retrieved from the FIFO data file 2 and stored to D50 through D52 FOEX W D1 2 D50 The table blow shows the data stored in FIFO data file 2 when inputs IO I1 and I2 are turned on in this order Only the valid data managed by the FIFOF FIEX and FOEX instructions are shown in the table Function Device Address Input IO Input 11 Input I2 Pointer D100 1 2 2 FO Pointer D101
22. 2 22 22 2 2 2 11 1 UMP ea DOL YUP aoa RR etii OR e Rc nro tates cle ne eco ae DA 11 1 LCAL Label 222222222 2 I rens 11 3 kabel Corea Afra athe a bee api DA e ra eec 11 3 DJNZ Decrement Jump Non zero 7 11 5 DIDisableIntert pt aoi Awe Re Sakae Rosen rede e aedi d 11 7 El Enable Interrupt RR Re Rete eL ops aed x 11 7 IOREF I O 2222 22 2 2 4 4 2 2 2 essa 11 9 HSCRF High speed Counter Refresh 11 11 FRQRF Frequency Measurement Refresh 11 12 COMRF Communication Refresh 11 13 FC5A MICROSMART USER s MANUAL FC9Y B1273 I DEC Cuaprer 12 Cuaprer 13 14 15 Cuaprer 16 17 18 19 IDEC TABLE OF CONTENTS Coordinate Conversion Instructions XYFSAXY Format SET gs as Aan a EEEE 12 1 CVXTY Convert X TO V epes et E E A E eared RR 12 2 CVYIX CONVErtY TOX A
23. RXD7 LABEL LJMP LCAL LRET DJNZ DI El IOREF HSCRF gt lt gt lt x x x x x x x FRQRF lt X X X X X Xx lt x x x x x x gt lt COMRF XYFS X Note 2 CVXTY CVYTX AVRG x x x Xx Note 1 Not available on FC5A D12K1E S1E Note 2 Not available on FC5A C24R2D IDEC lt x x x x x x lt FC5A MicROSMART USER s MANUAL FC9Y B1273 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X x Xx X X x X XxX X x x x XxX X X X X X X Xx 2 5 2 ADVANCED INSTRUCTIONS Note 1 Not available on FCSA C24R2D Group Pulse PID Instruction Dual Teaching Timer Intelligent Module Access Trigonometric Function Logarithm Power File Data Processing Clock Ethernet Instructions Symbol PULS1 All in One Type CPU Modules Slim Type CPU Modules FC5A C10R2 FC5A C10R2C FC5A C10R2D FC5A C16R2 FC5A C16R2C FC5A C16R2D FC5A C24R2 FC5A C24R2C FC5A C24R2D FC5A D16RK1 FCSA D16RS1 FCSA D32K3 FC5A D3253 FCSA D12K1E FC5A D12S1E PULS2 PULS3 PWM1 PWM2 PWM3 RAMP1 RAMP2 ZRN1 gt lt ZRN2 gt lt ZRN3 PID DTML DTIM DTMH DTMS x x x gt TTIM RUNA
24. ANDLOD OUT Output Q2 is on when data register D10 is less than or equal to 2 and greater than or equal to 3 Output Q3 is on while data register D10 is between 3 and 5 FC5A MicROSMART UsER s MANUAL FC9Y B1273 4 9 4 DATA COMPARISON INSTRUCTIONS 4 10 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 5 BINARY ARITHMETIC INSTRUCTIONS Introduction The binary arithmetic instructions make it possible for the user to program computations using addition subtraction multiplication and division For addition and subtraction devices internal relay M8003 is used to carry or to borrow The ROOT instruction can be used to calculate the square root of the value stored in one or two data registers INC increment DEC decrement SUM sum and RNDM random instructions are added to upgraded CPU modules with system program version 210 or higher ADD Addition ADD Kk k k k SUB Subtraction SUB KK k k k MUL Multiplicati MUL Kk kk k DIV Division DIV S1 R S1 R on S1 R S1 R S2 R S2 R S2 R S2 R D1 R D1 R D1 R REP D1 R Data type W or I S1 S2 D1 CY Data type D L or F 51 51 1 52 52 1 gt D1 D1 1 CY When input is on 16 or
25. Code Allocation Code Allocation Code Allocation Oh LLLI 4h 1 1 8h 0 0 0 0 Ch O 1h LLILO 5h 0 0 0 9h O O O Dh O 1 1 1 2h 1 1 1 6h 1 B B B Ah O O O B Eh O B B B 3h 1 0 0 7h B B B B Bh O Fh reserved 1 input output input and output 1 2 Code The ID2 code consists of 4 bits to indicate the internal function of the slave 1 1 Code The ID1 code consists of 4 bits to indicate additional identification of the slave Standard slaves can have an 1 1 code of 0000 through 1111 bin A B slaves use the MSB to indicate A or B slave and can have a unique value only for the lower three bits The MSB of A slaves is set to O and that of B slaves is set to 1 24 4 FC5A MIcROSMART UstR s MANUAL FC9Y B1273 I DEC 24 AS INTERFACE MASTER COMMUNICATION Quantities of Slaves and I O Points The quantity of slaves that can be connected to one AS Interface master module is as follows e Standard slaves 31 maximum e slaves 62 maximum The limits for slave quantities given above apply when the slaves are either all standard slaves or are all A B slaves When 62 slaves with four inputs and three outputs are connected a maximum of 434 1 0 points 248 inputs and 186 outputs can be controlled by one AS Interface master module When using a mix of standard slaves and A B slaves together the standard slaves can only use addresses 1 A thr
26. PID I S1 52 53 54 D1 0 4095 DO D100 D760 050 D760 is the analog input data of analog I O module 1 analog input channel 0 stores O through 4095 MOV W 51 Di When internal relay M4 high alarm output is turned on or M11 is turned on analog input operating status is 3 or more O is set to D772 analog output data turning off the heater power 0 D772 MOWW 51 Di REP When M4 and M11 are off D24 output manipulated variable D24 D772 for analog output module 51 24 of the PID instruction is moved to D772 analog output data CMP gt W 51 52 D1 REP D761 3 M11 When D761 analog input operating status stores 3 or more internal relay M11 is turned on Notes for Using Ladder Refresh Type Analog Input Modules When using analog input module FC4A J4CN1 with Pt100 or Ni100 inputs use the XYFS and CVXTY instructions to convert the 0 6 000 input to 0 50 000 input and store the result to the process variable S4 of the PID instruction e When using analog input module FC4A J4CN1 with Pt1000 or Ni1000 inputs use the XYFS and CVXTY instructions to convert the 0 60 000 input to 0 50 000 input and store the result to the process variable S4 of the PID instruction When using analog input module FC4A J8AT1 keep the operation within the temperature range where the thermistor shows linear characteristics e When using analog input module FC4A J8AT1 use the XYFS and CVXTY instructions to conver
27. When a word device such as T timer C counter or D data register is designated as the source or D double word SER destination 1 point word data type is used L long F float IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 5 8 DATA CONVERSION INSTRUCTIONS Examples HTOA Quantity of Digits 4 soru S1 52 D1 10 D10 4 D20 D10 Quantity of Digits 3 sotu HTOA W S1 52 D1 1 D10 3 D20 010 Quantity of Digits 2 sotu H HTOA W S1 S2 D1 010 2 D20 D10 e Quantity of Digits 1 soru HH HTOA W S1 52 D1 D10 1 D20 010 8 6 FC5A MicroSmart User s Manual 9 1273 Binary 4660 1234h Binary 4660 1234h Binary 4660 1234h Binary 4660 1234h D20 D21 D22 D23 D20 D21 D22 D20 D21 D20 ASCII 49 0031h 50 0032h 51 0033h 52 0034h ASCII 50 0032h 51 0033h 52 0034h ASCII 51 0033h 52 0034h ASCII 52 0034h IDEC 8 DATA CONVERSION INSTRUCTIONS ATOH ASCII to Hex 51 51 1 142 51 3 01 ATOH W S1 S2 D1 an dodo When input is on the ASCII data designated by 1 as many as the quant
28. w M10 M50 When input IO is on the 16 internal relays starting with M10 designated by 0 source device 51 are inverted bit by bit moved to 16 internal relays starting with M50 designated by destination device D1 M10 through M17 M20 through M27 NOT gt M50 through M57 M60 through M67 MSB S1 158 ON OFF statuses of the 16 internal relays M10 Before inversion M27 M10 0 10 1 1 0 0 01 0 101 01 11 1 110 01 1 through M17 and M20 through M27 inverted and moved to 16 internal relays M50 through M57 and M60 D1 After inversion through M67 50 is the LSB least significant bit and 67 50 111110 0 1 1 1 1 1 1 0 0 0 1 1 0 M67 is the MSB most significant bit MOVN W S1 D1 REP nes w 310 D2 When input 11 is on decimal constant 810 designated by source device 51 is con 1 verted into 16 bit binary data and the ON OFF statuses of the 16 bits inverted and moved to data register D2 designated by destination device D1 MSB S1 LSB Before inversion 810 0 0 0 0 0 0 1 1 0 0 1 0 1 0 1 0 DO MSB D1 LSB Dij After inversion 64725 1 1 1 1 1 1 0 0 1 1 0 1 0 1 0 1 D2 64725 810 030 NOT 020 MOVN W 51 D1 REP 1 D20 64605 When input 12 is on the data in data regist
29. 2 ADVANCED INSTRUCTIONS Valid Data Type Symbol Name See Page XYFS XY Format Set XX 12 1 CVXTY Convert X to Y X X 12 2 CVYTX Convert Y to X XX 12 3 AVRG Average X X X Xx 12 7 PULS1 Pulse Output 1 13 2 PULS2 Pulse Output 2 13 2 PULS3 Pulse Output 3 13 2 PWM1 Pulse Width Modulation 1 13 8 PWM2 Pulse Width Modulation 2 13 8 PWM3 Pulse Width Modulation 3 13 8 RAMP1 Ramp Pulse Output 1 13 14 RAMP2 Ramp Pulse Output 2 13 14 ZRN1 Zero Return 1 13 26 ZRN2 Zero Return 2 13 26 ZRN3 Zero Return 3 13 26 PID PID Control X X 14 1 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 RUNA Run Access X X 16 2 STPA Stop Access XX 16 4 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 LOGE Natural Logarithm X 18 1 LOG10 Common Logarithm X 18 2 EXP Exponent X 18 3 POW Power X 18 4 FIFOF FIFO Format X 19 1 FIEX First In Execute X 19 3 FOEX First Out Execute X 19 3 NDSRC N Data Search 19 5 Time Addition 20 1 TSUB Time Subtraction 20 5 HTOS HMS to Sec 20 9 STOH Sec to HMS 20 10 HOUR Hour Meter 20 11 EMAIL Send E mail PING Ping ETXD Transmit over Ethernet ERXD Re
30. 7 6 FC5A MicroSmart User s Manual FC9Y B1273 I DEC 7 SHIFT ROTATE INSTRUCTIONS WSFT Word Shift When input is on N blocks of 16 bit word data starting with device designated WSFT 51 52 01 by D1 are shifted up to the next 16 bit positions At the same time the data designated by device 51 is moved to device designated by D1 52 specifies the quantity of blocks to move When 2 3 quantity of blocks to shift S1 16 bit data D1 0 First 16 bit data UL D1 1 Second 16 bit data D1 2 Third 16 bit data D1 3 Fourth 16 bit data 3 blocks S2 D1 4 Fifth 16 bit data Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 S1 16 bit data First 16 bit data Second 16 bit data Third 16 bit data Fifth 16 bit data FC5A D32K3 S3 FC5A D12K1E S1E X X X X X Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Source data for word shift X X X X X X X X S2 Source 2 Quantity of blocks to shift X X X X X X X X D1 Destination 1 First device address to shift X For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as S1 or S2 the timer counter current value TC or CC is read out Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as
31. As a result when input IO is on the ON OFF status of data register D10 bit 5 is moved to data register D20 bit 12 Repeat Operation in the Indirect Bit Move Instructions Repeat Bit Devices Source and Destination REP D10 D20 3 MOVE INSTRUCTIONS D10 5 D20 12 15 14 13 12 11 10 9 8 7 6 54 3 2 1 0 Bit 5 15 14 13 12 11109 8 7 6 54 3 2 1 0 Bit 12 If a repeat operation is designated for bit devices such as input output internal relay or shift register bit devices as many as the repeat cycles are moved SOTU IBMV 51 52 DIR D2 11 M10 5 Q30 9 Since source device 1 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 the value of destination device D2 is 9 the destination is 3 outputs starting with Q41 As a result when input 11 is the ON OFF statuses of internal relays M15 through M17 are moved to outputs O41 through Q43 Repeat Word Devices Source and Destination REP M10 5 Q30 9 Repeat 3 M27 M20 M17 M15 M10 uu VA VAI 5th from M10 047 044 043 041 Q37 Y YV W WY W vv 9th from Q30 If a repeat operation
32. D20 D21 4 712389 IDE FC5A MicROSMART User s MANUAL FC9Y B1273 17 1 17 TRIGONOMETRIC FUNCTION INSTRUCTIONS DEG Radian to Degree 51 51 1 rad x 180 gt 01 01 1 DEG F S1 D1 xokekek When input is on the radian value designated by source device S1 is converted into a degree value and stored to the destination designated by device D1 Applicable 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 Valid Devices Device Function QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol When the conversion result is not within the range between 3 402823 x 10 and 1 175495 x 10 or between 1 175495 x 10 and 3 402823 x 10 special internal relay M8003 carry or borrow is turned on except when the conversion result is 0 When the conver sion result is below 3 402823 1038 or over 3 402823 x 103 causing an overflow the destination device designated by D1 stores a value of minus or plus infinity Not Zero Overflow Overflow M8003 1 1 Execution Result 3 402823 103 1 175495x10 0 1 175495x10 38 3 402823 1038 When the data designated by 51 does not comply with the normal floa
33. HG series Operator Interface Pin HG3G HG2G HG3G 1 Connector Terminal Block Description FG RDA RD RDB RD SDA SD SDB RD cs 3 RS 3 CS 3 RS 3 1 Terminal numbers are described SG 2 As HG3G uses only RDA and RDB for RS 485 422 2 wire method communication connecting SDA and SDB is unnecessary 3 When HG2G or HG1F is used wiring CS RS CS and RS is unnecessary Disable the hardware flow control of the con nected HG series operator interface Applicable Cable Connectors for HG series Operator Interface Operator Interface Connector on Cable D sub 9 pin male connector Ferrule for screw terminal block HG2G Ferrule for screw terminal block HG1F D sub 9 pin male connector RS232C Ferrule for screw terminal block RS485 HG2F HG3F HG4F D sub 25 pin male connector HG2S D sub 37 pin female connector Expansion RS232C RS485 Communication Module Communication Parameter Range Parameter Optional Range Default Communication Mode Maintenance communication Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 115200 Note 9600 Data Bits 7 8 7 Parity Even Odd None Even Stop Bits 10 2 1 Receive Timeout ms 222 pu ibis ae 0 is selected 200 Network Number Oto 31 0 Mode Selection Input Any input number Disabled Note To use 57600 or
34. L long F float 16 4 FC5A MICROSMART UstER s MANUAL FC9Y B1273 I DEC 16 INTELLIGENT MODULE ACCESS INSTRUCTIONS STPA WRITE Stop Access Write When the CPU module stops data in the area start ing at the device designated by DATA is written to ADDRESS in the intelligent module designated by Start input is not needed for this instruction SLOT STPA DATA R STATUS SLOT ADDRESS BYTE WRITE BYTE designates the quantity of data to write STATUS stores the operating status code Note STPA READ and STPA WRITE instructions can be used 64 times in a user program When more than 64 STPA READ and STPA WRITE instructions are used in a user program the excess instructions are not executed and error code 7 is stored in the data register designated as STATUS Applicable CPU Modules FC5A C16R2 C D FC5A C24R2D FC5A C24R2 C FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E FC5A C10R2 C D X X X X Valid Devices Run Access Write Device Function D Constant Repeat DATA First device address to extract data from X X X X X X X X X STATUS Operating status code Sem cmo w de dX SLOT Intelligent module slot number 1 7 ADDRESS First address in intelligent module to write data to SSS eS 0 127 BYTE Bytes of data to write 1 127 For the valid device address range see pages 6 1 and 6 2 Bas
35. X 0 65535 X 32768 0 65535 Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as S2 or D1 16 points are used integer X D double word When a word device such as T timer C counter or D data register is designated as S2 or D1 1 point is used L long F float Data Conversion Error The data conversion error is 0 5 CVYTX Convert Y to X When input is on the Y value designated by device S2 is converted into corre CVYTX Eon Nn sponding X value according to the linear relationship defined in the XYFS instruction Device S1 selects a format from a maximum of 6 all in one CPU or 30 slim CPU XY conversion formats The conversion result is set to the device designated by D1 Applicable 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 Valid Devices Device Function QM T C D Constant Repeat 0 to 5 all in one CPU S1 Source 1 Format number 0 to 29 slim CPU O to 65535 S2 Source 2 Y value X X X X X X X 32768 to 32767 D1 Destination 1 Destination to store results X X X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as 01 When T timer or C counter is us
36. gt lt x gt X x x x x X X Note 1 STPA RAD X Note 1 X DEG SIN COS TAN ASIN ACOS ATAN LOGE LOG10 EXP POW FIFOF FIEX FOEX NDSRC TADD TSUB HTOS STOH X X X X X X X X X X X X X OX PX KX PX PX X X PX x 0X 0X x x x Xx HOUR EMAIL X X Xx x OK OK X OK x OK OK x lt X X X X X X X X X x x x X X X X X X X X X X X X X X x x OK Xx X X X OK X X X X X X XxX X X X X X X X X X x XxX x x Xx x x x x X X Note 2 PING X Note 2 ETXD X Note 2 ERXD Note 2 Ethernet instructions can only be used with FCSA D12K1E and FC5A D12S1E 2 6 FC5A MicroSmart UsER s MANUAL FC9Y B1273 X Note 2 IDEC 2 ADVANCED INSTRUCTIONS Structure of an Advanced Instruction ni Repeat Designation Specifies whether repeat is used for the device or not Destination Device The destination device specifies the 16 or 32 bit data to store the result of the advanced instruction Some advanced instructions require two destination devices Source Device Destination Device Opcode The opcode is a symbol to identify the advanced instruction Repeat Cycles Data Type Specifies the word W integer I doubl
37. 111 0211 111 112 r 022 112 113 023 113 114 r 024 114 gt 115 025 115 Destination Repeat 3 When source data does not comply with the normal floating point format any repeat operation a user program cution error occurs and the source data is not moved to the destination MOV F S1R 11 D10 Repeat Bit Devices DIR D20 REP 3 Source Repeat 3 D10 D11 D12 D13 D14 D15 Destination Repeat 3 15 D20D21 15 Invalid gt 022 023 111 3 44 24 025 3 44 The MOV move instruction moves 16 bit data word or integer data type or 32 bit data double word or integer data type When a bit device such as input output internal relay or shift register is designated as the source or destination device 16 or 32 bits starting with the one designated by S1 or D1 are the target data If a repeat operation is designated for a bit device the target data increases in 16 or 32 bit increments depending on the selected data type Data Word Source Repeat 0 Destination Repeat 3 MOV W S1 DIR REP 110 D10 MO 3 D10 110 gt MO through M7 M10 through M17 011 1
38. CMP gt D S1 52 D1 D8060 5000 Q1 When D8060 D8061 exceeds 5000 Q1 is turned on IOREF immediately writes the output QO internal memory status to actual output QO Each time the interrupt program is completed program execution returns to the main program at the address where timer interrupt occurred 11 12 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 11 PROGRAM BRANCHING INSTRUCTIONS COMRF Communication Refresh The COMRE instruction refreshes the send and receive data in the expansion communication buffers for COMRF port 3 through port 7 in real time The send data in the buffer are usually sent out in the END processing The receive data in the buffer are usually sent to MicroSmart devices in the END processing The COMRF can be used in any place in the lad der diagram where you want to execute the TXD instruction immediately or to update the received data in a period shorter than the scan time Note The COMRF instruction cannot be used in interrupt programs If used a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module This instruction is available on upgraded CPU modules with system program version 110 or higher Applicable CPU Modules FC5A C16R2 C D FC5A C24R2D X X X X FC5A C10R2 C D FC5A C24R2 C FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E Example COMRF The following example demonstrates a program to execute COMRF instructio
39. Note 3 When S1 0 operation mode 0 to 2 1 to 100 3 y 1 to 100 of the maximum frequency of selected mode 51 0 5143 R W RN When 51 0 operation mode 3 10 to 10 000 ms 4 8 designated increments of 10 0 Reversible control disabled S144 Reversible control enable 1 Reversible control single pulse output R W 2 Reversible control dual pulse output RAMP1 only S145 Control direction 0 Forwaig R W 1 Reverse S1 6 Preset value high word 1 to 100 000 000 05F5 E100h R W S1 7 Preset value low word S1 8 Current value high word 1 to 100 000 000 05F5 E100h R S1 9 Current value low word 51410 When S1 0 operation mode 0 to 2 0 to 10 R When S1 0 operation mode 3 or 4 0 to 9 Note 1 Devices for high and low words can be swapped on upgraded CPU modules with system program version 110 or higher See page 5 46 Basic Vol Note 2 The frequency range of mode 3 is from 250 Hz to 100 kHz for FCSA D12K1E FCSA D12S1E Note 3 The frequency range of mode 3 is from 25 to 10 000 x10 Hz for FCSA D12K1E and FC5A D12S1E S140 Operation Mode The value stored in the data register designated by device 51 0 determines the frequency range of the pulse output WM dio 10 Hz to 1 kHz 100 Hz to 10 kHz 1 kHz to 100 kHz 200 Hz to 100 kHz FC5A MicROSMART User s MANUAL FC9Y B1273 13 15 13 PULSE INSTRUCTIONS 1 1 Steady Pulse Frequency When
40. Power Supply Wiring Diagram A recommended power supply wiring diagram is shown below Use a common power switch for both the CPU module power supply and AS Interface power supply to make sure that both power supplies are turned on and off at the same time Slim Type CPU Module AS Interface Master Module FC5A D32K3 FC4A AS62M AC Power Power Switch AS Interface Cable Connector CPU Module Power Supply 24V DC AS Interface Power Switch Note AS Interface Power Supply 30V DC VLSV very low safety voltage Note A failed slave can be replaced with a new slave with address O without turning off the power to the CPU module and the AS Interface line But if power has been turned off before replacing the slaves install a new slave with address 0 and take one of the fol lowing steps because the AS Interface master module has to be initialized to enable communication Disconnect the AS Interface cable connector and turn on both power supplies Five seconds later connect the AS Interface cable connector e Turn on the CPU module power supply first Five seconds later turn on the AS Interface power supply IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 24 7 24 AS INTERFACE MASTER COMMUNICATION Selecting the PLC Type Start WindLDR on a computer 1 From the WindLDR menu bar select Configuration gt PLC Type The PLC Selection dialog box appears 2 Select FCSA D16RX1 3
41. S1 16 32 bit data D1 2 or D1 4 p o1 D1 N 1 or D1 2N 2 Nth 16 32 bit data Source data for repeat set Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat N W N blocks Quantity of blocks to move 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol For the N W 1 word 16 bits is always used without regard to the data type Special internal relays cannot be designated as 01 When T timer or C counter is used as N W or S1 the timer counter current value TC or CC is read out When T timer or C coun ter is used as D1 the data is written in as a preset value TP or CP When F float data type is selected only data register and constant can be designated as S1 and only data register can be designated as D1 When F float data type is selected and S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Make sure that the last destination data determined by D1 N 1 word or integer data type or D1 2N 2 double word long or float data type is within the valid device range If t
42. should be used as required Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X the source or destination 16 points word data type or 32 points double word data type are used I integer When repeat is designated for a bit device the quantity of device bits increases in 16 or 32 point incre D double word X ments L long When a word device such as T timer C counter or D data register is designated as the source or F float destination 1 point word data type or 2 points double word data type are used When repeat is des Example XORW To convert optional output status among a series of 10 output internal relay points 011 010 Q7 00 1 from XORW W S1 52 D1 REP MO Qo 00 ignated for a word device the quantity of device words increases 1 2 point increments points use the XORW instruction in combination with 10 This program will invert the status of the shaded outputs at the left off and those not shaded from off to on Ten outputs QO through 011 are assigned to 10 internal relays MO through M11 Five internal relays MO M2 M4 M6 and M10 are set by ini tialize pulse special internal relay M8120 When input 11 is turned on the XORW instruction is executed to invert the status of o
43. through 100 The output manipulated variable S141 can be calculated by the following equation Output manipulated variable 51 1 Manipulated variable D1 x 10000 where N is the value stored in the output manipulated variable upper limit S1 16 10001 through 10099 If the manipulated variable D1 is greater than or equal to 100 100 multiplied by N 10000 is outputted to the output manipulated variable S141 If D1 is less than or equal to 0 0 is outputted to 51 1 To enable the manipulated variable upper limit turn on the output manipulated variable limit enable control relay S242 When 52 2 is turned off the output manipulated variable upper limit 514 16 has no effect When 51 16 is set to a value 10001 through 10099 the output manipulated variable lower limit 51 17 is disabled 1 17 Output Manipulated Variable Lower Limit The value contained in the data register designated by 51 17 specifies the lower limit of the output manipulated variable S141 Set a required value of through 100 for the output manipulated variable lower limit to the data register desig nated by 51 17 When 51 17 stores a value larger than 100 the output manipulated variable lower limit is set to 100 The output manipulated variable lower limit S1 17 must be smaller than the output manipulated variable upper limit 51 16 To enable the output manipulated variable lower limit turn on the output manipulated variable limit enable
44. 120 ms 100 ms 80 ms 60ms gt 120 ms 100 ms 1 7 20 ms Oms Note While the PID action is in progress operating status S142 is 5X or 6X the sampling period can be changed anytime The sam pling period as well as the integral time S1 8 and derivative time S1 9 has an effect on the calculation of integral manipulated vari able and derivative manipulated variable When the sampling time is changed during PID action the sampling time determined at the start of the PID action is used to calculate the integral manipulated variable and derivative manipulated variable 40 ms 40 ms 20 ms 51 13 Control Period The control period determines the duration of the ON OFF cycle of the control output S246 that is turned on and off according to the output manipulated variable S141 calculated by the PID action or derived from the manual mode out put manipulated variable 51 18 Set a required value of 1 through 500 to specify a control period of 0 1 sec through 50 0 sec to the data register designated by 51 13 When 51 13 stores 0 the control period is set to 0 1 sec When 51 13 is set to a value larger than 500 the control period is set to 50 0 sec The ON pulse duration of the control output S246 is determined by the product of the control period 51 13 and the output manipulated variable S141 Example Control period 5 sec S1 13 is set to 50 Output Manipulated Variable S141 8096 6096 5096 Control Out
45. 2 Install the RS232C communication adapter FC4A PC1 to the port 2 connector on the all in one type CPU module When using any slim type CPU module mount the RS232C communication module FCAA HPC1 next to the slim type CPU module and use the port 2 on the RS232C communication module When using the HMI base module with any slim type CPU module install the RS232C communication adapter FC4A PC1 to the port 2 connector on the HMI base module Connect the MicroSmart CPU module port 2 to a modem using the modem cable 1C FC2A KM1C as shown on page 22 1 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 22 9 22 MODEM MODE Programming WindLDR The Communication page in the Function Area Settings must be programmed to enable the modem communication for port 2 If required communication parameters of the CPU module port 2 can also be changed Since these settings 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 gt Comm Ports The Function Area Settings dialog box for Communication Ports appears 2 In the Communication Mode pull down list for Port 2 select Modem Protocol MicroSmart Function Area Settings Run Stop Control Memory Backup Input Configuration the communication ports Communication Ports Communication Ports Key Matrix Cartridges amp Modules Device Settings Pro
46. 20 CLOCK INSTRUCTIONS HOUR Hour Meter S1 lt gt D1 D2 HOUR S1 D1 D2 D3 RRR While input is the ON duration is measured The measured time value hour minute and second is stored to 3 consecutive data reg isters designated by destination device D1 and compared with the preset value designated by source device S1 When the D1 value reaches the S1 value an output or internal relay designated by destination device D2 is turned on Two data registers starting with destination device D3 are reserved for system work area This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Preset value X 0 65535 D1 Destination 1 Measured input ON duration X D2 Destination 2 Comparison output X D3 Destination 3 System work area X For the valid device address range see pages 6 1 and 6 2 Basic Vol Source device S1 can be designated by a data register or constant Source device S1 when designated by a data register and destination device D1 occupy 3 consecutive data registers starting with the designated device to store hour minute and second da
47. 22 10 Operating Procedure for Modem 22 11 Sample Program for Modem Originate Mode 22 12 Sample Program for Modem Answer 22 13 Troubleshooting in Modem Communication 22 14 Modbus TCP Communication Modbus TCP Communication General 1 23 1 Modbus TCP Master Communication 23 2 Modbus TCP Slave Communication 23 5 Programming the Web Server Module 5 5 51 23 8 Modbus TCP Communication 2 23 9 AS Interface Master Communication About AS Interface 2 7 4 24 1 Operation BaSICS 24 6 Pushbuttons and LED Indicators 24 14 AS Interface 24 18 Using Two AS Interface Master Modules 24 32 Usinge WindlDR 22 555 24 34 SwitchNet Data I O Port AS
48. 51 7 Proportional term When S1 4 control mode 0 or 1 proportional gain 1 to 10000 0 01 to 100 00 0 designates 0 01 210001 designates 100 0096 When S1 4 control mode 2 or 3 proportional band 1 to 10000 0 01 to 100 00 0 designates 0 01 210001 designates 100 00 R W 51 8 Integral time 1 to 65535 0 1 sec to 6553 5 sec O disables integral action R W 51 9 Derivative time 1 to 65535 0 1 sec to 6553 5 sec O disables derivative action R W 1410 Integral start coefficient 51 4150 1 1 to 100 1 to 100 0 or 101 or higher operates as 100 51 415 2 3 10 001 to 10 100 1 to 100 10 000 or lower or 10 101 or higher operates as 100 R W 51411 Input filter coefficient 0 to 99 0 to 99 2100 designates 99 R W 51 12 Sampling period 1 to 10000 0 01 sec to 100 00 sec 0 designates 0 01 sec gt 10001 designates 100 00 sec R W 51 13 Control period 1 to 500 0 1 sec to 50 0 sec 0 designates 0 1 sec gt 501 designates 50 0 sec R W 51 14 High alarm value When S1 4 control mode 0 or 2 disable linear conversion 0 to 4095 gt 4096 designates 4095 0 to 50000 250001 designates 50000 When S1 4 control mode 1 or 3 enable linear conversion Linear conversion min lt High alarm lt Linear conversion max When 51 14 lt 51 6 linear conversion min 51 6 becomes high alarm When 51 14 gt 51 5 linear co
49. 53 OFF OFF ON M8151 M8152 M8150 3 53 lt S2 lt S1 OFF OFF ON ON Small Large 4 S2 51 OFF OFF OFF ON gt 43 2 3 4 5 5 52 gt 51 ON OFF OFF OFF When more than ICMP gt or instruction is used M8150 M8151 or M8152 indicates the result of the instruc tion that was executed last 4 6 FC5A MICROSMART UsER s MANUAL FC9Y B1273 IDEC 4 DATA COMPARISON INSTRUCTIONS Example ICMP gt D10 D11 2 012 gt Q1 goes SOTU ICMP gt W S1 52 S3 D1 D10 011 112 01 When input 10 is turned on data of data registers 010 011 D12 designated by source devices 51 S2 and 53 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 51 S2 S3 D1 M8150 M8151 M8152 M8004 D10 17 gt 011 15 012 15 01 goes OFF OFF OFF OFF D10 15 lt 011 18 lt 012 19 Q1 goes off ON ON OFF ON IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 4 7 4 DATA COMPARISON INSTRUCTIONS LC Load Compare Equal To Data type W or I Data type D L or F 51 52 LC 1 S1 1 52 52 1 This instruction constantly compares 16 32 bit data designated by 51 52 When 51 data is equal to S2 data the output to the following i
50. C counter or D data register is designated as S2 or D1 1 point integer data type is used L long F float Data Conversion Error The data conversion error is 0 5 12 4 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DE Example Linear Conversion 12 COORDINATE CONVERSION INSTRUCTIONS The following example demonstrates setting up two coordinate points to define the linear relationship between X and Y The two points are XO YO 0 0 and X1 Y1 8000 4000 Once these are set there is an X to Y conversion as well as a Y to X conversion 0 CVXTY S1 S2 0 D10 CVYTX S1 S2 0 D11 D1 D20 S1 D21 D11 2500 D20 1000 YO D10 2000 IDEC X1 8000 Y1 4000 X1 Y1 M8120 is the initialize pulse special internal relay At startup XYFS specifies two points When input IO 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 The graph shows the linear relationship that is defined by the two points If the value in data register D10 is 2000 the value assigned to D20 is 1000 For Y to X conversion the following equation is used X 2Y D21 8000 5000 If the value in data register D11 is 2500 the value assigned to D21 is 5000 FC5A 5 User s MANUAL FC9Y B1273 12 5 12 COORDINATE CONVERSION INSTRUCTIONS Example Over
51. CMP gt D 51 52 D1 REP 12 D50 D60 Q2 S1 S2 D50 D51 23456789 060 061 12345678 D50 D51 23456789 060 061 34567890 Data Type Long CMP gt L 51 52 D1 REP D70 D80 Q3 S1 S2 D70 D71 12345678 lt 080 081 12345678 70 071 12345678 lt 80 081 34567890 Data Type Float CMP gt F 51 52 D1 REP 14 D90 D95 Q4 S1 S2 D90 D91 12 4 D95 D96 12 345 D90 D91 1 095 096 0 99 IDEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 D1 gt QO turned on QOturned off D1 gt 01 turned on Q1 turned off D1 02 turned gt _ Q2 turned off D1 gt Q3 turned x Q3 turned off D1 turned on _ 04 turned off 4 3 4 DATA COMPARISON INSTRUCTIONS Repeat Operation in the Data Comparison Instructions The following examples are described using the CMP2 instruction of the word and double word data types Repeat oper ation for all other data comparison instructions and other data types is the same as the following examples New logical OR operation option is added to the CMP instructions when the repeat operation is e
52. Eee E Not available on FC5A 16RK1 RS1 When input is the PWM3 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 sends out output pulses from output 02 PWM3 can be programmed to generate a predetermined number of output pulses When pulse counting is disabled PWM3 generates output pulses while the start input for the PWMG instruction remains on Note PWM1 PWM2 PWM3 instructions can be used only once in a user program When PWM1 PWM2 PWM3 is not used unused output QO Q1 or Q2 can be used for another pulse instruction or ordinary output Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E _ X PWM1 and X X PWM2 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Control register p D1 Destination 1 Status relay S SS Source device 51 control register uses 8 data registers starting with the device designated as 51 Data registers 00 01992 D2000 D7992 and D10000 D49992 can be designated as S1 For details see the following pages Destination device D1 status relay uses 3 internal relays starting with the device designated as D1 Internal relays MO to M2550 can be designated as D1 The least significant digit of the interna
53. PID INSTRUCTION Introduction The PID instruction implements a PID proportional integral and derivative algorithm with built in auto tuning to deter mine PID parameters such as proportional gain integral time derivative time and control action automatically In addi tion advanced auto tuning automatically determines the PID parameters without the need for designating auto tuning parameters PID instruction is primarily designed for use with an analog 1 0 module to read analog input data and turns on and off a designated output to perform PID control in applications such as temperature control described in the application example on page 14 18 In addition the PID instruction also generates an output manipulated variable for analog output module When this device value is moved to an analog output module a voltage 0 to 10V DC or current 4 to 20 mA DC output can be generated Warning e 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 cause the MicroSmart to perform unexpected operation resulting in disorder of the control system damage or accidents e When using the PID instruction for feedback control emergency stop and interlocking circuits must be configured outside the MicroSmart If such a circuit is configured inside the MicroSmart failure of inputting the process variable may cause equipment
54. Repeat 3 SOTU ANDW W 518 S2 D1R REP P sotu 4 2 010 D20 D30 D11 D20 D31 D12 D20 D32 Data Type Double Word When S1 source and 01 destination are designated to repeat different results are set to 3 devices starting with 1 01 1 S1 Repeat 3 S2 Repeat 0 D1 Repeat 3 SOTU ANDW D S1R 2 D1R REP 11 D10 D20 D30 3 D10 D11 D20 D21 C D30 D31 D12 D13 2 020 021 gt D32 D33 D14 D15 D20 D21 C D34 D35 Repeat All Source and Destination Devices Data Word When all devices are designated to repeat different results are set to 3 devices starting with D1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 SOTU ANDW W 518 S2R D1R REP 1 010 D20 D30 3 D10 020 D30 D11 D21 D31 D12 D22 D32 Data Type Double Word When all devices are designated to repeat different results are set to 3 devices starting with 01 01 1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 SOTU ANDW D 518 528 REP 11 D10 D20 D30 3 D10 D11 D20 D21 LM D30 D31 D12 D13 D22 D23 D32 D33 D14 D15 024 025 D34 D35 Note 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 6 4 FC5A Micr
55. Slave 1B M1470 8 high byte Slave 3B Slave 2B M1480 9 low byte Slave 5B Slave 4B M1490 9 high byte Slave 7B Slave 6B M1500 10 low byte Slave 9B Slave 8B M1510 10 high byte Slave 11B Slave 10B M1520 11 low byte Slave 13B Slave 12B M1530 11 high byte Slave 15B Slave 14B M1540 12 low byte Slave 17B Slave 16B M1550 12 high byte Slave 19B Slave 18B M1560 13 low byte Slave 21B Slave 20B M1570 13 high byte Slave 23B Slave 22B M1580 14 low byte Slave 25B Slave 24B M1590 14 high byte Slave 27B Slave 26B M1600 15 low byte Slave 29B Slave 28B M1610 15 high byte Slave 31B Slave 30B Device Address represents the offset from the Device Address designated in the RUNA or STPA instruction dialog box 24 20 FC5A MICROSMART UsER s MANUAL FC9Y B1273 IDEC 24 AS INTERFACE MASTER COMMUNICATION e Digital Output Data Image ODI Device Address Data Format AS Interface Master AS Interface Master 7 6 5 4 3 2 1 0 Module 1 Module 2 DO2 DO1 DOO DO2 DO1 DOO M1620 0 low byte Slave 1 A Slave 0 M1630 0 high byte Slave 3 A Slave 2 A M1640 1 low byte Slave 5 A Slave 4 A M1650 1 high byte Slave 7 A Slave 6 A M1660 2 low byte Slave 9 A Slave 8 A M1670 2 high byte Slave 11 A Slave 10 A M1680 3 low byte Slave 13 A Slave 12 A M1690 3
56. Slave 30B M1612 M1930 M1612 M1930 M1612 Slave 31B M1616 M1934 M1616 M1934 M1616 FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 43 24 AS INTERFACE MASTER COMMUNICATION HW Series continued Selector Key selector Illuminated selector 2 position Illuminated selector 3 position Slave Number 3 position Input DI2 Comm Block 1 2 Input DI2 Output DOO Input DI2 Comm Block 1 2 Output DOO Comm Block 2 Slave 0 M1302 M1302 M1620 M1302 M1620 Slave 1 A M1306 M1306 M1624 M1306 M1624 Slave 2 A M1312 M1312 M1630 M1312 M1630 Slave 3 A M1316 M1316 M1634 M1316 M1634 Slave 4 A M1322 M1322 M1640 M1322 M1640 Slave 5 A M1326 M1326 M1644 M1326 M1644 Slave 6 A M1332 M1332 M1650 M1332 M1650 Slave 7 A M1336 M1336 M1654 M1336 M1654 Slave 8 A M1342 M1342 M1660 M1342 M1660 Slave 9 A M1346 M1346 M1664 M1346 M1664 Slave 10 A M1352 M1352 M1670 M1352 M1670 Slave 11 A M1356 M1356 M1674 M1356 M1674 Slave 12 A M1362 M1362 M1680 M1362 M1680 Slave 13 A M1366 M1366 M1684 M1366 M1684 Slave 14 A M1372 M1372 M1690 M1372 M1690 Slave 15 A M1376 M1376 M1694 M1376 M1694 Slave 16 A M1382 M1382 M1700 M1382 M1700 Slave 17 A M1386 M1386 M1704 M1386 M1704 Slave 18 A M1392 M1392 M1710 M1392 M1710 Slave 19 A M1396 M1396 M1714 M13
57. X X S2 Source 2 Data to shift into the MSB X X X X 1 N B Number of bits in the data string X 1 65535 Bits Quantity of bits to shift 1 15 For the valid device address range see pages 6 1 and 6 2 Basic Vol Since the SFTR instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required IDEC FC5A MicroSmart User s Manual FC9Y B1273 7 3 7 SHIFT ROTATE INSTRUCTIONS Example SFTR Data Word M8120 is the initialize pulse special internal relay MOV W Sl Di 29 D10 When the CPU starts operation the MOV move instruction sets 29 to data register D10 Each time input IO is turned on 16 bit data of data register D10 is shifted to the right by 2 bits as designated by device Bits The last bit status shifted out is set to a carry special internal relay M8003 Zeros are set to the MSB Bits to shift 2 MSB D10 LSB Before shift 020 29 010 0 000 00 0 0 0 0 0 1 1 1 0 1 Shift to the right M8003 mE EE MSB Y D10 LSB After first shift 020 7 10 0 0 000 00 0 0 0
58. X X X X X X X X X Xx x x FC5A MICROSMART USER S MANUAL FC9Y B1273 X X X OK OK OK X OK OK x X X X X X X X OK X X X X X X X X X X X X X X X X X X X Xx Xx x x x X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X x x x x x x Xx IDEC Group Data Conversion Week Programmer Interface User Communication Program Branching Coordinate Conversion Symbol HTOB All in One Type CPU Modules 2 ADVANCED INSTRUCTIONS Slim Type CPU Modules FC5A C10R2 FC5A C10R2C FC5A C10R2D FC5A C16R2 FC5A C16R2C FC5A C16R2D FC5A C24R2 FC5A C24R2C FC5A C24R2D FC5A D16RK1 FC5A D16RS1 FC5A D32K3 FC5A D325S3 FC5A D12K1E FC5A D12S1E X BTOH HTOA ATOH BTOA ATOB ENCO DECO BCNT ALT CVDT DTDV DTCB SWAP WKTIM WKTBL DISP X X X X X X X X X X X X X Xx X X x X X X X X X X X x x x x X X X X X X X X X x x x DGRD TXD1 x x x x x x x x x x x X X Note 1 TXD2 gt lt X TXD3 X Note 2 TXD4 X Note 2 5 X Note 2 TXD6 x x TXD7 X RXD1 X Note 1 RXD2 X RXD3 X Note 2 RXD4 X Note 2 RXD5 X Note 2 RXD6
59. a source S1 or S2 16 points are used integer D double word 1 point is used L long F float Special Internal Relay M8024 BMOV WSFT Executing Flag When a word device such as T timer C counter or D data register is designated as source S1 or S2 While the BMOV or WSFT is executed M8024 turns on When completed M8024 turns off If the CPU is powered down while executing BMOV or WSFT M8024 remains on when the CPU is powered up again Example WSFT SOTU WSFT S1 52 D1 10 D10 3 D100 D100 through D102 D101 through D103 D10 0100 When input 10 is turned on data of 3 data registers starting with D100 des ignated by destination device 01 is shifted to the next data registers Data of data register D10 designated by source device S1 is moved to D100 des ignated by destination device D1 Before shift After first shift D10 12345 D10 12345 D100 1111 100 12345 D101 2222 D101 1111 D102 3333 102 2222 D103 4444 0103 3333 D104 5555 D104 5555 7 7 IDEC FC5A MicroSmart User s Manual FC9Y B1273 7 SHIFT ROTATE INSTRUCTIONS ROTL Rotate Left m When input is 16 or 32 bit data of the designated source device 51 is rotated to the bs left by the quantity of bits d
60. high byte Slave 15 A Slave 14 A M1700 4 low byte Slave 17 A Slave 16 A M1710 4 high byte Slave 19 A Slave 18 A M1720 5 low byte Slave 21 A Slave 20 A M1730 5 high byte Slave 23 A Slave 22 A M1740 6 low byte Slave 25 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 e 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 Slave 15B Slave 14B M1860 12 low byte Slave 17B Slave 16B M1870 12 high byte Slave 19B Slave 18B M1880 13 low byte Slave 21B Slave 20B M1890 13 high byte Slave 23B Slave 22B M1900 14 low byte Slave 25B Slave 24B M1910 14 high byte Slave 27B Slave 26B M1920 15 low byte Slave 29B Slave 28B M1930 15 high byte Slave 31B Slave 30B Device Address represents the offset from the Device Address designated in the RUNA or STPA instruction dialog box Caution Immediately after power up the digital I O data of standard slaves and expansion slaves cannot be accessed Data communication between the CPU module and the connected slaves starts when special internal relay M1945 Normal Operation Active turns on Make sure that M1945 is on before s
61. keep on the start input for the PID instruction e The high alarm output S244 and the low alarm output S245 work while the start input for the PID instruction is on These alarm outputs however do not work when a PID instruction execution error occurs S142 stores 100 or more due to data error in control data registers 51 0 through 51 26 or while the start input for the PID instruction is off Provide a program to monitor the process variable S4 separately e When PID execution error occurs S142 stores 100 or more or when auto tuning is completed the manipulated variable D1 stores and the control output 52 6 turns off e Do not use the PID instruction in program branching instructions LABEL LCAL LRET JMP JEND MCS MCR The PID instruction may not operate correctly in these instructions PID instruction using the difference between the set point 53 and process variable 54 as input calculates the manipulated variable D1 according to the PID parameters such as proportional term S147 integral time S148 and derivative time S149 When the set point S3 or process variable S4 is changed due to disturbance overshoot or undershoot will be caused Before put ting the PID control into actual application perform simulation tests by changing the set point and process variable disturbance to anticipated values in the application e The PID parameters such as proportional term S177 in
62. see page 7 28 Basic Vol Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as DATA 16 points are used When a word device such as T timer C counter or D data register is designated as DATA 1 point is used integer X D double word L long F float IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 16 5 16 INTELLIGENT MODULE ACCESS INSTRUCTIONS Intelligent Module Access Status Code The data register designated as STATUS stores a status code to indicate the operating status and error of the intelligent module access operation When status code 1 3 or 7 is stored take a corrective measure as described in the table below Status Status Description RUNA STPA Code 0 Normal Intelligent module access is normal X X The intelligent module is not installed correctly 1 Bus error Power down the MicroSmart modules and re install the intelligent X X module correctly The designated module number is not found Confirm the intelligent module number and correct the program More than 64 STPA READ and STPA WRITE instructions are used Elim 7 Excessive multiple usage X 8 inate the excess instructions 3 Invalid module number STPA Execution during Program Download When downloading a user program the CPU module is automatically stopped as default Depending on the timi
63. the output manipulated variable S141 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 S141 becomes less susceptible to an external noise or a change in the set point but stability is adversely affected during normal operation Set a required derivative gain of O through 100 to the data register designated by 1 26 before executing auto tuning Recommended values are 2096 through 3096 when the process variable fluctuates or is subject to noise Source Device S2 Control Relay Turn on or off appropriate outputs or internal relays starting with the device designated by S2 before executing the PID instruction as required Devices S244 through 52 7 are for read only to reflect the PID and auto tuning statuses Device Function Description R W ON Direct trol acti 52 0 Control action Lcd p R W OFF Reverse control action ON Manual mode S241 Aut d R W uto manual mod OFF Auto mode 5242 Output manipulated ON Enable output manipulated variable upper and lower limits S1 16 and 51 17 R W variable limit enable OFF Disable output manipulated variable upper and lower limits 51 16 and 51 17 5243 Integral start coefficient ON Disable integral start coefficient S1 10 R W disable OFF Enable integral start coefficient S1 10 ON When process variable 51 0 gt high alarm value 51 14 52 4 High alarm output R P OFF
64. 0 PID action is not executed Device Designations by Operation Mode 5143 The following table summarizes devices which have to be designated for each operation mode When auto tuning is used several devices are automatically determined and do not have to be designated 0 1 2 3 4 Op ration Mode 5143 PID action AT auto tuning 2 Advanced 51 7 Proportional term Designate Auto Auto Auto Auto S148 Integral time Designate Auto Auto Auto Auto S149 Derivative time Designate Auto Auto Auto Auto 51 12 Sampling period Designate Designate Auto 51 13 Control period Designate Designate Auto Auto S1 19 AT sampling period Designate Designate Auto Auto 51 20 AT control period Designate Designate Auto Auto 1421 AT set point Designate Designate Auto Designate 51 22 AT output manipulated variable Designate Designate Auto Auto 52 0 Control action Designate Auto Auto Auto Auto While the PID action is in progress operating status S141 is 5X or 6X these values can be changed for fine tuning Be careful improper changes may result in undesired operation S144 Control Mode Linear Conversion and Proportional Term The control mode designates whether to disable or enable the linear conversion and whether the proportional term uses the proportional gain or proportional band Control Mode S144 Linear Conversion Proportional Ter
65. 0 0 0 0 1 1 1 0 M8003 EE MSB Y D10 LSB After second shift 020 1 0 10 1010 10 0 0 0110 0 0 0 010 011 111 M8003 e Data Type Double Word M8120 is the initialize pulse special internal relay MOV W S1 D1 REP M8120 65535 D10 When the CPU starts operation the MOV move instruc tions set 65535 and data registers D10 and D11 respec MOV W S1 D1 REP tively 0 D11 Each time input IO is turned on 32 bit data of data registers D10 and D11 is shifted to the right by 1 bit as designated by device Bit D10 is the low word and D11 is the high word The last bit status shifted out is set to a carry special internal relay M8003 Ones are set to the MSB Bits to shift 1 Before shift 52 MSB D11 D10 LSB 1 0 0 0 0 0 0 00 0 00 0 0 0 0 0 1 1 1 1 1 11 1 1 111 1 1 1 1 Shift to the right M8003 After shift MSB D11 D10 D11 D10 LSB CY 1 0 0 0 0 0 0 0 0 00 0 0 000 0 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 8003 7 4 FC5A MicroSmart User s Manual 9 1273 IDE BCDLS BCD Left Shift H BCDLS S1 S2 When 52 1 digits to shift Before shift 0 1 2 3 4 5 Shi
66. 0 0 1 Record 0 D102 through D104 D10 D11 D12 D10 D11 D12 Record 1 D105 through D107 D20 021 022 D20 021 022 Record 2 D108 through D110 Record 3 D111 through D113 19 4 FC5A MICROSMART UsER s MANUAL FC9Y B1273 IDEC 19 FiLE DATA PROCESSING INSTRUCTIONS NDSRC N Data Search When input is a value specified by device 51 is sought Data NDSRC 51 S2 53 D1 ters are searched starting with the data register designated by p device S2 Device S3 specifies the quantity of 1 word or 2 word blocks of data registers to search depending on the data type The offset of the data register where a match first occurred is stored in data register designated by device D1 The quantity of times the value was matched is stored in the next data register When the search results in no match 65535 is stored in device D1 and O is stored in device D 1 This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Value to be sought uM Se X ex S2 Source 2 First data register number to search on S3 Source 3 Quantity of blocks to search mv X D1 Destination 1 Search
67. 0 DO 010 020 Source 1 Source 2 Destination 1 DO D19 K 059 Tow D11 RE m TR D2 012 DAE Secondi When the result exceeds 23 59 59 the resultant hour data is subtracted by 24 turning on special internal relay M8003 carry Source 1 Source 2 Destination 1 15 10 2 DO Hour D10 Hour D20 Hour 50 20 11 D1 Minute D11 Minute D21 Minute 40 30 10 D2 Second D12 Second D22 Second e Mode 1 SOTU TADD S1 S2 D1 10 1 08008 D100 D200 Source 1 Destination 1 7 7 D8008 Year D200 Year 8 8 D8009 Month 0201 Month 23 23 D8010 Day D202 Day 4 4 D8011 Not D203 of w Note D of W 10 10 20 D8012 Hour D100 Hour D204 Hour 20 15 35 D8013 Minute D101 Minute D205 Minute 30 25 55 D8014 Second D102 Second D206 Second 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 stored to D203 of destination 1 IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 20 3 20 CLOCK INSTRUCTIONS When the result exceeds 23 59 59 the resultant
68. 1 to 247 Response Time 1 5 ms 1 to 5000 ms in increments of 1 ms Receive Timeout 3 10 to 2550 ms in increments of 10 ms Special Internal Relay 8005 M8080 Communication error Communication completion relay Special Data Register D8053 D8054 Error code Transmission wait time in increments of 1 ms Applicable Function Code 1 Select the values from WindLDR gt Function Area Settings gt Communication 01 02 03 04 05 06 15 16 Read Coil Status Read Input Status Read Holding Registers Read Input Registers Force Single Coil Preset Single Register Force Multiple Coils Preset Multiple Registers 2 Special data register D8054 for Modbus communication transmission wait time x1 ms is used to set the response time 0 desig nates 1 ms and 5000 or more designates 5000 ms 3 When timeout occurs the MicroSmart discards the received data and waits for the first frame of the next valid communication Communication Completion and Communication Error Modbus TCP communication finishes when a read or write process is completed successfully or when a communication error occurs Immediately after a request communication has been completed Modbus communication completion relay M8080 turns on for 1 scan time When a communication 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
69. 17 7 sine 17 6 tangent 17 8 ASCII to BCD 8 12 to hex 8 7 ASI commands 24 30 ASIN 17 6 AS Interface 24 1 bus cycle time 24 5 topology 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 7 backup duration clock cartridge 9 8 basic instructions 1 1 BCD left shift 7 5 to ASCII 8 9 to hex 8 3 BCDLS 7 5 BCNT 8 17 binary arithmetic instructions 5 1 bit count 8 17 block move 3 9 BMOV 3 9 BMOV WSFT executing flag M8024 3 9 7 7 Boolean computation instructions 6 1 BTOA 8 9 BTOH 8 3 busy signal 25 11 cable 24 3 25 2 25 3 25 6 25 7 25 11 AS Interface 24 3 computer link 4C 24 6 25 2 25 6 expansion communication RS232C 25 2 RS485 25 3 modem 1C 22 1 RS232C 21 1 calendar clock setting using auser program 9 6 WindLDR 9 6 carry and borrow 5 17 or borrow signals 5 2 CDI 24 27 changing FC5A MicroSmart User s Manual FC9Y B1273 ZIDEC 1 1 code of slave 24 29 clock adjusting using a user program 9 7 cartridge adjusting accuracy 9 8 backup duration 9 8 enable adjustment 9 8 instructions 20 1 CMP lt 4 1 CMP lt 4 1 CMP lt gt 4 1 CMP 4 1 CMP g
70. 1X AT in progress AT is normal 2X AT completed 5X PID action in progress PID action is normal 6X PID set point S3 is reached Status code changes from 5X to 6X once the PID set point is reached 14 4 FC5A MICROSMART UstER s MANUAL FC9Y B1273 1 DEC 14 PID INSTRUCTION Status Code Description Operation 100 The operation mode 5143 is set to a value over 4 101 The control mode S1 4 is set to a value over 3 102 When the linear conversion is enabled S1 4 to 1 or 3 the linear conversion maximum value S1 5 and the linear conversion minimum value S1 6 are set to the same value 103 The output manipulated variable upper limit S1 16 is set to a value smaller than the output manipulated variable lower limit 51 17 When the linear conversion is enabled S144 set to 1 or 3 the AT set point S1 21 is set to a value 104 larger than the linear conversion maximum value S145 or smaller than the linear conversion mini mum value 51 6 When the linear conversion is disabled S144 set to O or 2 the AT set point S1 21 is set to a value 103 larger than 4095 or 50000 depending on the analog I O module type When the linear conversion is enabled 51 4 set to 1 or 3 the set point S3 is set to a value larger AT is 106 than the linear conversion maximum value 1 5 or smaller than the linear conversion minimum stopped because of value S1 6 incorrect parameter set 107 When
71. 2 10 The frequency change rate S1 3 is larger than the difference between the initial pulse frequency 51 2 and the steady pulse frequency 51 1 Reduce the frequency change rate 51 3 or the initial pulse frequency 51 2 13 18 FC5A MICROSMART UstER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Destination Device D1 Status Relay Four internal relays starting with the device designated by 01 indicate the status of the RAMP instruction These devices are for read only Device Function Description R W 0 Pulse output OFF D1 0 Pulse output ON 1 Pulse output ON R 01 1 Pulse output complete 0 Pulse output not complete R 1 Pulse output complete D1 2 Pulse output status steady pulse output R 1 Changing output pulse frequency D1 3 Pulse output overflow 0 Overflow nat occurreg R 1 Overflow occurred D1 0 Pulse Output ON The internal relay designated by device D1 0 remains on while the RAMP instruction generates output pulses When the start input for the RAMP instruction is turned off or when the RAMP instruction has completed generating a predeter mined 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 RAMP instruction has completed generating a predeter mined number of output pulses or when the RAMP instruction is stopped to generate output pulses When the start input
72. 25 4 and 25 5 2 Connect the printer to communication port 3 through port 7 on the expansion RS232C communication module For terminal arrangement and wiring diagram see page 2 89 Basic Vol 3 From the WindLDR menu bar select Configuration gt Comm Ports The Function Area Settings dialog box for Communication Ports appears IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 25 9 25 EXPANSION RS232C RS485 COMMUNICATION 4 Inthe Communication Mode pull down list for Port 3 through Port 7 select User Protocol MicroSmart Function Area Settings Run Stop Control Memory Backup Input Configuration Contiouethe communication ports Communication Ports Communication Ports Key Matrix Cartridges amp Modules Device Settings Program Protection Self Diagnostic Communication Mode Comm Param Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol 7 Configure 9600 7 Even 1 Configure 9600 7 1 Configure 9600 7 Even 1 Configure 9600 7 Even 1 Configure 9600 7 Even 1 In END Processing 10 ms Mode Selection Input Network No Default 5 The Communication Parameters dialog box appears Change settings to meet the communication parameters of the remote device See the user s manual for the remote device User Protocol Po Baud Rate bps Data Bits Parity Stop Bits Receive T
73. 3 is from 250 Hz to 100 kHz for FCSA D12K1E FC5A D12S1E Note 3 The frequency range of mode 3 is from 25 to 10 000 x10 Hz for FCSA D12K1E and FC5A D12S1E 51 0 Operation Mode The value stored in the data register designated by device 51 0 determines the frequency range of the pulse output 10 Hz to 1 kHz 100 Hz to 10 kHz 1 kHz to 100 kHz 200 Hz to 100 kHz S141 Output Pulse Frequency When 51 0 is set to through 2 the value stored in the data register designated by device S141 specifies the frequency of the pulse output in percent of the maximum of the frequency range selected by 51 0 Valid values for device S141 are 1 through 100 thus the output pulse frequency can be 10 Hz to 1 kHz operation mode 0 100 Hz to 10 kHz operation mode 1 or 1 kHz to 100 kHz operation mode 2 When 51 0 is set to 200 Hz to 100 kHz valid values for device S141 are 20 through 10 000 and the 51 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 output frequency error is 596 maximum Operation Mode S140 Output Pulse Frequency Hz 0to2 1 to 100 Maximum frequency selected by 51 0 x 51 1 value 96 3 20 to 10 000 51 1 value x 10 S142 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 device
74. 6 For the specifications of the clock cartridge see page 2 95 Basic Vol WKTIM Week Timer H When input is on the WKTIM compares the S1 and S2 preset data WKTIM 51 52 53 D1 with the current day and time MODE Fo When the current day and time reach the presets output or inter nal relay designated by device 01 is turned on depending on the week table output control designated by MODE Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat MODE Week table output control 0 2 S1 Source 1 Day of week comparison data X 0 127 S2 Source 2 Hour minute comparison data to turn on SS X 0 2359 S3 Source 3 Hour minute comparison data to turn off X 0 2359 D1 Destination 1 Comparison ON output X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 MODE Week table output control 0 through 2 0 Disable the week table When the current day and time reach the presets for S1 S2 and S3 the designated output or internal relay is turned on or turned off Set 0 for MODE when the WKTBL is not used the WKTBL inst
75. 7 From the WindLDR menu bar select Online gt Download The Download dialog box appears Download Transfer Mode Binary _ ASCII Download Options F Automatic start after download Keep output during download 7 Suspend 1 0 force before download Automatic device clear after download Write device datafile to the PLC after download Setting E Download comment data Setting Program Information Program Size bytes Comment Size bytes Total bytes Communication Settings 8 8 Click the OK button 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 connected to the expansion RS232C RS485 communication module 11 From the WindLDR menu bar select Online gt Monitor gt Monitor The monitor screen appears and you can monitor the MicroSmart operating statuses and change device values n DE FC5A MICROSMART UsER s MANUAL 9 1273 25 5 25 EXPANSION RS232C RS485 COMMUNICATION Operator Interface Communication Using the expansion RS232C RS485 communication module the MicroSmart can communicate with IDEC s
76. 7 3 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 1 1 1 BASIC INSTRUCTIONS REFERENCE Symbol Name Function See Page Basic LODN Load Not Stores intermediate results and reads inverted contact status Vol 7 3 Basic MCR Master Control Reset Ends a master control Vol 7 28 Basic MCS Master Control Set Starts a master control Vol 7 28 OR Or Parallel connection of NO contact pasic Vol 7 5 C Basic OR LOD Or Load Parallel connection of circuit blocks Vol 7 6 ORN Or Not Parallel connection of NC contact Vol 7 5 Basic OUT Output Outputs the result of bit logical operation Vol 7 3 OUTN Output Not Outputs the inverted result of bit logical operation Vol 7 3 Basic RST Reset Resets output internal relay or shift register bit Vol 7 4 Basic SET Set Sets output internal relay or shift register bit Vol 7 4 SFR Shift Register Forward shift register Vol 7 23 SFRN Shift Register Not Reverse shift register Basic 5 E Vol 7 23 i 2 SOTD Single Output Down Falling edge differentiation output Vol 7 27 SOTU Single Output U Rising edge differentiation output Basic ES AUTRU P BM Vol 7 27 Basic TIM 100 ms Timer Subtracting 100 ms timer 0 to 6553 5 sec Vol 7 8 TIMO 100 ms Off delay Timer Subtracting 100 ms off delay timer 0 to 6553 5 sec ues 7 TMH 10 m
77. C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM T C D Constant Repeat Mode Selection of S1 data range 0 1 S1 Source 1 Date time data to subtract from X S2 Source 2 Time data to subtract X D1 Destination 1 Destination to store results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When Mode O is selected source devices S1 and S2 and destination device D1 occupy 3 consecutive data registers starting with the designated device Data registers 00 01997 D2000 D7997 and D10000 D49997 be designated as these devices When Mode 1 is selected source device S1 and destination device D1 occupy 7 consecutive data registers starting with the designated device Data registers 00 01993 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 00 01997 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 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 20 5 20 CLOCK INSTRUCTIONS Mode 0 When mode 0 is selected time data hour minute and second stored in 3 data registers st
78. CONVERSION INSTRUCTIONS Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as int x the source 16 points word or integer data type or 32 points double word or long data type are used integer d When a word device such as T timer C counter or D data register is designated as the source 1 D double word X point word or integer data type or 2 points double word long or float data type are used L long X F float X Example AVRG The following example demonstrates a program to calculate average values of the data register D100 and store the result to data register D200 in every 500 scans AVRG W S1 S2 S3 D1 D2 M8125 is the in operation output special internal relay M8125 D100 110 500 D200 M100 When the sampling end input does not turn on While sampling end input 110 is off the average maximum and minimum values are calculated in every 500 scans and stored to data registers D200 D201 and D202 respectively Sampling completion output M100 is set every 500 scans 1stscan i 2ndscan 500thscan 156 2ndscan Sampling Data D100 In operation Special IR M8125 is Sampling End Input 110 off ON Sampling Completion Output M100 Average Value D200 500 Maximum Value D201 530 Minimum Value D202 480 Values are set every 500 scans 1 When the sampling end input turns on When sampling e
79. Cable Connection and Pinouts FC5A SIF4 Expansion RS485 Communication Module FC5A SIFA Terminal Shield Expansion RS232C RS485 Communication Module Communication Parameter Range Parameter Optional Range Default Communication Mode Maintenance communication Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 115200 Note 9600 Data Bits 7 8 7 Parity Even Odd None Even Stop Bits 10 2 1 Receive Timeout ms k pee 0 is selected 200 Network Number Oto 31 0 Mode Selection Input Any input number Disabled Note To use 57600 or 115200 bps the CPU modules with system program version 220 or higher and FC5A SIF2 version 200 or higher or FC5A SIF4 are required Notes e When downloading or uploading the user program set the transfer mode to ASCII To download or upload the user program CPU modules with system program version 220 or higher and FC5A SIF4 are required e Run Time Program Download cannot be used on port through port 7 IDEC FC5A MicROSMART User s MANUAL FC9Y B1273 25 3 25 EXPANSION RS232C RS485 COMMUNICATION Computer Link Communication through the Expansion RS232C RS485 Communication Module To perform the computer link communication using the expansion RS232C RS485 communication module a user pro gram has to be downloaded through port 1 or 2 in the 1 1 computer link system as shown on page 25 2 After download ing the user program to the CPU mod
80. Click OK to save changes and return to the ladder editing screen Function Area Settings Selection OpenNet FC4A C10R2X FC4A C16R2X FC4A C24R2X FC4A D20X3 FC4A D20RX1 Configure FC4A D40X3 FCSA C1O0R2X FCSA C16R2X FCSA C24R2 ECSA DI6RXI FCSA D32X3 Use as Default Default FC5A D16RX1 Use of the AS Interface master module must be selected in the Function Area Settings dialog box 1 From the WindLDR menu bar select Configuration gt Cartridges amp Modules The Function Area Settings dialog box for Cartridges amp Modules appears MicroSmart Function Area Settines Run Stop Control Memory Backup Input Configuration Communication Ports Key Matrix Device Settings Program Protection Self Diagnostic Cartridges amp Modules Configure the cartridges and expansion modules Clock Cartridge Use Clock Cartridge E Enable Clock Cartridge Adjustment Memory Cartridge 7 Enable Memory Cartridge Download AS Interface Use AS Interface Master Module Default 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 FCSA D12K1E or 01251 is selected under PLC Selection the check box is not displayed because this setting is permanently enabled Since this setting relates to the user program download the user program to the CPU module after chan
81. Clock Data Calendar Clock Data Write When M8020 is turned on data in data registers D8015 through D8021 calendar clock Flag new data are set to the clock cartridge installed on the CPU module This example demonstrates how to set calendar clock data using a ladder program After storing new calendar clock data into data registers D8015 through D8021 special internal relay M8020 calendar clock data write flag must be turned on to set the new calendar clock data to the clock cartridge MOV W S1 0 D1 DO REP M8120 MOV W 51 Di 10 D1 MOV W 51 Di 10 D2 MOV W Si Di 2 D3 MOV W 51 Di 9 D4 MOV W 51 Di 30 05 MOV W 51 Di 0 D6 MOV W S1R DO DIR D8015 REP 4 S1R D4 DIR D8019 REP 3 MOV W MO M1 S1R D8008 DIR D10 REP 7 MOV W M8125 Adjusting Clock Using a User Program M8120 is the initialize pulse special internal relay When the CPU starts seven MOV W instructions store calendar clock data to data registers DO through D6 When input 10 is turned on new calendar data year month day and day of week are moved to data registers D8015 through D8018 and internal relay MO is turned on for 1 scan time When input 11 is turned on new clock data hour minute and second are moved to data registers D8019 through D8021
82. Code Description 1 An error was found on the expansion 1 0 bus 7 e The AS Interface master module is in local mode 8 e Attempt was made to change the parameters of a slave which did not exist FC5A MICROSMART User s MANUAL FC9Y B1273 24 37 24 AS INTERFACE MASTER COMMUNICATION Error Messages When an error is returned from the AS Interface master module WindLDR will display an error message The error codes and their meanings are given below Configure AS Interface Master o AS Interface Master Error 8 Error Code Description 1 An error was found on the expansion 1 0 bus While the AS Interface master module was in offline mode attempt was made to perform auto config 2 uration or manual configuration An incorrect command was sent While slave address existed on the bus attempt was made to perform auto configuration or manual 7 configuration The AS Interface master module is in local mode The slave you are trying to change does not exist A slave of the designated new address already exists e While a standard slave was set at A address attempt was made to set an slave at B address of the 8 same number e While slave was set at B address attempt was made to set a standard slave at A address of the same number e Attempt was made to change the parameters of a slave which did not exist When a reply message is not returned from the AS Interface
83. D1 can be designated to repeat individually or in com bination When destination device D1 is not designated to repeat the final result is set to destination device D1 and D1 1 When repeat is designated consecutive devices as many as the repeat cycles starting with the designated device are used Since the repeat operation works similarly on the word and integer data types the following examples are described using the word data type Repeat One Source Device When only S1 source is designated to repeat the final result is set to destination device D1 D1 1 Data Type Word and Integer S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 a g Ws om eon D11 x D20 030 031 012 020 D30 D31 Data Type Double Word Long and Float S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 MUL D SIR S2 Di REP 0122013 x D20 D231 D30 D31 014 015 x 20 021 030 031 Repeat Destination Device Only When only 01 destination is designated to repeat the same result is set to 3 devices starting with D1 D141 Data Type Word and Integer S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 Hu ee em RS ES wp v D10 x D20 LI D32 D33 D10 x D20 gt D34 D35 Data Type Double Word Long and Float S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 MUL D 51 S2 REP 01001 D20D21 032 033 D10 D11 D20D21 D34 D35 Repeat Two Source Devices When 51
84. D10 030 3 D10 D11 D20 D21 030 031 D12 D13 D22 D23 D30 D31 D14 D15 D24 D25 030 031 Quotient Repeat Source and Destination Devices Data Type Word and Integer When S1 source and 01 destination are designated to repeat different results are set to 6 devices starting with D1 S1 Repeat 3 S2 Repeat 0 D1 Repeat 3 DIV W 51 52 DIR REP H FUR tel 010 D20 D30 033 D11 D20 031 D34 D12 D20 gt 032 D35 Quotient Remainder Data Type Double Word and Long When S1 source and 01 destination are designated to repeat different results are set to 6 devices starting with 01 01 1 51 Repeat 3 52 Repeat 0 D1 Repeat 3 P dai dE M AE NE i D10 D11 020 021 D30 D31 D36 D37 D12 D13 20021 gt 032 033 D38 D39 D14 D15 D20 D21 gt D34D35 D40 D41 Quotient Remainder Data Type Float When S1 source and 01 destination are designated to repeat different results are set to 3 devices starting with D1 D1 1 S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 sotu H DIV F 518 S2 REP 1 D10 030 3 D10 D11 20 021 030 031 D12 D13 D20 D21 D32 D33 D14 D15 D20 D21 L D34 D35 Quotient IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 11 5 Binary Arithmetic Instructions Repeat All Source and Destination Devices Data Type Word and Integer When all devices are designated to repeat different results are set
85. D141 ua S142 EA Dira ka 1 3 Note D1 3 SU i023 n pas 23 stesi shal easy Divs oras S146 ree S242 docui D1 6 pon Note Device S143 in source 1 is not used for execution and need not be designated Source 1 data is compatible with leap 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 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 stored to device D1 3 Day of week data represent 0 Sunday 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday and 6 Saturday When source 1 contains invalid day time data a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module When the execution result is less than 00 year 1 month 1 day 00 00 00 a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module 20 6 FC5A MIcROSMART USER s MANUAL FC9Y B1273 I DEC Examples TSUB The following examples demonstrate the TSUB instruction to subtract time data in two different modes Mode 0 SOTU TSUB S1 52 D1 10 0 DO D10 D20
86. DO D1 D2 Source 1 20 Hour 30 Minute 40 Second D10 D11 D12 Source 2 10 Hour 10 Minute 5 Second D20 D21 D22 20 CLOCK INSTRUCTIONS Destination 1 10 Hour 20 Minute 35 Second When the result is less than 00 00 00 the resultant hour data is added with 24 turning on special internal relay M8003 borrow DO D1 D2 Mode 1 Source 1 8 Hour 10 Minute 5 Second D10 D11 D12 SOTU TSUB S1 52 D1 10 1 D8008 D100 D200 D8008 D8009 D8010 D8011 D8012 D8013 D8014 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 stored to D203 of destination 1 IDEC Source 1 7 Year 8 Month 23 Day 4 D of W 10 Hour 20 Minute 30 Second Note FC5A MicROSMART UsER s MANUAL FC9Y B1273 D100 D101 D102 Source 2 10 Hour 30 Minute 30 Second Source 2 5 Hour 15 Minute 25 Second D20 D21 D22 D200 D201 D202 D203 D204 D205 D
87. Data Types W word X When a bit device such as 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 integer D double word X L long F float When a word device such as T timer C counter or D data register is designated as the source or destination 1 point word data type or 2 points double word data type are used 8 12 FC5A MicroSmart User s Manual FC9Y B1273 I DEC Examples ATOB W Quantity of Digits 5 sotu H ATOB W 651 S2 D1 D10 5 D20 D10 D11 D12 D13 D14 Quantity of Digits 4 H ATOB W 651 52 D1 1 D10 4 D20 D10 D11 D12 D13 Quantity of Digits 3 soru H ATOB W 651 52 D1 010 3 D20 D10 D11 D12 Quantity of Digits 2 sotu H ATOB W 51 52 D1 010 2 D20 D10 011 Quantity of Digits 1 sotu H ATOB W 651 52 D1 010 1 020 D10 IDEC FC5A MicroSmart User s Manual FC9Y B1273 ASCII 49 0031h 50 0032h 51 0033h 52 0034h 53 0035h ASCII 49 0031h 50 0032h 51 0033h 52 0034h ASCII 49 0031h 50 0032h 51 0033h ASCII 49 0031h 50 0032h ASCII 49
88. Devices Device Function I QM R T C D Constant Repeat S1 Source 1 First device address to move X X X X X 1 99 D1 Destination 1 First device address to move to X X X X X 1 99 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 be designated as D1 Special internal relays cannot be designated as D1 Source device can be both internal relays MO through M2557 and special 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 register can be designated as D1 When F float data type is selected and S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X the source or destination 16 points word or integer data type or 32 points double word or long data I integer X type are used When repeat is designated for a bit device the quantity of dev
89. Di REP 11 010 020 D30 010 011 4 554 x D20D21 1 414 30 031 6 439356 Note Since the destination uses two word devices in the multiplication operation data register D1999 cannot be used as destination device 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 5 4 FC5A MicroSmart User s Manual FC9Y B1273 IDE 5 Binary Arithmetic Instructions Examples DIV Data Type Word DIVW Si S2 Di REP 010 50 D20 7 030 7 p31 1 12 D10 D20 D30 Quotient Remainder When input I2 is on data of D10 is divided by data of D20 The quotient is set to D30 and the remainder is set to D31 Note Since the destination uses two word devices in the division operation of word data type data register D1999 cannot be used as destination device D1 When using a bit device such as internal relay for destination 32 internal relays are required so M2521 larger number cannot be used as destination device D1 Data Type Integer H DIV I 61 S2 D1 REP D10 50 20 7 D30 7 D31 1 12 D10 D20 D30 Quotient Remainder Note Since the destination
90. Edit Tag Name Device Address Comment OK Cancel 22 12 FC5A MicroSmart UsER s MANUAL FC9Y B1273 DE Sample Program for Modem Answer Mode 22 MODEM MODE This program demonstrates a user program for the modem answer mode to move a value to a data register assigned to the modem mode and initialize the modem While the telephone line is connected user communication instruction RXD2 is executed to receive an incoming communication M8120 MOV W S1 1 D1 D8103 REP M8120 D1 M8077 MO D2 DO 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 is on while telephone line is connected RXD2 receives incoming communication and stores received data to data registers starting with D10 The RXD2 instruction is programmed using WindLDR with parameters shown below Source S1 Data register D10 No conversion 2 digits Repeat 10 RXD Receive 51 lt 00010 2 10 gt Tag Name Device Address Comment Insert Delete Edit OK Cancel Variable Data Register DR No 00010 Im Conversion Type 7 ASCII to BIN 00
91. F ID1 7 3 Click the slave address 00 to open the Change Slave Address dialog box for slave 0 To assign slave address 1 to the slave enter 1 in the New Address field and click OK Configure AS Interface Master Yellow Shade SEES Master Module No 1 2 2 Close Click slave address 0 to open the Change Slave Address dialog box Auto Configuration Manual Configuration Chanee Slave Address Switch Slave File Open File Save Data Structure of CDI PCD 10 10 102 101 Current Address Slave New Address Slave A Slave B OK Cancel CDI Configuration Data Image PCD Permanent Configuration Data The new address 01 is shaded with yellow to indicate that the address assignment is complete Slave A Configure AS Interface Master Master Module No Yellow Shade 2 4 When changing slave addresses on other slaves continue from step 3 if Close it is possible to wire the slave with TENE Auto Configuration out turning off power or from step 1 if the CPU module is shut down oes contests Switch Slave File Open File Save Data Structure of CDI PCD 10 10 102 101 n DE FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 9 24 AS INTERFACE MASTER COMMUNICATION Configuring a Slave Next you have to set the slave configuration in the AS Interface master module either by using pushbuttons PB1 and PB2 on the AS Interf
92. FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol When the data designated by source device S1 is less than or equal to or does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the LOG10 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example LOG10 D10 and D11 designated by source device S1 is stored to data registers D20 and When input 11 is the common logarithm of the binary data of data registers SOTU LOG10 F 51 D10 D20 f aes D21 designated by destination device D1 10810 0 0000278 4 555955 S1 D1 D10 D11 0 0000278 20 021 4 555955 18 2 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 18 LOGARITHM POWER INSTRUCTIONS EXP Exponent
93. Function I QM T C D Constant Repeat S1 Source 1 Base address to move from X X X X X 1 1 99 52 2 Offset for 51 X X X X X X X 0 65535 D1 Destination 1 Base address to move to X X X 1 99 D2 Destination 2 Offset for D1 X X X X X X X 0 65535 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 be designated as D1 Special internal relays cannot be designated as 01 When T timer or C counter is used as S2 or D2 the timer counter current TC or CC value is read out Make sure that the last source data determined by 51 52 and the last destination data determined by D1 D2 are within the valid device range If the derived source or destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Either source device S2 or destination device D2 does not have to be designated If S2 or D2 is not designated the source or destina tion device is determined by S1 or D1 without offset Examples IBMVN C5 Source device 51 destination device D1 determine the type of device Source device 52 and destination device D2 are the offset values to determine the source and destination devices If the value of data register D10 designated by source device
94. HG series operator interfaces To connect the HG series operator interface to the expansion RS232C RS485 communication mod ule use a communication cable prepared by the user For details about the communication settings and specifications see the HG series operator interface user s manual System Setup Example Expansion RS232C Communication Module CPU Module FCSA SIF2 To Port 1 RS232C T Ii el Computer Link Cable 4C FC2A KC4C 3m 9 84 ft long 2 E HG series Operator Interface E F To Port 3 RS232C 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 Note Run User programs cannot be downloaded and uploaded through the expansion RS232C communication module HG2G HG1F HG2F HG3F HG4F HG2S Applicable Operator Interfaces HG series operator interfaces applicable to port 1 through port 7 can be used Cable Connection and Pinouts RS232C HG series Operator Interface FC5A SIF2 Pin HG3G HG2G HG3G Description Terminal A Connector Terminal Block 7 Shield 25 6 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 25 EXPANSION RS232C RS485 COMMUNICATION Cable Connection and Pinouts RS485 FC5A SIFA Shield
95. ID2 Code ID1 Code D1844 Slave 0 D1845 Slave 1 A D1846 Slave 2 A D 1844 N Slave N A D1875 Slave 31 A D1876 unused D1877 Slave 1B D 1876 N Slave NB D1907 Slave 31B Parameter Image PI For AS Interface master module 1 data registers 01908 through 01923 are allocated to read the PI of each slave The PI is made up of four parameters the P3 P2 P1 and PO The Pl is the current slave parameter 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 data for program execution Device Address Data Format AS Interface Master AS Interface Master Bits 15 to 12 Bits 11 to 8 Bits 7 to 4 Bits 3 to 0 Module 1 Module 2 P3 P2 P1 PO P3 P2 P1 PO P3 P2 P1 PO P3 P2 P1 PO D1908 Slave 3 A Slave 2 A Slave 1 A Slave 0 D1909 Slave 7 A Slave 6 A Slave 5 A Slave 4 A D1910 Slave 11 A Slave 10 A Slave 9 A Slave 8 A D 1908 N 4 Slave N 3 A Slave N 2 A Slave N 1 A Slave N A D1915 Slave 31 A Slave 30 A Slave 29 A Slave 28 A D1916 Slave 3B Slave 2B Slave 1B unused D1917 Slave 7B Slave 6B Slave 5B
96. IR Status Description 8057 AT Cotnmand Execution command is in execution start IR is on OFF AT command is not in execution completion or failure IR is on ON Command mode M8067 Operational State OFF Online mode ON Telephone line connected Note M8077 OFF Telephone line disconnected Note While M8077 line connection is off the MicroSmart cannot send and receive maintenance communication and user communi cation through port 2 When M8077 is turned on maintenance communication or user communication is enabled depending on the value stored in data register D8103 online mode protocol selection 22 2 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 22 MODEM MODE Special Data Registers for Modem Mode Special data registers D8103 and D8109 D8199 are allocated to the modem mode When the MicroSmart starts to run D8109 and D8110 store the default values and D8145 D8169 store the default initialization string Data Register Stored Data Description The D8103 value selects the protocol for the RS232C port 2 after telephone line is con i nected D8103 Online Mode Protocol Selection 0 other than 1 Maintenance protocol 1 User protocol The D8109 value selects how many retries will be made until the operation initiated by Retry Cycles a start internal relay M8050 M8056 is completed D8109 default 3 0 No retry 1 65535 Executes a specified number
97. Interface Master Module 1 24 39 Expansion RS232C RS485 Communication Allocating Communication Port Number 25 1 Computer Link 25 2 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC TABLE OF CONTENTS Operator Interface 25 6 User COMMUNICATION 4 25 9 Troubleshootirig 25 13 NDEX IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 TABLE OF CONTENTS vi FC5A MiCROSMART UsER s MANUAL FC9Y B1273 IDEC 1 BASIC INSTRUCTIONS REFERENCE Introduction This chapter describes the list of basic instructions and brief description of each instruction For detail about each basic instruction see the corresponding page in 5 User s Manual Basic Volume FC9Y B1268 Basic Instruction List Symbol Name Function See Page AND And Series connection of NO contact Basle Vol 7 5 eee Basic AND LOD And Load Series connection of circuit blocks Vol 7 6 Basic ANDN And Not Series connection of NC contact Vol 7 5 BPP Bit Pop Restores the result of bit logical operation which was saved tempo Basic rarily Vol 7 7 A 3 Basic BPS Bit Push Saves the r
98. Interface Master Module 2 The following example demonstrates to assign AS Interface objects to internal relays using the RUNA instruction Digital inputs IDI digital outputs ODI and status information are read to and written from internal relays Although not included in the sample program analog inputs and analog outputs can also be assigned to data registers using RUNA or STPA instructions Like AS Interface master module 1 other AS Interface objects can be accessed using the Configure AS Interface Master dialog box on WindLDR such as the list of active slaves LAS list of detected slaves LDS list of peripheral fault slaves LPF list of projected slaves LPS configuration data image CDI permanent configuration data PCD parameter image and permanent parameter PP Programming Procedure 1 Determine the AS Interface objects to access and the MicroSmart devices to assign the AS Interface objects AS Interface Master Module 2 AS Interface Master Module EEPROM Read Write MicroSmart Device Device Address Data Size bytes AS Interface Object 0 32 R M200 to M517 Digital input IDI 3 32 Ww M520 to M837 Digital output ODI 2 6 R M840 to M897 Status information 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 modul
99. Interface is a network system that is compatible with the IEC62026 standard and is not proprietary to any one manufacturer A master device can communicate with slave devices such as sensors actuators and remote 1 05 using digital and analog signals transmitted over the AS Interface bus The AS Interface system is comprised of the following three major components e One master such as the MicroSmart AS Interface master module FC4A AS62M e One or more slave devices such as sensors actuators switches and indicators e Dedicated 30V DC AS Interface power supply 26 5 to 31 6V DC These components are connected using a two core cable for both data transmission and AS Interface power supply 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 slaves when connected directly to the AS Interface bus via a branch unit or a T junction unit Sensors Actuators Not Compatible with AS Interface Conventional sensors and actuators that are not compatible with the AS Interface can also be connected to the AS Inter face bus using a remote I O slave and be handled in the same way as devices that are compatible with th
100. Master dialog box The screen display of the Configure AS Interface Master dialog box can be updated using Refresh If you save the configuration data to a file you can open the file to configure other AS Interface master modules using the same data To save and open the configuration file click File Save or File Open If the configuration command is not processed correctly the error message AS Interface Master Error and an error code will appear See page 24 38 If the error message Configuration failure Confirm the slave setup and perform configuration again is shown and the FLT LED is on then remove the cause of the error referring to page 24 13 and repeat configuration The configuration cannot be done in the following cases Error Code Description 1 An error was found on the expansion 1 bus While the AS Interface master module was in offline mode attempt was made to execute auto configu 2 ration or manual configuration While slave address existed on the bus attempt was made to execute auto configuration or manual 7 configuration e The AS Interface master module is in local mode 24 36 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC Monitor AS Interface Slave 24 AS INTERFACE MASTER COMMUNICATION While the MicroSmart is communicating with AS Interface slaves through the AS Interface bus operating status of AS Interface slaves can be monitored using WindLDR on a computer Outp
101. Modbus TCP Master Request Table Port 2 appears The Modbus TCP Master Request Table Port 2 can also be opened by clicking the Configure button for Port 2 MODBUS TGP Master Client Request Table Port2 Request Execution Device Error Status Import Export Master Slave Number Req Execution Function Code Device Address Data Size WordjBit Oto 247 Slave Address Device Error Status n DE FC5A MICROSMART USER s MANUAL 9 1273 23 3 23 TCP COMMUNICATION 3 Click the Communication Settings button The Communication Settings dialog box appears Change settings if required Communication Settines Baud Rate bps Parity Stop Bit Retry Cycle Receive Timeout 10ms Baud Rate bps 9600 19200 38400 57600 Parity Even Odd None Stop Bits 10r2 Retry Cycle 1to 10 Receive Timeout 1 to 255 x10 ms Select the same values set for the web server module FC4A 5 5 51 4 Click the button to return to the Modbus TCP Master Request Table Port 2 Designate requests under the Function Code A maximum of 2040 requests can be entered in one request table Choose to use Request Execution Device and Error Status data registers When using Request Execution Device and Error Status data registers enter the first number of the devices MODBUS TCP Master Client Request Table Port2 Request Execution Device 2
102. ORW 6 1 output data 24 39 24 40 LEDs 24 16 points 10 1 10 3 overlapping coordinates 12 6 parameter 24 4 image 24 28 PCD 24 28 peripheral fault slaves LPF 24 26 Periphery_OK 24 25 permanent configuration data PCD 24 28 parameter PP 24 29 Pl 24 28 PID control 14 1 instruction 14 1 notes for using 14 17 pinout 22 1 PLC status monitoring 21 3 POW 18 4 DE FC5A MiCROSMART UsER s MANUAL 9 1273 V INDEX vi power 18 4 supply 24 7 AS Interface 24 3 wiring 24 7 PP 24 29 preparations for using modem 22 9 printer 25 11 process variable before conversion 14 16 processing time 24 18 24 30 profile 24 27 analog slave 24 22 program branching instructions 11 1 using with SOTU SOTD instructions 11 2 using with timer instruction 11 2 programming clock cartridge accuracy using WindLDR 9 8 computer link using WindLDR 21 2 data registers and internal relays 22 9 DI or El using WindLDR 11 7 Modbus TCP master using WindLDR 23 3 slave using WindLDR 23 7 modem mode using WindLDR 22 10 special data register 25 11 projected slaves LPS 24 27 protected mode 24 15 PULS1 13 2 PULS2 13 2 PULS3 13 2 pulse instructions 13 1 output 13 2 width modulation 13 8 pushbutton operation 24 14 pushbuttons and LED indicators 24 14 PWM1 13 8 PWM2 13 8 PWM3 13 8 quantities of slaves and I O points 24 5 RAD 17 1 radian 17 1 ramp control 13 14 RAMP1 13 14 RAMP2 13 14 random 5 19 reading time digital switch d
103. Operation Mode The value stored in the data register designated by device S142 determines the frequency range of the low frequency creep pulse output 0 10Hzto 1 kHz 1 100 Hz 10 kHz 2 1kHzto 100 kHz 3 200 Hz to 100 kHz IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 27 13 PULSE INSTRUCTIONS 1 3 Creep Pulse Frequency When S142 is set to 0 through 2 the value stored in the data register designated by device 51 3 specifies the frequency of the creep pulse output in percent of the maximum of the frequency range selected by S142 Valid values for device 5133 are 1 through 100 thus the initial pulse frequency can be 10 Hz to 1 kHz operation mode 0 100 Hz to 10 kHz operation mode 1 or 1 kHz to 100 kHz operation mode 2 When S142 is set to 3 200 Hz to 100 kHz valid values for device S143 are 20 through 10 000 in increments of 10 and the 5143 value multiplied by 10 determines the creep pulse frequency thus the creep pulse frequency can be set in incre ments of 10 Hz The pulse frequency error is 5 maximum Creep Operation Mode S142 Creep Pulse Frequency Hz 0to2 1 to 100 Maximum frequency selected by S142 x 5143 value 96 3 20 to 10 000 S143 value 10 1 4 Error Status When the start input for the ZRN instruction is turned on device values are checked When any error is found in the device values the data register designated by device S144 stores an error code Error Code Description 0 No
104. Repeat S1 Source 1 Arc sine value to convert into radian c X X D1 Destination 1 Destination to store conversion results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When the data designated by source device S1 is not within the range between 1 0 and 1 0 or does not comply with the normal float ing point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the ASIN 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example ASIN When input I1 is turned on the arc sine of the value of data registers D10 and sotu ASIN F B E D11 designated by source device S1 is stored to data registers D20 and D21 designated by destination device D1 asin 0 7071069 0 7853982 rad 0 7853982 rad 7 4 rad S1 D1 10 011 0 7071069 20 021 0 7853982 17 6 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DE ACOS Arc Cosine E Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D 17 TRIGON
105. S1 60 D1 D1 REP S1 DO D1 M100 M8120 is the initialize pulse special internal relay When the CPU starts PWMST macro designates parameters for pulse output in the first stage When input 10 is off D1 pulse width ratio stores 30 30 When input IO is on D1 pulse width ratio stores 60 60 When input 11 is PWM2 generates output pulses of a 30 or 60 pulse width ratio from output Q1 depending whether input IO is off or on respectively n DE FC5A MicROSMART UsER s MANUAL FC9Y B1273 13 13 13 PULSE INSTRUCTIONS RAMP1 Ramp Control 1 When input is on the RAMP1 instruction sends out a predetermined number of output 7 oo pulses from output QO 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 selected for accelera tion and deceleration of the movement When input is off the pulse output remains off When input is turned on again the 1 instruction starts a new cycle of generating output pulses RAMP1 can also be used for reversible control to generate a control direction output or reverse output pulse from output Q1 Note The RAMP1 instruction
106. S2 is 8 the M37 M30 M27 M20 source data is determined by adding the offset to internal relay M20 des ignated by source device 51 AZ x XJ XJ XJ WU XJ XJ RJ NOT Ggth from M20 If the current value of counter C5 designated by destination device D2 is 10 the destination is determined by adding the offset to output Q10 des ignated by destination device D1 YYY WV WY WV Y W W W 10th from Q10 Q27 Q22 Q20 Q17 Q10 As a result when input IO is on the ON OFF status of internal relay M30 is inverted and moved to output Q22 3 12 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 3 MOVE INSTRUCTIONS NSET N Data Set 51 52 53 Sn gt D1 D2 D3 Dn NSET S1 S2 Sn D1 RR 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 pro gram version 200 or higher N blocks of 16 32 bit data N blocks of 16 32 bit data First 16 32 bit data First 16 32 bit data Second 16 32 bit data Second 16 32 bit data Third 16 32 bit data Third 16 32 bit data N Data Set D1 1 or D1 2 lin 01 2 or D1 4 pe SE Nth 16 32 bit data D1 N 1 D1 2N 2 Nth 16 32 bit data Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16R
107. 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 pee cu sl S1 D1 pee cu sl D100 Source 1 2 Hour Destination 1 10 7840 D1 Minute m D100 D101 Second DO 40 D2 Second Source 1 40 Hour Destination 1 30 145820 D1 Minute D100 D101 Second DO 20 D2 Second IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 20 9 20 CLOCK INSTRUCTIONS STOH Sec to HMS Seconds Hours minutes seconds S1 D1 dokcekok When input is on time data in seconds designated by source device S1 is converted into hours minutes and seconds The result is stored to destination device D1 This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Time data in seconds X X D1 Destination 1 Destination to store results X For the valid device address range see pages 6 1 and 6 2 Basic
108. Slave 25B M1586 M1586 M1904 M1586 M1904 Slave 26B M1592 M1592 M1910 M1592 M1910 Slave 27B M1596 M1596 M1914 M1596 M1914 Slave 28B M1602 M1602 M1920 M1602 M1920 Slave 29B M1606 M1606 M1924 M1606 M1924 Slave 30B M1612 M1612 M1930 M1612 M1930 Slave 31B M1616 M1616 M1934 M1616 M1934 Note Three position selector key selector and illuminated selector switches use two communication blocks therefore require two slave addresses For the communication block mounting position see page 24 40 24 44 FC5A MICROSMART USER S MANUAL FC9Y B1273 IDEC 25 EXPANSION RS232C RS485 COMMUNICATION Introduction This chapter describes communication examples using the FCbA SIF2 expansion RS232C communication module and FC5A SIF4 expansion 5485 communication module For specifications of the expansion RS232C RS485 communication modules see page 2 86 Basic Vol Applicable CPU Modules FC5A C16R2 C D FC5A C24R2D 3 Note 5 5 5 FC5A C10R2 C D FC5A C24R2 C FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E CPU module system program version 110 or higher is required to use the FC5A SIF2 expansion RS232C communication module CPU module system program version 220 or higher is required to use the FCSA SIF4 expansion RS485 communication module The system program version can be confirmed using WindLDR See page 13 2 Basic Vol When the CPU module system program version is lower than the required version you can download the latest syst
109. Slave 6B Slave 5B Slave 4B D 1932 N 4 Slave N 3 B Slave N 2 B Slave N 1 B Slave NB D1939 Slave 31B Slave 30B Slave 29B Slave 28B Changing ID1 Code of Slave 0 For AS Interface master module 1 data register D1940 is allocated to read and write the ID1 code of slave 0 To change the slave O ID1 settings store a required value in D1940 and execute the ASI command Write Slave O ID1 The ASI com mand Read Slave 0 101 can be used to read slave 0 ID1 data to data register 01940 After changing the slave 0 101 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 IDEC AS Interface Master Module 2 Bits 15 to 12 Bits 11 to 8 FC5A MicROSMART USER s MANUAL FC9Y B1273 Bits 7 to 4 Bits to 0 ID1 code 24 29 24 AS INTERFACE MASTER COMMUNICATION ASI Commands AS Interface Master Module 1 The ASI commands are used to update AS Interface devices in the CPU module or to control the AS Interface master module 1 Data registers D1941 through D1944 are used to store command data D1945 is used to store a request code before executing the command While the command is executed D1945 stores status and result codes ASI Command Format Command Part 8 bytes Request Result D1941 D1942 D1943 D1944 D1945 ASI Command Data To execute an ASI comman
110. TCP Master Communication Using WindLDR Modbus TCP master communication settings and request tables for Modbus slave stations can be programmed using the WindLDR Function Area Settings Since these settings 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 gt Comm Ports The Function Area Settings dialog box for Communication Ports appears 2 Inthe Communication Mode pull down list for Port 2 select Modbus TCP Master Client MicroSmart Function Area Settings Run Stop Control Upp Conf iow the communication Ports Memory Backup Input Configuration Communication Ports Communication Ports Port Communication Mode Comm Param Mode Selection Input Network No Key Matrix Maintenance Protocol Configure 9600 7 Even 1 Cartridges amp Modules Maintenance Protocol w Configure 9600 7 Even 1 i Maintenance Protocol 7 T Device Settings User Protocol 56000508 0 0 0 Program Protection Modem Protocol Configure 9600 7 Even 1 0 0 0 0 Data Link Master f ae Self Diagnostic Data Link Slave Configure 9600 7 Even 1 Modbus ASCII Slave Configure 9600 7 Even 1 Modbus RTU Slave Modbus ASCII Master Configure 9600 7 Even 1 Modbus RTU Master EE Master Client MODBUS TCP Slave Server In END Processing Every 10 ms Default The
111. 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 MODBUS TCP Slave Server Port2 Baud Rate bps Data Bits Parity Stop Bits Receive Timeout ms Slave Number Baud Rate bps 9600 19200 38400 57600 Cancel Default 4 Click the OK button to return to the Communication tab page 5 Click the OK button to save changes 6 Download the user program to the CPU module Parity Even Odd None Stop Bits 10r2 Receive Timeout 1 to 5000 ms Slave Number 1to 247 Now programming for the Modbus TCP slave is complete Parameters and valid values are the same as Modbus slave communication For details see pages 12 15 through 12 22 Basic Vol FC5A MICROSMART USER s MANUAL FC9Y B1273 23 7 23 TCP COMMUNICATION Programming the Web Server Module FC4A SX5ES1E For details about 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 E Web Server Unit Settings Home Configuration Network Serial Ports Security Alarms Administration Backup Restore Restore Factory Defaults System Information Reboot PLC Moni
112. Tag for LIMP and LCAL 0 127 0 255 LJMP Label Jump When input is on jump to the address with label O through 127 all in one type CPU or 0 to 255 H LIMP 2 1 slim type CPU designated by 51 When input is off no jump takes place and program execution proceeds with the next instruc tion The instruction is used as an either or choice between two portions of a program Pro gram execution does not return to the instruction following the LJMP instruction after the pro gram branch Applicable 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 Valid Devices Device Function QM R T C D Constant Repeat S1 Source 1 Label number to jump to X 0 127 0 255 For the valid device address range see pages 6 1 and 6 2 Basic Vol Since the LJMP instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Note Make sure that a LABEL instruction of the label number used for a LIMP instruction is programmed When designating S1 using other than a constant the value for the label is a variable When using a variable for a label make sure that all probable LABEL num bers 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 I
113. Use Unuse Error Status 2 Use Unuse Import Export Function Code jos Read Holding Registers 02 Read Input Status 15 Force Multiple Coils 01 Read Coil Status Master Device Address D0000 D0100 D0200 D0300 Slave Number Data Size Word Bit 0 to 247 14 Word 32 Bit 4 Bit 4 Bit Execution Slave Address Device Error Status 400001 100001 000001 000001 Communication Settings Notes for Editing the Request Table Request execution devices and error status data registers are allocated in the order of 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 Request Table Port 2 is complete click the OK button to save changes 6 Download the user program to the CPU module Now programming for the Modbus TCP master is complete Parameters and valid values are the same as Modbus master communication For details see pages 12 7 through 12 9 Basic Vol 23 4 FC5A MICROSMART UstR s MANUAL FC9Y B1273 23 TCP COMMUNICATION Modbus TCP Slave Communication WindLDR Function Area Settings are used to c
114. User s Manual FC9Y B1273 IDEC TABLE OF CONTENTS 1 2 3 Cuaprer 4 Cuaprer 5 Basic Instructions Reference 1 1 Advanced Instructions Advanced Instruction 5 2 2 1 Advanced Instruction Applicable CPU Modules 2 4 Structure of an Advanced Instruction 2 7 Input Condition for Advanced Instructions 2 7 Source and Destination 2 7 Using Timer or Counter as Source Device 2 7 Using Timer or Counter as Destination Device 2 7 Data Types for Advanced Instructions Integer Type 2 8 Discontinuity of Device 2 10 No Operation 2 2 10 Move Instructions MOV Move 2 2 2 24 4 2 2 24 2 2 22 2 4 3 1 MOVN Move Not 222 2 2 2 24 4 4 4 2 2 22 22 2 2 2 ees 3 5 IMOV Indirect MOVE cesses teansa aene rne onera lee rea Oa Rr a Rt
115. When process variable S1 0 lt high alarm value S1 14 ON When process variable S1 0 lt low alarm value S1 15 S245 Low alarm output R p OFF When process variable S140 gt low alarm value S1 15 S246 Control output Goes on and off according to the AT parameters or PID calculation results R 52 7 complete output Goes on when AT is complete or failed and remains on until reset R 14 14 FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC 14 PID INSTRUCTION 2 0 Control Action When auto tuning is executed with the operation mode S143 set to 1 AT PID 2 AT 3 advanced AT PID or 4 advanced AT the control action is determined automatically When auto tuning results in a direct control action the control action control relay designated by 52 0 is turned on When auto tuning results in a reverse control action the control action control relay designated by 52 0 is turned off The PID action is executed according to the derived control action which remains in effect during the PID action Process Variable S140 When auto tuning is not executed with the operation mode A S1 3 set to 0 PID turn on or off the control action control relay S2 0 to select a direct or reverse control action respec tively before executing the PID instruction Direct Control Action In the direct control action the manipulated variable D1 is increased while the process variable S140 is larger than the Set Point 53 s
116. X X X X X X Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Sampling data X X X X S2 Source 2 Sampling end input X X X X S3 Source 3 Sampling cycles scan times X X X X X X X 0 65535 D1 Destination 1 First device address to store results X D2 Destination 2 Sampling completion output X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D2 Special internal relays cannot be designated as D2 When T timer or C counter is used as S1 or S3 the timer counter current value TC or CC is read out When F float data type is selected only data registers can be designated as S1 and D1 While input is on the AVRG instruction is executed in each scan When the quantity of sampling cycles scan times designated by device S3 is 1 through 65535 sampling data designated by device S1 is processed in each scan When the designated sampling cycles have been completed the average value of the sampling data is set to device designated D1 data type W or I or D1 D1 1 data type D L or F The maximum value of the sampling data is set to the next device D1 1 data type W or I or D1 2 D1 3 data type D L or F The minimum value of the sampling data is set to the next device D1 2 data type W or I or 01 4 01 5 data type D L or The sampl
117. a timer instruction DTML 1 sec Dual Timer While input is on destination device D1 repeats to turn on and off DEME ae D1 22 for a duration designated devices 51 52 respectively The time range is 0 through 65535 sec DTIM 100 ms Dual Timer While input is on destination device D1 repeats to turn on and off DHM 51 32 pz for a duration designated by devices S1 and S2 respectively time range is 0 through 6553 5 sec DTMH 10 ms Dual Timer zi z DE 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 655 35 sec DTMS 1 ms Dual Timer for a duration designated by devices S1 and S2 respectively While input is destination device D1 repeats to turn and off DTMS S1 2 D1 D2 The time range is 0 through 65 535 sec Applicable 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 IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 15 1 15 DUAL TEACHING TIMER INSTRUCTIONS Valid Devices Device S1 Source 1 Function ON duration Constant S2 Source 2 OFF duration D Bos X 0 65535 X 0 65535 D1 Destina
118. address range see pages 6 1 and 6 2 Basic Vol When the conversion result is not within the range between 3 402823 10 and 1 175495 x 10 8 or between 1 175495 x 10 and 3 402823 x 103 special internal relay M8003 carry or borrow is turned on except when the conversion result is 0 When the conver sion result is between 1 175495 x 1038 and 1 175495 x 10 the destination device designated by D1 stores 0 Not Zero Overflow Overflow M8003 1 1 Execution Result 3 402823 103 1 175495x10 0 175495x10 3 402823 1038 When the data designated by 51 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example RAD RADE e D1 When input 11 is turned on the degree value of data registers D10 and D11 SOTU F D10 D20 designated by source device S1 is converted into a radian value and stored to 11 data registers 020 021 designated by destination device 01 270 x 1 180 4 712389 rad S1 D1 D10 D11 270 0
119. and ERR LED on the CPU module Since the TAN 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example TAN S T When input 11 is turned on the tangent of the radian value of data registers SOTU F D10 D20 D10 and D11 designated by source device S1 is stored to data registers D20 and 1 D21 designated by destination device D1 3 926991 rad 57 4 rad tan 57 4 1 000001 S1 D1 D10 D11 3 926991 D20 D21 1 000001 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 17 5 17 TRIGONOMETRIC FUNCTION INSTRUCTIONS ASIN Arc Sine asin 51 51 1 01 01 1 rad pus sl Di pus sl KEK 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 51 51 1 value must be within the following range 1 0 51 51 1 lt 1 0 If the 51 51 1 value is not within this range an indefinite value is stored to 01 01 1 Applicable 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 Valid Devices Device Function I QM T C D Constant
120. and S1 or D1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X EM the source or destination 16 points word integer data type 32 points double word long or I integer X float data type are used When repeat is designated for a bit device the quantity of device bits D double word X increases in 16 or 32 point increments L long X When a word device such as T timer C counter or D data register is designated as the source or F float X destination 1 point word or integer data type or 2 points double word long or float data type are used When repeat is designated for a word device the quantity of device words increases in 1 or 2 point increments IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 19 8 DATA CONVERSION INSTRUCTIONS Examples CVDT Data Type Either S1 or 01 is not float Unless F float data type is selected for both source and destination only the integral number is moved omitting the fraction SOTU CVDT S1 D1 REP Device Data Type Value FTOW DO D2 Source F 3 141593 Destination When input IO is turned on 3 is stored to data register D2 S1 D1 DO Di 314193 gt b2 __ 3
121. and internal relay 1 is turned on for 1 scan time When either MO or M1 is turned on calendar clock data write flag spe cial internal relay M8020 is turned on to set the new calendar clock data to the clock cartridge M8125 is the in operation output special internal relay While the CPU is running the MOV W moves current calendar clock data to data registers D10 through 016 Special internal relay M8021 clock data adjust flag is provided for adjusting the clock data When M8021 is turned on the clock is adjusted with respect to seconds If seconds are between 0 and 29 for current time adjustment for seconds will be set to O and minutes remain the same If seconds are between 30 and 59 for current time adjustment for seconds will be set to O and minutes are incremented one M8021 is useful for precise timing which starts at zero seconds Example Adjusting Calendar Clock Data to 0 Seconds When input I2 is turned on clock data adjust flag special internal relay M8021 is turned on and the SOTU Q clock is adjusted with respect to seconds 12 M8021 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 9 7 9 WEEK PROGRAMMER INSTRUCTIONS Adjusting Clock Cartridge Accuracy The optional clock cartridge FC4A PT1 has an initial monthly error of 2 minutes at 25 C The accuracy of the clock car tridge can be improved to 30 seconds using Enable Clock Cartridge Adjustment in the Function Area Settings Before starting the clock cartr
122. and output Q1 high alarm light is turned off When D761 analog input operating status stores 3 or more internal relay M11 is turned on WindLDR has a macro to program parameters for analog 1 0 modules Place the cursor where to insert the ANST instruc tion click the right mouse button and select Macro Instructions ANST Set Analog Module Parameters In the ANST dia log box press the Configure button under Slot 1 and program as shown below ANST Set Analog Module Parameters Analog Module Configure Select the slots where to mount analog I O modules and press the Configure button CPU module Slot 1 Slot 2 E Slot 3 Configure Type FC4A LOSAP1 Type FC5A C24R2X DR Allocation Configure Parameters 00760 00779 DR Allocation Data IN CHO D0760 IN CH1 D0766 OUT CHO D0772 Type FC4A LO3AP1 Channel Signal Type Slot 4 PK Device Address Device Range Data Type in i Data Status IN CHO Status IN CH1 Type K Binary data OUT CH0 Oto 10V DC Binary data 4095 D0760 00761 4095 00766 00767 4095 00772 00773 Binary data IN CHO D0761 IN CH1 D0767 OUT 00773 Cancel 14 20 FC5A MicroSmart UsER s MANUAL FC9Y B1273 14 PID INSTRUCTION Set PID Parameters PIDST Dialog Box Place the cursor where to
123. and shift registers and input of single outputs SOTU and SOTD are maintained dur ing the jump if required Hold the input off for one or more scan cycles after the jump for the rising or falling edge transi tion to be recognized Although normally the SOTU instruction produces a pulse for one scan when used in a program branch the SOTU pulse will last only until the next time the same SOTU So Q1 Internal instruction is executed Memory OFF In the example on the left the program branch will loop as long as internal relay MO remains on However the SOTU produces a pulse output only during the first loop Q1 Output OFF END END Since the END instruction is not executed as long as MO remains on output Q1 is not turned on even if input I1 is on 11 2 FC5A MICROSMART UstER s MANUAL FC9Y B1273 I DEC 11 PROGRAM BRANCHING INSTRUCTIONS LCAL Label Call When input is on the address with label 0 through 127 all in one type CPU or 0 to 255 slim LCAL EUN 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 at the end of a program branch which is called so that normal program execution resumes by returning to the instruction following the LCAL instruction Note The END inst
124. any place in the ladder diagram where you want to read the updated high speed counter current value For the high speed counter function see page 5 7 Basic Vol Applicable 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 Example HSCRF The following example demonstrates a program to update the current value of high speed counter HSC1 using the HSCRF instruction For the timer interrupt see page 5 36 Basic Vol MOV W S1 Di M8120 is the initialize pulse special internal relay 0 08036 08036 stores 0 to designate jump destination label 0 for timer rupt The interrupt program is separated from the main program by the ad While the CPU is running program execution jumps to label 0 repeat 0 edly at intervals selected in the Function Area Settings M8125 is the in operation output special internal relay HSCRF updates the HSC1 current value in data registers D8210 and D8211 CMP D S1 52 D1 D8210 150000 Q1 When D8210 D8211 exceeds 150000 Q1 is turned on IOREF immediately writes the output QO internal memory status to actual output QO Each time the interrupt program is completed program execution returns to the main program at the address where timer interrupt occurred IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 11 11 11 PROGRAM BRANCHING INSTRUCTIONS FRQRF Frequency Measurement Refresh When input is
125. can be used only once in a user program When RAMP1 is used with reversible control disabled unused output Q1 can be used for another pulse instruction PULS2 PWM2 or ZRN2 or ordinary output RAMP2 Ramp Control 2 When input is on the RAMP2 instruction sends out a predetermined number of output iid pur RM pulses from output Q2 The output frequency changes in a trapezoidal pattern deter mined by source device S1 After starting the RAMP2 instruction the output pulse fre quency increases linearly to a predetermined constant value remains constant at this Not available on FCSA 16RK1 RS1 value for some time and then decreases linearly to the original value The frequency change rate or the frequency change time can be selected for accelera tion and deceleration of the movement When input is off the pulse output remains off When input is turned on again the RAMP2 instruction starts a new cycle of generating output pulses RAMP2 can not be used for reversible control Note The RAMP2 instruction can be used only once in a user program Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E E X RAMP1 X X Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Control register ELS es d D1 Destination 1 Status relay UE Source device S1 control register uses 11 data registers starting with the device des
126. compares the S1 S2 and S3 preset data with the current day and time When the current day and time reach the presets an output designated by device D1 is turned on and off WKTIM S1 S2 S3 Di M8125 is the in operation output special internal relay M8125 0 62 830 1715 Q0 S1 62 specifies Monday through Friday The WKTIM turns on output QO at 8 30 and turns off output QO at 17 15 on Monday through Friday e With Additional Days the Week Table MODE 1 When the current time reaches the hour minute preset time on the special days programmed in the WKTBL the desig nated output is turned on or turned off In addition the designated output is turned on and off every week as designated by device S1 of WKTIM In normal execution when the current day and time coincide with the preset day S1 and time S2 or S3 of the WKTIM the designated output is turned on or off Execution on the special days has precedence over execution on normal days This example demonstrates operation on special days in addition to regular weekends The 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 Em M8120 is the initialize pulse special internal relay M8120 1231 S2 101 S3 102 54 103 WKTBL designates Dec 31 to Jan 3 as special days MODE 1 adds special days WKTIM S1 S2 S3 D1 81
127. control relay S2 2 and set the output manipulated variable upper limit S1 16 to a value other than 10001 through 10099 When the manipulated variable D1 is smaller than or equal to the specified lower limit the lower limit value is outputted to the output manipulated variable S141 When the output manipulated variable limit enable control relay S2 2 is turned off the output manipulated variable lower limit S1 17 has no effect bl 1 DE FC5A MicROSMART User s MANUAL FC9Y B1273 14 11 14 PID INSTRUCTION 1 18 Manual Mode Output Manipulated Variable The manual mode output manipulated variable specifies the output manipulated variable 0 through 100 for manual mode Set a required value of 0 through 100 for the manual mode output manipulated variable to the data register desig nated by 51 18 When 51 18 stores a value larger than 100 the manual mode output manipulated variable is set to 100 To enable the manual mode turn on the auto manual mode control relay S241 While in manual mode the PID action is disabled The specified value of the manual mode output manipulated variable S1 18 is outputted to the output manipulated variable S11 and the output manipulated variable for analog output module 51 24 The control output S246 is turned on and off according to the control period 51 13 and the manual mode output manipulated variable 51 18 The 51 18 value has effect on the manipulated value 01 and the outp
128. damage or accidents PID PID Control When input is on auto tuning and or PID action is executed PID S1 52 53 54 D1 Adde Gauss according to the value 0 through 4 stored in a data register device assigned for operation mode PID PID Control Type PID PID Control Tag Name Device Address Module Type Comment 0 4095 Data Type Integer I Module 0 4095 FC44 L0341 FC4A LO3AP1 FC4A J2A1 FC4A K1A1 OK 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 FCSA C10R2 C D 1682 0 FC5A C24R2 C D 5 168 1 851 FC5A D32K3 S3 FC5A D12K1E S1E ES X 32 X 56 X 56 X 56 n DE FC5A MicROSMART UsER s MANUAL FC9Y B1273 14 1 14 PID INSTRUCTION Valid Devices Device Function 1 Q M R T D Constant DO D7973 S1 Source 1 Control register D10000 D49973 S2 Source 2 Control relay 00 0620 0 2550 DO D7999 0 4095 pa puree set point aM n 7 p10000 D49999 0 50000 Process variable DO D7999 S4 Source 4 before conversion B EHE D10000 D49999 B NEN DO D7999 D1 Destination 1 Manipulated variable D10000 D49999 Module Type Depending on the analog I O module select 0 4095
129. data in devices designated by D1 and D2 are This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat D1 Destination 1 First device address to exchange X xX X D2 Destination 2 First device address to exchange X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 or D2 Special internal relays cannot be designated as D1 or D2 Valid Data Types W word X integer D double word X L long F float Examples XCHG Data Word SOTU XCHG W D1 D2 10 D21 024 D21 lt 024 When input 10 is turned on data of data registers D20 and D24 designated by devices D1 and D2 are exchanged with each other Data Type Double Word SOTU XCHG D D1 D2 D31 037 031 032 lt gt D37 D38 When input I1 is turned on data of data registers D31 D32 and D37 D38 designated by devices D1 and D2 are exchanged with each other IDEC Before Exchange D21 1000 D22 D23 D24 2000 Before Exchange 031 032 1234567890 D33 D34 D35 D36 D37 D38 9876
130. data register is designated as the source or destination 1 point word data type is used After Execution 12345 3039h L D20 IDEC 8 DATA CONVERSION INSTRUCTIONS SWAP Data Swap H SWAP S1 R mde 2222 42002 When input is on upper and lower byte or word data of a word or double word data designated by S1 are exchanged and the result is stored to destina tion designated by D1 This instruction is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol Since the SWAP 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 W wod x When a D data register is designated as the source or destination 1 point word data type or 2 points double word data type are used When repeat is designated the quantity of device words increases in 1 integer 1 or 2 point increments D double word X L long F float Example
131. designate these input numbers as normal inputs in the Function Area Settings If I2 through I5 used as a deceleration input are designated as an interrupt input catch input or high speed counter input in the Function Area Settings the inputs work as a deceleration input for the ZRN instruction the designation in the Function Area Settings will have no effect When using a high speed deceleration input make sure that the input contact does not bounce If the input signal con tains chatter the pulse output will be stopped immediately Normal Deceleration Input 10 11 16 through 1627 MO through M2557 The normal deceleration input reads the deceleration input signal when the input data is updated at the END processing so the timing of accepting the deceleration input depends on the scan time 13 28 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Destination Device D1 Status Relay Two internal relays starting with the device designated by 01 indicate the status of the ZRN instruction These devices for read only 0 Pulse output OFF 1 Pulse output ON D1 0 Pulse output ON 0 Pulse output not complete 01 1 Pul tput let 1 Pulse output complete D1 0 Pulse Output ON The internal relay designated by device D1 0 remains on while the ZRN instruction generates output pulses When the start input or deceleration input for the ZRN instruction is turned off to stop generating output pu
132. designated by source devices 51 and S2 are compared When S1 data is less than or equal to S2 data destination device D1 is turned on When the condition is not met D1 is turned off IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 4 1 4 DATA COMPARISON INSTRUCTIONS CMP gt Compare Greater Than or Equal To Data type W or I 125 2 D1 on CMP gt S1 R S2 R D1 R Data type D L or F 51 51 1 2 52 52 1 D1 on AND OR xxx 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 destination device D1 is turned on When the condition is not met D1 is turned off Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat Repeat Result Logical AND or OR operation 51 Source 1 Data to compare X X X X X 1 99 S2 Source 2 Data to compare X X X X X 1 99 D1 Destination 1 Comparison output X 1 99 For the valid device address range see pages 6 1 and 6 2 Basic Vol When only S1 and or S2 is repeated the logical operation type can be selected from AND or OR The logical operation OR is available on upgraded CPU modules with system program version 200 or higher Internal relays MO through M2557 be designated as D
133. designated to repeat source devices as many as the repeat cycles start ing with the devices designated by S1 and S2 are compared with each other The comparison results are set to destina tion devices as many as the repeat cycles starting with the device designated by D1 Data Type Word S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 H CMP gt W S1 R S2 R DIR REP Rep 10 D10 D20 M10 3 D10 10 gt D20 0 M10 turned on D11 20 D21 20 M11 turned on D12 30 D22 100 M12 turned off Data Type Double Word S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 CMP gt D S1R S2R 1 10 D20 D30 M50 3 D20 D21 lt gt 30 031 7 M50 D22 D23 32033 M51 D24 D25 gt D34 D35 M52 Comparison Output Status The comparison output is usually maintained while 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 ON CMP gt W 51 52 D1 REP Input l0 10 010 Qo Comparison D10 gt C1 Result D10 lt C1 Comparison ON Output OFF This program turns the output off when the input is off ON CMP gt W OFF 51 010 52 C1 D1 MO Input IO 10 Comparison
134. different identification codes ID 1 0 ID2 101 the AS Interface master mod ule detects an error When two slaves have the same address and same identification codes the AS Interface master module cannot detect an error Failure to observe this warning may cause severe personal injury or heavy damage to property e When a slave with address 0 is connected to the AS Interface master module power up the MicroSmart CPU module first Approximately 5 seconds later turn on the AS Interface power sup ply If the CPU module and AS Interface power supply are turned on at the same time the AS Inter face master module enters normal protected offline In this mode slave addresses can be changed but the slave status cannot be confirmed on WindLDR To change a slave address from the WindLDR menu bar select Online gt Configure Master The Configure AS Interface Master dialog box appears Chanee Slave Address Current Address Slave Click a slave address to open the Change Slave Address dialog box Select Slave A or Slave B enter a required address in the New Address field and Slave B click OK The Change Slave Address dialog box is closed The new slave address is stored the slave module nonvolatile memory New Address Slave A Cancel 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 address cannot be change
135. earlier slaves Slave Addresses Each standard slave connected to the AS Interface bus can be allocated an address of 1 through 31 Each A B slave can be allocated an address of 1A through 31A or 1B through 31B All slaves are set to address O 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 the same identification codes The new slave will automatically be allocated the same address as the slave that was removed and you do not have to set the address again For details of the ASI command to enable auto addressing see page 24 30 Slave Identification Slaves have the following four identification codes The master checks the identification codes to determine the type and feature of the slave connected on the AS Interface bus ID Code The ID code consists of 4 bits to indicate the type of the slave such as sensor actuator standard slave or A B slave For example the ID code for a standard remote 1 0 is 0 and that for an slave is A hex Code The 1 0 code consists of 4 bits to indicate the quantity and allocation of I O points on a slave Code Allocation
136. error occurs communication error special internal relay M8005 also turns on for 1 scan time immediately after the error 23 6 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 IDEC Programming Modbus TCP Slave Communication Using WindLDR Modbus TCP slave server communication settings can be programmed using the WindLDR Function Area Settings Since these settings 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 gt Comm Ports The Function Area Settings dialog box for Communication Ports appears 23 MopBUs TCP COMMUNICATION 2 Inthe Communication Mode pull down list for Port 1 or Port 2 select Modbus TCP Slave Server MicroSmart Function Area Settings Run Stop Control Memory Backup Input Configuration cron the communication ports Communication Ports Communication Ports Key Matrix Cartridges amp Modules Device Settings Program Protection Self Diagnostic Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol Configure 9600 7 Even 1 Configure 9600 7 Even 1 Configure 9600 7 Even 1 Configure 9600 7 Even 1 Configure 9600 7 Even 1 In END Processing Every 10 ms Port Communication Mode Comm Param Mode Selection Input Network No 0 0 0 0 0 0 0 Default The Modbus
137. for the RAMP instruction is turned on the internal relay designated by device D1 1 turns off D1 2 Pulse Output Status The internal relay designated by device D1 2 turns on while the output pulse frequency is increasing or decreasing and turns off when the output pulse frequency reaches the steady pulse frequency S1 1 While the pulse output is off the internal relay designated by device D1 2 remains off D1 3 Pulse 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 51 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 Pulse Outputs Three additional special data registers store the current frequency of pulse outputs Device Address Function Description While the PULS1 or 1 instruction is executed 08055 stores the current D8055 Current Pulse Frequency ulse frequency of output QO of PULS1 or RAMP1 Q0 P 2 The value is updated every scan Current Pulse Frequency While the PULS2 or RAMP1 reversible control dual pulse output instruction is tput Q1 D8056 of PULS2 or RAMP1 Q1 executed D8056 stores the current pulse frequency of output Q The value is updated every scan While the PULS3 or RAMP2 instruction is execute
138. for the source and destination separately Source S1 51 51 1 Destination D1 1 01 1 When the same data type is designated for both source and destination the CVDT instruction has the same function as the MOV instruction Unless F float data type is selected for both source and destination only the integral number is moved omitting the fraction When the source data exceeds the range of destination data type the destina tion stores a value closest to the source data within the destination data type Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 First device address to convert data type X X X X X 1 99 D1 Destination 1 First device address to store converted data X X 1 99 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 be designated as D1 Special internal relays cannot be designated as D1 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 register can be designated as D1 When F float data type is selected
139. for the word data type and 0 through 9999 9999 BCD for the double word data type Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 BCD data to convert X X X X X D1 Destination 1 Destination to store conversion results X X X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 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 Valid values for the source device are 0 through 9999 BCD for the word data type and 0 through 9999 9999 BCD for the double word data type Make sure that each digit of the source designated by S1 is O through 9 If the source data 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 Since the 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 W word X When a bit device such as input Q output M internal relay or R shift regist
140. hours minutes and seconds designated by source device S1 is converted into seconds The result is stored to destination device D1 This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Time data in hours minutes seconds X D1 Destination 1 Destination to store results X For the valid device address range see pages 6 1 and 6 2 Basic Vol Source device S1 occupies 3 consecutive data registers starting with the designated device Data registers DO D1997 D2000 D7997 and D10000 D49997 can be designated as source device S1 Destination device D1 occupies 2 consecutive data registers to store double word data starting with the designated device Data regis ters 00 01998 02000 07998 and D10000 D49998 can be designated as destination device 01 Hour data can be 0 through 65535 Minute and second data can be 0 through 59 When any of the hour minute or second data 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 The instruction is not executed Since the HTOS instruction is executed in each scan while input is on a pulse input from a SOTU or
141. igh Wor 1 305419896 1234h 12345678h Low Word D1 3 2 FC5A MicROSMART User s MANUAL FC9Y B1273 IDEC 3 MOVE INSTRUCTIONS Repeat Operation in the Move Instructions Repeat Source Device When the 1 source is designated with repeat devices as many as the repeat cycles starting with the device designated by S1 are moved to the destination As a result only the last of the source devices is moved to the destination Data Type Word Source Repeat 3 Destination Repeat 0 MOV W S1R D1 REP E D10 D20 3 D10 110 D20 112 D11 111 D21 D12 112 D22 Data Type Double Word Source Repeat 3 Destination Repeat 0 H MOVIBI a ud D10 110 m D20 114 011 111 021 115 012 112 D22 D13 113 D23 D14 114 D24 D15 115 J D25 Repeat Destination Device When the 01 destination is designated to repeat the source device designated by S1 is moved to all destination devices as many as the repeat cycles starting with the destination designated by D1 Data Word Sou
142. indicates that data exchange is enabled While M1960 is on the AS Interface master module is in normal pro tected mode and data exchange between the AS Interface master module and slaves is enabled The data exchange can be enabled and disabled using the ASI commands Enable Data Exchange and Prohibit Data Exchange M1961 Off line M1961 goes on when a command to switch to normal protected offline is issued To switch to normal protected offline from normal protected mode either press the PB2 button on the AS Interface master module or issue the ASI command Go to Normal Protected Offline M1961 remains on until normal protected offline is exited M1962 Connected Mode M1962 indicates that the AS Interface master module is in connected mode While in connected mode M1962 remains on Then LMO LED remains off and the CMO LED remains on 1 DEC FC5A MiCROSMART UsER s MANUAL FC9Y B1273 24 25 24 AS INTERFACE MASTER COMMUNICATION Slave List Information For AS Interface master module 1 data registers D1764 through D1779 are assigned to slave list information to deter mine the operating status of the slaves The slave list information is grouped into four lists List of active slaves LAS shows the slaves currently in operation List of detected slaves LDS the slaves detected on the AS Interface bus List of peripheral fault slaves LPF the faulty slaves List of projected slaves LPS the slave configuration stored in the AS Inter face master
143. internal relay M8003 Bits to rotate 2 MSB D20 LSB Before rotation 020 13 0 0 0 0 0 0 0 0 0 000 1 1 0 1 M8003 MSB 20 LSB After first rotation 020 16387 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 M8003 MSB D20 LSB cY After second rotation D20 53248 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 M8003 Data Type Double Word RORIS m Each time input 11 is turned on 32 bit data of data registers 020 021 is T SOTU 0 020 a rotated to the right by 1 bit as designated by device bits The last bit status rotated out is set to a carry special internal relay M8003 Bits to rotate 1 Before rotation D20 D21 851 981 MSB D20 D21 LSB o o o o o ojo o o o o o 1 1 o 1 o o o o o o o o o o o o 1 1 o 1 Rotate to the right M8003 After rotation D20 D21 2 147 909 638 MSB D20 D21 LSB cY 1 0 0 0 0 0 0 0 0 0 00 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 M8003 IDEC FC5A MicroSmart User s Manual FC9Y B1273 7 11 7 SHIFT ROTATE INSTRUCTIONS 7 12 FC5A MicroSma
144. is designated for word devices such as data register bit statuses as many as the repeat cycles in the designated data register are moved SOTU HH IBMV S1 S2 DIR D2 2 D10 5 D20 12 Since source device 1 is data register D10 and the value of source device S2 is 5 the source data is 3 bits starting with bit 5 of data regis ter D10 Since destination device D1 is data register D20 and the value of desti nation device D2 is 12 the destination is 3 bits starting with bit 12 of data register D20 As a result when input 12 is on the ON OFF statuses of data register D10 bits 5 through 7 are moved to data register D20 bits 12 through 14 REP D10 D10 5 D20 12 Repeat 3 Bit 15 14 13 12 11109 8 7 6 5 4 ss NENEN Bit 5 Bit 15 14 13 12 11 10 9 8 7 6 5 4 o C O Bit 12 DE FC5A MicROSMART User s MANUAL FC9Y B1273 3 11 Ls 3 MOVE INSTRUCTIONS IBMVN Indirect Bit Move Not 51 52 NOT gt 01 D2 IBMVN S4 R 52 D1 R D2 REP RRR RRR When input is on the values contained in devices designated by S1 and S2 are added to determine the source of data The 1 bit data so determined is inverted and moved to destina tion which is determined by the sum of values contained in devices designated by D1 and D2 Applicable 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 Valid Devices Device
145. is executed to adjust the process variable S140 the set point S3 When the linear conversion is disabled 51 4 set to O or 2 set a required set point value of through 4095 or 50000 depending on the analog I O module type to the device designated by S3 Valid devices are data register and constant When the linear conversion is enabled S144 set to 1 or 3 designate data register as device 53 and set a required set point value of 0 through 65535 word data type or 32768 through 32767 integer data type to the data register desig nated by S3 The set point value S3 must be larger than or equal to the linear conversion minimum value S146 and smaller than or equal to the linear conversion maximum value S145 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 S142 See Operating Status on page 14 4 Source Device S4 Process Variable before Conversion PID instruction is designed to use analog input data from an analog I O module as process variable The analog I O module converts the input signal to a digital value of O through 4095 or 50000 and stores the digital value to a data reg ister depending on the mounting position of the analog 1 0 module and the analog input channel connected to the ana log input source Designate a data register as source device S4 to store the process variable For the data register number
146. is moved to D31 MOV W S1 D1 D8012 hour data is moved to D20 08012 020 MOV W S1 D1 REP D8013 minute data is moved to D21 D8013 D21 SOTU TXD S1 D1 D2 When is turned on TXD3 is executed to send 73 byte data Mo 3 73 M1 DO through the RS232C port 3 to the printer SP SP SP SP R N T SP T 20h 20h 20h 2Dh 2Dh 2Dh 20h 50h 52h 49h 4Eh 54h 20h 54h E S T CR LF CR LF SP SP SP 45h 53h 54h 20h 2Dh 2Dh 2Dh ODh OAh ODh OAh 20h 20h 20h D20 Conversion BCD gt ASCII Digits 2 REP 01 D20 hour data is converted from BCD to ASCII and 2 digits are sent H SP 48h 20h D21 minute data is converted from BCD to ASCII and 2 digits are D21 Conversion BCD 4ASCII Digits 2 REP 01 sent M CR LF CR LF 4Dh ODh OAh ODh OAh SP SP SP C N T 2 z 20h 20h 20h 43h 4Eh 54h 32h 2 2Eh 2Eh 031 Conversion BCD 4ASCII Digits 4 REP 01 CR LF SP SP SP 0 3 0 ODh OAh 20h 20h 20h 44h 30h 33h 30h 2Eh 2Eh 2Eh D30 Conversion BCD 4ASCII Digits 4 01 CR LF CR LF ODh OAh ODh OAh D31 counter C2 data is converted from BCD to ASCII and 4 digits are sent D30 data is converted from BCD to ASCII and 4 digits are sent END 25 12 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC Troubleshooting 25 EXPANSION RS232C RS485 COMMUNICATION This section describes the procedures to determine the cause of trouble and actions to be taken
147. is on While a slave of address was connected power was turned on After changing the slave offline address power up again For the address changing method see page 24 35 Slave operation is unstable IDEC Check if there are two or more slaves with the same address Each slave must have a unique address If two slaves have the same address and same identification codes ID I O ID2 ID1 the AS Interface master module may fail to detect an error When changing the dupli cate slave address using WindLDR remove one of the slaves from the bus FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 13 24 AS INTERFACE MASTER COMMUNICATION Pushbuttons and LED Indicators This section describes the operation of pushbuttons PB1 and PB2 on the AS Interface master module to change opera tion modes and also explains the functions of address and I O LED indicators Pushbutton Operation The operations performed by pushbuttons PB1 and PB2 on the front of the AS Interface master module depend on the duration of being pressed A long press switches the operation mode and a short press switches the slave being monitored on the 1 0 LEDs If the duration of pressing PB1 or PB2 does not correspond to either of these the status of the AS Interface master module does not change Long Press A long press takes effect when you press either pushbutton PB1 or PB2 or both for 3 seconds or more Use the long press to change the
148. module For AS Interface master module 2 the slave list information can be accessed using RUNA or STPA instructions List of Active Slaves LAS For AS Interface master module 1 data registers D1764 through D1767 are allocated to read the LAS You can check the register bits to determine the operating status of each slave When a bit is on it indicates that the corresponding slave is active Device Address Data Format AS Interface Master Module 1 AS Interface Master Module 2 Bits 15 to 8 Bits 7 to 0 D1764 0 Slaves 15 A to 8 A Slaves 7 A to 0 D1765 1 Slaves 31 A to 24 A Slaves 23 A to 16 A D1766 2 Slaves 15B to 8B Slaves 7B to OB D1767 3 Slaves 31B to 24B Slaves 23B to 16B List of Detected Slaves LDS For AS Interface master module 1 data registers D1768 through D1771 are allocated to read the LDS You can check the register bits to determine the detection status of each slave When a bit is on it indicates that the corresponding slave has been detected by the master Device Address Data Format AS Interface Master Module 1 AS Interface Master Module 2 Bits 15 to 8 Bits 7 to 0 D1768 4 Slaves 15 A to 8 A Slaves 7 A to 0 D1769 5 Slaves 31 A to 24 A Slaves 23 A to 16 A D1770 6 Slaves 15B to 8B Slaves 7B to OB D1771 7 Slaves 31B to 24B Slaves 23B to 16B List of Peripheral Fault Slaves LPF For AS Interface master module 1 data registers D1772 through D1775 are a
149. module on See The PWR power LED does not go on 25 13 Basic Vol Is the PWR LED on the FC5A SIF4 module flashing Supply the rated voltage to the CPU module 3 1 25 14 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDEC 25 EXPANSION RS232C RS485 COMMUNICATION Data is not received correctly in the user communication Check Action Page Are the communication settings for the external device Set the same communication parameters for expan 25 10 and expansion communication port the same sion communication port as the external device Is the same data register designated as destination device Change the duplicate device to another data regis Basic Vol D2 receive status repeatedly ter 10 15 Is a start delimiter specified in the RXD instruction Are Correct the program to make sure that inputs to Basic Vol inputs to more than 5 RXD instructions on simultane more than 5 RXD instructions do not go on simulta 10 15 ously neously Make sure that the receive format of the RXD Basic Vol Did you check the format of incoming data instruction matches that of the incoming data 10 16 Make sure that the receive timeout value is larger Basic Vol Is the receive timeout value set correctly using WindLDR than character intervals of the incoming data 10 5 Did you make sure of source 1 device of the RXD instruc Make sure that the receive data designated as the Basic Vol tion
150. 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 relay designated by device D1 2 turns on when the PULS1 or PULS3 instruction has generated more than the predetermined number of output pulses When the start input for the PULS instruction is turned on the internal relay designated by device D1 2 turns off 13 4 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Special Data Registers for Pulse Outputs Three additional special data registers store the current frequency of pulse outputs Device Address Function Description While the PULS1 or RAMP1 instruction is executed 08055 stores the current D8055 Current Pulse Frequency ulse frequency of output QO of PULS1 or RAMP1 Q0 pid The value is updated every scan While the PULS2 or RAMP1 reversible control dual pulse output instruction is D8056 Current Pulse Frequency executed D8056 stores the current pulse frequency of output Q1 of PULS2 or RAMP1 Q1 a The value is updated every scan While the PULS3 or RAMP2 instruction is executed D8059 stores the current D8059 Current Frequency ulse frequency of output Q2 of PULS3 or 2 Q2 puise The value is updated every scan Timing Chart for Enable Puls
151. on the FRQRF instruction refreshes the frequency measurement values in special data reg H oe isters in real time The FRQRF can be used in any place in the ladder diagram where you want to read the updated frequency measurement value Before the measured results are stored in the special data registers it takes a maximum of calculation period plus one scan time Using the FRORF instruction in the ladder diagram 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 Applicable 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 Example FRQRF The following example demonstrates a program to update the current value of frequency measurement value using the FRQRF instruction For the timer interrupt see page 5 36 Basic Vol MOV W S1 D1 REP M8120 is the initialize pulse special internal relay 0 D8036 08036 stores 0 to designate jump destination label for timer inter rupt Main Program 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 the Function Area Settings M8125 is the in operation output special internal relay FRQRF updates the HSC1 frequency measurement value in data regis ters D8060 and D8061
152. on the values contained in devices designated by S1 and S2 are added to determine the source of data The 1 bit data so determined is moved to destination which is determined by the sum of values contained in devices desig nated by D1 and D2 Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Base address to move from X X X X 1 1 99 52 Source 2 Offset for 51 X X X X X X X 0 65535 D1 Destination 1 Base address to move to X X X 1 99 D2 Destination 2 Offset for D1 X X X X X X X 0 65535 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S2 or D2 the timer counter current value TC or CC is read out Make sure that the last source data determined by 51 52 and the last destination data determined by D1 D2 are within the valid device range If the derived source or destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Either source device S2 or destination device D2 does not have to be designated If S2 or D2 is not designated the source or destina tion de
153. on the value stored in data register designated by device 51 5 control direction for forward or 1 for reverse If the value stored in the data register designated by device 1 4 is changed after the start input for the RAMP instruction has been turned on the change can take effect only after the CPU starts again 1 5 Control Direction When S144 is set to 1 or 2 to enable reversible control the value stored in the data register designated by device S145 specifies the control direction 0 Forward 1 Reverse 61 6 Preset Value High Word S1 7 Preset Value Low Word The RAMP1 or RAMP2 instruction generates a predetermined number of output pulses as designated by devices S146 and S147 The preset value can be 1 through 100 000 000 05F5 E100h stored in two consecutive data registers desig nated by 51 6 high word and 51 7 low S148 Current Value High Word S149 Current Value Low Word 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 S148 high word and 51 9 low word The current value be 1 through 100 000 000 05F5 E100h and is updated in every scan IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 17 13 PULSE INSTRUCTIONS 1 10 Error Status When the start input for the RAMP instruction is turned on device values are checked When any error is found in the device values
154. operation mode of the AS Interface master module or to PB1 save the configuration data to the AS Interface master module EEPROM Short Press E A short press takes effect when you press either pushbutton PB1 or PB2 for 0 5 second or less E Use the short press to change the slave address when monitoring slave 1 0 status on the AS Inter e face master module LED indicators PB2 Transition of AS Interface Master Module Modes Using Pushbuttons MicroSmart Power ON Note All pushbutton operations for changing modes are long press Connected Mode Normal Protected Mode PB2 ec PB2 2 Normal Protected Data Exchange Off Normal Protected Offline Store Configuration Data to EEPROM Local Mode Protected Mode Configuration Mode PB2 ee PB2 Store Configuration Data to EEPROM 1 Pushbutton operation or execution of the ASI command Go to Normal Protected Offline 2 Pushbutton operation or execution of the ASI command Go to Normal Protected Mode 3 Execution of the ASI command Prohibit Data Exchange 4 Execution of the ASI command Enable Data Exchange 5 Configuration is done by clicking the Auto Configuration or Manual Configuration button in WindLDR The configuration data is saved to the AS Interface master module EEPROM
155. or CC is read out T timer or C counter is used as D1 and the data is written in as a current value TP or CP Since the TCCST 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 x When a bit device such as input Q output M internal relay or R shift register is designated as the source 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 increments integer D double word X When a word device such as T timer C counter or D data register is designated as the source or L long destination 1 point word data type or 2 points double word data type are used When repeat is des F float ignated for a word device the quantity of device words increases in 1 or 2 point increments Example TCCST When input I2 is turned on 99998 is written to the current value of counter C23 Ladder Diagram Timing Chart CNTD C23 Reset Input 10 100000 99998 99999 99998 99999 100000 Pulse Input 11 Counter C23 Input 12 TCCSTD S1 D1 99998 C23 Output 00 3 16 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 4 DATA COMPARISON INSTRUCTIONS Introduction Data can be compared using data comparison instructions such as equal to unequal to les
156. or S3 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module When the data of S1 is smaller than that of S3 S1 S3 a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X the source 16 points word or integer data type or 32 points double word or long data type are used integer X integer When a word device such as T timer C counter or D data register is designated as the source 1 D double word X point word or integer data type or 2 points double word long or float data type are used L long X The destination uses only one output or internal relay regardless of the selected data type F float X Special Internal Relays M8150 M8151 and M8152 in ICMP Three special internal relays are available to indicate the comparison result of the ICMP gt instruction Depending on the result one of the three special internal relays turns on S1 must always be greater than or equal to S3 S1 gt S3 When S2 S1 M8150 turns on D1 S2 Value M8150 M8151 M8152 When S2 S3 M8151 turns on Status When S1 S2 S3 M8152 turns on 1 52 lt S3 OFF ON OFF OFF 2 52
157. 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 f the parameter values in D200 through D207 except for D204 are changed while generating output pulses the change takes effect when start input IO is turned on for the next cycle fthe value stored in D204 is changed after start input 10 has been turned the change can take effect only after the CPU starts again e f start input 10 is turned off before reaching the preset value RAMP1 stops generating output pulses immediately then internal relay M50 turns off and internal relay M51 turns on When input IO is turned on again RAMP1 restarts to generate output pulses for another cycle starting at the initial pulse frequency 13 20 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC 13 PULSE INSTRUCTIONS Timing Chart for Reversible Control with Single Pulse Output This program demonstrates a timing chart of the RAMP1 instruction when reversible control is enabled with single pulse output D204 1 reversible control with single pulse output RAMP S1 D1 D200 M50 Start Input 10 Control Direction D205 0 Forward 1 Reverse Steady Pulse Frequency Initial Pulse Frequency Output Pulse QO Control Direction Output Q1 Pulse Output ON M50 Pulse Output Complete M51 Pu
158. range 200 Hz to 100 kHz DO 3 S141 Steady pulse frequency 10 kHz D1 1000 51 2 Initial pulse frequency 500 Hz D2 50 51 3 Frequency change time 2 000 ms D3 2000 1 4 Reversible control enable Reversible control with single output D4 1 S145 Control direction Forward D5 0 S146 Preset value high word 100 000 D6 D7 100000 S147 Preset value low word S148 Current value high word 0 to 100 000 D8 D9 51 9 Current value low word 51 10 Error status D10 RAMPST S1 DO MOV W 51 D1 D5 REP MOV W 51 D1 D5 REP S1 DO D1 M100 13 24 M8120 is the initialize pulse special internal relay When the CPU starts RAMPST macro designates parameters for pulse output When input 11 is off DS control direction stores 0 forward When input I1 is on D5 control direction stores 1 reverse When start input IO is turned RAMP1 starts to generate 100 000 output pulses FC5A MICROSMART UsER s MANUAL FC9Y B1273 EipEC Sample Program RAMP1 Reversible Control with Dual Pulse Output 13 PULSE INSTRUCTIONS This program demonstrates a user program of the RAMP1 instruction to generate 1 000 000 pulses from output 00 for ward pulse or Q1 reverse pulse while input I1 is off or on respectively Steady pulse frequency Initial pulse frequency Frequency change time Reversible control enable Preset value Programmin
159. relay M8004 and the ERR LED on the CPU module The DI and El instructions 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 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 Interrupt Interrupt Enabled Interrupt Disabled Interrupt Input I2 M8140 ON M8140 OFF Interrupt Input I3 M8141 ON M8141 OFF Interrupt Input 14 M8142 ON M8142 OFF Interrupt Input I5 M8143 ON M8143 OFF Timer Interrupt M8144 ON M8144 OFF Programming WindLDR In the Disable Interrupt DI or Enable Interrupt El dialog box click the check box on the left of Interrupt Inputs I2 through I5 or Timer Interrupt to select source device S1 The example below selects interrupt inputs I2 13 and timer interrupt for the DI instruction and a 19 will be shown as source device S1 The total of selected interrupt inputs and timer DI Disable Interrupt DI S1 19 interrupt is shown as source device S1 Type 51 JEI Enable Interrupt interrupt Input 12 Interrupt S1 Value DI Disable Interrupt 7 Interrupt Input 13 Interrupt Input I2 1 1 Interrupt Input 14 POPE Interrupt Input 13 2 Interrupt Input 15 Dimer interrupt ms Int rrupt input TS Interrupt Input I5 8 OK
160. s MANUAL FC9Y B1273 ZIDEC 25 EXPANSION RS232C RS485 COMMUNICATION User Communication The user communication function can be used for the MicroSmart to communicate with a PC printer and barcode reader through the expansion RS232C RS485 communication module For details about the user communication function see page 10 1 Basic Vol Expansion RS232C RS485 Communication Module Communication Parameter Range Parameter Optional Range Default Communication Mode User communication Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 115200 Note 9600 Data Bits 7or8 7 Parity Even Odd None Even Stop Bits 10 2 1 Receive Timeout ms 1 22 0 or 2550 is selected 209 Note To use 57600 or 115200 bps CPU modules with system program version 220 or higher and FC5A SIF2 version 200 or higher or FC5A SIF4 are required User Communication through the Expansion RS232C Communication Module This section describes an example of user communication through the expansion RS232C communication module to send data to a printer After downloading the 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
161. the system program version to 220 or higher The expansion RS232C RS485 communication module cannot communicate with an operator interface Check Action Page mm Basic Vol Is the communication cable connected correctly Connect the communication cable correctly 2 89 25 6 Is the PWR LED on the CPU module on See The PWR power LED does not go on 25 13 Basic Vol Is the PWR LED on the FC5A SIF4 module flashing Supply the rated voltage to the CPU module 3 1 2 Set the same communication parameters for the Are the communication settings for the operator interface man operator interface and expansion communication 25 7 and expansion communication port the same port U de the CPU modul t i Is the CPU module system program version applicable to Pee E coms er MA Basic Vol the expansion RS232C RS485 communication module t0110 0r higher to use the FECSA SIF2 ONTO 220 DF A 9 higher to use the FC5A SIF4 Communication response is slow Check Action Page TEM Set the communication baud rate to a required 25 3 25 7 Is the communication baud rate set to a proper value value 25 9 Is the COMRF instruction used in the user program Use the COMBRF instruction in the user program 11 13 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 25 13 25 EXPANSION RS232C RS485 COMMUNICATION Data is not transmitted at all in the user communication Check Action Page B
162. the ZRN2 instruction stops generating output pulses ZRN S1 52 D1 2 The output pulse width ratio is fixed at 50 ZRN3 Zero Return 3 When input is on the ZRN3 instruction sends out a pulse output of a predeter mined high frequency from output Q2 When a deceleration input turns on the output frequency decreases to a creep frequency When the deceleration input turns off the ZRN3 instruction stops generating output pulses ZRN S1 52 D1 3 Not available on FCSA 16RK1 RS1 The output pulse width ratio is fixed at 50 Note The ZRN1 ZRN2 and ZRN3 instructions can be used only once in a user program When ZRN1 ZRN2 or ZRN3 is not used unused output 00 01 or Q2 can be used for another pulse instruction or ordinary output Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E 2nd X ZRN1 and ZRN2 X X Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Control register Lem ambo ucc X S2 Source 2 Deceleration input MO ho o D1 Destination 1 Status relay die Source device S1 control register uses 5 data registers starting with the device designated as S1 Data registers DO D1995 D2000 D7995 and D10000 D49995 can be designated as S1 For details see the following pages Source device S2 deceleration input can designate i
163. the data in these data registers are changed the teaching timer does not operate correctly The teaching timer 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 Examples TTIM When input 10 is turned on TTIM resets data register D100 to zero and starts to store the ON duration of input IO to data register D100 measured in units of 100 ms When input IO is turned off TTIM stops the measurement and data register D100 maintains the measured value of the ON duration ON i 1500 ms d lt D100 Value 0 The following example demonstrates program to measure the ON duration of input 10 and to use the ON duration as preset value for 100 ms timer instruction TIM When input I1 is turned on 100 ms timer TO starts to operate with a preset value stored in data register DO While input IO is on TTIM measures the ON duration of input IO and stores the measured value in units of 100 ms to data register D100 When input IO is turned off MOV W stores the D100 value to data 51 D1 register DO as a preset value for timer TO D100 DO IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 15 3 15 DUAL TEACHING TIMER INSTRUCTIONS 15 4 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 16 INTELLIGENT MODULE ACCESS INSTRUCTIONS Introduction Inte
164. the linear conversion is disabled S1 4 set to O or 2 the set point S3 is set to a value larger than 4095 or 50000 depending on the analog 1 0 module type While the AT PID action is executed S1 3 set to 1 or 3 the process variable S1 0 cannot reach the AT set point S1 21 In the direct control action S2 0 on the AT PID action is started when the process variable is in the following relationship 108 Set point S3 lt Process variable S1 0 lt AT set point S1 21 To solve this problem set the AT set point to a value smaller than the process variable In the reverse control action S2 0 off the AT PID action is started when the process variable is in the following relationship set point 51421 lt Process variable 51 0 lt Set point S3 To solve this problem set the AT set point to a value greater than the process variable The current control action S2 0 differs from that determined at the start of AT To restart AT set correct parameters referring to the probable causes listed below The manipulated variable D1 or the control output S246 is not outputted to the control target 200 correctly The process variable is not stored to the device designated by S4 AT output manipulated variable 51422 is not set to a large value so that the process variable S4 can change sufficiently A large disturbance occurred AT is stopped because of 201 AT failed to complete normally
165. the lower byte of the destination This instruction is available on upgraded CPU modules with system program version 200 or higher FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Binary data to combine X D1 Destination 1 Destination to store results X X X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Special internal relays cannot be designated as 01 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 Source device S1 uses 2 data registers starting with the device designated by S1 Since the DTCB 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 W word X integer D double word L long F float Example DTCB sou DTCB W Dio 8 22 Before Execution 48 D20 010 57 011 0039h FC5A MicroSmart User s Manual 9 1273 Upper byte Lower byte When a bit device such as input Q output M internal relay or R shift register is designated as the destination 16 points word data type are used When a word device such as T timer C counter or D
166. the source or F float X destination 1 point word data type or 2 points double word or float data type are used When repeat is designated for a word device the quantity of device words increases in 1 or 2 point incre ments 3 6 FC5A MicROSMART UsER s MANUAL FC9Y B1273 IDEC 3 MOVE INSTRUCTIONS Example IMOV Data Type Word IMOVW 51 52 D1 02 REP io D20 C10 025 D20 C10 010 025 Source device 51 and destination device D1 determine the type of device Source device 52 and destination device D2 are the offset values to determine the source and destination devices If the current value of counter C10 designated by source device S2 is 4 the source data is determined by adding the offset to data register D20 designated by source device S1 D 20 4 D24 If data register D25 contains a value of 20 the destination is determined by adding the offset to data regis ter D10 designated by destination device D1 D 10 20 D30 As a result when input IO is on the data in data register D24 is moved to data register e Data Type Float IMOV F 51 52 D1 D2 REP 0 D20 D50 D10 051 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 by source device S1 D 20 2 D22 If data register D51 contains a value of 20 the destination is determined by adding the offset to data regis ter D10 designated b
167. 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 S2 to designate the quantity of bits searched are 1 through 256 Make sure that the search area designated by S1 plus S2 is within the valid value range If the source data is out of the valid range a user program execution error will result turning on spe cial internal relay M8004 and the ERR LED on the CPU module Since the BCNT 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 BCNT When input is on bits which are on are sought in an array of 64 bits starting at BCNT S1 52 D1 internal relay M4 designated by source device S1 10 4 64 D100 Since 3 bits are on in the searched area the quantity is stored to data register D100 designated by destination device D1 M17 MO M37 M20 M57 M40 M77 M60 M97 M80 M117 M100 Searched area When input 10 is on bits which are on are sought in 60 bits starting at bit of H BNCT S1 S2 D1 data register D10 designated by device S1 1 D10 60 0100 Since 2 bits are on among the 60 bits 2 is stored to data register D100 desig nated by device D1 Bit D10 D11 D12 D13 D14 D15 IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 17 8 DATA CONVERSION INSTRUCTIONS ALT Alternate Output When input is turned on output internal relay or shi
168. to 6 devices starting with D1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 H i SOTU j DIV W Re e js D10 D20 gt 030 D33 D11 D21 D31 D34 D12 D22 D32 D35 Quotient Remainder Data Type Double Word and Long When all devices are designated to repeat different results are set to 6 devices starting with 01 01 1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 DIV D SiR 528 DIR REP P 72225 D10 D11 020021 080 031 036 037 D1213 022 023 032 033 38 39 D14D15 D24D25 D34D35 040 041 Quotient Remainder Data Type Float When all devices are designated to repeat different results are set to 3 devices starting with 01 01 1 S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 SOTU DIV F SiR S2R D1R REP 11 D10 D20 D30 3 D10 D11 D20 D21 D30 D31 012 013 D22 D23 032 033 014 015 D24 D25 EL D34 D35 Quotient Note 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 5 12 FC5A MicroSmart User s Manual FC9Y B1273 I DEC 5 Binary Arithmetic Instructions INC Increment os S D DatatypeDorL S D S D 1 1 S D S D 1 Data type W or I S D 1 S D 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
169. value TP or CP which can be 0 through 65535 All data registers including special data registers and expansion data registers can be designated as DATA STATUS Specify a data register to store the operating status code Data registers DO D1999 and D10000 D49999 can be desig nated as STATUS Special data registers and expansion data registers cannot be designated For status code description see page 16 6 SLOT Enter the slot number where the intelligent module is mounted A maximum of seven intelligent modules can be 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 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 instruction is executed when the CPU module is stopped regardless whether the input condition for the MCS instruction is on or off For MCS and MCR instructions see page 7 28 Basic Vol Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as DATA 16 points are used integer X D double word When a word device such as T timer C counter or D data register is designated as DATA 1 point is used
170. while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types W word Z Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example EXP When input I1 is on e is raised to the data of data registers D10 and D11 desig SOTU EXP F 22 don nated by source device S1 and the operation result is stored to data registers H D20 and D21 designated by destination device D1 e 27182818 7 389056 S1 D1 D10 D11 2 0 D20 D21 7 389056 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 18 3 18 LOGARITHM POWER INSTRUCTIONS POW Power 51 51 152521 gt D1 D1 1 POW F S1 52 D1 When input is on binary data designated by source device 51 is raised to the power 52 52 1 designated by source device S2 and the operation result is stored to the destination designated by device D1 Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Binary data of base we ux 7 X S2 Source 2 Binary data of exponent X X D1 Destination 1 Destination to store results dem ue
171. will be turned on 19 2 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDEC 19 FiLE DATA PROCESSING INSTRUCTIONS FIEX First In Execute EB zi When input is on the data stored in data registers starting with the device designated by S1 is stored to the corresponding FIFO data file This instruction is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid Devices Device Function QM T C D Constant Repeat N File Number File number e 0 9 S1 Source 1 First data register to store data to FIFO data file X For the valid device address range see pages 6 1 and 6 2 Basic Vol Make sure that FIEX instructions are executed after the corresponding FIFOF instruction has initialized the FIFO data file If FIEX instruc tions are executed without executing the corresponding FIFOF instruction a user program execution error will result turning on spe cial internal relay M8004 and the ERR LED on the CPU module Since the FIEX 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 W word X When a D data register is designated as the source data registers as many as the value stored in device S1 of the corresponding FIFOF instru
172. 0 oos 00 0001 address Note Enable Auto Addressing 0 8 Enables auto address assign default 0306 0800 0000 0000 0001 Disable Auto Addressing 0 8 4 Disables auto address assign 0306 0801 0000 0000 0001 1 WindLDR has the Slave Status dialog box to execute this command to write a PI value to a designated slave See Sample Program on page 24 31 2 WindLDR has the Change Slave Address dialog box to execute this command 3 Completed in a scan when the five data registers store respective values When completed D1945 stores 4 See Request and Result Codes on page 24 31 Other commands takes several scans to complete execution 4 Each scan time extends by 0 8 ms At least 1 sec is required until the ASI command takes effect Note Specify the slave address in the data register as shown in the table below Data Register Value Data Register Value Slave Address Slave Address Hexadecimal Decimal Hexadecimal Decimal O A 00h 0 1 A O1h 1 1B 21h 33 2 A 02h 2 2B 22h 34 31 A 1Fh 31 31B 3Fh 63 24 30 FC5A MicroSmart UsER s MANUAL FC9Y B1273 DE Request and Result Codes 24 AS INTERFACE MASTER COMMUNICATION D1945 Value Low Byte Description Note 00h Initial value at power up 01 Request 02h Processing ASI command While D1945 lower byte stores 01h 02h or 08h do not 04h Completed normally write any value to D1945 otherwi
173. 0021 gt 032 033 0838 039 10 011 020 021 034 035 040 041 Quotient Remainder Data Type Float When only 01 destination is designated to repeat the same result is set to 3 devices starting with D1 D1 1 S1 Repeat 0 DIVF 51 52 DIR REP D10 D11 D10 D11 S2 Repeat 0 D1 Repeat 3 020 021 D30 D31 D20 D21 032 033 D20 D21 LL D34 D35 Quotient 5 10 FC5A MicroSmart User s Manual FC9Y B1273 1 DEC 5 Binary Arithmetic Instructions Repeat Two Source Devices Data Word and Integer When S1 and S2 source are designated to repeat the final result is set to destination devices D1 and D1 1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 DIV W S1R S2R D1 REP H MSc cun a mE D10 D20 D30 031 D11 D21 gt 030 031 012 022 D30 031 Quotient Remainder Data Type Double Word and Long When 51 and S2 source are designated to repeat the final result is set to destination devices 01 01 1 D1 2 D1 3 S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 DIVD SiR 528 D1 P c E D10 D11 020021 D30 D31 D32 D33 D12 D13 022 023 D30 D31 032 033 014 015 D24D25 030 031 032 033 Quotient Remainder Data Type Float When 51 and S2 source are designated to repeat the final result is set to destination devices 01 01 1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 sotu H 518 528 Di 1
174. 0031h 8 DATA CONVERSION INSTRUCTIONS D20 D20 D20 D20 D20 BCD Binary 12345 3039h BCD Binary 1234 04D2h BCD Binary BCD Binary BCD Binary 1 0001h 8 13 8 DATA CONVERSION INSTRUCTIONS Examples ATOB D Quantity of Digits 10 soru H ATOB D 1 52 D1 io D10 10 020 D10 Quantity of Digits 6 011 012 013 014 015 016 017 D18 D19 sotu H ATOB D 51 52 D1 1 D10 6 D20 D10 Quantity of Digits 3 D11 D12 D13 D14 D15 sotu ATOB D s1 52 D1 2 D10 3 D20 D10 8 14 D11 D12 ASCII 49 0031h 50 0032h 51 0033h 52 0034h 53 0035h 54 0036h 55 0037h 56 0038h 57 0039h 48 0030h ASCII 49 0031h 50 0032h 51 0033h 52 0034h 53 0035h 54 0036h ASCII 49 0031h 50 0032h 51 0033h 20 021 20 021 20 021 FC5A MicroSmart User s Manual FC9Y B1273 BCD Binary 1234567890 499602D2h BCD Binary 123456 0001E240h BCD Bin
175. 010 FC5A MICROSMART UsER s MANUAL 9 1273 2 ASCII to BCD None E Delimiter eH Digits REP 2 10 OK Cancel 22 13 22 MODEM MODE Troubleshooting in Modem Communication When a start internal relay is turned on the data of D8111 modem mode status changes but the modem does not work Cause A wrong cable is used or wiring is incorrect Solution Use the modem cable 1C 2 1 The DTR or ER indicator on the modem does not turn on Cause A wrong cable is used or wiring is incorrect Solution Use the modem cable 1C FC2A KM1C When a start internal relay is turned on the data of D8111 modem mode status does not change Cause Modem protocol is not selected for port 2 Solution Select Modem Protocol for Port 2 using WindLDR Configure gt Function Area Settings gt Communication and download the user program to the CPU module When an initialization string is sent a failure occurs but sending ATZ completes successfully Cause Theinitialization 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 Cause2 The modem is used in a PBX environment Solution 2 Add XO or to the initialization st
176. 010 020 D30 010 011 4 43996 20 021 3 14 30 031 1 414 Quotient Note Since the destination uses two word devices in the division operation of float data type data register D1999 cannot be used as destination device D1 IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 5 5 Binary Arithmetic Instructions Repeat Operation in the ADD and SUB Instructions Source devices S1 and S2 and destination device D1 can be designated to repeat individually or in combination When destination device D1 is not designated to repeat the final result is set to destination device D1 When repeat is desig nated consecutive devices as many as the repeat cycles starting with the designated device are used Since the repeat operation works similarly on the ADD addition and SUB subtraction instructions the following examples are described using the ADD instruction Repeat One Source Device Data Type Word and Integer When only S1 source is designated to repeat the final result is set to destination device D1 sotu H ADD W 518 S2 Di 7 D10 D30 3 e Data Type Double Word Long and Float When only S1 source is designated to repeat the final result is set to destination device D1 D1 1 sotu H ADD D 518 S2 Di 7 D10 30 3 Repeat Destination Device Only Data Type Word and Integer S1 Repeat 3
177. 010 gt Cc1 Result D10 lt C1 ON Output QO OFF IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 4 5 4 DATA COMPARISON INSTRUCTIONS ICMP gt Interval Compare Greater Than or Equal To ICMP gt _ 51 S2 H S3 D1 512522 53 gt D1 on 51 51 1 gt 52 52 1 gt 53 53 1 D1 on Data type W or I Data type D L F When input is on the 16 or 32 bit data designated by 51 S2 and S3 are compared When the condition is met destination device D1 is turned on When the condition is not met D1 is turned off Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A D16RK1 RS1 FCSA C24R2 C D FC5A D32K3 S3 FC5A D12K1E S1E X X X X X Valid Devices Device Function I QM 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 A For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S1 S2 or S3 the timer counter current value TC or CC is read out When F float data type is selected only data register and constant be designated as S1 S2 and 53 When F float data type is selected and S1 S2
178. 1 REP E 39M Dio due Boh D10 D20 030 031 D11 20 gt 030 031 012 020 D30 031 Quotient Remainder Data Type Double Word and Long When only S1 source is designated to repeat the final result is set to destination devices 01 01 1 and D1 2 D1 3 S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 SOTU DIV D SIR S2 Di P sou D10 D20 D30 3 10 011 D20 D21 D30 D31 D32 D33 D12 D13 D20 D21 D30 D31 D32 D33 D14 D15 D20 D21 gt 30 031 D32 D33 Quotient Remainder Data Type Float When only S1 source is designated to repeat the final result is set to destination devices D1 D1 1 S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 DIV F SIR S2 Di REP D12 D13 D20 D21 n 030 031 D14 D15 D20 D21 gt D30 D31 Quotient 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 S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 H j SOTU DIV W Eum DIG ina i D10 D20 gt 030 D33 D10 D20 D31 D34 D10 D20 D32 D35 Quotient Remainder Data Type Double Word and Long When only 01 destination is designated to repeat the same result is set to 6 devices starting with D1 D141 S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 DIVD S1 52 DIR REP P e 4 10 011 020021 080 031 036 037 10 011 02
179. 1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S1 or S2 the timer counter current value TC or CC is read out When F float data type is selected only data register and constant can be designated as S1 and S2 When F float data type is selected and S1 or S2 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X j the source 16 points word or integer data type or 32 points double word or long data type are used integer X When repeat is designated for a bit device the quantity of device bits increases in 16 or 32 point incre D double word X ments L long X When a word device such as T timer C counter or D data register is designated as the source 1 F float X point word or integer data type or 2 points double word long or float data type are used When repeat is designated for a word device the quantity of device words increases in 1 or 2 point incre ments When an output or internal relay is designated as the destination only 1 point is used regardless of the selected data type When repeat is designated for the destination outputs or internal relays as many as the repeat cycles are used Spe
180. 1 0 is set to through 2 the value stored in the data register designated by device S141 specifies the frequency of the steady pulse output in percent of the maximum of the frequency range selected by 51 0 Valid values for device S141 are 1 through 100 thus the output pulse frequency can be 10 Hz to 1 kHz operation mode 0 100 Hz to 10 kHz operation mode 1 or 1 kHz to 100 kHz operation mode 2 When 51 0 is set to 3 200 Hz to 100 kHz valid values for device S141 are 20 through 10 000 in increments of 10 and the S141 value multiplied by 10 determines the steady pulse frequency thus the output pulse frequency can be set in increments of 10 Hz The output frequency error is 596 maximum Operation Mode S140 Steady Pulse Frequency Hz 0to2 1 to 100 Maximum frequency selected by 51 0 x 51 1 value 96 3 20 to 10 000 S141 value x 10 51 2 Initial Pulse Frequency When 51 0 is set to 0 through 2 the value stored in the data register designated by device S142 specifies the frequency of the initial pulse output in percent of the maximum of the frequency range selected by 51 0 Valid values for device 51 2 are 1 through 100 thus the initial pulse frequency can be 10 Hz to 1 kHz operation mode 0 100 Hz to 10 kHz operation mode 1 or 1 kHz to 100 kHz operation mode 2 When 1 0 is set to 3 200 Hz to 100 kHz valid values for device S142 are 20 through 10 000 in increments of 10 and the S142 value multiplied by 10 determines t
181. 11 M20 through M27 M30 through M37 012 112 MA0O through M47 M50 through M57 Data Type Double Word Source Repeat 0 Destination Repeat 3 MOV D 51 DIR REP 111 3 D10 110 r MO through M7 M10 through M17 011 111 M20 through M27 M30 through M37 012 112 r M4O through M47 M50 through M57 013 113 M60 through M67 M70 through M77 014 114 r M80 through M87 M90 through M97 _ gt D15 115 M100 through M107 M110 through M117 Overlapped Devices by Repeat If the repeat operation is designated for both the source and destination and if a portion of the source and destination areas overlap each other then the source data in the overlapped area is also changed SOTU MOV W S1R D1R REP 112 D10 D12 4 D10 through D13 Repeat 4 D12 through D15 Repeat 4 Source Destination 3 4 Before Execution After Execution bol 1 Dol 1i ouf 2 Dual 2 pi2 3 pi2 1 4 pi3 2 014 1 015 15 2 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDEC 3 MOVE INSTRUCTIONS MOVN Move Not MOVN S1 R D1 R REP ee 17 SUR DIR x When input is on 16 or 32 bit data from device designated by S1 is inverted bit by bit and moved to device designated by D1 Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S
182. 115200 bps CPU modules with system program version 220 or higher and FC5A SIF2 version 200 or higher or FCSA SIF4 are required IDEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 25 7 25 EXPANSION RS232C RS485 COMMUNICATION Operator Interface Communication through the Expansion RS232C RS485 Communication Module To perform the operator interface communication using the expansion RS232C RS485 communication module a user program has to be downloaded through port 1 or 2 in the 1 1 computer link system as shown on page 25 6 After down loading the user program to the CPU module the CPU module can communicate with the operator interface through the expansion RS232C 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 communication module For terminal arrangement and wiring diagram see page 2 89 and 2 90 Basic Vol Now the CPU module can communicate with the operator interface using communication port 3 through port 7 Note When the refreshing cycle of display data on the operator interface is slow see Communication response is slow on page 25 13 25 8 FC5A MICROSMART UsER
183. 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 ZiDEC 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 El 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 IBMV 3 10 IBMVN 3 12 ICMP gt 4 6 IMOV 3 6 IMOVN 3 8 INC 5 13 input condition 2 7 IOREF 11 9 LABEL 11 1 LC lt 4 8 LC lt 4 8 LC lt gt 4 8 LC 4 8 LC 4 8 LC gt 4 8 LCAL 11 3 list 2 1 UMP 11 1 LOG10 18 2 LOGE 18 1 LRET 11 3 MOV 3 1 MOVN 3 5 MUL 5 1 NDSRC 19 5 NOP 2 10 NRS 3 14 NSET 3 13 ORW 6 1 PID 14 1 POW 18 4 PULS1 13 2 PULS2 13 2 PULS3 13 2 PWM1 13 8 PWM2 13 8 PWMS3 13 8 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 INDEX RAD 17 1 RAMP1 13 14 RAMP2 13 14 RNDM 5 19 ROOT 5 15 ROTL 7 8 ROTR 7 10 RUNA READ 16 2 RUNA WRITE 16 3 SFTL 7 1 SFTR 7 3 SIN 17 3 STOH 20 10 STPA READ 16 4 STPA WRITE 16 5 structure 2 7 SUB 5 1 SUM 5 16 SWAP 8 23 TADD 20 1 TAN 17 5 TCCST 3 16 TSUB 20 5 TTIM 15 3 WKTBL 9 2 WKTIM 9 1 WSFT 7 7 XCHG 3 15 XORW 6 1 XYFS 12 1 ZRN1 13 26 ZRN2 13 26 ZRN3 13 26 allocating communication port number 25 1 ALT 8 18 alternate output 8 18 analog 1 0 data 24 22 input data 24 22 output data 24 23 slave profile 24 22 AND word 6 1 ANDW 6 1 answer mode 22 2 22 6 APF not APO 24 25 applicable sensors and actuators 24 1 arc cosine
184. 1337 M1336 M1654 Slave 8 A M1343 M1342 M1342 M1660 M1343 M1342 M1660 Slave 9 A M1347 M1346 M1346 M1664 M1347 M1346 M1664 Slave 10 A M1353 M1352 M1352 M1670 M1353 M1352 M1670 Slave 11 A M1357 M1356 M1356 M1674 M1357 M1356 M1674 Slave 12 A M1363 M1362 M1362 M1680 M1363 M1362 M1680 Slave 13 A M1367 M1366 M1366 M1684 M1367 M1366 M1684 Slave 14 A M1373 M1372 M1372 M1690 M1373 M1372 M1690 Slave 15 A M1377 M1376 M1376 M1694 M1377 M1376 M1694 Slave 16 A M1383 M1382 M1382 M1700 M1383 M1382 M1700 Slave 17 A M1387 M1386 M1386 M1704 M1387 M1386 M1704 Slave 18 A M1393 M1392 M1392 M1710 M1393 M1392 M1710 Slave 19 A M1397 M1396 M1396 M1714 M1397 M1396 M1714 Slave 20 A M1403 M1402 M1402 M1720 M1403 M1402 M1720 Slave 21 A M1407 M1406 M1406 M1724 M1407 M1406 M1724 Slave 22 A M1413 M1412 M1412 M1730 M1413 M1412 M1730 Slave 23 A M1417 M1416 M1416 M1734 M1417 M1416 M1734 Slave 24 A M1423 M1422 M1422 M1740 M1423 M1422 M1740 Slave 25 A M1427 M1426 M1426 M1744 M1427 M1426 M1744 Slave 26 A M1433 M1432 M1432 M1750 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 M1477 M1476 M1476 M1794 M1477 M1476 M1794 Slav
185. 1556 M1874 M1556 M1874 M1556 Slave 20B M1562 M1880 M1562 M1880 M1562 Slave 21B M1566 M1884 M1566 M1884 M1566 Slave 22B M1572 M1890 M1572 M1890 M1572 Slave 23B M1576 M1894 M1576 M1894 M1576 Slave 24B M1582 M1900 M1582 M1900 M1582 Slave 25B M1586 M1904 M1586 M1904 M1586 Slave 26B M1592 M1910 M1592 M1910 M1592 Slave 27B M1596 M1914 M1596 M1914 M1596 Slave 28B M1602 M1920 M1602 M1920 M1602 Slave 29B M1606 M1924 M1606 M1924 M1606 Slave 30B M1612 M1930 M1612 M1930 M1612 Slave 31B M1616 M1934 M1616 M1934 M1616 IDE FC5A MicROSMART UstER s MANUAL FC9Y B1273 24 41 24 AS INTERFACE MASTER COMMUNICATION L6 Series continued Selector Key selector Lever Illuminated selector 2 position Illuminated selector 3 position 24 42 Slave Number 3 position Input DI3 Input DI2 Input DI2 Output DOO Input DI3 Input DI2 Output DOO Slave 0 M1303 M1302 M1302 M1620 M1303 M1302 M1620 Slave 1 A M1307 M1306 M1306 M1624 M1307 M1306 M1624 Slave 2 A M1313 M1312 M1312 M1630 M1313 M1312 M1630 Slave 3 A M1317 M1316 M1316 M1634 M1317 M1316 M1634 Slave 4 A M1323 M1322 M1322 M1640 M1323 M1322 M1640 Slave 5 A M1327 M1326 M1326 M1644 M1327 M1326 M1644 Slave 6 A M1333 M1332 M1332 M1650 M1333 M1332 M1650 Slave 7 A M1337 M1336 M1336 M1654 M
186. 1740 M1422 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 M1794 M1476 Slave 4B M1482 M1800 M1482 M1800 M1482 Slave 5B M1486 M1804 M1486 M1804 M1486 Slave 6B M1492 M1810 M1492 M1810 M1492 Slave 7B M1496 M1814 M1496 M1814 M1496 Slave 8B M1502 M1820 M1502 M1820 M1502 Slave 9B M1506 M1824 M1506 M1824 M1506 Slave 10B M1512 M1830 M1512 M1830 M1512 Slave 11B M1516 M1834 M1516 M1834 M1516 Slave 12B M1522 M1840 M1522 M1840 M1522 Slave 13B M1526 M1844 M1526 M1844 M1526 Slave 14B M1532 M1850 M1532 M1850 M1532 Slave 15B M1536 M1854 M1536 M1854 M1536 Slave 16B M1542 M1860 M1542 M1860 M1542 Slave 17B M1546 M1864 M1546 M1864 M1546 Slave 18B M1552 M1870 M1552 M1870 M1552 Slave 19B M1556 M1874 M1556 M1874 M1556 Slave 20B M1562 M1880 M1562 M1880 M1562 Slave 21B M1566 M1884 M1566 M1884 M1566 Slave 22B M1572 M1890 M1572 M1890 M1572 Slave 23B M1576 M1894 M1576 M1894 M1576 Slave 24B M1582 M1900 M1582 M1900 M1582 Slave 25B M1586 M1904 M1586 M1904 M1586 Slave 26B M1592 M1910 M1592 M1910 M1592 Slave 27B M1596 M1914 M1596 M1914 M1596 Slave 28B M1602 M1920 M1602 M1920 M1602 Slave 29B M1606 M1924 M1606 M1924 M1606
187. 2 points start ing with the designated number are processed as source or destination data When a word device such as timer or coun ter is designated as a source device the current value is read as source data When a timer or counter is designated as a destination device the result of the advanced instruction is set to the preset value for the timer or counter When a data register is designated as a source or destination device the data is read from or written to the designated data register Using Timer or Counter as Source Device Since all timer instructions TML 1 sec timer TIM 100 ms timer TMH 10 ms timer and TMS 1 ms timer subtract from the preset value the current value is decremented from the preset value and indicates 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 O 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 decremented from the preset value When any counter is designated as a source device of an advanced instruction the current value is read as source data Using Timer or Counter as Destination Device As described above when a timer or counter is designated as a destination device of an advanced instruction the
188. 206 Destination 1 21 Hour 39 Minute 35 Second Destination 1 7 Year 8 Month 23 Day 4 D of W 5 Hour 5 Minute 5 Second 20 7 20 CLOCK INSTRUCTIONS When the result is less than 00 00 00 the resultant hour data is added with a multiple of 24 and the day data is decremented D8008 D8009 D8010 D8011 D8012 D8013 D8014 Source 1 7 Year 8 Month 23 Day 4 D of W 20 Hour 30 Minute 40 Second Note D100 D101 D102 Source 2 30 Hour 40 Minute 50 Second D200 D201 D202 D203 D204 D205 D206 Destination 1 7 Year 8 Month 22 Day 3 D of W 13 Hour 49 Minute 50 Second 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 stored to D203 of destination 1 20 8 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 IDEC 20 CLOCK INSTRUCTIONS HTOS HMS to Sec Hours minutes seconds Seconds pn S1 D1 pn When input is on time data
189. 21 2 FC5A MICROSMART USER S MANUAL FC9Y B1273 21 COMPUTER LINK COMMUNICATION Assigning Network Numbers When assigning a unique network number of 0 through 31 to each CPU module for the 1 N computer link network download the user program containing the network number setting to each CPU module in the 1 1 computer link system then the new network number is assigned to the CPU module Make sure that there is no duplication of network num bers in a 1 N computer link network Communication Settings When monitoring the MicroSmart operation or downloading a user program using WindLDR make sure that the same communication settings are selected for the CPU module and WindLDR so that the computer communicates with the MicroSmart in either the 1 1 or 1 N computer link system To change 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 of the MicroSmart assigned with net work number 12 in a 1 N communication computer link system 1 From the WindLDR menu bar select Online Set Up The Communication Settings dialog box appears 2 Under PLC Network Setting click the 1 N button to sel
190. 24 14 FC5A MicroSmart UsER s MANUAL FC9Y B1273 24 AS INTERFACE MASTER COMMUNICATION AS Interface Master Module Operation Modes The AS Interface master module has two modes of operation connected mode is used for actual operation and local mode is used for maintenance purposes Connected Mode In connected mode the CPU module communicates with the AS Interface master module to monitor and control each slave Connected mode is comprised of the following three modes Normal Protected Mode When the CPU module is powered up the AS Interface master module initially enters normal protected mode of con nected mode if no error occurs This is the normal operation mode for the AS Interface master module to perform data communication with the connected slaves If the configuration data stored in the AS Interface master module do not match the currently connected slave configura tion the FLT LED on the front of the AS Interface master module goes on Execute configuration using the pushbuttons on the AS Interface master module Configuration can also be done using WindLDR See page 24 36 Normal Protected Offline The AS Interface master module stops communication with all slaves and enables offline operation initialization of the master module In this mode the CPU module cannot monitor the slave status To enter normal protected offline from normal protected mode either long press the PB2 button or execute the ASI co
191. 25 1 65 1030 2310 00 51 65 specifies Saturday and Sunday WKTIM turns on output QO at 10 30 and turns off at 23 10 on every Saturday Sunday and special days 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 normal execution when the current day and time coincide with the preset day S1 and time S2 or S3 the designated output is turned on or off Execution on the special days has precedence over execution on normal days This example demonstrates operation aborted on special days The output is turned on from 10 00 a m to 8 00 p m on every Monday through Friday but is not turned on from May 2 through May 5 WKTBL designates May 2 to May 5 as special days MODE 2 skips special days S1 62 specifies Monday to Friday WKTIM turns on output QO at 10 00 and turns off at 20 00 on every Monday through Friday except on special days S1 M8120 502 52 503 53 504 54 505 WKTIM S1 52 53 D1 M8125 2 62 1000 2000 00 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 9 3 9 WEEK PROGRAMMER INSTRUCTIONS Keep Output ON across 0 a m When the hour minute comparison data to turn on S2 is larger than the hour minute comparison data to turn off S3 the comparison ON output D1 turns on at S2 on th
192. 273 IDEC Valid Data Types W word integer D double word L long F float X KX Xx Examples LC Ladder Diagram 1 Reset CNTD C2 100000 1 LC D E 99997 aa LC gt D C2 99996 Timing Chart Reset Input 10 99995 Pulse Input 11 E oi Output QO Output Q1 SN Ladder Diagram 2 ADD I LC lt I 21 LC lt I Timing Chart ON Input 12 Are D10 Value ON Output Q2 OFF Output Q3 OFF IDEC 4 DATA COMPARISON INSTRUCTIONS When a bit device such as input Q output M internal relay or R shift register is designated 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 1 point word or integer data type or 2 points double word long or float data type are used Program List Instruction Data LOD LOD CNTD LC D OUT LC gt D OUT 99996 99997 99998 99999 51 52 D1 D10 1 D10 10 11 C2 100000 C2 99997 Qo C2 99996 Q1 100000 REP Output QO 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 Program List Instruction Data LOD SOTU ADD I LC lt I LC lt I ORLOD OUT LC lt I LC lt I
193. 3 Output IDEC e Write Parameter Settings Settings LED Brightness Selection Control Data Remarks P2 P1 PO 10096 1 1 Default 5096 1 DOO 0 1 2596 0 DO1 1 0 12 596 0 0 FC5A MICROSMART UstER s MANUAL FC9Y B1273 24 39 24 AS INTERFACE MASTER COMMUNICATION HW Series Digital 1 0 Data Allocation Input data is sent from slaves to the AS Interface master Output data is sent from the AS Interface master to slaves gt Communication Input Data Output Data Switehnet eo Used 1 0 Block Mounting slave send data slave receive data ave Uni nd Position DI3 DI2 DI1 DIO DO3 DO2 DO1 DOO Pushbutton lin 2 0 X1 1 1 Pilot light 1 out 2 0 0 1 1 X1 Illuminated pushbutton 1 in 1 out 2 0 X1 1 1 X1 Selector Key selector 2 position lin 2 0 x2 1 1 1 1 0 x3 1 1 Selector Key selector 3 position lin 2 0 x3 1 1 Illuminated selector 2 position 1 in 1 out 2 0 2 1 1 X1 Nu lin 1 0 x3 1 1 Illuminated selector 3 position 110 1 out 2 0 1 1 x1 Notes 1 AS Interface master uses bit for addressing slaves As shown in the table and figure 3 position selector key selector 2 Inthe above table bits marked with X1 X2 and X3 are used for and illuminated selector switches use two communication blocks SwitchNet
194. 3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 First device address to move X X X X X 1 99 D1 Destination 1 First device address to move to X X X X X 1 99 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 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 Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X rd the source or destination 16 points word or integer data type or 32 points double word or long data integer X type are used When repeat is designated for a bit device the quantity of device bits increases in 16 or D double word X 32 point increments L long X When a word device such as T 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 F float LLL repeat is designated for word device the quantity of device words increases in 1 or 2 point increments Examples MOVN MOVN W S1 D1 REP
195. 32 bit data designated by source devices S1 and S2 are added The result is set to destination device D1 and carry M8003 Data type W or I S1 52 01 BW Data type D L or F 51 51 1 52 52 1 01 01 1 BW When input is 16 or 32 bit data designated by source device 52 is subtracted from 16 or 32 bit data designated by source device S1 The result is set to destination device D1 and borrow M8003 Data type W or I 51 x 52 gt 01 01 1 Data type D L or 51 51 1 x 52 52 1 gt 01 01 1 When input is 16 32 bit data designated by source device 51 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 range for data types D or L the ERR LED and special internal relay M8004 user program execution error are turned on Data type W l S1 52 D1 quotient D1 1 remainder Data type D or L 51 51 1 52 52 1 gt D1 D1 1 quotient 1 2 01 3 remainder Data type F 51 51 1 52 52 1 gt D1 D1 1 quotient When input is on 16 or 32 bit data designated by source device S1 is divided by 16 or 32 bit data designated by source device S2 The quo tient is set to 16 or 32 bit destination device D1 and the remainder is set to the next 16 or 32 bit data Data type F does not generate a remainder When 2 is 0 dividing by 0 the ERR LED and special internal relay M8004 user program execution e
196. 32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM T C D Constant Repeat Mode Selection of S1 data range 0 1 51 Source 1 Date time data to add to X S2 Source 2 Time data to add X D1 Destination 1 Destination to store results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When Mode 0 is selected source devices S1 and S2 and destination device D1 occupy 3 consecutive data registers starting with the designated device Data registers 00 01997 D2000 D7997 and D10000 D49997 be designated as these devices When Mode 1 is selected source device S1 and destination device D1 occupy 7 consecutive data registers starting with the designated device Data registers 00 01993 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 00 01997 D2000 D7997 and D10000 D49997 can be designated as source device S2 Since the TADD instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 20 1 20 CLOCK INSTRUCTIONS Mode 0 When mode O is selected time data hour minute and second stored in 3 data registers starting with source device S2 are added t
197. 372 M1690 M1372 M1690 M1372 Slave 15 A M1376 M1694 M1376 M1694 M1376 Slave 16 A M1382 M1700 M1382 M1700 M1382 Slave 17 A M1386 M1704 M1386 M1704 M1386 Slave 18 A M1392 M1710 M1392 M1710 M1392 Slave 19 A M1396 M1714 M1396 M1714 M1396 Slave 20 A M1402 M1720 M1402 M1720 M1402 Slave 21 A M1406 M1724 M1406 M1724 M1406 Slave 22 A M1412 M1730 M1412 M1730 M1412 Slave 23 A M1416 M1734 M1416 M1734 M1416 Slave 24 A M1422 M1740 M1422 M1740 M1422 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 M1794 M1476 Slave 4B M1482 M1800 M1482 M1800 M1482 Slave 5B M1486 M1804 M1486 M1804 M1486 Slave 6B M1492 M1810 M1492 M1810 M1492 Slave 7B M1496 M1814 M1496 M1814 M1496 Slave 8B M1502 M1820 M1502 M1820 M1502 Slave 9B M1506 M1824 M1506 M1824 M1506 Slave 10B M1512 M1830 M1512 M1830 M1512 Slave 11B M1516 M1834 M1516 M1834 M1516 Slave 12B M1522 M1840 M1522 M1840 M1522 Slave 13B M1526 M1844 M1526 M1844 M1526 Slave 14B M1532 M1850 M1532 M1850 M1532 Slave 15B M1536 M1854 M1536 M1854 M1536 Slave 16B M1542 M1860 M1542 M1860 M1542 Slave 17B M1546 M1864 M1546 M1864 M1546 Slave 18B M1552 M1870 M1552 M1870 M1552 Slave 19B M
198. 42 10 Channel 3 D1743 11 Channel 4 D1744 12 Channel 1 D1745 13 Channel 2 D1746 14 Channel 3 D1747 15 Channel 4 D1748 16 Channel 1 D1749 17 Channel 2 D1750 18 Channel 3 D1751 19 Channel 4 D1752 20 Channel 1 D1753 21 Channel 2 D1754 22 Channel 3 D1755 23 Channel 4 D1756 24 Channel 1 D1757 25 Channel 2 D1758 26 Channel 3 D1759 27 Channel 4 D1760 28 D1761 29 D1762 30 D1763 31 24 AS INTERFACE MASTER COMMUNICATION Data Format 1st data 2nd data 1 3rd data 2 Ath data 5th data AO4 6th data AO5 7th data AO6 reserved Device Address represents the offset from the Device Address designated in the RUNA or STPA instruction dialog box For example when analog input slaves 1 13 and 20 analog output slaves 5 and 25 and analog I O slaves 14 and 21 are used the analog I O slave data will be allocated by configuration as shown below and maintained until the next configu ration is executed Four channels 8 bytes are always reserved for each slave The data range area for AS Interface module 2 is the same Analog Slave Module AS Interface Master Module 1 Data Storage Analog Input Slave AS Interface Master Module 1 Data Storage Analog Output Slave 1st D1700 D1703 Slave 1 D1732 D1735 Unused 2nd D1704 D1707 Unused D1736 D1739 Slave 5 3rd D1708 D1711 Slave 13 D1740 D1743 Unused 4th D1
199. 500 250 C Set Point 53 2000 200 C AT Set Point automatically determined Linear Conversion Minimum Value S146 0 0 C IDEC Analog Input Data D760 Process Variable before Conversion S4 FC5A MicROSMART UsER s MANUAL FC9Y B1273 4095 14 19 14 PID INSTRUCTION Ladder Program The ladder diagram shown below describes an example of using the PID instruction The user program must be modified according to the application and simulation must be performed before actual operation ANST NO 1 LO3AP1 S1 M8120 DO S2 MO S3 D100 PID I 51 0 4095 DO 52 MO S3 D100 S4 D760 D1 D50 M11 CMP gt W S1 D761 52 3 D1 M11 Set Analog Module Parameters ANST Dialog Box M8120 is the initialize pulse special internal 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 O through 4095 When internal relay M4 high alarm output is turned on or M11 is turned on analog input operating status is 3 or more QO heater output is turned off and output Q1 high alarm light is turned on When M4 and M11 are off and M6 control output is turned on QO heater output is turned on
200. 51 51 1 01 01 1 H EXP F S1 D1 When input is on e is raised to the power 51 51 1 designated by source device S1 and is stored to the destination designated by device D1 e base of natural logarithm 2 7182818 Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Binary data of exponent X X D1 Destination 1 Destination to store results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When the operation result is not within the range between 3 402823 10 and 1 175495 x 10 9 or between 1 175495 10 and 3 402823 x 103 special internal relay M8003 carry or borrow is turned on except when the result is 0 When the operation result is between 1 175495 x 10 and 1 175495 x 1075 the destination device designated by D1 stores 0 When the operation result is less than 3 402823 x 10 or larger than 3 402823 10 causing an overflow the destination device designated by D1 stores a value of minus or plus infinity When the data designated by source device S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the EXP instruction is executed in each scan
201. 543 FC5A MicROSMART UsER s MANUAL FC9Y B1273 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 point word data type or 2 points double word data type are used After Exchange D21 2000 D22 D23 D24 1000 After Exchange 031 032 9876543 033 034 D35 D36 D37 D38 1234567890 3 15 3 MOVE INSTRUCTIONS TCCST Timer Counter Current Value Store S1 D1 H Tccsr SIR DAIR When input is on 16 or 32 bit data designated by 1 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 Applicable 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 Valid Devices Device Function M T C D Constant Repeat S1 Source 1 First device address to move X X X X X X X 1 99 D1 Destination 1 First device address to move to X X 1 99 For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as S1 the timer counter current value TC
202. 6 Preset value high word 1 000 000 D6 D7 1000000 51 7 Preset value low word 1 8 Current value high word 0 to 1 000 000 D8 D9 51 9 Current value low word 51 10 010 Error status RAMPST MOV W MOV W S1 DO 51 D1 D5 51 D1 D5 S1 DO D1 M100 REP REP pulses FC5A MicROSMART UsER s MANUAL FC9Y B1273 M8120 is the initialize pulse special internal relay When the CPU starts RAMPST macro designates parameters for pulse output When input 11 is off DS control direction stores 0 forward When input I1 is on D5 control direction stores 1 reverse When start input 10 is turned RAMP1 starts to generate 1 000 000 output 13 25 13 PULSE INSTRUCTIONS ZRN1 Zero Return 1 When input is on the ZRN1 instruction sends out a pulse output of a predeter mined high frequency from output QO When a deceleration input turns on the output frequency decreases to a creep frequency When the deceleration input turns off the ZRN1 instruction stops generating output pulses ZRN S1 52 D1 1 The output pulse width ratio is fixed at 50 ZRN2 Zero Return 2 When input is on the ZRN2 instruction sends out a pulse output of a predeter mined high frequency from output Q1 When a deceleration input turns on the output frequency decreases to a creep frequency When the deceleration input turns off
203. 60 1234h Binary 291 0123h Binary 18 0012h Binary IDEC 8 DATA CONVERSION INSTRUCTIONS BTOA BCD to ASCII Word data type 51 gt D1 01 1 01 2 D1 3 D1 4 H BTOA S1 S2 D1 Double word data type 51 51 1 D1 D1 1 D1 2 D1 9 RK KK When input is the 16 or 32 bit binary data designated by S1 is converted into BCD and converted into ASCII data The data is read from the lowest digit as many as the quantity of digits designated by S2 The result is stored to the destination starting with the device designated by D1 The quantity of digits to convert can be 1 through 5 for the word data type and 1 through 10 for the double word data type The double word data type is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid Devices Device Function I QM 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 15 110 D1 Destination 1 Destination to store conversion results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as S1 or S2 the timer counter current value TC
204. 712 D1715 Slave 14 D1744 D1747 Slave 14 5th D1716 D1719 Slave 20 D1748 D1751 Unused 6th D1720 D1723 Slave 21 D1752 D1755 Slave 21 7th D1724 D1727 Unused D1756 D1759 Slave 25 8th D1728 D1731 reserved D1760 D1763 reserved IDEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 23 24 AS INTERFACE MASTER COMMUNICATION Status Information For AS Interface master module 1 the status information is allocated to AS Interface internal relays M1940 through M1997 These internal relays are used to monitor the status of the AS Interface bus If an error occurs on the bus you can also confirm the error with the status LEDs on the front of the AS Interface master module in addition to these status internal relays For AS Interface master module 2 the status information can be accessed using RUNA or STPA instructions e Status Information Internal Relays Device Address AS Interface AS Interface Description Status Master Master ON OFF Module 1 Module 2 M1940 Config OK Configuration is complete Configuration is incomplete Slave address 0 is not M1941 105 0 Slave address 0 Ts deteoted detected on the AS Interface on the AS Interface bus bus M1942 Auto_Address_Assign Auto addressing is enabled Auto addressing is disabled M1943 Auto_Address_Available Auto addressing is ready Auto addressing is not ready 0 Configuration mode is Other than con
205. 96 M1714 Slave 20 A M1402 M1402 M1720 M1402 M1720 Slave 21 A M1406 M1406 M1724 M1406 M1724 Slave 22 A M1412 M1412 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 M1466 M1466 M1784 M1466 M1784 Slave 2B M1472 M1472 M1790 M1472 M1790 Slave 3B M1476 M1476 M1794 M1476 M1794 Slave 4B M1482 M1482 M1800 M1482 M1800 Slave 5B M1486 M1486 M1804 M1486 M1804 Slave 6B M1492 M1492 M1810 M1492 M1810 Slave 7B M1496 M1496 M1814 M1496 M1814 Slave 8B M1502 M1502 M1820 M1502 M1820 Slave 9B M1506 M1506 M1824 M1506 M1824 Slave 10B M1512 M1512 M1830 M1512 M1830 Slave 11B M1516 M1516 M1834 M1516 M1834 Slave 12B M1522 M1522 M1840 M1522 M1840 Slave 13B M1526 M1526 M1844 M1526 M1844 Slave 14B M1532 M1532 M1850 M1532 M1850 Slave 15B M1536 M1536 M1854 M1536 M1854 Slave 16B M1542 M1542 M1860 M1542 M1860 Slave 17B M1546 M1546 M1864 M1546 M1864 Slave 18B M1552 M1552 M1870 M1552 M1870 Slave 19B M1556 M1556 M1874 M1556 M1874 Slave 20B M1562 M1562 M1880 M1562 M1880 Slave 21B M1566 M1566 M1884 M1566 M1884 Slave 22B M1572 M1572 M1890 M1572 M1890 Slave 23B M1576 M1576 M1894 M1576 M1894 Slave 24B M1582 M1582 M1900 M1582 M1900
206. C FC5A MICROSMART User s MANUAL FC9Y B1273 11 13 11 PROGRAM BRANCHING INSTRUCTIONS 11 14 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 12 COORDINATE CONVERSION INSTRUCTIONS Introduction The coordinate conversion instructions convert one data point to another value using a linear relationship between values of X and Y X2 Y2 X1 Y1 X P YO XYFS XY Format Set When input is on the format for XY conversion is set The XY H XYFS 51 XO en Xn Yn coordinates define the linear relationship between X and Y CPU Module No of XY Coordinates n All in One 2to5 0 lt lt 4 Slim 2 to 32 0 lt lt 31 Applicable 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 Valid Devices Device Function QM T C D Constant Repeat 0 to 5 all in one CPU S1 Source 1 Format number 0 to 29 slim CPU XO through Xn X value X X X X X X 0 to 65535 0 to 65535 YO through Yn Y value X X X X X X X 32768 to 32767 For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as XO through Xn or YO through Yn the timer counter current value TC or CC is read out S1 Format number Select a format number 0 through 5 all in one type CPU or 0 through 29 slim type CPU A maximum of 6 or 30 formats for XY con version can be
207. Cancel Timer Interrupt 16 1 DEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 11 7 11 PROGRAM BRANCHING INSTRUCTIONS Example DI and El The following example demonstrates a program to disable and enable interrupt inputs and timer interrupt selectively For the interrupt input and timer interrupt functions see pages 5 34 and 5 36 Basic Vol In this example inputs I2 and are designated as interrupt inputs and timer interrupt is used with interrupt intervals of 100 ms MOV W S1 D1 M8120 is the initialize pulse special internal relay 0 D8032 D8032 stores jump destination label number for interrupt input 12 MOV W Sl Di 1 D8033 D8033 stores jump destination label number 1 for interrupt input I3 D8036 stores jump destination label number 2 for timer interrupt MOV W Sl Di 2 D8036 When input 110 is on DI disables interrupt inputs I2 I3 and timer interrupt then M8140 M8141 and M8144 turn off When input 111 is on and 110 is off El enables interrupt inputs I2 and then M8140 and M8141 turn on When input 112 is on and 110 is off El enables timer interrupt then M8144 turns on 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 r
208. Compare Equal 4 8 LC lt gt Load Compare Unequal To 1 7 4 8 LC Load Compare Less 4 8 LC Load Compare Greater 4 8 LC lt Load Compare Less Than or Equal To 4 8 LC gt Load Compare Greater Than or Equal To 4 8 Binary Arithmetic Instructions ADD Addition peie dhe qoqua luris 5 1 SUB Subtraction 55555 cd de dies ema arem edet maed eq acme 5 1 n 5 1 DIV DIVISION tee 5 1 INC due nte dee ardet ettet tirs dried ap 5 13 DEC Decrement duele ce diese dani da rdc rte 5 13 ROOT Es 5 15 SWIMS CIM 5 16 RNDMI RAMGOIM mm 5 19 FC5A MICROSMART UstER s MANUAL FC9Y B1273 i TABLE OF CONTENTS 6 7 8 9 10 11 Boolean Computation Instructions ANDW AND Word 0 0 cece cece RR m el
209. D or 4 advanced AT a derivative time is determined automatically and does not have to be designated by the user When auto tuning is not used by setting the operation mode S143 to 0 PID set a required value of 1 through 65535 to specify a derivative time of 0 1 sec through 6553 5 sec to the data register designated by S149 When S149 is set to 0 the derivative action is disabled When the derivative time is set to a large value the derivative action becomes large When the derivative action is too large hunching of a short period is caused While the PID action is in progress the derivative time value can be changed by the user 1 10 Integral Start Coefficient The integral start coefficient specifies the threshold value to start the integral action If the integral action is enabled from the start of execution of the PID instruction this may cause the process variable to be overshot Overshooting can be controlled by delaying the start of the integral action with the integral start coefficient linked to the proportional term If the integral start coefficient is too small overshooting is eliminated but a certain amount of difference offset between the set point and the process variable may occur If the integral start 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 S243 To disable the integral start c
210. D instruction should be used as required Valid Data Types W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example ATAN When input I1 is turned on the arc tangent of the value of data registers D10 sotu ATAN F En 57 D11 designated by source device 51 is stored to data registers 020 021 designated by destination device D1 atan 0 4142136 0 3926992 rad 0 3926992 7 8 rad S1 D1 D10 D11 0 4142136 20 021 0 3926992 17 8 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 18 LOGARITHM POWER INSTRUCTIONS Introduction This chapter describes logarithm and power instructions which are used to calculate logarithm or powered values of source devices LOGE Natural Logarithm log 51 51 1 01 01 1 H LOGE F S1 D1 RR REE When input is on the natural logarithm of the binary data designated by source device S1 is stored to the destination designated by device D1 Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Binary data to convert into natural logarithm X X D1 Destination 1 Destination to store conversi
211. D149 respectively 50 IMOV W S1 DJNZ 1st cycle 2nd cycle 3rd cycle 4th cycle 49th cycle 50th cycle S1 D1 D1 D1 D1 D1 D1 D1 52 52 255 D1 50 49 48 47 MOV W S1 D1 REP M8120 1049 DO MOV W S1 D1 REP D1 D2 DO D99 D1 DEC W S D Destination Destination Destination Destination Destination Destination FC5A MiCROSMART UsER s MANUAL FC9Y B1273 50 01 to determine the jump cycles M8120 is the initialize pulse special internal relay At start up MOV instructions store initial data 1049 DO to store the value for the first cycle REP IMOV moves DO data 1049 to D1049 in the first cycle D99 50 D149 D99 49 D148 D99 48 D147 D99 47 D146 D99 2 0101 D99 1 0100 DEC decrements DO data to 1048 1049 1048 1047 1046 1001 1000 D149 D148 D147 D146 D101 D100 DJNZ jumps to label 255 until D1 value reduces to 0 1049 1048 1047 1046 1001 1000 IDEC 11 PROGRAM BRANCHING INSTRUCTIONS DI Disable Interrupt H 7 a When input is on interrupt inputs and time
212. D15 0 51 25 Proportional band offset value 0 D25 0 51 26 Derivative gain 0 D26 0 2 2 s Mmahipulatedvariable limit Disable output manipulated variable limits M2 OFF 52 3 Integral start coefficient disable Enable integral start coefficient S1 10 M3 OFF gt o 244 High alarm output BE MERE DEDI E RUE Remains on during advanced auto tuning 5246 Control output Goes on and off according to the control period M6 51 13 and output manipulated variable S141 during PID action S3 Set point 200 C D100 2000 S4 Process variable fire ree cna gael 0760 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 Note D763 0 D1 Manipulated variable Stores PID calculation result D50 PID start input Starts to execute the PID instruction 10 Heater power switch Turned on and off by control output M6 Qo High alarm light Turned on and off by high alarm output M4 and al analog input error M11 Analog input error Turns on when analog input operating status D761 M11 is 3 or more Note When analog 1 0 module FC4A L03AP1 is used for the PID instruction select the binary data to make sure that the process vari able takes a value of through 4095 Analog Input Data vs Process Variable after Conversion Process Variable after Conversion S140 A Linear Conversion Maximum Value S145 13000 1300 C High Alarm Value 51 14 2
213. DEC FC5A MICROSMART User s MANUAL FC9Y B1273 11 1 11 PROGRAM BRANCHING INSTRUCTIONS Example LIMP and LABEL The following example demonstrates a program to jump to three different portions of program depending on the input When input IO 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 oscillates in 1 sec increments M8122 is the 100 ms clock special internal relay When jump occurs to label 1 output Q1 oscillates in 100 ms increments M8123 is the 10 ms clock special internal relay When jump occurs to label 2 output Q2 oscillates in 10 ms increments Using the Timer Instruction with Program Branching When the timer start input of the TML TIM TMH or TMS instruction is already on timedown begins immediately at the location jumped to starting with the timer current value When using a program branch it is important to make sure that timers are initialized when desired after the jump If it is necessary to initialize the timer instruction set to the preset value after the jump the timer s start input should be kept off for one or more scan cycles before initialization Other wise the timer input on will not be recognized Using the SOTU SOTD Instructions with Program Branching Check that pulse inputs of counters
214. Data Types The following table shows hexadecimal equivalents which are stored in the CPU as a result of addition and subtraction of the decimal values shown Data Type Result of Addition Hexadecimal Storage Result of Subtraction Hexadecimal Storage 0 0000 65535 FFFF 65535 FFFF 0 0000 Word 131071 CY FFFF 1 BW FFFF 65535 BW 0001 65536 BW 0000 65534 CY 7FFE 65534 BW 7FFE 32768 CY 0000 32768 BW 0000 32767 7FFF 32767 7FFF 0 0000 0 0000 Integer 1 FFFF 1 FFFF 32767 8001 32767 8001 32768 8000 32768 8000 32769 FFFF 32769 BW FFFF 65535 CY 8001 65535 BW 8001 0 00000000 4294967295 FFFFFFFF 4294967295 FFFFFFFF 0 00000000 Double Word 8589934591 CY FFFFFFFF 1 BW FFFFFFFF 4294967295 BW 00000001 4294967296 BW 00000000 4294967294 CY 7FFFFFFE 4294967294 BW 7FFFFFFE 2147483648 CY 00000000 2147483648 BW 00000000 2147483647 7FFFFFFF 2147483647 7FFFFFFF 0 00000000 0 00000000 Long 1 FFFFFFFF 1 FFFFFFFF 2147483647 80000001 2147483647 80000001 2147483648 80000000 2147483648 80000000 2147483649 CY FFFFFFFF 2147483649 BW FFFFFFFF 4294967295 CY 80000001 4294967295 BW 80000001 2 8 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDEC 2 ADVANCED INSTRUCTIONS Floating Point Data Format The FC5A MicroSmart can specify the floating point data type F for advanced instructions Like the double word D and long integer L data types the fl
215. EEFEE2AR 0100 0101 900642408 01000101 2 D100 D101 IDEC 5 Binary Arithmetic Instructions RNDM Random When input is on pseudorandom numbers are generated RNDM W 51 S2 D1 Source devices 51 52 specify the minimum maximum values of the gen erated pseudorandom numbers respectively S2 value must be larger than S1 value 51 and S2 values must be between 0 and 32767 The result is stored to the destination designated by device D1 This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Minimum value of pseudorandom numbers X X S2 Source 2 Maximum value of pseudorandom numbers X X D1 Destination 1 Destination to store results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When S1 or S2 value is over 32767 a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module When S1 value is larger than or equal to S2 value a user program execution error will result turning on special internal relay M8004 and ERR LED on t
216. ER s MANUAL FC9Y B1273 DE 17 TRIGONOMETRIC FUNCTION INSTRUCTIONS TAN Tangent tan 51 51 1 01 01 1 TAN F S1 D1 When input is the tangent of the radian value designated by source device 51 is stored to the destination designated by device D1 Applicable 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 Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol When the conversion result is not within the range between 3 402823 x 108 and 1 175495 x 10 or between 1 175495 x 10 and 3 402823 x 103 special internal relay M8003 carry or borrow is turned on except when the conversion result is 0 When the conver sion result is below 3 402823 x 1038 or over 3 402823 x 103 causing an overflow the destination device designated by D1 stores a value of minus or plus infinity Not Zero Overflow Overflow M8003 1 1 Execution Result 3 402823 103 1 175495x10 0 1 175495 10788 3 402823 1038 When the data designated by 51 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004
217. F float ADD S1 S2 1 word device S1 D1 2 word devices D1 2 word devices S2 1 word device XOR S1 S2 D1 1 word device 5 16 FC5A MicroSmart User s Manual FC9Y B1273 I DEC 5 Binary Arithmetic Instructions Carry and Borrow In advanced instructions involving D double word L long or F floating point data special internal relay M8003 carry and borrow is turned on when the execution of the instruction results in the following value Data Type M8003 Execution Result D double word 1 Out of the range between 0 to 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 Carry and Borrow in Floating Point Data Processing When advanced instructions involving floating point data are executed special internal relay M8003 carry and borrow is updated M8003 Execution Result Value 1 0 Overflow out of the range between 3 402823 10 and 3 402823x10 5 1 0 Not zero within the range between 1 175495x10 and 1 175495 10 3 0 0 Zero Not Zero Overflow Overflow M8003 1 1 Execution Result 3 402823 103 1 175495 1038 0 1 175495x1078 3 402823 1038 Examples SUM Data Word soru L Jsumiw 51 S2 01 pol _1 gt D100 D101 0 P soru ADD DO 4 D100 0001h 0000000Ah 2 0002h D1 3 0003h 4 0004h soru H SUM W s1 52 D1 poll 261 D100 1276 P
218. FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as 01 Valid values for the offset designated by source device S1 are 0 through 255 Make sure that the offset designated by S1 and the last bit of destination data determined by the sum of S1 and D1 are within the valid value range If the offset or destination data 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 Since the DECO 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 DECO When input IO is on the destination bit is determined by adding the value contained in LE 7 S1 D1 data register D20 designated by device S1 to internal relay M104 designated by destina PEO M104 tion device D1 Since 19th bit from internal relay M104 is internal relay M127 the bit so determined is turned on mar joo D20 19 First bit mo m moo When input 11 is on the destination bit is
219. FC9Y B1273 2 F C5A SERIES _ pentra User s Manual Advanced Volume IDEC CORPORATION SAFETY PRECAUTIONS Read this user s manual to make sure of correct operation before starting installation wiring operation maintenance and inspection of the MicroSmart All MicroSmart modules are manufactured under IDEC s rigorous quality control system but users must add a backup or failsafe provision to the control system when using the MicroSmart in applications where heavy damage or personal injury may be caused in case the MicroSmart should fail eIn this user s manual safety precautions are categorized in order of importance to Warning and Caution Warning notices are used to emphasize that improper operation may cause severe personal injury or death e Turn off power to the MicroSmart before installation removal wiring maintenance and inspection of the MicroSmart Failure to turn power off may cause electrical shocks or fire hazard e Special expertise is required to install wire program and operate the MicroSmart People without such expertise must not use the MicroSmart Emergency stop and interlocking circuits must be configured outside the MicroSmart If such a circuit is configured inside the MicroSmart failure of the MicroSmart may cause disorder of the control system damage or accidents Install the MicroSmart according to the instructions described in this user s manual Imprope
220. FF duration DTML 1 sec 2 1 sec x 2 2 sec 1 1 1 1 DTIM 100 ms 10 100 ms x 10 1 sec 5 100 ms x 5 2 0 5 sec DTMH 10 ms 50 10 ms x 50 500 ms 25 10 ms x 25 2 250 ms DTMS 1ms 250 1 ms x 250 250 ms 125 1 5 125 125 ms For the timer accuracy of timer instructions see page 7 9 Basic Vol 15 2 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDEC 15 DUAL TEACHING TIMER INSTRUCTIONS TTIM Teaching Timer While input is on the ON duration is measured in units of 100 ms and the measured value is stored a data register designated by destination device D1 The measured time range is O through 6553 5 sec Applicable 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 Valid Devices Device Function I QM R T C D Constant D1 Destination 1 Measured value lt EN For the valid device address range see pages 6 1 and 6 2 Basic Vol Destination device D1 measured value uses 3 data registers starting with the device designated as D1 Data registers DO D1997 D2000 D7997 and D10000 D49997 can be designated as D1 Subsequent two data registers starting with destination device D1 1 are used for a system work area Do not use these two data registers for destinations of other advanced instructions and do not change values of these data registers using the Point Write function on WindLDR If
221. Float sotu KY MULD SIR 528 DIR REP 1 D10 D30 3 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 D10 x D20 gt D30 D31 D11 x D21 D32 D33 D12 x D22 D34 D35 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 D10 D11 x D20 D21 n D30 D31 D12 D13 x D22 D23 D32 D33 D14 D15 x D24 D25 D34 D35 IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 9 5 Binary Arithmetic Instructions Repeat Operation in the DIV Instruction Since the DIV division instruction except the float data type uses two destination devices the quotient and remainder are stored as described below Source devices 1 and S2 and destination device D1 can be designated to repeat individu ally or in combination When destination device D1 is not designated to repeat the final result is set to destination device D1 quotient and D1 1 remainder When repeat is designated consecutive devices as many as the repeat cycles start ing with the designated device are used Division instructions in the float data type do not generate remainders and use two consecutive data registers to store quotients When repeat is designated for destination of the float data type consecutive data registers as many as the repeat cycles are used Repeat One Source Device Data Type Word and Integer When only S1 source is designated to repeat the final result is set to destination devices D1 and D1 1 S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 DIV W S1R 2 D
222. I O data Each communication block must have a unique address therefore 7 the 3 position selectors require 2 slave addresses 3 X1 When pushbutton is pressed input data is 1 on When not pressed input data is 0 off When output data is 1 on LED is on Unused input bits 013 and 012 are 0 off and unused input bits DI1 When output data is 0 off LED is off and DIO are 1 on Slaves ignore unused output data sent from the master 4 X2 The input data from 2 position selector key selector and illumi nated selector switches depend on the operator position as shown below Selector 2 position Operator Lett Right Operator Position Left Right DI2 0 1 5 X3 The input data from 3 position selector key selector and illumi nated selector switches depend on the operator position as shown below Selector Center 3 position Operator Operator Position Left Center Right Communication Block Mounting Input Data Bit Position 1 DI2 1 0 0 2 DI2 0 0 1 e Write Parameter Command 24 40 o je as mmo FC5A MICROSMART UsER s MANUAL FC9Y B1273 Communication Block Mounting Position Rear View Address Marking Area Mounting d Position AN ag T L 00 AS nterface Mounting Position i Bu Z5 AS Interface AS Interface AS Interface
223. IBMV 3 10 IBMVN 3 12 ICMP gt 4 6 ID code 24 4 ID1 code 24 4 of slave O 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 Boolean computation 6 1 clock 20 1 coordinate conversion 12 1 data comparison 4 1 data conversion 8 1 dual teaching timer 15 1 file data processing 19 1 intelligent module access 16 1 interface 10 1 logarithm power 18 1 move 3 1 PID 14 1 program branching 11 1 pulse 13 1 shift rotate 7 1 trigonometric function 17 1 week programmer 9 1 intelligent module access instructions 16 1 status code 16 6 interface instructions 10 1 internal relay for SwitchNet slaves 24 41 interval compare greater than or equal to 4 6 IOREF 11 9 L6 series digital I O data allocation 24 39 LABEL 11 1 label 11 1 call 11 3 jump 11 1 return 11 3 LAPP s cables 24 3 LAS 24 26 latch phase 10 1 LC lt 4 8 LC lt 4 8 LC lt gt 4 8 LC 4 8 LC gt 4 8 LC gt 4 8 FC5A MicroSmart User s Manual FC9Y B1273 ZIDEC LCAL 11 3 LDS 24 26 105 0 24 24 LED indicators 24 14 24 16 line connection 22 2 linear conversion 12 5 list advanced instruction 2 1 basic instruction 1 1 of active slaves LAS 24 26 of detected slaves LDS 24 26 of per
224. IONS Timing Chart for Disable Pulse Counting This program demonstrates a timing chart of the PWM2 instruction without pulse counting D102 0 disable pulse counting PWM S1 D1 1 2 D100 M20 Start Input 11 Pulse Width Ratio D101 PWR1 0 1 PWR2 a Output Pulse Q1 Pulse Output ON M20 Pulse Output Complete M21 e When input 11 is turned PWM2 starts to generate output pulses at the frequency designated by the value stored in data register D100 The pulse width is determined by the value stored in data register D101 While the output pulses are sent out from output 01 internal relay M20 remains on When input 11 is turned off PWM2 stops generating output pulses immediately then internal relay M20 turns off and inter nal relay M21 turns on f the pulse width ratio value in D101 is changed while generating output pulses the change takes effect 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 quency so that the pulse width ratio is changed successfully 13 12 FC5A MICROSMART UstER s MANUAL FC9Y B1273 I DEC Sample Program PWM2 13 PULSE INSTRUCTIONS This program demonstrates a user program of the PWM2 instruction to generate pulses from output Q1 with an ON OFF ratio of 3096 while input IO is off or 6096 when input IO is on Programming WindLDR On the Wi
225. Instruction Type Function Setting Description Initial operation mode 0000 Mode 1 100 Hz to 10 kHz Control Register Initial pulse frequency D0001 30 1 to 100 in increments of 1 51 Creep operation mode 00002 Mode 0 10 Hz to 1 kHz Mores Creep pulse frequency D0003 80 1 to 100 in increments of 1 Device Address Error Status Comment Same device address as S1 for the ZRN1 instruction OK Device Settings Device Function Description Device Address Value 51 0 Initial operation mode Frequency range 100 Hz to 10 kHz DO 1 1 1 Initial pulse frequency 10 kHz x 30 3 kHz D1 30 51 2 Creep operation mode Frequency range 10 Hz to 1 kHz D2 0 51 3 Creep pulse frequency 1 kHz x 80 800 Hz D3 80 51 4 Error status D4 2 Deceleration input High speed deceleration input I3 D1 0 Pulse output ON s E m 2i M100 D1 1 Pulse output complete ipu Bru 2 101 M8120 is the initialize pulse special internal relay ZRNST S1 R When the CPU starts ZRNST macro designates parameters for pulse output Pulse output ON flag M100 is turned off Pulse output complete flag M101 is turned off When start input 11 is turned on ZRN1 starts to generate output pulses from output 00 52 D1 M100 n DE FC5A MicROSMART UsER s MANUAL FC9Y B1273 13 31 13 PULSE INSTRUCTIONS 13 32 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 14
226. K1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X S1 S2 S3 D1 Valid Devices Device Function QM C D Constant Repeat S1 Source 1 First device address to move X X X X X X D1 Destination 1 First device address to move to X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Special internal relays cannot be designated as D1 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 When F float data type is selected only data register and constant can be designated as S1 and only data register can be designated as D1 When F float data type is selected and S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Make sure that the last destination data determined by D1 N 1 word or integer data type or D1 2N 2 double word long or float data type is within the valid device range If the derived destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and ERROR LED on the CPU module Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word
227. Lo 24V DC Power Supply 10 4 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 11 PROGRAM BRANCHING INSTRUCTIONS Introduction The program branching instructions reduce execution time by making it possible to bypass portions of the program whenever certain conditions are not satisfied The basic program branching instructions are LABEL and LJMP which are used to tag an address and jump to the address which has been tagged Programming tools include either or options between numerous portions of a program and the ability to call one of several subroutines which return execution to where the normal program left off The DI or El instruction disables or enables interrupt inputs and timer interrupt individually LABEL Label This is the label number from to 127 all in one type CPU or 0 to 255 slim type CPU used at the pro its gram address where the execution of program instructions begins for a program branch An END instruction may be used to separate a tagged portion of the program from the main program In this way scan time is minimized by not executing the program branch unless input conditions are satisfied Note The same label number cannot be used more than once Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat Label number
228. NTELLIGENT MODULE ACCESS INSTRUCTIONS RUNA WRITE Run Access Write H RUNA DATA R STATUS SLOT ADDRESS BYTE WRITE While input is on data the area starting at the device designated by DATA is written to ADDRESS in the intelligent module designated by SLOT BYTE designates the quantity of data to write STATUS stores the operating status code Applicable CPU Modules 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 Valid Devices Run Access Write Device Function I QM R C D Constant Repeat DATA First device address to extract data from X X X X X X X X X STATUS Operating status code E x SLOT Intelligent module slot number 1 7 ADDRESS First address in intelligent module to write data to EL Nl ee 0 127 BYTE Bytes of data to write 1 127 For the valid device address range see pages 6 1 and 6 2 Basic Vol DATA STATUS SLOT ADDRESS BYTE Specify the first device address to extract the data to write to the intelligent module When T timer or C counter is used as DATA for Run Access Write the timer counter current value TC or CC is writ ten to the intelligent module All data registers including special data registers and expansion data registers can be designated as DATA When a constant is de
229. NUAL FC9Y B1273 ZIDEC 14 PID INSTRUCTION While manual mode is enabled with the auto manual mode control relay S2 1 set to on 1 1 stores 0 through 100 of the manual mode output manipulated variable 51 18 and D1 stores an indefinite value irrespective of the 1 18 value While auto tuning is in progress S141 stores 0 through 100 of the AT output manipulated variable 1422 and D1 stores an indefinite value While advanced auto tuning is in progress 51 1 and D1 store an indefinite value Examples of Output Manipulated Variable Values Output Manipulated Output Manipulated Output Manipulated Manipulated Variable Output Manipulated Variable Limit Enable Variable Upper Limit Variable Lower Limit P D1 Variable S2 2 S1 16 S1 17 S1 1 gt 100 100 OFF disabled 1 to 99 1 to 99 lt 0 0 gt 50 50 50 25 26 to 49 26 to 49 lt 25 25 ON enabled gt 100 50 10050 1to 99 1to 99 x 0 5 lt 0 0 IMPORTANT The control output 52 6 is turned on and off according to the control period 51 13 and the output manipulated vari able S1 1 When an feedback system consists of the control output S246 optimum control may not be achieved for some controlled object then it is recommended that a feedback control system be programmed using the calculation results of the manipulated variable D1 Notes for Using the PID Instruction e Since the PID instruction requires continuous operation
230. Note D1 3 SU epe 093 28 S145 jos S241 01 5 ae S1 6 S242 pos D1 6 pon Note Device S143 in source 1 is not used for execution and need not be designated Source 1 data is compatible with leap 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 day and stored to device D143 Day of week data represent 0 Sunday 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday and 6 Saturday When source 1 contains invalid day time data a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module When the execution result exceeds 99 year 12 month 31 day 23 59 59 a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module 20 2 FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC 20 CLOCK INSTRUCTIONS Examples TADD The following examples demonstrate the TADD instruction to add time data in two different modes Mode 0 10
231. OA BCD to ASCII X 8 9 ATOB ASCII to BCD X X 8 12 Data Conversion ENCO ae DECO Decode 8 16 BCNT Bit Count 8 17 ALT Alternate Output 8 18 CVDT Convert Data Type 8 19 DTDV Data Divide X 8 21 DTCB Data Combine X 8 22 SWAP Data Swap X X 8 23 WKTIM Week Timer 9 1 Week Programmer WKTBL Week Table 9 2 DISP Display 10 1 Interface DGRD Digital Read 10 3 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 Pasic 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 Receive 5 Basic Vol 10 15 RXD6 Receive 6 Basic Vol 10 15 RXD7 Receive 7 Basic Vol 10 15 LABEL Label 11 1 LIMP Label Jump 11 1 LCAL Label Call 11 3 LRET Label Return 11 3 DJNZ Decrement Jump Non zero 11 5 Program Branching DI Disable Interrupt 11 7 Enable Interrupt 11 7 IOREF I O Refresh 11 9 HSCRF High speed Counter Refresh 11 11 FRQRF Frequency Measurement Refresh 11 12 COMRF Communication Refresh 11 13 2 2 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 IDE Group Coordinate Conversion Pulse PID Instruction Dual Teaching Timer Intelligent Module Access Trigonometric Function Logarithm Power File Data Processing Clock Ethernet Instructions IDEC
232. OMETRIC FUNCTION INSTRUCTIONS acos 51 51 1 01 01 1 rad D1 When input is on the arc cosine of the value designated by source device 51 is stored radians to the destination designated by device D1 The 51 51 1 value must be within the following range 1 0 515141 lt 1 0 If the 51 51 1 value is not within this range an indefinite value is stored to D1 D1 1 FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Arc cosine value to convert into radian gt X X D1 Destination 1 Destination to store conversion results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When the data designated by source device S1 is not within the range between 1 0 and 1 0 or does not comply with the normal float ing point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the ACOS 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 W word integer D double word L long F float X Example ACOS sotu ACOS F uo Since the floating point data type is used the source and destination devices use two consecutive data r
233. OREF instruction can be used with an interrupt input or timer interrupt to refresh data Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 O for refresh A Only input or output numbers available on the CPU module can be designated as S1 Input and output numbers for expansion 1 mod ules cannot be designated as S1 For the valid device address range see pages 6 1 and 6 2 Basic Vol Input Device Addresses and Allocated Internal Relays Input Device Internal Relay Input Device Internal Relay 10 M300 110 M310 11 M301 111 M311 12 M302 112 M312 13 M303 113 M313 14 M304 114 M314 15 M305 115 M315 l6 M306 116 M316 17 M307 117 M317 During normal execution of a user program 1 statuses are refreshed simultaneously when the END instruction is exe cuted at the end of a scan When a real time response is needed to execute an interrupt the IOREF instruction can be used When the input to the IOREF instruction is turned on the status of the designated input or output is read or written immediately When the IOREF instruction is executed for an input the filter does not take effect and the input status at the moment is read to a corresponding internal relay The actual input status of the same input number is read to the internal inp
234. PID instruction as required and make sure that the values are within the valid range Devices 1 0 through S142 1 23 and 1 24 are for read only For programming the devices using a macro see page 14 21 Device 51 0 Function Process variable after conversion Description When S1 4 control mode 1 or 3 enable linear conversion Stores the process variable after conversion When S1 4 control mode 0 or 2 disable linear conversion Stores the process variable without conversion R W S141 Output manipulated variable Stores the output manipulated variable manual mode output variable and AT output manipulated variable in percent to 100 0 to 100 51 2 Operating status Stores the operating or error status of the PID instruction 51 3 Operation mode PID action AT auto tuning PID action AT auto tuning Advanced AT PID action R W 51 4 Control mode linear conversion and proportional term Disable linear conversion proportional gain Enable linear conversion proportional gain Disable linear conversion proportional band 0 1 2 3 4 Advanced AT 0 1 2 3 Enable linear conversion proportional band R W 51 5 Linear conversion maximum value Word data type 0 to 65535 Integer data type 32768 to 32767 R W 51 6 Linear conversion minimum value Word data type 0 to 65535 Integer data type 32768 to 32767 R W
235. PU modules with system program version 200 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat N File Number File Number 0 9 51 Source 1 Quantity of data registers per record 1 255 52 Source 2 Quantity of records 2 255 D1 Destination 1 First data register to store FIFO data file X D2 Destination 2 FIFO status output For the valid device address range see pages 6 1 and 6 2 Basic Vol Special internal relays cannot be designated as 02 Since the FIFOF 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 When an M internal relay is designated as the D2 three internal relays starting with the device desig W word X nated by D2 are used integer 2 When D data register is designated as the D1 1xS2 2 data registers starting with the device desig D double word nated by D1 used L long F float IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 19 1 19 FiLE DATA PROCESSING INSTRUCTIONS Destination Device D1 FIFO Data File FIFO data files are initialized when corresponding FIFOF in
236. PULS2 cannot be programmed to generate a predetermined number of output pulses When input is on the PULS3 instruction sends out a pulse output from output 02 The output pulse frequency is determined by source device S1 The output pulse width ratio is fixed at 5096 PULS3 can be programmed to generate a predetermined number of output pulses When pulse counting is disabled PULS3 generates output pulses while the start input for the PULS3 instruction remains on Note The PULS1 PULS2 and PULS3 instructions can be used only once in a user program When PULS1 PULS2 or PULS3 is not used unused output 00 01 or Q2 can be used for another pulse instruction or ordinary output Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D Valid Devices FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X PULS1 and PULS2 i x Device Function QM R T C D Constant Repeat S1 Source 1 Control register D1 Destination 1 Status relay Ss KMS S Source device S1 control register uses 8 data registers starting with the device designated as S1 Data registers DO D1992 D2000 D7992 and D10000 D49992 can be designated as S1 For details see the following pages Destination device D1 status relay uses 3 internal relays starting with the device designated as D1 Internal relays MO to M2550 can be designated as D1 The least significant digit of the internal relay number designated as D1 must be 0 ot
237. RAMP1 instruction Cancel Device Settings Device Function Description Device Address Value 51 0 Operation mode Frequency range 200 Hz to 100 kHz DO 3 1 1 Steady pulse frequency 6 kHz D1 600 51 2 Initial pulse frequency 300 Hz D2 30 51 3 Frequency change time 2 000 ms D3 2000 1 4 Reversible control enable Reversible control disabled D4 0 1 5 Control direction Not used no effect DS 1 6 Preset value high word 48 000 D6 D7 48000 51 7 Preset value low word 51 8 Current value high word 0 to 48 000 D8 D9 S149 Current value low word 1410 Error status D10 0 Pulse output OFF D1 0 Pulse output ON 1 Pulse output ON M100 D1 1 Pulse output complete SEDIS output not complete M101 1 Pulse output complete D1 2 Pulse output status 0 Steady pulse output M102 1 Changing output pulse frequency D1 3 Pulse output overflow SESSION RIBTHECUTRO M103 1 Overflow occurred M8120 is the initialize pulse special internal relay RAMPST S1 DO When the CPU starts RAMPST macro designates parameters for pulse output 51 D1 When start input 10 is turned on RAMP1 starts to generate 48 000 output pulses DO M100 FC5A MICROSMART USER s MANUAL FC9Y B1273 13 23 13 PULSE INSTRUCTIONS Sample Program RAMP1 Reversible Control with Single Pulse Output This program demonstrates a user program of the RAMP1 instruction to generate 100 000 pulses from output QO Con trol direct
238. Re need ep re RR Pe Re RC RUE e pee Rr Bod t 17 8 Logarithm Power Instructions LOGE Natural 2 2 22222222 2 2 18 1 LOG10 Common Logarithm 18 2 EXP EXPONENE P PEL 18 3 POW POWER 18 4 File Data Processing Instructions FIFOF FIFO Format ded ated Rer n cde rc e 19 1 FC5A MICROSMART UstER s MANUAL FC9Y B1273 iii TABLE OF CONTENTS 20 Cuaprer 21 22 23 24 25 EXECUTE essere n ERR RR RR RU 19 3 FOEX First Out Execute 19 3 NDSRC N Data Seafrch 13 3 um aen ee c ut east ita e Porc ale aia n RR Ce Ro Dee RR DAR DA e Br Rec t 19 5 Clock Instructions Time Addition 0 cee enn nee teen net ra 20 1 TSUB Time Subtraction 20 5 HMS to Se dated 20 9 STOH Sec to HMS 0 0 cc cece eee 20 10 HOUR Hour Meter 20 11 Computer Link Communication Comput
239. S Interface cable terminal block from the AS Interface cable connector on the AS Interface master module AS Interface specifies use of brown cables for the AS Interface line and blue cables for the AS Interface line Connect the cables 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 Use a ferrule Brown Label Brown AS Interface Blue AS Interface Use a ferrule Blue Label 24 6 FC5A MICROSMART UseR s MANUAL FC9Y B1273 ZIDEC 24 AS INTERFACE MASTER COMMUNICATION Power Supply Caution 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 a communication error e Turn on the AS Interface power supply no later than the CPU module power supply except when slave address exists on the network The two power supplies may be turned off in any order e Immediately after power up the CPU module cannot access slave I O data in the AS Interface mas ter module Make the user program so that slave I O data are accessed after special internal relay M1945 Normal Operation Active has turned on See page 24 25
240. S2 source are designated to repeat source devices as many as the repeat cycles starting with the devices designated by 1 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 Operation AND S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 CMP gt W S1R 52 D1 10 AND D10 D20 M10 3 D10 10 D20 0 011 20 021 20 AND M10 D12 30 lt gt 022 100 MEN e Data Type Word Repeat Logical Operation OR S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 CMP gt W S1R 52 D1 Rep 10 D10 0 3 010 10 lt D 0 D11 20 gt D21 20 OR M10 D12 30 gt D22 100 c Data Type Double Word Repeat Logical Operation AND S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 CMP gt D SIR S2R Di Repeat a Repeat 3 Repeati 0 10 AND D20 D30 M50 3 D20 D21 30031 073 D22 D23 032 033 AND M50 024 025 D34 D35 4 4 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 4 DATA COMPARISON INSTRUCTIONS Repeat Source and Destination Devices When S1 S2 source and D1 destination are
241. S232C Communication Adapter To RS232C Port E Modem C N 2 RTS Request to Send DTR Data Terminal Ready TXD Transmit Data RXD Receive Data DSR Data Set Ready SG Signal Ground Signal Ground No Connection Modem Cable 1 FC2A KM1C 3m 9 84 ft long I gt zl D sub 25 pin Male Connector D sub 25 pin Connector Pinouts Description Frame Ground Transmit Data Receive Data Request to Send No Connection No Connection Signal Ground Data Carrier Detect N Data Terminal Ready e Do not connect the NC no connection pin to any line otherwise the MicroSmart or modem may be damaged e Modem cables for Apple Macintosh computers cannot be used for the MicroSmart e Do not connect the cable to the port 1 or port 2 RS485 otherwise the MicroSmart or modem may be damaged FC5A MicROSMART UsER s MANUAL FC9Y B1273 22 MODEM MODE Applicable Modems Any Hayes compatible modem can be used Modems with a communications rate of 9600 bps or more between modems are recommended Use modems of the same make and model at both ends of the communication line Special Internal Relays for Modem Mode Special internal relays M8050 M8077 are allocated to the modem mode M8050 M8056 are used to send an AT com man
242. Slave 4B D 1916 N 4 Slave N 3 B Slave N 2 B Slave N 1 B Slave NB D1923 Slave 31B Slave 30B Slave 29B Slave 28B 24 28 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDEC 24 AS INTERFACE MASTER COMMUNICATION Permanent Parameter PP For AS Interface master module 1 data registers D1924 through D1939 are allocated to read and write the PP of each slave Like the PI the PP is made up of four parameters the P3 P2 P1 and PO When auto configuration is executed the is copied to the PP and stored in the ROM of the AS Interface master module When you execute manual configura tion you can set the PP using the Configure Slave dialog box on WindLDR The ASI command Read PP can be used to read PP data to data registers D1924 through D1939 After changing the PP set tings execute the ASI command Read PP then you can use the updated PP data for program execution Device Address Data Format AS Interface Master AS Interface Master Bits 15 to 12 Bits 11 to 8 Bits 7 to 4 Bits 3 to 0 Module 1 Module 2 P3 P2 P1 PO P3 P2 P1 PO P3 P2 P1 PO P3 P2 P1 PO D1924 Slave 3 A Slave 2 A Slave 1 A Slave 0 D1925 Slave 7 A Slave 6 A Slave 5 A Slave 4 A D1926 Slave 11 A Slave 10 A Slave 9 A Slave 8 A D 1924 N 4 Slave N 3 A Slave N 2 A Slave N 1 A Slave N A D1931 Slave 31 A Slave 30 A Slave 29 A Slave 28 A D1932 Slave 3B Slave 2B Slave 1B unused D1933 Slave 7B
243. Smart starts to run the user program the default modem initialization strings is stored to D8145 D8169 See page 22 3 Default Initialization String ATEOQOV1 amp D2 amp C1NVOXA amp K3MVAONN5SO 2 amp W CR LF Programming Data Registers and Internal Relays To enable the modem mode and communicate through the telephone line the following settings are needed 1 If the default initialization string does not match your modem program a proper initialization string and enter the ASCII val ues to data registers starting with D8145 initialization string To send out the new initialization string turn on internal relay M8050 initialization string start IR after the new values have been stored to the data registers Program to move 0 or 1 to data register D8103 online mode protocol selection to select maintenance protocol or user pro tocol for the RS232C port 2 after telephone line is connected 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 ODh at the end of the telephone number See page 22 4 If you want to change the default value of 3 retry cycles program to move a required value to data register D8109 Include internal relays M8050 M8077 in the user program to control the modem communication as required Setting Up the CPU Module 1
244. Source 2 X value X X X X X X 0 to 65535 D1 Destination 1 Destination to store results X X X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S2 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 S1 Format number Select a format number 0 through 5 all in one type CPU or through 29 slim type CPU which have been set using the XYFS instruc tion When an XYFS instruction with the corresponding format number is not programmed or when XYFS and CVXTY instructions of the same format number have different data type designations a user program execution error will result turning on special internal 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 12 2 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 12 COORDINATE CONVERSION INSTRUCTIONS D1 Destination to store results The conversion result of the Y value is stored to the destination Data Type Word Integer S2 X value 0 to 65535 0 to 65535 D1 Y value 0 to 65535 32768 to 32767 Y yi 65535 32767 Valid Coordinates
245. T USER S MANUAL FC9Y B1273 DE Troubles at System Start up 24 AS INTERFACE MASTER COMMUNICATION The following table summarizes possible troubles at system start up probable causes and actions to be taken Trouble PWR LED is off Cause and Action e AS Interface power is not supplied to the AS Interface master module Check that wiring is correct and AS Interface power is supplied power Power is not supplied from the CPU module to the AS Interface master module Check the connection between the CPU module and the AS Interface master module e Slave configuration on the bus is incorrect Use the WindLDR slave monitor function to check that slaves are connected correctly Perform configuration if necessary For the con FLT LED is on figuration method see page 24 34 fault If FLT LED remains on even though slaves are connected correctly and configuration is com pleted either disconnect and reconnect the AS Interface connector or turn off and on the AS Interface power supply The CPU module fails to communicate with the AS Interface master module Check the fol lowing points LMO LED is on e Is the CPU module compatible with AS Interface Check the Type No of the CPU module local mode Is a check mark put in the check box Use AS Interface Master Module in WindLDR Func tion Area Settings The box is checked as default If not put a check mark and download the user program to the CPU module OFF LED
246. T User s MANUAL FC9Y B1273 24 3 24 AS INTERFACE MASTER COMMUNICATION Main Features of AS Interface V2 with Slave Expansion Capability The AS Interface is a reliable bus management system in which one master periodically monitors each slave device con nected on the AS Interface bus in sequence The master manages the I O data parameters and identification codes of each slave in addition to slave addresses The management data depends on the type of the slave as follows Standard Slaves e A maximum of four inputs and four outputs for each slave e Four parameters for setting a slave s operation mode P3 P2 P1 PO e Four identification codes ID code 1 code 102 code and ID1 code A B Slaves e A maximum of four inputs and three outputs for each slave e Three parameters for setting a slave s operation mode P2 P1 PO e Four identification codes ID code 1 code 102 code and ID1 code Note 1 Parameters P3 through PO are used to set an operation mode of the slave For details see the user s manual for the slave Note 2 The slaves connected to the AS Interface bus are distinguished from each other by the ID code and I O code contained in each slave Some slaves have ID2 code and ID1 code to indicate the internal functions of the slave For example analog slaves use the ID2 code to represent the channel number of the slave Note 3 The MicroSmart AS Interface master module is also compatible with AS Interface ver 2 1 and
247. The special data register number and value shown above are for port 3 For the DSR signal on other ports see page 10 36 Basic Vol IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 25 11 25 EXPANSION RS232C RS485 COMMUNICATION Setting Communication Parameters Set the communication parameters to match those of the printer See page 25 10 For details of the communication parameters of the printer see the user s manual for the printer An example is shown below Communication Parameters Baud rate 9600 bps Data bits 8 Parity None Stop bits 1 Note The receive timeout value is used for the RXD instruction in the user communication mode Since this example uses only the TXD instruction the receive timeout value has no effect Ladder Diagram The second data stored in special data register D8014 is compared with using the CMP compare equal to instruction Each time the condition is met the TXD3 instruction is executed to send the C2 and D30 data to the printer A counting circuit for counter C2 is omitted from this sample program MOVW S1 D1 REP M8120 is the initialize pulse special internal relay M8120 24 D8105 24 D8105 to enable the DSR option for busy control CMP W S1 52 D1 REP M8125 is the in operation output special internal relay M8125 08014 0 MD CMP W compares the D8014 second data with 0 MOV W S1 D1 REP When the D8014 data equals 0 second MO is turned on MO C2 D31 Counter C2 current value
248. USER S MANUAL FC9Y B1273 IDEC HW Series 24 AS INTERFACE MASTER COMMUNICATION Selector Key selector Pushbutton Pilot Light Illuminated Pushbutton a Slave Number 2 position Input DI2 Output DOO Input DI2 Output DOO Input DI2 Slave 0 M1302 M1620 M1302 M1620 M1302 Slave 1 A M1306 M1624 M1306 M1624 M1306 Slave 2 A M1312 M1630 M1312 M1630 M1312 Slave 3 A M1316 M1634 M1316 M1634 M1316 Slave 4 A M1322 M1640 M1322 M1640 M1322 Slave 5 A M1326 M1644 M1326 M1644 M1326 Slave 6 A M1332 M1650 M1332 M1650 M1332 Slave 7 A M1336 M1654 M1336 M1654 M1336 Slave 8 A M1342 M1660 M1342 M1660 M1342 Slave 9 A M1346 M1664 M1346 M1664 M1346 Slave 10 A M1352 M1670 M1352 M1670 M1352 Slave 11 A M1356 M1674 M1356 M1674 M1356 Slave 12 A M1362 M1680 M1362 M1680 M1362 Slave 13 A M1366 M1684 M1366 M1684 M1366 Slave 14 A M1372 M1690 M1372 M1690 M1372 Slave 15 A M1376 M1694 M1376 M1694 M1376 Slave 16 A M1382 M1700 M1382 M1700 M1382 Slave 17 A M1386 M1704 M1386 M1704 M1386 Slave 18 A M1392 M1710 M1392 M1710 M1392 Slave 19 A M1396 M1714 M1396 M1714 M1396 Slave 20 A M1402 M1720 M1402 M1720 M1402 Slave 21 A M1406 M1724 M1406 M1724 M1406 Slave 22 A M1412 M1730 M1412 M1730 M1412 Slave 23 A M1416 M1734 M1416 M1734 M1416 Slave 24 A M1422 M1740 M1422 M
249. Vol Source device S1 occupies 2 consecutive data registers to store double word data starting with the designated device Data registers DO D1998 D2000 D7998 and D10000 D49998 can be designated as source device S1 Destination device D1 occupies 3 consecutive data registers starting with the designated device Data registers D0 D1997 D2000 D7997 and D10000 D49997 can be designated as destination device D1 Second data for source device 51 can be 0 through 4 294 967 295 When the conversion result exceeds 65535 hours 59 minutes 59 seconds special internal relay M8003 carry is turned on For exam ple the conversion result is 65537 hours 0 minute 0 second destination 1 stores 1 hour 0 minute second turning on 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 EE NE S1 D1 EE NE D100 Destination 1 Source 1 ome Hour DS DG Second TELLUS D101 Minute 102 Second 08 Source 1 D109 Hour D506 Second m D101 minute D102 20 10 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 I DE
250. When T timer or C counter is used as D1 the device data is the timer counter preset value TP or CP which can be 0 through 65535 When F float data type is selected only data register can be designated as S1 or D1 When F float data type is selected and S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Either source device S2 or destination device D2 does not have to be designated If S2 or D2 is not designated the source or destina tion device is determined by S1 or D1 without offset Make sure that the source data determined by S1 S2 and the destination data determined by D1 D2 are within the valid device range If the derived source or destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X the source or destination 16 points word data type 32 points double word data type are used 1 integer When repeat is designated for a bit device the quantity of device bits increases in 16 or 32 point incre D double word X ments L long When a word device such as T timer C counter or D data register is designated as
251. X m the source or destination 16 points word or integer data type or 32 points double word or long data 1 integer X type are used D double word X When a word device such as T timer C counter or D data register is designated as the source or L long X destination 1 point word or integer data type or 2 points double word long or float data type are F float HE n Example NSET F sotu HH NSET F S1 52 53 54 SS D1 0 51 D20D21 0 51 li 0 51 234 789 333 100 D20 EET Five constants 0 51 2 34 7 89 3 33 and 10 0 gt 020 through 029 7 89 gt 0241025 789 3 33 gt D26 D27 3 33 When input 10 is turned on 5 constants designated by source devices S1 through S5 are moved to 10 data registers starting with D20 designated by destination device D1 10 0 028 029 10 0 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 3 13 3 MOVE INSTRUCTIONS NRS N Data Repeat Set 51 gt D1 D2 D3 Dn 1 NRS N W S1 D1 When input is 16 or 32 bit data designated by 51 is set to blocks of desti nations starting with device designated by D1 This instruction is available on upgraded CPU modules with system program version 200 or higher blocks of 16 32 bit data First 16 32 bit data Second 16 32 bit data D1 N Data Repeat Set D1 1 or D1 2 32 Third 16 32 bit data uem Us
252. ZRN2 Pulse Output Port Q2 PULS3 PWM3 ZRN3 RAMP2 Q3 14 49 Hz Output Frequency 10 Hz to 100 kHz 45 96 Hz 10 Hz to 100 kHz 10 Hz to 100 kHz 367 65 Hz Pulse Width Ratio 5096 0 to 100 50 50 pine Countin PULS1 PWM1 RAMP1 PULS3 PWM3 RAMP2 Preset Value 1 to 100 000 000 1 to 100 000 000 1 to 100 000 000 m Frequency Change Time 10 to 10 000 ms High speed 12 13 14 15 Deceleration Input 10 11 16 to 1627 7 MO to M2557 IDEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 13 1 13 PULSE INSTRUCTIONS PULS1 Pulse Output 1 AE EFI S1 D1 AE EFI PULS2 Pulse Output 2 pe 3 S1 D1 pe 3 PULS3 Pulse Output 3 Ww S1 D1 Ww Not available FC5A 16RK1 RS1 When input is on the PULS1 instruction sends out a pulse output from output QO output pulse frequency is determined by source device S1 The output pulse width ratio is fixed at 5096 PULS1 can be programmed to generate a predetermined number of output pulses When pulse counting is disabled PULS1 generates output pulses while the start input for the PULS1 instruction remains on When input is on the PULS2 instruction sends out a pulse output from output Q1 The output pulse frequency is determined by source device S1 The output pulse width ratio is fixed at 5096 PULS2 generates output pulses while the start input for the PULS2 instruction remains on
253. a ASCII H Soru PRAI H A ET 53 D10 6 D20 11 010 011 499602029 020 0035h 54 0036h D21 55 022 0037h 56 0038h 57 0039h D23 D24 48 D25 0030h Quantity of Digits 3 BCD ASCII H SOT B m 56 D10 3 20 2 D10 D11 499602 2 gt 020 0038h 57 0039h D21 48 022 0030h IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 11 8 DATA CONVERSION INSTRUCTIONS ATOB ASCII to BCD Word data type S1 1 1 51 2 143 51 4 D1 H ATOB 51 S2 D1 Double word datatype S1 S1 1 S1 2 S1 9 gt 01 01 1 When input is the ASCII data designated by 51 as many as the quantity of digits designated by S2 is converted into BCD and converted into 16 or 32 bit binary data The result is stored to the destination designated by device D1 Valid values for source data to convert are 30h through 39h The quantity of digits to convert can be 1 through 5 for the word data type and 1 through 10 for the double word data type The double word data type is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid Devices Device Fun
254. a 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 cY MSB D10 LSB 1 0 1 0 0 0 0 00 0 0 0 0 1 10 M8003 cY MSB D10 LSB 1 0 1 00 0 0 00 0 0 0 0 1111011 M8003 cY MSB D10 LSB 0 110 01 0 0101 01 0 101 01 0 111 0 1 0 8003 Each time input 11 is turned on 32 bit data of data registers 010 and 011 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 D10 D11 LSB i 1 0 1 0 ojojojo 0100 1011111011110 10 0 00 01000 011140 lt 8003 x Rotate to the left After rotation D10 D11 1 074 610 189 MSB D10 D11 LSB 1 0 1 00 0 0 01 0 0 00 110 1 0 1 0 0 70 0 0 0 0 00 0 1 10 1 M8003 IDEC FC5A MicroSmart User s Manual FC9Y B1273 7 SHIFT ROTATE INSTRUCTIONS ROTR Rotate Right ees When input is 16 or 32 bit data of th
255. a type W or I 51 82 D1 on CMP lt gt S1 R S2 R D1 R REP Data type D L or F 51 51 1 52 52 1 01 AND OR When input is 16 32 bit data designated by source devices 51 and S2 are compared When S1 data is not equal to S2 data destina tion device D1 is turned on When the condition is not met D1 is turned off CMP lt Compare Less Than Data type W or I 1 lt S2 D1 on CMP S1 R S2 R D1 R REP Data type D L or F 51 51 1 lt 52 52 1 D1 on AND OR sx When input is 16 or 32 bit data designated by source devices 51 and S2 are compared When S1 data is less than S2 data destination device D1 is turned on When the condition is not met D1 is turned off CMP gt Compare Greater Than Data type W or I S1 gt S2 D1 on CMP gt S1 R S2 R D4 R Data type D L or F 51 51 1 gt 52 52 1 D1 on AND OR When input is 16 or 32 bit data designated by source devices 51 and S2 are compared When S1 data is greater than S2 data destina tion device D1 is turned on When the condition is not met D1 is turned off CMP lt Compare Less Than or Equal To Data type W or I 51 lt S2 D1 on CMP lt S1 R S2 R D1 R Data type D L or F 51 51 1 lt 52 52 1 gt D1 on AND OR When input is 16 or 32 bit data
256. ace Master AS Interface Master Bits 15 to 12 Bits 11 to 8 Bits 7 to 4 Bits 3 to 0 Module 1 Module 2 ID Code Code ID2 Code ID1 Code D1780 Slave 0 D1781 Slave 1 A D1782 Slave 2 A D 1780 N Slave N A D1811 Slave 31 A D1812 unused D1813 Slave 1B D 1812 N Slave NB D1843 Slave 31B IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 24 27 24 AS INTERFACE MASTER COMMUNICATION Permanent Configuration Data PCD For AS Interface master module 1 data registers D1844 through D1907 are allocated to read and write the PCD of each slave Like the CDI the PCD is made up of four codes the ID code 1 code 1 2 code and ID1 code When auto configuration is executed the CDI is copied to the PCD and stored in the ROM of the AS Interface master module When you execute manual configuration you can set the PCD using the Configure Slave dialog box on WindLDR Set the PCD of each slave to the same value as its 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 The ASI command Read PCD can be used to read the PCD data to data registers D1844 through D1907 Execute the ASI command Read PCD before using the PCD data for program execution Device Address Data Format AS Interface Master AS Interface Master Bits 15 to 12 Bits 11 to 8 Bits 7 to 4 Bits 3 to 0 Module 1 Module 2 ID Code I O Code
257. ace master module or WindLDR Configuration Using Pushbuttons PB1 and PB2 e gt SRSRGECKIERN ER Shut down and power up again Press PB1 and PB2 Press PB2 Press PB1 1 Check that PWR LED and CMO LED on the AS Interface master module are on normal protected mode 2 Press pushbuttons 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 Shutdown the CPU module and AS Interface master module and power up again Check that FLT LED is off which indicates that configuration is complete 6 Use WindLDR to view slave information on the Configure AS Interface Master dialog box and check that all slaves are recog nized correctly 24 10 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 24 AS INTERFACE MASTER COMMUNICATION Configuration Using WindLDR Slave configuration can be set using WindLDR in two ways using the Auto Configuration or Manual Configuration button on the Configure AS Interface Master dialog box 1 Click the Auto Configuration button to store the configuration information LDS CDI Pl of the connected slaves to the EEPROM LPS PCD PP in the AS Interface master module For details see page 24 36 The auto configuration automatically stores the information of
258. after Conversion S1 0 High Alarm Value 51 14 2500 250 C Set Point 53 2000 200 C AT Set Point automatically determined gt Time L PID Action Auto Tuning Device Settings for Analog I O Module nnd Function Description Device Address Value ee Input 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 Analog output data 4095 D772 Output Analog output operating status Stores 0 through 4 D773 Analog output signal type Voltage output 0 to 10V DC D774 0 Analog output data type 12 bit data 0 to 4095 D775 0 14 22 FC5A MICROSMART USER S MANUAL FC9Y B1273 N I DEC 14 PID INSTRUCTION Ladder Program The ladder diagram shown below describes an example of using the PID instruction The user program must be modified according to the application and simulation must be performed before actual operation Programming in the dialog boxes of the ANST Set Analog Module Parameters PIDST Set PID Parameters and PID PID Control instructions are the same as the preceding example NO 1 M8120 is the initialize pulse special internal relay 0 1 When the CPU starts the ANST analog macro instruction a stores parameters for the analog I O module function DO The PIDST PID macro instruction also stores parameters for the PID function
259. aling 22 2 telephone number 22 4 digital I O data allocation 24 39 24 40 input dataimage 24 20 output dataimage 24 21 read 10 3 switch data reading time 10 3 direct control action 14 14 disable interrupt 11 7 disconnect line 22 2 mode 22 2 22 5 discontinuity of device areas 2 10 DISP 10 1 display 10 1 processing time 10 1 DIV 5 1 division 5 1 DJNZ 11 5 double word data move in data registers 3 2 devices in data registers 2 10 DTCB 8 22 DTDV 8 21 DTIM 15 1 DTMH 15 1 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 iii INDEX DTML 15 1 DTMS 15 1 dual teaching timer instructions 15 1 El 11 7 enable clock cartridge adjustment 9 8 interrupt 11 7 ENCO 8 15 encode 8 15 error code 24 35 24 36 24 37 24 38 messages 24 38 exchange 3 15 exclusive OR word 6 1 execution time COMRF 11 13 EXP 18 3 expansion capability 24 4 RS232C RS485 communication 25 1 exponent 18 3 FIEX 19 3 FIFO format 19 1 FIFOF 19 1 file data processing instructions 19 1 first in execute 19 3 first out execute 19 3 flat cable 24 3 FOEX 19 3 format number 12 1 12 2 12 3 frequency measurement refresh 11 12 FRQRF 11 12 function area settings 24 8 hex to ASCII 8 5 BCD 8 1 hexadecimal storage decimal values 2 8 high speed counter refresh 11 11 HMS 20 9 HOUR 20 11 hour meter 20 11 HSCRF 11 11 HTOA 8 5 HTOB 8 1 HTOS 20 9 HW series digital I O data allocation 24 40 1 0 code 24 4 data 24 20 refresh 11 9
260. an while input is on a pulse input from a SOTU or SOTD instruction should be used as required Examples ENCO E M17 M37 M57 M77 M97 M117 Bit D10 D11 D12 D13 D15 IDEC 51 M4 ENCO S1 64 D10 15 14 13 12 11 D1 D100 D1 D100 10 9 When input IO is on a bit which is on is sought in 64 bits starting at internal relay M4 designated by device S1 Since internal relay M30 is the first point that is on the offset from the first search point is 20 and 20 is stored to data register D100 designated by device D1 MO 20 0100 M40 M60 gt M80 M100 C Searched area When input 11 is on a bit which is on is sought in 64 bits starting at bit 0 of data register D10 designated by device S1 Since bit 8 of data register D11 is the first point that is on the offset from the first search point is 24 and 24 is stored to data register D100 designated by device D1 gt a es epu pe espe searched area FC5A MicroSmart User s Manual FC9Y B1273 8 15 8 DATA CONVERSION INSTRUCTIONS DECO Decode When input is on the values contained in devices designated by 1 and D1 are added to pipe n mul p xs 51 D1 determine the destination and the bit so determined is turned on Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1
261. and Changing Output Status and Parameters While the MicroSmart is communicating with AS Interface slaves through the AS Interface bus operating status of AS Interface slaves can be monitored using WindLDR on a computer Output statuses and parameter image of slaves con nected to the AS Interface master module can also be changed using WindLDR 1 From the WindLDR menu bar select Online Monitor then select Online Monitor Slaves The Monitor AS Interface 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 OO through O3 and parameters PI PO through P3 as required Monitor AS Interface Slaves Master Module No e 1 2 Slave Blue Shade Slave Status 01 Outputs 00 off Parameters PO 1 On off Doff The selected parameters PI are in effect until the CPU module is shut down When the CPU module is powered up again the parameter values PP selected in the slave configuration procedure page 24 10 will take effect To store the changed parameter values to the AS Interface master module EEPROM execute the Copy PI to PP command by storing 0306 0100 0000 0000 0001 to data registers D1941 through D1945 See page 24 30 24 12 FC5A MICROSMAR
262. and S2 source are designated to repeat the final result is set to destination device 01 01 1 Data Type Word and Integer S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 MUL W S1R S2R D1 REP P i D10 D20 D30 3 D10 D20 Ie 030 031 D11 x D21 030 031 D12 x D22 D30 D31 Data Type Double Word Long and Float S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 MUL D SIR 528 Di D12 D13 D22D23 gt 030 031 D14 DI5 24 025 030 031 5 8 FC5A MicroSmart User s Manual FC9Y B1273 I DEC Repeat Source and Destination Devices 5 Binary Arithmetic Instructions When S1 source and 01 destination are designated to repeat different results are set to 3 devices starting with D1 D1 1 Data Type Word and Integer sotu H MUL W SIR 52 REP 1 D10 D30 3 Data Type Double Word Long and Float SOTU H MUL D S1R S2 REP 1 D10 030 3 Repeat All Source and Destination Devices S1 Repeat 3 S2 Repeat 0 D1 Repeat 3 D10 x D20 gt D30 D31 D11 x D20 D32 D33 D12 x D20 D34 D35 S1 Repeat 3 S2 Repeat 0 D1 Repeat 3 D10 D11 x D20 D21 D30 D31 D12 D13 x D20 D21 D32 D33 D14 D15 x D20 D21 D34 D35 When all devices are designated to repeat different results are set to 3 devices starting with 01 01 1 Data Type Word and Integer sotu HH SIR S2R DIR REP D10 030 3 Data Type Double Word Long and
263. and the ERR LED on the CPU module Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as the source N W or destination 16 points word data type are used integer D double word When a word device such as T timer C counter or D data register is designated as the source N W or destination 1 point word data type is used L long F float Special Internal Relay M8024 BMOV WSFT Executing Flag While the BMOV or WSFT is executed M8024 turns on When completed M8024 turns off If the CPU is powered down while executing BMOV or WSFT M8024 remains on when the CPU is powered up again Example BMOV SOTU BMOV W S1 N W D1 010 2005 gt 20 2005 10 D10 5 D20 Dii 12 p21 12 D12 25 D22 25 D13 12 D23 12 D10 through D14 D20 through D24 When input IO is turned on data of 5 data registers starting with D10 designated by source device S1 is moved to 5 data registers starting with D20 designated by desti D14 30 nation device D1 D24 30 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 3 9 3 MOVE INSTRUCTIONS IBMV Indirect Bit Move S1 S2 D1 D2 IBMV S1 R S2 D1 R D2 REP RRR RRR When input is
264. are reserved for system work area 50 lt gt 0100 0101 0102 gt 02 While input 10 is the ON duration is measured The measured time value hour minute and second is stored to data registers 0100 0101 0102 designated by destination device D1 and compared with 50 hours designated by source device S1 When the measured value reaches 50 hours output Q2 designated by destination device D2 is turned on Data registers D1900 and D1901 designated by destination device D3 are reserved for system work area FC5A MICROSMART USER s MANUAL FC9Y B1273 I DEC 21 COMPUTER LINK COMMUNICATION Introduction When the MicroSmart CPU module is connected to a computer operating status and 1 status can be monitored on the computer data in the CPU module can be monitored or updated and user programs can be downloaded and uploaded The CPU module can also be started and stopped from the computer A maximum of 32 CPU modules can be connected to one computer in the 1 N computer link system This chapter describes the 1 N computer link system For the 1 1 computer link system see page 4 1 Basic Vol For computer link communication on port 3 through port 7 using expansion RS232C RS485 communication modules see page 25 1 Computer Link System Setup 1 N Computer Link System To set up a 1 N communication computer link system install the RS485 communication adapter FC4A PC3 to the port 2 connector on the all in one type CPU modul
265. arting with source device 52 are subtracted from the time data hour minute and second stored in 3 data registers starting with source device S1 The results are stored to 3 data registers starting with destination device D1 Source 1 Source 2 Destination 1 51 093 52 0 23 DA 093 ios piei area S142 1 S242 7 D142 Hour data be 0 through 23 Minute and second data be 0 through 59 When the execution result is less than 00 00 00 the result is added with 24 hours and stored to the data register designated by desti nation device D1 turning on special internal relay M8003 borrow When any of the hour minute or second data 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 Mode 1 When mode 1 is selected time data hour minute and second stored in 3 data registers starting with source device S2 are subtracted from the date time data year month day day of week hour minute and second stored in 7 data registers starting with source device S1 The results are stored to 7 data registers starting with destination device D1 Source 1 Destination 1 51 ee DI i99 S141 Het
266. ary 123 0000007Bh IDEC ENCO En nim code Pe Wd 51 Bits Applicable CPU Modules FCSA C10R2 C D D1 FC5A C16R2 C D 8 DATA CONVERSION INSTRUCTIONS 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 FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 First bit to start search X X X X X D1 Destination 1 Destination to store search results X X X Bits Quantity of bits searched Hm N a For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 Valid values for Bits to designate the quantity of bits searched are 1 through 256 Make sure that the search area designated by S1 plus Bits is within the valid value range If the source data 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 Since the ENCO instruction is executed in each sc
267. asic Vol Forced I O 5 72 Basic Vol RUN LED Flashing Mode 5 49 Memory Cartridge Upload Function Basic Vol Note 5 2 93 Off Delay Timer Instructions Basic Vol TMLO TIMO TMHO and TMSO 7 11 Double Word Counter Instructions Basic Vol CNTD CDPD and CUDD 7 15 MOV and IMOV Instructions Upgrade 34 New data type F 5 2 or N Data Set and N Data Repeat Set higher 3 13 3 14 Instructions NSET and NRS 200 or higher 200 or higher 200 or higher Timer Counter Current Value Store 3 16 Instruction TCCST CMP Instructions Upgrade 4 4 Load Comparison Instructions 4 8 LC LC lt gt LC lt LC LC and LC gt BTOA and ATOB Instructions Upgrade 8 9 New data type D 8 12 Data Divide Combine and Swap 8 21 8 22 Instructions DTDV DTCB and SWAP 8 23 User Communication Instructions Basic Vol Upgrade TXD and RXD 10 6 10 15 File Data Processing Instructions FIFOF FIEX and FOEX 197413 3 IDEC All In One Type Slim Type FCSA C10R2 FC5A C10R2C FC5A C24R2 FC5A D16RK1 FC5A D16RS1 CPU Module i WindLDR Page FC5A C10R2D FCSA C24R2C FC5A D32K3 FC5A C16R2 FCSA C24R2D FC5A D32S3 FC5A C16R2C FC5A D12K1E FC5A C16R2D FC5A D12S1E Note 1 Basic Vol Key Matrix Input Note 6 5 38 User Program Protection Upgrade 5 3 Exchange Instruction XCHG 210 or higher 210 or higher higher 3 15 Increment Instruction INC 210 or h
268. asic Vol Is the communication cable connected correctly Make sure of correct wiring 2 89 25 11 Are the communication settings for the remote terminal cR and expansion RS232C RS485 communication port the Xd P p 25 10 sion communication port as the remote terminal same U de the CPU modul t i Is the CPU module system program version applicable to Dee S MOA Eya vE Son Basic Vol the expansion RS232C RS485 communication module to EUG Sr hue penta use the FCSA SIF2or A 9 higher to use the FC5A SIF4 Is the correct port number designated in the TXD instruc Designate a correct port number in the TXD instruc Basic Vol tion tion 10 7 Is the start input for the TXD instruction on Turn on the start input for the TXD instruction 25 12 Is the PWR LED on the CPU module on See The PWR power LED does not go on 25 13 Basic Vol Is the PWR LED on the FC5A SIF4 module flashing Supply the rated voltage to the CPU module 34 Data is not transmitted correctly in the user communication Check Action Page Are the communication settings for the external device Set the same communication parameters for expan 25 10 and expansion communication port the same sion communication port as the external device Is the same data register designated as destination device Change the duplicate device to another data regis Basic Vol D2 transmit status repeatedly ter 10 6 Are inputs to more than 5 TXD instructions on simultane Co
269. aster module 2 are shown in the table below AS Interface Master Module 2 AS Interface Master Module EEPROM Data Size preteens Read Write Device Address AS Interface Object 0 32 3 0 R Digital input IDI input data image 3 32 3 0 Ww Digital output ODI output data image 2 6 1 0 R Status information 1 64 5 2 R Analog input 4 64 5 2 Analog output List of active slaves LAS 9 24 3 0 R List of detected slaves LDS List of peripheral fault slaves LPF List of projected slaves LPS Configuration data image A CDI Configuration data image B CDI 2 Permanent configuration data A PCD 2 Permanent configuration data PCD 2 Parameter image 2 Permanent parameter 2 Slave 0 101 code Z ASI command description 1 Thetime required for the CPU module to update the device data for RUNA or STPA instruction For example when reading IDI ODI status information LAS LDS and LPF continuously 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 24 32 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 24 AS INTERFACE MASTER COMMUNICATION WindLDR Program to Access AS Interface Objects for AS
270. at only the disconnect command is sent while the line is connected 63 AT command execution error Command failed in the first and all retry cycles IDEC FC5A MicROSMART USER s MANUAL FC9Y B1273 22 7 22 MODEM MODE Initialization String Commands The built in initialization string see page 22 3 include the commands shown below For details of modem commands see the user s manual for your modem When you make an optional initialization string modify the initialization string to match your modem EO Characters NOT echoed The modem mode of the MicroSmart operates without echo back Without the EO command the MicroSmart misunderstands an echo for a result code An error will be caused although a command is executed correctly This command must be included in the initialization string Qo Result codes displayed The modem mode of the MicroSmart is configured to use result codes Without the QO command a timeout error will be caused although a command is executed correctly This command must be included in the initialization string V1 Word result code The modem mode of the MicroSmart is configured to use word result codes Without the V1 command result codes are regarded as invalid and a timeout error will be caused although a command is executed correctly This command must be included in the initialization string amp D2 Hang up and disable auto answer on DTR detection When the DTR signal turns of
271. ata 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 retry cycles 22 3 interval 22 3 reverse control action 14 14 revision history 1 3 RNDM 5 19 ROOT 5 15 rotate left 7 8 right 7 10 ROTL 7 8 ROTR 7 10 RS232C cable 21 1 communication adapter 22 1 expansion communication 25 1 port communication protocol 22 5 RS232C RS485 converter 21 1 RS485 communication adapter 21 1 module 21 1 expansion communication 25 1 run access read 16 2 write 16 3 RUNA READ 16 2 RUNA WRITE 16 3 sample program change slave 24 31 modem answer mode 22 13 modem originate mode 22 12 scan time adjusting 10 4 sectoHMS 20 10 selecting the PLC type 24 8 send slave data 24 39 24 40 set point 14 16 setting calendar clock using a user program 9 6 using WindLDR 9 6 SFTL 7 1 SFTR 7 3 shift left 7 1 right 7 3 shift rotate instructions 7 1 short press 24 14 SIN 17 3 sine 17 3 slave addresses 24 4 FC5A MicroSmart User s Manual FC9Y B1273 ZIDEC expansion capability 24 4 identification 24 4 information 24 27 list information 24 26 profile 24 27 analog 24 22 recei
272. ata Types W word integer D double word X L long F float IDEC FC5A MicroSmart User s Manual FC9Y B1273 When a word device such as D data register is designated as source S1 2 points double word data type are used When a bit device such as I input Q output M internal relay or R shift register is designated as source S2 16 points are used When a word device such as T timer C counter or D data register is designated as source S2 1 point is used 7 5 7 SHIFT ROTATE INSTRUCTIONS Example BCDLS M8120 is the initialize pulse special internal relay MOV W 51 Di 8120 123 D10 When the CPU starts operation the MOV move instructions set 123 and 4567 to data registers D10 and D11 respectively MOV W S1 D1 REP m 2 4567 D11 Each time input IO is turned on the 32 bit 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 When S2 1 digits to shift D10 D11 Before shift 011 213 41 516 7 5 10 Shift to the left After first shift 0 5 1112 3 4 5 6 7 0 0 After second shift 1 4 2 3 4 5 16 7 0 0 MSD LSD
273. ated variable 51 1 is reduced to zero When PID action is selected with operation mode S143 set to 1 AT PID or 3 advanced AT PID the PID action follows imme diately When the operation mode S143 is set to 1 AT PID 2 AT or 4 advanced set a required AT set point to the data register designated by 51 21 When the operation mode S143 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 is disabled S144 set to 0 or 2 set a required AT set point of through 4095 or 50000 depending on the analog 1 0 module type to the data register designated by 1 21 When 51 21 stores a value larger than 4095 or 50000 the AT set point is set to 4095 or 50000 When the linear conversion is enabled 51 4 set to 1 or 3 set a required AT set point of through 65535 word data type or 232768 through 32767 integer data type to the data register designated by 51 21 set point must be larger than or equal to the linear conversion minimum value S146 and must be smaller than or equal to the linear con version maximum value S145 In the direct control action see page 14 15 set the AT set point 51 21 to a value sufficiently smaller than the process variable S4 at the start of the auto tuning In the reverse control action set the AT set point S1 21 to a value suffi ciently larger than the process variable S4 at the start of t
274. because the process variable S4 fluctuated excessively To restart d AT set the AT sampling period S1 19 or the input filter coefficient 51 11 to a larger value AT failed to produce correct results because the quantity of AT sampling cycles is too small This error occurs when the AT sampling period 51 19 is too long or when the difference is too small 202 between the process variable at the start of AT sampling and the AT set point 51 21 Set the AT set point S1 21 to a value so that a sufficient step action can be performed and set the AT sampling period S1 19 to a value so that sampling can be performed more than 10 cycles S143 Operation Mode When the start input for the PID instruction is turned on the CPU module checks the value stored in the data register designated by S143 and executes the selected operation The selection cannot be changed while executing the PID instruction 0 PID action The PID action is executed according to the designated PID parameters such as proportional term S1 7 integral time S148 derivative time S149 sampling period 51 12 control period S1 13 and control action S240 1 AT auto tuning PID action Auto tuning is first executed according to the designated AT parameters such as AT sampling period 51 19 AT control period S1 20 AT set point 51 21 and AT output manipulated variable S1 22 As a result of auto tuning PID parameters are deter mined such as pro
275. ble Word 810 gt D2 D3 H MOV D S1 D1 DO 10 810 D2 When input IO is on constant 810 designated by source device S1 is moved to data registers D2 and D1 D3 designated by destination device D1 D2 0 6 0 D3 810 810 Data move operation for the long data type is the same as for the double word data type Data Type Word D10 gt D2 sol H MOV W 51 Di REP 41 11 When input 11 is on the data in data register D10 02 designated by source device 51 is moved to data D1 register D2 designated by destination device D1 D2 930 qo SET 010 930 Data Type Double Word 010 011 D2 D3 DO MOV D ma a REP When input 11 is on the data in data registers D10 pi 1 D11 designated by source device 51 is moved to data registers D2 and D3 designated by destination D2 device D1 D3 D10 Double word D11 Data Double word Data Move in Data Registers When a data register timer or counter is selected as a double word device the upper word data is loaded from or stored to the first device selected The lower word data is loaded from or stored to the subsequent device Double word Destination Device Data Register Double word Data Move to Data Registers MOV D 51 D1 REP Source Data ioina 305419896
276. ble word data type are used When repeat is des ignated for a word device the quantity of device words increases in 1 or 2 point increments IMOVN W 51 52 D1 D2 REP io C10 D30 020 010 4 SAY C10 D10 NOT gt D30 D20 Source device 51 and destination device D1 determine the type of device Source device 52 and destination 30 15 device D2 are the offset values to determine the source and destination devices If the data of data register D10 designated by source device S2 is 4 then the source data is determined by add D21 L ing the offset to counter C10 designated by source device S1 TT C 10 4 C14 pas suus If data register D20 designated by destination device D2 contains a value of 15 then the destination is deter D46 mined by adding the offset to data register D30 designated by destination device D1 22 221 0 30 15 045 C13 As a result when input IO is on the current value of counter C14 is inverted and moved to data register D45 C14 6450 C15 3 8 FC5A MICROSMART UstER s MANUAL FC9Y B1273 3 MOVE INSTRUCTIONS BMOV Block Move 51 51 1 142 S1 N 1 D1 01 1 D1 2 D1 N 1 BMOV W S1 N W D1 When input is N blocks of 16 bit word data starting with device designated by S1 are moved to N blocks of destinations starting with device desi
277. bus Master communication can be used on port 2 through port 7 Modbus Slave communication can be used on port 1 through port 7 Optional communication adapter FC4A PC1 or FC4A PC3 or communication module FCAA HPC1 or FC4A HPC3 is needed to use port 2 Expansion RS232C or RS485 communication modules FCSA SIF2 or FC5A SIFA are needed to use port through port 7 Note 5 Memory cartridge FC4A PM32 FC4A PM64 or FC4A PM128 is required to use this function Note 6 Key matrix inputs cannot be used on the FC5A C24R2D CPU module Revision History Date Manual No Description March 2009 B 1138 0 First print e New functions of system program version 220 February 2010 B 1138 1 E e Expansion RS485 Communication Module FC5A SIFA August 2014 B 1138 2 PID instruction upgrade The integral start coefficient can be set when the propor tional band is selected IDEC FC5A MicroSmart User s Manual FC9Y B1273 Preface 3 About This Manual This user s manual primarily describes programming and powerful communications of the MicroSmart Chapter 1 Basic Instructions Reference Programming of the basic instructions available devices and sample programs Chapter 2 Advanced Instructions General rules of using advanced instructions terms data types and formats used for advanced instructions Chapter 3 through Chapter 20 Detailed descriptions on advanced instructions grouped into 18 chapters Chapter 21 through C
278. ceive over Ethernet FC5A MICROSMART USER s MANUAL FC9Y B1273 2 3 2 ADVANCED INSTRUCTIONS Advanced Instruction Applicable CPU Modules Applicable advanced instructions depend on the type of CPU modules as listed in the table below Group NOP Move Data Comparison Binary Arithmetic Boolean Computation Shift and Rotate 2 4 Symbol NOP MOV All in One Type CPU Modules Slim Type CPU Modules FC5A C10R2 FC5A C10R2C FC5A C10R2D FC5A C16R2 FC5A C16R2C FC5A C16R2D FC5A C24R2 FCSA C24R2C FCSA C24R2D FCSA D16RK1 FCSA D16RS1 FCSA D32K3 FC5A D3253 FCSA D12K1E FCSA D12S1E X MOVN IMOV IMOVN BMOV IBMV IBMVN NSET NRS XCHG TCCST CMP CMP lt gt CMP lt CMP gt CMP lt CMP gt ICMP gt LC LC lt gt LC lt 1 gt LC lt LC gt ADD SUB MUL DIV INC DEC ROOT SUM RNDM ANDW ORW XORW SFTL SFTR BCDLS WSFT ROTL ROTR X X X X X X X 0X X OK PX OK 0X DX X X OK X X X X X X X X X X X X X X X x X XxX x x X X X X X X X X X 0X 0X X X X X X X X X X X X X X x X X X X X X X X X X X X X X XxX x X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
279. cial Internal Relays M8150 M8151 and M8152 in CMP Three special internal relays are available to indicate the comparison result of the CMPz instruction Depending on the result one of the three special internal relays turns on When S1 S2 M8150 greater than turns on miii D1 When S1 S2 M8151 equal to turns on Status When S1 S2 M8152 less than turns on 1 51 gt 52 ON OFF OFF OFF 2 51 52 OFF ON OFF ON i 3 51 lt 52 OFF OFF ON OFF Small Large lt gt When repeat is designated the comparison result of the last repeat 52 1 2 3 cycle turns on one of the three special internal relays When more than one or ICMP gt instruction is used M8150 M8151 or M8152 indicates the result of the instruc tion that was executed last 4 2 FC5A MICROSMART UstER s MANUAL FC9Y B1273 1 DEC Examples CMP gt 4 DATA COMPARISON INSTRUCTIONS The following examples are described using the gt instruction Data comparison operation for all other data compari son instructions is the same for the CMP2 instruction Data Type Word S1 52 gt S1 52 D1 REP 10 D10 D20 Qo 10 127 D20 50 10 42 020 56 Data Type Integer S1 52 CMP gt I S1 S2 01 REP 11 D30 D40 Q1 D30 12 lt Dp40 3 D30 4 lt gt Dp40 3 Data Type Double Word
280. cted mode S1 2 R W When S1 2 operation mode 3 20 to 10 000 x10 Hz Note 2 51 4 Error status Oto2 R Note 1 The frequency range of mode 3 is from 250 Hz to 100 kHz for FCSA D12K1E and FC5A D12S1E Note 2 The frequency range of mode 3 is from 25 to 10 000 x10 Hz for FC5A D12K1E and FC5A D12S1E 1 0 Initial Operation Mode The value stored in the data register designated by device 51 0 determines the frequency range of the high frequency initial pulse output 0 10Hzto 1 kHz 1 100 Hzto 10 kHz 2 1kHzto 100 kHz 3 200 Hz to 100 kHz 1 1 Initial Pulse Frequency When 51 0 is set to through 2 the value stored in the data register designated by device S141 specifies the initial fre quency of the pulse output in percent of the maximum of the frequency range selected by 1 0 Valid values for device 51 1 1 through 100 thus the initial pulse frequency can be 10 Hz to 1 kHz operation mode 0 100 Hz to 10 kHz operation mode 1 or 1 kHz to 100 kHz operation mode 2 When 51 0 is set to 200 Hz to 100 kHz valid values for device S141 are 20 through 10 000 and the 51 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 596 maximum Initial Operation Mode S140 Initial Pulse Frequency Hz 0to2 1 to 100 Maximum frequency selected by S140 x 51 1 value 96 3 20 to 10 000 51 1 value x 10 S142 Creep
281. ction I QM R T C D Constant Repeat S1 Source 1 ASCII data to convert X 52 Source 2 Quantity of digits to convert X X X X 1 5 1 10 D1 Destination 1 Destination to store conversion results X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Special internal relays cannot be designated as 01 When T timer or C counter is used as S2 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 Valid values for source S1 data to convert are 30h through 39h The quantity of digits to convert can be 1 through 5 for the word data type and 1 through 10 for the double word data type Make sure that the values for each source designated by S1 and the quantity of digits designated by S2 are within the valid range If the S1 or S2 data 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 Make sure that the last source data determined by 51 52 1 is within the valid device range If the derived source device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and ERROR LED on the CPU mod ule Since the ATOB 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
282. ction Parameters Type Control Register Settings Instruction Type Function DR Setting Description Operation mode 0000 Mode 3 200 Hz to 100 kHz Control Register Output pulse Frequency 00001 20 20 to 10 000 in increments of 10 x10Hz Pulse counting 0002 Enable pulse counting PULS1 and PULS3 instructions only Preset value 00003 00004 5 1 to 100 000 000 05 5 E100h Device Address Current value 00005 00006 1 to 100 000 000 05 5 E100h Comment Error Status 00007 Same device address as S1 for the PULS1 instruc tion Device Settings Device Function Description Device Address Value 51 0 Operation mode Frequency range 200 Hz to 100 kHz DO 3 1 1 Output pulse frequency 200 Hz D1 20 51 2 Pulse counting Enable pulse counting D2 1 5143 Preset value high word 5 000 D3 D4 5000 1 4 Preset value low word S145 Current value high word 0 to 60 000 D5 D6 1 6 Current value low word PULSST S1 M8120 is the initialize pulse special internal relay R When the CPU starts PULSST macro designates parameters for pulse output in the first stage Pulse data update flag 1 is reset pulse data not updated Pulse output complete flag M101 is turned off When M101 is turned on two MOV instructions store second stage MOV W ages ot parameters to data registers D1 D3 and D4 50 D1 MOV D 51 D1 REP 101 D1 outp
283. ction are used integer D double word L long F float FOEX First Out Execute data registers starting with the device designated D1 When input is on the data is retrieved from the corresponding FIFO data file and stored to the FOEX W D This instruction is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat N File Number File number 0 9 D1 Destination 1 First data register number to store data X For the valid device address range see pages 6 1 and 6 2 Basic Vol Make sure that FOEX instructions are executed after the corresponding FIFOF instruction has initialized the FIFO data file If FOEX instructions are executed without executing the corresponding FIFOF instruction a user program execution error will result turning on special internal relay M8004 and the ERR LED on the 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 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 19 3 19 FiLE DATA PROCESSING INSTRUCTIONS Valid Data Types W word X integer D double word L long
284. cuit This is required when equipment containing the MicroSmart is des tined for Europe Use an EU approved circuit breaker This is required when equipment containing the MicroSmart is destined for Europe Make sure of safety before starting and stopping the MicroSmart or when operating the MicroSmart to force outputs on or off Incorrect operation on the MicroSmart may cause machine damage or accidents e f relays or transistors in the MicroSmart output modules should fail outputs may remain or off For output signals which may cause heavy accidents provide a monitor circuit outside the MicroSmart Do not connect the ground wire directly to the MicroSmart Connect a protective ground to the cabinet containing the MicroSmart using an M4 or larger screw This is required when equipment containing the MicroSmart is destined for Europe Do not disassemble repair or modify the MicroSmart modules Dispose of the battery in the MicroSmart modules when the battery is dead in accordance with pertaining regulations When storing or disposing of the battery use a proper container prepared for this purpose This is required when equip ment containing the MicroSmart is destined for Europe When disposing of the MicroSmart do so as an industrial waste IDEC FC5A MicroSmart User s Manual FC9Y B1273 Preface 1 Revision Record The table below summarizes the changes to this manual since the first printing of FC9Y B927 0 in Apr
285. cuted in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as the source or destination 16 points word data type are used integer D double word When a word device such as T timer C counter or D data register is designated as the source or destination 1 point word data type is used L long F float IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 7 8 DATA CONVERSION INSTRUCTIONS Examples ATOH Quantity of Digits 4 soru H ATOH W 51 52 D1 io D10 4 D20 D10 Quantity of Digits 3 011 012 013 H ATOH W 51 s2 Di 1 D10 3 D20 D10 Quantity of Digits 2 011 012 sotu HH ATOH W 51 52 D1 2 D10 2 D20 D10 Quantity of Digits 1 011 soru H ATOH W s1 52 D1 010 1 D20 D10 8 8 ASCII 49 0031h 50 0032h 51 0033h 52 0034h ASCII 49 0031h 50 0032h 51 0033h ASCII 49 0031h 50 0032h ASCII 49 0031h D20 D20 D20 1 gt 020 1 FC5A MicroSmart User s Manual FC9Y B1273 Binary 46
286. d integer D double word L long F float 2X XXX xXx 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 Device W word integer D double word L long F float S1 2 1 word device 2 word devices S3 D1 1 word device 1 word device IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 19 5 19 FiLE DATA PROCESSING INSTRUCTIONS Examples NDSRC The following examples demonstrate the NDSRC instruction to search data of three different data types Data Word NDSRC W 51 S2 S33 Di 10 010 0100 5 D200 D10 1234 Search Data Type Double Word NDSRC D S1 10 D10 D10 D11 12345678 Data Type Float NDSRC F S1 10 D10 D10 D11 0 4521 19 6 D99 D100 Offset 0 0101 1 match Result D200 D102 2 gt 201 D103 3 match D104 4 D105 52 53 D1 D100 5 D200 D98 D99 12345678 D100 D101 1459997 0 D102 D103 12345678 2 match D104 D105 4584557 4 D106 D107 12345678 6 match D108 D109 12345678 8 match D110 D111 1234457 52 53 D1 D100 5 D200 Search D98 D99 Offset 1000101 0 D102 D103 2 D104 D105 4 D106 D107 6 match D108 D109 8 D110 D111
287. d D8059 stores the current D8059 Current Pulse Frequency ulse frequency of output Q2 of PULS3 or RAMP2 Q2 T 2 value is updated every scan IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 19 13 PULSE INSTRUCTIONS Timing Chart for Reversible Control Disabled This program demonstrates a timing chart of the RAMP1 instruction when reversible control is disabled D204 0 reversible control disabled RAMP S1 D1 D200 M50 Start Input 10 Steady Pulse Frequency Initial Pulse Frequency Output Pulse QO Pulse Output ON M50 Pulse Output Complete M51 Pulse Output Status M52 When input IO is turned on RAMP1 generates output pulses starting at the initial frequency designated by the value stored in data register D202 While the output pulses are sent out from output QO internal relay M50 remains on Operation modes through 2 The pulse frequency increases according to the frequency change rate value stored in data register D203 Operation mode 3 The pulse frequency increases as long as the frequency change time stored in data register D203 While the output pulse frequency is on the increase internal relay M52 remains on When the output 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
288. d LF are appended at the beginning and end of the initialization string automatically by the system program and are not stored in data registers DR 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 AT EO QO V1 amp D 2 amp CL V OX 4 amp A OV 5 SO 2 amp W 0000 LF Depending on your modem and telephone line the initialization string may have to be modified Consult the manual for your modem Changes can be made by entering required values to data registers 08145 08169 Store two characters in one data regis ter the first character at the upper byte and the second character at the lower byte in the data register AT and LF need not be stored in data registers Use the MOV move instructions on WindLDR to set the initialization string characters and ASCII value ODh for CR at the end Program the MOV instructions to replace the default values 08145 08169 stored in the first scan and execute the MOV instructions in a subsequent scan For essential commands which must be included in the initialization string see page 22 8 After the new values are stored turn on M8050 to send the new initial ization string to the modem When the initialization string has been sent successfully internal relay M8060 is turned on If the initialization string fails internal relay M8070 i
289. d store required values to data resisters D1941 through D1945 as listed in the table below i Command Data Hexadecimal ASI Command IUE Description Time ms 1941 D1942 D1943 1944 D1945 Read LPS 1 0 Reads LPS to D1776 D1779 010B 084C 0000 0000 0001 Read CDI 10 4 Reads CDI to D1780 D1843 010C 4050 0000 0000 0001 Read PCD 10 4 Reads PCD to D1844 D1907 010E 4090 0000 0000 0001 Read 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 2 Reads slave 0 ID1 to D1940 0109 02 0 0000 0000 0001 Write Slave 0 ID1 0 7 3 Writes D1940 to slave 0 ID1 0209 02 0 0000 0000 0001 Copy PI to PP 0874 Copies parameter image to permanent 0306 0100 0000 0000 0001 parameter Change Slave 0 8 4 Writes to slave Note 0306 0102 000 00 0001 Hina 08 From normal protected mode to normal 0306 0301 0000 0000 0001 protected offline 4 From normal protected offline to normal Go to Normal Protected Mode 0 8 0306 0300 0000 0000 0001 protected mode Prohibit Data Exchange 08 From normal protected mode to normal 0306 0401 0000 0000 0001 protected data exchange off Enable Data Exchange 087 Fror normal pr ect d data exchange 0306 0000 0001 off to normal protected mode Change Slave Address 0 8 4 Change slave address 4 to new 0306 050
290. d in the following cases Error Code Description 1 e An error was found on the expansion 1 0 bus 7 e The AS Interface master module is in local mode e The slave you are trying to change does not exist A slave of the designated new address already exists 8 e While a standard slave was set at A address attempt was made to set slave at B address of the same number e While an slave was set at B address attempt was made to set a standard slave at A address of the same number FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 35 ZiDEC 24 AS INTERFACE MASTER COMMUNICATION Configuration Before commissioning the AS Interface master module configuration must be done using either WindLDR or the push buttons on the front of the AS Interface master module This section describes the method of configuration using WindLDR For configuration using the pushbuttons see page 24 10 Configuration is the procedure to store the following information to the AS Interface master module ROM e A list of slave addresses to be used e Configuration data to specify slave types or identification codes ID 1 0 ID2 ID1 e Parameters P2 P1 PO to designate the slave operation at power up WindLDR provides two options for configuration auto configuration to execute automatic configuration and manual con figuration to execute configuration according to the data selected by the user Auto Configuration Auto configuration sto
291. d or disconnect the telephone line M8060 M8066 M8070 M8076 turn on to indicate the results of the com mand M8057 M8067 and M8077 are used to indicate the status of the modem mode All completion and failure internal relays are turned off when another start internal relay is turned on Start and Result Internal Relays Mode Command Start IR Completion IR Failure IR Data Register Initialization String M8050 M8060 M8070 D8145 D8169 Originate Mode ATZ M8051 M8061 M8071 Dialing M8052 M8062 8072 D8170 D8199 Disconnect Mode Disconnect Line M8053 M8063 M8073 AT General Command Mode AT Command M8054 M8064 M8074 D8130 D8144 Node Initialization String M8055 M8065 M8075 D8145 D8169 ATZ M8056 M8066 M8076 When one of start internal relays M8050 M8056 is turned on a corresponding command is executed once To repeat the command reset the start internal relay and turn the internal relay on again Completion or failure of a command is determined as described below Completion Failure The command is transmitted repeatedly as many as the retry cycles specified in data register D8109 When the command is completed successfully the completion IR is turned on and the command is not executed for the remaining cycles 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 Status
292. d to the destination designated by device D1 Applicable 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 Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol When the data designated by S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the COS 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example COS When input 11 is turned on the cosine of the radian value of data registers 010 SOTU COS F En 57 D11 designated by source device 51 is stored to data registers 020 and 021 1 designated by destination device D1 3 926991 rad 57 4 rad cos 57 4 0 7071068 S1 D1 D10 D11 3 926991 20 021 0 7071068 17 4 FC5A MicroSmart Us
293. dem mode the MicroSmart can initialize a modem dial a telephone number send an AT command enable the answer mode to wait for an incoming call and dis connect the telephone line These operations can be performed simply by turning on a start internal relay dedicated to each operation Caution e The modem mode provides for a simple modem control function so that the MicroSmart can ini tialize a modem dial a destination telephone number or answer an incoming call The perfor mance of the modem communication using the modem 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 e While communicating through modems the telephone line may be disconnected unexpectedly or receive data errors may occur Provisions against such errors must be included in the user pro gram System Setup To connect a modem to the MicroSmart install the RS232C communication adapter FC4A PC1 to the port 2 connector on the all in one type CPU module or mount the RS232C communication module FC4A HPC1 next to the slim type CPU module and use the modem cable 1C FC2A KM1C To enable the modem mode select Modem Protocol for Port 2 using Wind LDR Configuration gt Comm Port CPU Module Shield To Port 2 FC4A PC1 R
294. des 0 to 2 Mode 3 Steady Pulse Frequency gt 7 Initial Pulse Frequency 934 Frequency Change Rate 10 ms Frequency Change Time Output Pulse 13 16 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS 1 4 Reversible Control Enable The value stored in the data register designated by device 51 4 specifies one of the output modes RAMP1 can designate 0 through 2 for device S144 while RAMP2 can designate 0 and 1 S144 Value Reversible Control Description Output QO or Q2 generates output pulses used for single direction control o Reversible contro oweo Lf LY LE LE LI LI LH disabled Output Q1 can be used for PULS2 PWM2 ZRN2 or an ordinary output When using RAMP2 output Q3 can be used for an ordinary output Output QO or Q2 generates output pulses and output Q1 or Q3 generates a direc tion control signal Output 00 02 Reversible control p Single pulse output Output Q1 Q3 Forward Reverse Output Q1 or Q3 turns on or off depending on the value stored in data register des ignated by device 1 5 control direction for forward or 1 for reverse Output QO generates forward output pulses and output Q1 generates reverse out put pulses Output QO Forward 2 Reversible control RAMP1 only Dual pulse output Output Q1 Reverse Output QO or Q1 generates output pulses alternately depending
295. determined by adding the value contained DECO S1 D1 data register D10 designated by device S1 to data register D30 designated by destination 1 010 D30 device D1 Since 39th bit from data register D30 bit is data register D32 bit 7 the bit so deter mined is turned on Bit D10 Ho 533 8 16 FC5A MicroSmart User s Manual FC9Y B1273 IDE 8 DATA CONVERSION INSTRUCTIONS BCNT Bit Count When input is on bits which are on are sought in an array of consecutive bits BCNT 4 Eon Nos starting at the point designated by source device S1 Source device S2 desig nates the quantity of bits searched The quantity of bits which are on is stored to the destination designated by device D1 Applicable 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 Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S2 the timer counter current value TC or CC is read out When T
296. device This instruction is available on upgraded CPU modules with system program version 210 or higher DEC Decrement Data type W or I S D 1 S D DEC DatatypeDorL 8 0 5 0 1 1 gt 5 0 5 0 1 When input is one is subtracted from the 16 or 32 bit data designated by device S D and the result is stored to the same device This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S D Source Destination Device to increment data X For the valid device address range see pages 6 1 and 6 2 Basic Vol Since the INC and DEC instructions are 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 W word When a word device such as D data register is designated as the source destination 1 point word or integer data type or 2 points double word or long data type are used integer D double word x Xx x Xx L long F float Increment beyond Limits When the S D value is at its maximum and incremented by one the value returns to turning on the carry M8003 Decrement beyond Limits When the S D value is at its minimum and d
297. device Bits The last bit status shifted out is set to a carry special internal relay M8003 Zeros are set to the LSB Bits to shift 1 MSB D10 LSB 52 Before shift 010 43690 110111011110 1110111101100 1110110 0 M8003 Shift to the left MEN EN cY MSB D10 LSB After first shift D10 21844 1 0 1 0 1 0 1 0 1 0 110 11 0 11010 0 M8003 MEN MEN cY MSB D10 LSB After second shift D10 43688 0 1 0 1 0 1 0 1 0 1 01 0 1 0 0 0 8003 e N_B 32 bits M8120 is the initialize pulse special internal relay MOV W S1 D1 REP M8120 0 D10 When the CPU starts operation the MOV move instruc tions set 0 and 65535 to data registers D10 and D11 respec MOV W S1 D1 REP tively 65535 D11 Each time input IO is turned on 32 bit data of data registers D10 and D11 is shifted to the left by 2 bits as designated by device Bits D10 is the low word and D11 is the high word The last bit status shifted out is set to a carry special internal relay M8003 Ones are set to the LSBs Bits to shift 2 Before shift
298. dress LEDs go on and 1 0 LEDs indicate the statuses FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 17 24 AS INTERFACE MASTER COMMUNICATION AS Interface Devices This section describes AS Interface devices assigned in the CPU module to control and monitor the AS Interface master module and describes ASI commands used to update AS Interface devices in the CPU module or to control the AS Inter face master module The FC5A MicroSmart CPU modules can be used with one or two AS Interface master modules For the first AS Interface master module which is mounted closer to the CPU module the AS Interface objects can be accessed through the AS Interface devices such as internal relays M1300 through M1997 and data registers D1700 through D1999 as shown on page 24 19 Details about AS Interface objects for AS Interface master module 2 are described on the following pages AS Interface Power Supply x 2 AS Interface Master Module 1 AS Interface Master Module 2 Note When using two AS Interface master modules two AS Interface power supplies are needed Since the AS Interface cable transmits both signals and power each network requires a separate power supply To two separate AS Interface networks Processing Time For AS Interface master module 1 AS Interface internal relays for digital I O and status info
299. dule EEPROM This information is called AS Interface objects which can be accessed through the AS Interface devices such as internal relays M1300 through M1997 and data registers D1700 through D1999 The allocation for AS Interface master module 1 is shown in the table below MicroSmart CPU Module AS Interface Master Module EEPROM Device Address Precessing Read Device Device 222 1 Write AS Interface Object AS Interface M1300 M1617 3 0 2 Digital input IDI input data image Internal M1620 M1937 3 0 2 Digital output ODI output data image Relays M1940 M1997 1 0 R Status information D1700 D1731 5 2 R Analog input 01732 01763 5 2 Analog output D1764 D1767 1 0 R List of active slaves LAS D1768 D1771 1 0 2 List of detected slaves LDS D1772 D1775 1 0 2 List of peripheral fault slaves LPF D1776 D1779 1 0 R W 23 List of projected slaves LPS AS Interface D1780 D1811 5 2 R Configuration data image A CDI Data D1812 D1843 5 2 R Configuration data image B CDI Registers D1844 D1875 5 2 R W 23 Permanent configuration data PCD Each time ASI D1876 D1907 5 2 R W 7 Permanent configuration data PCD 2 01908 01923 3 0 2 Parameter image D1924 D1939 3 0 R W 7 Permanent parameter PP D1940 0 7 R W Slave 0 ID1 code D1941 D1945 R W ASI command description D1946 D1999 reserved 1 The ti
300. dvanced AT a proportional term is determined automatically and does not have to be desig nated by the user IDEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 14 7 14 PID INSTRUCTION When auto tuning is not used by setting the operation mode S143 0 PID set a required value of 1 through 10000 to specify a proportional gain of 0 01 through 100 00 or a proportional band of 0 01 through 100 00 to the data register designated by S147 When 51 7 stores 0 the proportional gain is set to 0 01 or the proportional band is set to 0 01 When S1 7 stores a value larger than 10000 the proportional gain is set to 100 00 or the proportional band is set to 100 00 When the proportional gain is selected the output manipulated variable S1 1 is calculated from the deviation between the set point S3 and the process variable S4 When the proportional gain is set to a large value the proportional band becomes small and the response becomes fast but overshoot and hunching will be caused In contrast when the propor tional gain is set to a small value overshoot and hunching are suppressed but response to disturbance will become slow The proportional band is the range of inputs deviation between the set point and the process variable required for the output manipulated variable S1 1 to change from 0 to 100 The output manipulated variable S1 1 of the propor tional term is calculated from the current input with respect to the prop
301. e FC4A SX5ES1E D Modbus TCP Slave Server All in one Type CPU Module RS232C Communication Adapter FCAA PC1 RS232C Communication Mod ule FC4A HPC1 Web Server Module FC4A SX5ES1E Ethernet Slim Type CPU Module Ethernet Note Only one Modbus TCP slave can be connected to one Modbus TCP master Modbus TCP Master Communication Specifications Mode Applicable Communication Port Modbus TCP Master Communication 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 bits 1 to 247 0 broadcast slave number Maximum Number of Slaves 1 Receive Timeout 2 10 to 2550 ms in increments of 10 ms Transmission Wait Time 3 1 to 5000 ms in increments of 1 ms Retry Cycles 1to10 1 Select the same values set for the web server module FC4A SX5ES1E 2 Specifies 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 x1 ms Using D8054 can delay transmission from the MicroSmart 23 2 FC5A MICROSMART USER S MANUAL FC9Y B1273 IDEC 23 MopBUs TCP COMMUNICATION Programming Modbus
302. e and program execution proceeds with the next instruction This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Decrement value Em e umi CX 0 127 2 Source 2 Label number to jump to 0 SX 0 255 For the valid device address range see pages 6 1 and 6 2 Basic Vol Since the DJNZ instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required The label number can be 0 through 127 all in one CPU or 0 through 255 slim CPU Make sure that a LABEL instruction of the label number used for a DJNZ instruction is programmed When designating S2 using a data register the value for the label is a variable When using a variable for a label make sure that all probable LABEL numbers 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 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 11 5 11 PROGRAM BRANCHING INSTRUCTIONS Example DJNZ and LABEL The following example demonstrates a program to store consecutive values 1000 through 1049 to data registers D100 through
303. e or mount the 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 cable The RS232C cable has a D sub 9 pin female connector for connection with a computer FC4A MicroSmart OpenNet Controllers MICRO and MICRO C can be connected to the same 1 N computer link system 1st Unit Network No 0 RS485 a Communication Adapter FCAA PC3 000000000 Port 1 adda A B SG T eoe B Port 2 B RS232C RS485 B Converter Cable E ia 2nd Unit Network No 1 E gt A BSG RS232C Cable SOS aa E oooo00000 Cable Shielded twisted pair cable 200 meters 656 feet maximum Core wire 0 3 mm RS485 Communication Module FC4A HPC3 RS485 Terminal on the Communication Module A B SG S S Cable Note When a USB RS485 converter from third
304. e 4B M1483 M1482 M1482 M1800 M1483 M1482 M1800 Slave 5B M1487 M1486 M1486 M1804 M1487 M1486 M1804 Slave 6B M1493 M1492 M1492 M1810 M1493 M1492 M1810 Slave 7B M1497 M1496 M1496 M1814 M1497 M1496 M1814 Slave 8B M1503 M1502 M1502 M1820 M1503 M1502 M1820 Slave 9B M1507 M1506 M1506 M1824 M1507 M1506 M1824 Slave 10B M1513 M1512 M1512 M1830 M1513 M1512 M1830 Slave 11B M1517 M1516 M1516 M1834 M1517 M1516 M1834 Slave 12B M1523 M1522 M1522 M1840 M1523 M1522 M1840 Slave 13B M1527 M1526 M1526 M1844 M1527 M1526 M1844 Slave 14B M1533 M1532 M1532 M1850 M1533 M1532 M1850 Slave 15B M1537 M1536 M1536 M1854 M1537 M1536 M1854 Slave 16B M1543 M1542 M1542 M1860 M1543 M1542 M1860 Slave 17B M1547 M1546 M1546 M1864 M1547 M1546 M1864 Slave 18B M1553 M1552 M1552 M1870 M1553 M1552 M1870 Slave 19B M1557 M1556 M1556 M1874 M1557 M1556 M1874 Slave 20B M1563 M1562 M1562 M1880 M1563 M1562 M1880 Slave 21B M1567 M1566 M1566 M1884 M1567 M1566 M1884 Slave 22B M1573 M1572 M1572 M1890 M1573 M1572 M1890 Slave 23B M1577 M1576 M1576 M1894 M1577 M1576 M1894 Slave 24B M1583 M1582 M1582 M1900 M1583 M1582 M1900 Slave 25B M1587 M1586 M1586 M1904 M1587 M1586 M1904 Slave 26B M1593 M1592 M1592 M1910 M1593 M1592 M1910 Slave 27B M1597 M1596 M1596 M1914 M1597 M1596 M1914 Slave 28B M1603 M1602 M1602 M1920 M1603 M1602 M1920 Slave 29B M1607 M1606 M1606 M1924 M1607 M1606 M1924 Slave 30B M1613 M1612 M1612 M1930 M1613 M1612 M1930 Slave 31B M1617 M1616 M1616 M1934 M1617 M1616 M1934 FC5A MICROSMART
305. e AS Interface e Branch Unit T junction Unit Remote I O Type Slave AS Interface Bus AS Interface Non compatible Sensors Actuators AS Interface Compatible Sensors Actuators 2 Maximum 1 0 points when using or two AS Interface master modules ZIDEC AS Interface Master Module 1 module 2 modules Maximum Slaves 62 slaves 124 slaves Maximum 1 0 Points 434 248 inputs 186 outputs 868 496 inputs 372 outputs Maximum Communication Dis Without repeater 100m Without repeater 100m tance With 2 repeaters 300m With 2 repeaters 300m FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 1 24 AS INTERFACE MASTER COMMUNICATION AS Interface System Requirements Master The AS Interface master controls and monitors the status of slave devices connected to the AS Interface bus Normally the AS Interface master is connected to a PLC sometimes called host or a gateway For example the MicroSmart AS Interface master module is connected to the MicroSmart CPU module The FC5A MicroSmart CPU module can be used with one or two AS Interface master modules so two separate AS Inter face networks can be set up Applicable 5 MicroSmart CPU Modules FC5A C24R2 FC5A C24R2C FC5A D16RK1 FC5A D16RS1 FC5A D32K3 FC5A D3253 FCSA D12K1E FCSA D12S1E Note FC5A C24R2D cannot use the AS Interface master module AS Interface Master Module FC4A AS62M One or two AS Interface mas
306. e Counting This program demonstrates a timing chart of the PULS1 instruction when pulse counting is enabled D202 1 enable pulse counting PULS S1 D1 10 1 0200 50 Start Input IO Output Pulse Frequency D201 Preset Value D203 D204 Output Pulse QO 1 PV2 gt Pulse Output ON M50 Pulse Output Complete M51 When input IO is turned 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 QO internal relay M50 remains on When the quantity of generated output pulses reaches the preset value designated by data registers D203 and D204 PULS1 stops generating output pulses Then internal relay M50 turns off and internal relay M51 turns on f the output pulse frequency value in D201 is changed while generating output pulses the change takes effect in the next scan When changing the pulse frequency make sure that the timing of the change is much slower than the output pulse fre quency so that the pulse frequency is changed successfully e f input 10 is turned off before reaching the preset value PULS1 stops generating output pulses immediately then internal relay M50 turns off and internal relay M51 turns on IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 5 13 PULSE INSTRUCTIONS Timing Chart for Disable Pulse Counting This program demonstrates a timing chart of
307. e Execution After Execution pe D D1 ee a D20 D10 D20 _ 741 4 55 7 4161 ror D1 D11 D12 4294967295 021 022 6553599 021 4294967295 65535 99999 D13 D14 20 738916 p23 p24 4 554 nr E D1 pA D23 20 738916 4 554 IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 15 5 Binary Arithmetic Instructions SUM Sum SUM S1 ADD XOR Applicable CPU Modules D1 Calculate the total of designated data depending on the calculation option ADD When input is on N blocks of 16 or 32 bit data starting at device designated by S1 are added and the result is stored to device designated by D1 S2 specifies the quantity of data blocks XOR When input is on N blocks of 16 bit data starting at device designated by S1 are XORed and the result is stored to device designated by D1 S2 specifies the quantity of data blocks This instruction is available on upgraded CPU modules with system program version 210 or higher 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 Valid Devices Device Function QM 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
308. e Master Modules The FC5A MicroSmart CPU modules can be used with one or two AS Interface master modules For the first AS Interface master module which is mounted closer to the CPU module the AS Interface objects can be accessed through the AS Interface devices such as internal relays M1300 through M1997 and data registers D1700 through D1999 as shown on page 24 19 e 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 e ASI commands cannot be used for AS Interface master module 2 Use pushbuttons PB1 and PB2 on the AS Interface master module to go to Normal Protected Mode Normal Protected Offline and Normal Protected Data Exchange Off e AS Interface master module 2 does not have the function to change ID1 code of slave 1 and enable disable auto addressing Auto addressing is always enabled Accessing AS Interface Objects for AS Interface Master Module 2 The 1 0 data and parameters of slaves on the AS Interface bus the status of the AS Interface bus and various list infor mation of the slaves are allocated to the AS Interface master module EEPROM This information is called AS Interface objects 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 The data addresses for AS Interface m
309. e analog slave to process the data properly e Analog Input Data Device Address Channel No AS Interface Master Module 1 AS Interface Master Module 2 D1700 0 Channel 1 D1701 1 Channel 2 D1702 2 Channel 3 D1703 3 Channel 4 D1704 4 Channel 1 D1705 5 Channel 2 D1706 6 Channel 3 D1707 7 Channel 4 D1708 8 Channel 1 D1709 9 Channel 2 D1710 10 Channel 3 D1711 11 Channel 4 D1712 12 Channel 1 D1713 13 Channel 2 D1714 14 Channel 3 D1715 15 Channel 4 D1716 16 Channel 1 D1717 17 Channel 2 D1718 18 Channel 3 D1719 19 Channel 4 D1720 20 Channel 1 D1721 21 Channel 2 D1722 22 Channel 3 D1723 23 Channel 4 D1724 24 Channel 1 D1725 25 Channel 2 D1726 26 Channel 3 D1727 27 Channel 4 D1728 28 D1729 29 D1730 30 D1731 31 24 22 FC5A MICROSMART UsER s MANUAL FC9Y B1273 Data Format 1st data AIO 2nd data 11 3rd data Al2 4th data Al3 5th data Al4 6th data 15 7th data Al6 reserved IDEC e Analog Output Data Device Address Channel No AS Interface Master Module 1 AS Interface Master Module 2 D1732 0 Channel 1 D1733 1 Channel 2 D1734 2 Channel 3 D1735 3 Channel 4 D1736 4 Channel 1 D1737 5 Channel 2 D1738 6 Channel 3 D1739 7 Channel 4 D1740 8 Channel 1 D1741 9 Channel 2 D17
310. e day designated by S1 remains on across 0 a m and turns off at S3 on the next day This example demonstrates a program to keep the designated output on across a m and turn off the output on the next day WKTIM S1 S2 S3 D1 M8125 is the in operation output special internal relay 8125 0 38 2000 600 Qo S1 38 specifies Monday Tuesday and Friday The WKTIM turns on output QO at 20 00 on Monday Tuesday and Fri day and turns off output QO at 6 00 on the next day 20 00 6 00 20 00 6 00 20 00 6 00 Sun Mon Tue Wed Thu Fri Sat Keep Output ON for Several Days Multiple WKTIM instructions can be used to keep an output on for more than 24 hours This example demonstrates a program to keep the designated output on from 8 a m on every Monday to 7 p m on every Friday WKTIM S1 S2 S3 D1 M8125 is the in operation output special internal relay 2 800 10000 0 S1 2 specifies Monday WKTIM S1 S2 S3 D1 S1 28 specifies Tuesday Wednesday and Thursday 0 28 10000 10000 M1 S1 32 specifies Friday WKTIM S1 52 53 D1 S2 10000 and 3 10000 disable comparison of hour and minute 0 32 10000 1900 M2 data While internal relay MO M1 or M2 is on output QO remains on 19 00 Sun Mon Tue Wed Thu Fri Sat 9 4 FC5A MiICROSMART UsER s MANUAL FC9Y B1273 I DE Using Clock Cartridge 9 WEEK PROGRAMMER INSTRUCTIONS When using the week programmer instructions you have to install a clock cartridge into the CPU module and enabl
311. e designated as DATA Special internal relays cannot be designated as DATA When T timer or C counter is used as DATA for Run Access Read the data read from the intelligent module is stored as a preset value TP or CP which can be 0 through 65535 All data registers including special data registers and expansion data registers can be designated as DATA Specify a data register to store the operating status code Data registers DO D1999 and D10000 D49999 can be desig nated as STATUS Special data registers and expansion data registers cannot be designated For status code description see page 16 6 Enter the slot number where the intelligent module is mounted A maximum of seven intelligent modules can be used Specify the first address in the intelligent module to read data from 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 W word X When a bit device such as input Q output M internal relay or R shift register is designated as integer DATA 16 points are used D double word When a word device such as T timer C counter or D data register is designated as DATA 1 point is used L long F float 16 2 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 16 I
312. e designated source device 51 is rotated to the wi bs right by the quantity of bits designated by device bits wi The result is set to the source device 51 and the last bit status rotated out is set to a carry special internal relay M8003 Data Type Word bits to rotate 1 MSB S1 LSB cY Before rotation gt 11 0 0 1 1 101110 111 11 0 1011 110 Rotate to the right M8003 MSB S1 LSB After rotation 01 0 0 1 10 1 0 1 1 1 0 0 1 1 0 M8003 Data Type Double Word bits to rotate 1 Before rotation MSB S1 LSB cY rF 1 0 0 1 1 01 0 1 1 1 0 0 11 0 1 0 0 1 1 01 0 1 11 0 0 1 1 0 i Rotate to the right M8003 After rotation MSB S1 LSB cY 011101 0 111 01 1 011111110 01 111 01 11010 11111 0 1 0 1 11110 01111 0 8003 Applicable 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 Valid Devices Device Function M T C D Constant Repeat S1 Source 1 Data for bit rotation X bits Quantity of bits to rotate
313. e power supply for the AS Interface mas ter module Goes on when the AS Interface power is supplied sufficiently Indicates the AS Interface configuration status Goes on when the permanent configuration data PCD stored in the AS Inter FLT Fault face master module EEPROM does not match the current slave configuration or configuration data image CDI Then configuration is not complete or an error was found on the AS Interface bus Indicates the mode of the AS Interface master module Status LEDs LMO Local mode Goes on when the AS Interface master module is in local mode Goes off when the AS Interface master module is in connected mode CMO Connected mode 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 Interface master module Flashes when the AS Interface master module is in configuration mode Input LEDs INO IN3 Indicates the operating status of four inputs at the address indicated by the address LEDs Goes on when the corresponding input at the indicated address is on Output LEDs OUTO OUT3 Indicates the operating status of four outputs a
314. e reas 6 1 ORW OR Word ak cesare x tec atte vana dea ae uda A damnata eque Eae a 6 1 XORW Exclusive OR Word 6 1 Shift Rotate Instructions SFTL Shift Left 2 22222222222222 2 2 24224 2 2 2 2 7 1 SFTR Shift Right 2 22222222222 2 4 2 2 2 2 elle 7 3 BCDLS BCD Left Shift 5 7 5 WSFT Word Shift 2 22222222 2 2 2 24 4 4 2 2 2 22 2 24 7 7 ROTE Left oec hea bade Reine eae a EB add eee Rage EE aA RA 7 8 ROTR Rotate Right 2 Ase ba inant 7 10 Data Conversion Instructions to BCD 2 2 2 2 2 2 2424 4 2 22 22 8 1 BCD 1 4 22 222 222222 8 3 nis raka t ed dna DR 8 5 ASCII to Hex 222 2 22 2 24 424 4 2 2 22 22 2 2 2 8 7 BTOA BCD to ASCII doin aaa eta ne EQ RU D Ee ur RO dina eae UR Cea 8 9 ATOB ASCITO rh eg Re ug Re b oor e AMOUR e 8 12 zh eosisiwon RICE 8 15 DECOWDECOCE scare
315. e second place of decimals and multiplied by 100 Data type F 51 51 1 gt 01 01 1 When input is on the square root of device designated by 51 51 11 is extracted and is stored to the destination designated by 01 01 1 Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Binary data Se ie xe X D1 Destination 1 Destination to store results E For the valid device address range see pages 6 1 and 6 2 Basic Vol When F float data type is selected and source device S1 contains a negative value a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module When F float data type is selected and S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the ROOT 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 W word X When a word device such as D data register is designated as the source or destination 1 point word data type or 2 points double word or float data type are used integer D double word X L long F float X Examples ROOT Befor
316. e to use the clock cartridge using WindLDR as follows 1 From the WindLDR menu bar select Configuration gt Cartridges and Modules The Function Area Settings dialog box for Cartridges and Modules appears MicroSmart Function Area Settines Run Stop Control Memory Backup Input Configuration Communication Ports Key Matrix Device Settings Program Protection Self Diagnostic cartridges amp Modules L i Configurethe cartridges and expansion modules Clock Cartridge Use Clock Cartridge Enable Clock Cartridge Adjustment Memory Cartridge Enable Memory Cartridge Download AS Interface Use AS Interface Master Module OK Cancel 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 Caution 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 error occurs turning on the ERR LED on the CPU module Special data register D8005 general error code stores 400h clock IC error FC5A MicROSMART UsER s MANUAL FC9Y B1273 9 5 9 WEEK PROGRAMMER INSTRUCTIONS Setting Calendar Clock Using WindLDR Before using the clock cartridge for the first time the calendar clock data in the clock cartridge must be set using WindLDR or execut
317. e word D long L or float F data type MOV W S1R DIR Source Device Data Type Repeat Designation The source device specifies the 16 or 32 bit data to be pro cessed by the advanced instruction Some advanced instruc tions require two source devices Repeat Cycles Specifies the quantity of repeat cycles 1 through 99 Input Condition for Advanced Instructions Almost all advanced instructions must be preceded by a contact except NOP no operation LABEL label LRET label return and STPA stop access instructions The input condition can be programmed using a bit device such as input output internal relay or shift register Timer and counter can also be used as an input condition to turn on the contact when the timer times out or the counter counts out While the input condition is on the advanced instruction is SOTU MOV W S1 D1 REP executed in each scan To execute the advanced instruction Ig D10 D20 only at the rising or falling edge of the input use the SOTU or SOTD instruction While the input condition is off the advanced instruction is not executed and device statuses are held Source and Destination Devices The source and destination devices specify 16 or 32 bit data depending on the selected data type When a bit device such as input output internal relay or shift register is designated as a source or destination device 16 or 3
318. e word data type are used integer D double word X L long F float When a word device such as T timer C counter or D data register is designated as the source 1 point word data type or 2 points double word data type are used IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 1 8 DATA CONVERSION INSTRUCTIONS Examples HTOB Data Type Word SOTU HTOB W S1 D1 11 D10 D20 D10 Data Type Double Word D10 D10 SOTU HTOB D S1 D1 12 D10 D20 D10 8 2 D11 D10 D11 D10 D11 FC5A MicroSmart User s Manual FC9Y B1273 Binary 0 0000h 1234 04D2h 9999 270Fh Binary 0 0000h 0 0000h 188 OOBCh 24910 614Eh 1525 05F5h 57599 EOFFh D20 D20 D20 D20 D21 D20 D21 D20 D21 BCD 0 0000h 4660 1234h 39321 9999h BCD 0 0000h 0 0000h 4660 1234h 22136 5678h 39321 9999h 39321 9999h IDEC 8 DATA CONVERSION INSTRUCTIONS BTOH BCD to Hex 51 01 BTOH S1 D1 mE RR REE When input is on the BCD data designated by S1 is converted into 16 or 32 bit binary data and stored to the destination designated by device D1 Valid values for the source device are 0 through 9999 BCD
319. ecremented by one the value returns to its maximum value word or double word data type or to 1 integer or long data type turning on the borrow M8003 IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 13 5 Binary Arithmetic Instructions Example INC SOTU INC W S D 010 100 1 gt D10 101 10 D10 When input 10 is turned on the data of D10 is incremented by one If the SOTU is not programmed the data of D10 is incremented in each scan Example DEC SOTU DEC W 5 0 D20 100 1 gt 20 99 11 D20 When input 11 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 5 14 FC5A MicroSmart User s Manual FC9Y B1273 IDE 5 Binary Arithmetic Instructions ROOT Root Data type W JS1 gt D1 H S1 D1 ROOT 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 651 51 1 01 1 1 When input is on the square root of device designated by 51 51 1 is extracted and is stored the destination designated by 01 01 41 The square root is calculated to two decimals omitting the figures below th
320. ect 1 N communication and select 12 in the Network Number field 3 From the WindLDR menu bar select Online Monitor Monitor The ladder diagram on the screen enters the monitor mode 4 From the WindLDR menu bar select Online gt Status The PLC Status dialog box appears Communication Settines f Status f Serial Serial Port Setting System Information Ethernet Port iCOM1 Baud Rate 9600 bps Data Bits 7 bits Parity Even Stop Bits 1 bit Timeout 100 id Ex a ER ER ER Automatic Detection PLC Network Setting 1 1 1 N Network Number 12 E PLC Type System Program Version Operation Status Run Stop Status Scan Time TIM CNT Change Status Calendar Write Protection Read Protection Error Status FCSA D16RX1 211 Running Current Maximum Unchanged Clear Confirm 09 01 15 Thu 13 33 23 Change Unprotected Unprotected Clear Details OK Cancel Network Number Enter 12 to select a network num ber to communicate with FC5A MicROSMART UsER s MANUAL FC9Y B1273 21 3 21 COMPUTER LINK COMMUNICATION 21 4 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 22 MODEM MODE Introduction This chapter describes the modem mode designed for communication between the MicroSmart and another MicroSmart or any data terminal equipment through telephone lines Using the mo
321. ed as S2 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 S1 Format number Select a format number 0 through 5 all in one type CPU or 0 through 29 slim type CPU which have been set using the XYFS instruc tion When an XYFS instruction with the corresponding format number is not programmed or when XYFS and CVYTX instructions of the same format number have different data type designations a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 12 3 12 COORDINATE CONVERSION INSTRUCTIONS S2 Y value Enter a value for the Y coordinate to convert within the range specified in the XYFS instruction Two different data ranges are available depending on the data type D1 Destination to store results The conversion result of the X value is stored to the destination Data Type Word Integer S2 Y value 0 to 65535 32768 to 32767 D1 X value 0 to 65535 0 to 65535 Y Y 65535 32767 Valid Coordinates X 0 65535 32768 0 65535 Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as S2 z or D1 16 points are used integer X D double word When a word device such as T timer
322. ed by S141 holds 0 through 100 read from the manipulated variable 32768 through 32767 stored in the data register designated by D1 omitting values less than 0 and greater than 100 The percent value in S141 determines the ON duration of the control output 52 6 in proportion to the control period 51 13 While manual mode is enabled with the auto manual mode control relay S2 1 set to 51 1 stores 0 through 100 read from the manual mode output manipulated variable 51 18 While auto tuning AT is in progress S141 stores 0 through 100 read from the AT output manipulated variable S1422 S142 Operating Status The data register designated by S142 stores the operating or error status of the PID instruction Status codes 1X through 6X contain the time elapsed after starting auto tuning or PID action X changes from 0 through 9 in 10 minute increments to represent O through 90 minutes The time code remains 9 after 90 minutes has elapsed When the operation mode S143 is set to 1 AT PID the time code is reset O 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 M8004 user program execution error To continue operation enter correct parameters and turn on the start input for the PID instruction Status Code Description Operation
323. ed up for a period longer than the backup duration the clock data is initialized to the following values Calendar 00 01 01 Time 0 00 00 AM 9 8 FC5A MicROSMART User s MANUAL FC9Y B1273 10 INTERFACE INSTRUCTIONS Introduction The DISP display instruction is used to display 1 through 5 digits of timer counter current values and data register data on 7 segment display units The DGRD digital read instruction is used to read 1 through 5 digits of digital switch settings to a data register This instruction is useful to change preset values for timers and counters using digital switches DISP Display H When input is on data designated by source device S1 is set to outputs or internal relays designated by device Q This instruc tion is used to output 7 segment data to display units DISP S1 Q LAT DAT BCD4 L L Quantity of digits 1 to 5 decimal 1 to 4 hex Eight DISP instructions can be used in a user program Data phase Display data can be 0 through 65535 FFFFh Low or High Conversion BCD or BIN Latch phase Low or High Applicable 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 Note The DISP instruction requires transistor output terminals When using all in one 24 I O type CPU module FC5A C24R2 connect a transistor output module Valid Devices Device Funct
324. ee 800 262 IDEC Fax 1 408 744 9055 Toll Free Fax 800 635 6246 E mail opencontact idec com CANADA IDEC CANADA LIMITED 3155 Pepper Mill Court Unit 4 Mississauga Ontario L5L 4X7 Canada Tel 1 905 890 8561 Toll Free 888 317 4332 Fax 1 905 890 8562 E mail sales ca idec com AUSTRALIA IDEC AUSTRALIA PTY LTD 17 104 Ferntree Gully Road Oakleigh Victoria 3166 Australia Tel 61 3 8523 5900 Toll Free 1800 68 4332 Fax 61 3 8523 5999 E mail sales au idec com UNITED KINGDOM IDEC ELECTRONICS LIMITED Unit 2 Beechwood Chineham Business Park Basingstoke Hampshire RG24 8WA UK Tel 44 1256 321000 Fax 44 1256 327755 E mail sales uk idec com GERMANY IDEC ELEKTROTECHNIK GmbH Wendenstrasse 331 20537 Hamburg Germany Tel 49 40 25 30 54 0 Fax 49 40 25 30 54 24 E mail service idec de B 1273 2 JAPAN IDEC CORPORATION 6 64 Nishi Miyahara 2 Chome Yodogawa ku Osaka 532 0004 Japan Tel 81 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 5119 IDEC SHENZHEN CORPORATION Unit AB 3B2 Tia
325. eeded for this instruction nated by DATA STPA DATA STATUS SLOT ADDRESS BYTE READ BYTE designates the quantity of data to read STATUS stores the operating status code Note STPA READ and STPA WRITE instructions can be used 64 times in a user program When more than 64 STPA READ and STPA WRITE instructions are used in a user program the excess instructions are not executed and error code 7 is stored in the data register designated as STATUS Applicable CPU Modules FC5A C16R2 C D FCSA C10R2 C D FCSA C24R2D FC5A C24R2 C FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X Valid Devices Stop Access Read Device Function M D Constant Repeat DATA First device address to store read data X X X X X STATUS Operating status code eX SLOT Intelligent module slot number 1 7 ADDRESS First address in intelligent module to read data from eS 0 127 Bytes of data read 1 127 For the valid device address range see pages 6 1 6 2 Basic Vol DATA Specify the first device address to store the data read from the intelligent module Internal relays MO through M2557 can be designated as DATA Special internal relays cannot be designated as DATA When T timer or C counter is used as DATA for Stop Access Read the data read from the intelligent module is stored as a preset
326. egisters D1 D20 2 356195 rad 37 4 rad S1 D10 D11 0 7071068 FC5A MicROSMART User s MANUAL FC9Y B1273 D20 D21 When input I1 is turned on the arc cosine of the value of data registers D10 and D11 designated by source device S1 is stored to data registers D20 and D21 designated by destination device D1 acos 0 7071068 2 356195 rad D1 2 356195 17 7 17 TRIGONOMETRIC FUNCTION INSTRUCTIONS ATAN Arc Tangent atan 51 51 1 01 01 1 rad peur D1 peur KEK When input is on the arc tangent of the value designated by source device 1 is stored in radians to the destination designated by device D1 Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Arc tangent value to convert into radian d KX X D1 Destination 1 Destination to store conversion results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When the data designated by source device S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the ATAN instruction is executed in each scan while input is on a pulse input from a SOTU or SOT
327. egral start coefficient 52 2 Output manipulated variable limit enable 51 11 Input filter coefficient 52 3 Integral start coefficient disable S3 Set point PID Control PID Dialog Box PID PID Control Type PID PID Control Tag Name Device Address Module Type 0 4095 Comment Data Type Integer I Module Type 0 4095 FC48 LO3A1 FC4A LO3AP1 FC4A 2A1 FC4A K1A1 n DE FC5A MICROSMART UsER s MANUAL 9 1273 14 21 14 PID INSTRUCTION Example 2 ON OFF Control Using Analog Output The output manipulated variable for analog output module 51 24 of the PID instruction is moved to the analog output data 0772 and the analog 1 0 module sends out a voltage output of to 10V DC The analog output is then connected to a thyristor unit which controls the AC power using phase control System Setup Thyristor Unit FC5A C24R2 FC4A LO3AP1 55 099 59959 9 9 9959 9 3S a ad EN 0 1 2 3 4 5 6 7 10 11 12 13 14 15 000000000 ooooa oood gt OUT zi Pf li F 77 ki INO a os Won ss 7 Hea 1 E Thermocouple 9999999999909 Heater pe Temperature Control by Auto Tuning and PID Action Process Variable
328. em program using WindLDR See page A 9 Basic Vol Note The all in one 24 type CPU module cannot use the expansion RS232C RS485 communication 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 Function Module FC4A L03A1 FC4A LO3AP1 FC4A J2A1 FC4A J4CN1 FC4A J8C1 FC4A J8AT1 FC4A K1A1 FC4A K2C1 FC4A K4A1 AS Interface Master Module FC4A AS62M Analog I O 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 modules are mounted Example When five expansion RS232C communication modules and two 1 0 modules are mounted the communication port num bers allocated as shown below Port 1 Expansion RS232C Communication Module FC5A SIF2 n n b 2200 Port 2 Port 3 Port 4 Port 5 Port 6 Port 7 Onno Cu IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 25 1 25 EXPANSION RS232C RS485 COMMUNICATION Computer Link Communication The computer link communication can be used with WindLDR on a PC connected to the CPU module to per
329. en a slave with address the factory setting is detected on the AS Interface bus in normal 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 24 24 FC5A MiICROSMART UsER s MANUAL FC9Y B1273 IDEC 24 AS INTERFACE MASTER COMMUNICATION M1942 Auto_Address_Assign M1942 indicates that the auto addressing function is enabled The default setting is enabled and M1942 is normally on This setting can be changed using the ASI commands Enable Auto Addressing and Disable Auto Addressing Note When the auto addressing function is enabled at the AS Interface master module and a slave fails you can replace the slave with a new slave which has the same identification codes without stopping the AS Interface bus e If the replacement slave is assigned the same address and has the same identification codes as the failed slave the replacement slave is automatically added to the LDS list of detected slaves to continue operation If the assigned address or the identification codes of the replacement slave are different from the failed slave the FLT LED will go on When replacing a failed slave with a new slave which is assigned address 0 factory setting and has the same identification codes the new slave will be assigned the address of the failed slave and added to the LDS and LAS list of active slaves If the identification codes of the replacement s
330. en expansion 1 0 mod ules but can connect a maximum of six expansion modules including one or two AS Interface mas ter modules If more than six expansion modules including the AS Interface master module are connected an error occurs and special data register 08037 quantity of expansion 1 0 modules stores error code 20 hex e The AS Interface master module can connect a maximum of seven analog 1 0 slaves When more than seven analog 1 slaves are connected the AS Interface system will not operate correctly Slaves Various types of slave devices can be connected to the AS Interface bus including sensors actuators and remote 1 devices Analog slaves can also be connected to process analog data Slaves are available in standard slaves and A B slaves Standard slaves have an address of 1 trough 31 in the standard address range A B slaves have an address of 1A through 31A in the standard address range or 1B through 31B in the expanded address range Among the A B slaves slaves with an address of 1A through 31A are called A slaves and slaves with an address of 1B through 31B are called B slaves 24 2 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC 24 AS INTERFACE MASTER COMMUNICATION AS Interface Power Supply The AS Interface bus uses a dedicated 30V DC power supply AS Interface power supply which is indicated with the AS Interface mark General purpose power sup ply units cannot be used for the AS Interface bus AS I
331. ends on the input terminal used as shown below Input Terminals Filter Time Filter value selected in the Function Area Settings default 3 ms See Input Filter on page 5 42 Basic Vol 110 through 117 on CPU Modules 3 ms fixed 10 through 17 on CPU Modules Inputs on Expansion Input Modules 4 ms fixed When the actual scan time is too short to execute the DGRD instruction use the constant scan function When the input filter time is set to 3 ms set a value of 9 or more in ms to special data register D8022 constant scan time preset value See page 5 50 Basic Vol When the input filter time is changed set a proper value to D8022 to make sure of the mini mum required scan time shown above Example DGRD The following example demonstrates a program 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 DGRD Q D1 When input 15 is on the 4 digit value from BCD digital switches is read to data 15 BCD4 D10 register 010 Wiring Diagram 16 point Transistor 8 point DC Input Module Sink Output Module 08 1 FC4A T16K3 Digital Switches 130 Q30 o o 131 Q31 o 132 Q32 o 133 Q33 134 034 135 035 136 Q36 137 Q37 Cr ocoM o COM V
332. er 12 D30 D20 M LAT designated by S1 is inverted bit by bit and moved to data register D20 designated by D1 D30 930 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 3 5 3 MOVE INSTRUCTIONS IMOV Indirect Move IMOV S1 R 52 D1 R D2 REP 2 R R When input is on the values contained in devices designated by 51 52 added to determine the source of data 16 or 32 bit data so determined is moved to destination which is determined by the sum of values contained in devices designated by D1 and D2 The float data type is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Base address to move from 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 Offset for D1 X X X X X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S1 S2 or D2 the device data is the timer counter current value TC or CC
333. er is designated as the source 16 points word data type or 32 points double word data type are used integer D double word X When a word device such as T timer C counter or D data register is designated as the source 1 point word data type or 2 points double word data type are used L long F float IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 3 8 DATA CONVERSION INSTRUCTIONS Examples BTOH Data Type Word SOTU BTOH W S1 D1 11 D10 D20 D10 Data Type Double Word D10 D10 SOTU BTOH D S1 D1 12 D10 D20 D10 8 4 D11 D10 D11 D10 D11 FC5A MicroSmart User s Manual FC9Y B1273 BCD 0000h 4660 1234h 39321 9999h BCD 0 0000h 0 0000h 4660 1234h 22136 5678h 39321 9999h 39321 9999h D20 D20 D20 D20 D21 D20 D21 D20 D21 Binary 0 0000h 1234 04D2h 9999 270Fh Binary 0 0000h 0 0000h 188 OOBCh 24910 614Eh 1525 05F5h 57599 EOFFh IDEC 8 DATA CONVERSION INSTRUCTIONS Hex to ASCII 51 gt D1 01 1 D1 2 D1 3 HTOA W 51 S2 D1 When input is the 16 bit binary data designated 51 is read from the lo
334. er Link System Setup 1 N Computer Link System 21 1 Programming WindLDR 21 2 Monitoring PLC Status 21 3 Modem Mode SyStem Setup isset dead Reece e qa dee ddr n E 22 1 Applicable Modems 22 2 Special Internal Relays for Modem Mode 22 2 Special Data Registers for Modem 22 3 Origi ate Mode PUT 22 3 Disconnect Mode 2 2 2 22 5 AT General Command Mode 22 5 Answer Mode 4 22 6 Modem Mode Status Data Register 22 7 Initialization String Commands 22 8 Preparations for Using 2 22 9 Programming Data Registers and Internal Relays 22 9 Setting Up the CPU 22 9 Programming WindLDR
335. es designated by S1 S2 S3 SN are set to the week table The quantity of special days can be up to 20 The special days stored in the week table are used to add or skip days to turn on or off the comparison outputs programmed in sub sequent WKTIM instructions The WKTBL must precede the WKTIM instructions Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Special month day data X 101 1231 For the valid device address range see pages 6 1 and 6 2 Basic Vol 9 2 FC5A 5 UsER s MANUAL FC9Y B1273 IDEC 9 WEEK PROGRAMMER INSTRUCTIONS S1 through SN Special month day data Specify the months and days to add or skip days to turn on or off the comparison outputs programmed in WKTIM instructions 01 through 12 01 through 31 Example To set July 4 as a special day designate 704 as S1 Make sure that the values set for S1 through SN are within the valid ranges If any data is over the valid value a user pro gram execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Examples WKTIM and WKTBL Without Special Days MODE 0 This example is the basic program for week programmer application without using the WKTBL week table instruction While the CPU is running the WKTIM
336. es according to the frequency change rate value stored in data register D203 Operation mode 3 The pulse frequency increases as long as the frequency change time stored in data register D203 While the output pulse frequency is on the increase internal relay M52 remains on Depending on the control direction designated by the value stored in data register D205 output QO or Q1 sends out output pulses while D205 stores 0 forward or 1 reverse respectively When the output 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 turn off and internal relay M51 turns on If the parameter values in D200 through D207 except for D204 are changed while generating output pulses the change takes effect when start input IO is turned on for the next cycle If the value stored D204 is changed after start input 10 has been turned on the change can take effect only after the CPU starts again If start input IO is turned off before reaching the preset value RAMP1 stops generating output pulses immediately then internal relay M50 turns off and internal relay M51 turns on When input IO is turned on agai
337. es are included in numbering the slots such as digital I O modules analog 1 0 modules and AS Interface modules READ READ The RUNA WRITE instruction on the second line is programmed as shown below RUNA W RUNA W DATA M200 D300 RUNA W DATAR STATUS WRITE M520 D301 DATA STATUS M840 D302 RUNA Run Access Instruction Type Read Write Data Type Word w STATUS SLOT 2 ADDRESS 0 SLOT ADDRESS 2 3 SLOT ADDRESS 2 2 PLC Data Tag Name m0520 Device Address BYTE 32 BYTE 32 BYTE 6 R 7 Repeat Comment When IO is turned on RUNA instructions are exe cuted to read and write the designated data Intelligent Module Slot Number 1 7 Data Address 0 127 Data Size Byte 1 127 FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 33 24 AS INTERFACE MASTER COMMUNICATION Using WindLDR This section describes the procedures to use WindLDR for the AS Interface system WindLDR contains the Configure AS Interface Master dialog box to configure slaves and to change slave addresses and the Monitor AS Interface Slave dialog box to monitor the slave operation For the procedures to select the PLC type and Function Area Settings see page 24 8 Configure AS Interface Master AS Interface compatible slave devices are set to address at factory and must be assigned a uniq
338. esignated by 51 52 When 51 data is less than or equal to S2 data the output to the following instructions is turned on When the condition is not met the output is turned off LC Load Compare Greater Than or Equal To 512 52 51 51 1 gt 52 52 1 Data type W or I LC gt Data type D L or F This instruction constantly compares 16 32 bit data designated by 51 52 When 51 data is greater than or equal to S2 data the output to the following instructions is turned on When the condition is not met the output is turned off Applicable 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 Valid Devices Device Function M C D Constant Repeat S1 Source 1 Data to compare X X X X S2 Source 2 Data to compare X X X X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used the timer counter current value TC or CC is read out When F float data type is selected only data register and constant can be designated When F float data type is selected and S1 or S2 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module The output to the following instructions is turned off 4 8 FC5A MiICROSMART UsER s MANUAL FC9Y B1
339. esignated by device bits The result is set to the source device 51 and the last bit status rotated out is set to a carry special internal relay M8003 Data Type Word bits to rotate 1 MSB S1 LSB Before rotation r 11 0 0o 1 1 0 1 0 1 1 1 0 0 1 1 0 lt M8003 gt Rotate to the left cY MSB S1 LSB After rotation 1 0 0 1 1 0 1 0 1 1 1 0 0 1 1 0 1 M8003 Data Type Double Word bits to rotate 1 Before rotation cY MSB S1 LSB 1 0 0 1 1 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 1 00 1 1 0 M8003 Rotate to the left After rotation MSB S1 LSB 1 0101111110 1110 1 11111100 1111011100 1 1 0 1 0 1 1 1 00 1 10 1 M8003 Applicable 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 Valid Devices Device Function M T C D Constant Repeat S1 Source 1 Data for bit rotation X X X bits Quantity of bits to rotate 1 15 1 31 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relay
340. esult of bit logical operation temporarily Vol 7 7 Basic BRD Bit Read Reads the result of bit logical operation which was saved temporarily Vol 7 7 5 Counter Comparison Equal to comparison of counter current value Vol 7 19 Basic gt Counter Comparison gt Greater than or equal to comparison of counter current value Vol 7 19 Basic CDP Dual Pulse Reversible Counter Dual pulse reversible counter 0 to 65 535 Vol 7 12 Double word Dual Pulse CDPD Reversible Counter Double word dual pulse reversible counter 0 to 4 294 967 295 Vol 7 16 CNT Adding Counter Adding counter 0 to 65 535 Basic Vol 7 12 Basi CNTD Double word Adding Counter Double word adding counter 0 to 4 294 967 295 re Up Down Selection Basic CUD Reversible Counter Up down selection reversible counter 0 to 65 535 Vol 7 14 CUDD Double word Up Down Double word up down selection reversible counter Basic Selection Reversible Counter 0 to 4 294 967 295 Vol 7 17 Basic DC Data Register Comparison Equal to comparison of data register value Vol 7 21 Basi gt Data Register Comparison gt Greater than or equal to comparison of data register value 1 END End Ends a program Bese ida Vol 7 31 Basic JEND Jump End Ends a jump instruction Vol 7 30 Basic JMP Jump Jumps a designated program area Vol 7 30 Basic LOD Load Stores intermediate results and reads contact status Vol
341. et point S3 Temperature control for cooling is executed in the direct control action Time Process Variable 51 0 In the reverse control action the manipulated variable D1 is n increased while the process variable S1 0 is smaller than the set point S3 Temperature control for heating is executed in the reverse control action Set Point S3 In either the direct or reverse control action the manipulated variable D1 is increased while the difference between the process variable 51 0 and the set point S3 increases Reverse Control Action Time 52 1 Auto Manual Mode To select auto mode turn off the auto manual mode control relay designated by S241 before or after starting the PID instruction In auto mode the PID action is executed and the manipulated variable D1 stores the PID calculation result The control output 52 6 is turned on and off according to the control period 51413 and the output manipulated vari able S141 To select manual mode turn on the auto manual mode control relay S241 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 51 18 and the output manipu lated variable for analog output module 51 24 stores a value of 0 through 4095 or 50000 converted from the manual mode output ma
342. eturns to the main program When input I3 is on program execution jumps to label 1 M8125 is the in operation output special internal relay ALT turns on or off the output Q3 internal memory IOREF immediately writes the output Q3 internal memory status to actual out put Q3 Program execution returns to the main program Timer interrupt occurs every 100 ms then program execution jumps to label 2 M8125 is the in operation output special internal relay ALT turns on or off the output O4 internal memory IOREF immediately writes the output O4 internal memory status to actual out put 04 Program execution returns to the main program 11 8 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE 11 PROGRAM BRANCHING INSTRUCTIONS IOREF I O Refresh H REE a When input is on 1 bit I O data designated by source device S1 is refreshed immediately regard less of the scan time When input is used as 51 the actual input status is immediately read into an internal relay starting with M300 allocated to each input available on the CPU module When Q output is used as S1 the output data in the RAM is immediately written to the actual output available on the CPU module Refresh instructions are useful when a real time response is required in a user program which has a long scan time The refresh instruction is most effective when using the refresh instruction at a ladder step immediately before using the data The I
343. f Specify the hours and minutes to turn on S2 or to turn off S3 the output or internal relay designated by D1 Hour Disable Comparison 00 through 23 00 through 59 10000 Example To turn on the output or internal relay at 8 30 a m using the WKTIM instruction designate 830 as S2 To turn off the output or internal relay at 5 05 p m designate 1705 as S3 When 10000 is set to hour minute comparison data the comparison data is ignored For example if 10000 is set to the hour minute comparison data to turn off 53 the WKTIM instruction compares only the hour minute comparison data to turn on S2 When the hour minute comparison data to turn on S2 is larger than the hour minute comparison data to turn off S3 the com parison ON output D1 turns on at S2 on the day designated by S1 remains on across and turns off at 53 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 result turning on special internal relay M8004 and the ERR LED on the CPU module WKTBL Week Table S1 S2 S3 SN gt Week Table N x 20 WKTBL S1 52 S3 6x SN RRR RRR RRR When input is on N blocks of special month day data in devic
344. f 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 amp C1 DCD ON with carrier from remote modem DCD tracks the state of the data carrier from the remote modem An ON condition of DCD indicates the pres ence of a carrier This command must be included in the initialization string vo MNP result codes disabled Conventional result codes are used and reliable link result codes are not used X4 Enables dial tone and busy detection amp K3 Enables hardware flow control The software flow control XON XOFF cannot be used for the MicroSmart modem mode This command must be included in the initialization string AO Set MNP maximum block size to 64 bytes N5 MNP auto reliable mode 50 2 Ring to answer Specifies the ring on which the modem will pick up the telephone line SO 2 specifies that the modem answers an incoming call when detecting 2 ring calls 50 0 disables the auto answer function amp W 22 8 Write active profile The current configuration profile is saved to a non volatile memory of the modem FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 22 MODEM MODE Preparations for Using Modem Before using a modem read the user s manual for your modem The required initialization string depends on the model and make of the modem When the Micro
345. figuration M1944 low byte Configuration enabled mode M1945 Normal_Operation_Active Normal protected mode is Other than normal protected enabled mode M1946 APF not APO AS Interface power supply AS Interface power supply is failure normal M1947 Offline Ready Normal protected offline is Other than normal protected enabled offline M1950 Periphery_OK Peripheral devices are nor Peripheral devices are abnor mal mal high byte M1951 M1957 reserved M1960 Data Exchange Active Data exchange is enabled Data exchange is prohibited Command to go to normal 1 rotected offline was issued Command gate normal M1961 Off line protected offline was not low byte by the pushbutton or WindLDR M1962 Connected Mode Connected mode is enabled Local mode is enabled 1 M1963 M1967 high byte reserved M1970 M1997 2 reserved Device Address represents the offset from the Device Address designated in the RUNA or STPA instruction dialog box M1940 Config_OK M1940 indicates the configuration status M1940 goes on when the permanent configuration data PCD stored in the AS Interface master module EEPROM matches the configuration data image CDI When configuration is changed e g a new slave is added or a slave fails M1940 goes off Then the FLT LED goes on M1941 105 0 M1941 is used to check for the presence of a slave with address 0 on the AS Interface bus M1941 goes on wh
346. form mainte nance operations such as download upload user programs start stop the PLC monitor the PLC status and read write device values When the expansion RS232C RS485 communication module is mounted to the CPU module in a computer link system the computer link communication functions can be performed except for Run Time Program Download For details about the computer link communication see pages 4 1 Basic Vol and 21 1 System Setup Example Expansion RS232C Communication Module CPU Module FC5A SIF2 1 85232 T NIE JI Computer Link Cable 4C a aa nadag FC2A KCAC n d 3m 9 84 ft long 2 To Port 3 RS232C 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 Note Run Time Program Download cannot be used through the expansion RS232C RS485 communication module Note When expansion RS485 communication module is used connect a PC and the CPU module using a USB RS485 converter from third party Cable Connection and Pinouts FC5A SIF2 Expansion RS232C Communication Module FC5A SIF2 Computer D sub 9 pin Description 25 2 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC 25 EXPANSION RS232C RS485 COMMUNICATION
347. ft register bit designated by D1 is H SOTU ALT Eon 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 or shift register bit repeats to turn on and off in each scan Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat D1 Destination 1 Bit to turn on and off X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Since the ALT instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction must be used Example ALT When input IO is turned on output QO designated by device D1 is turned on and remains SOTU ALT 01 after input 10 is turned off 10 Qo When input IO is turned on again output QO is turned off ON Input IO OFF ON Output QO OFF 8 18 FC5A MicroSmart User s Manual FC9Y B1273 IDE 8 DATA CONVERSION INSTRUCTIONS CVDT Convert Data Type S1 D1 CVDT S1 R D1 R TO RR RRR When input is on the data type of the 16 or 32 bit data designated by 1 is converted and stored to the destination designated by device D1 Data types can be designated
348. ft to the left After shift Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D 7 SuiFT ROTATE INSTRUCTIONS 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 51 and 51 1 0 through 9999 The quantity of digits to shift can be 1 through 7 Zeros are set to the lowest digits as many as the digits shifted S1 S141 lt 1 2 3 4 5 6 FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as S2 the timer counter current value TC or CC is read out The quantity of digits to shift designated as S2 can be 1 through 7 Make sure that the source data determined by S1 51 1 is between 0 and 9999 for each data register If either source data is over 9999 a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module When S2 is over 7 a user program execution error will also result Valid D
349. g WindLDR 30 kHz 10 kHz 2 000 ms Reversible control with dual pulse output 1 000 000 pulses total On the WindLDR editing screen place the cursor where you want to insert the pulse instruction macro and type RAMPST Enter parameters as shown below RAMPST Set RAMP Instruction Parameters Type Instruction Type Control Register Tag Name Control Register Settings RAMP Function DR 51 00000 Operation mode D0000 Steady pulse frequency D0001 30 Initial pulse frequency 00002 10 Frequency change rate 00003 2000 Mode 2 1 kHz to 100 kHz Description 1 to 100 in increments of 1 1 to 100 in increments of 1 95 1 to 100 in increments of 1 Device Address Comment Same device address as S1 for the RAMP1 instruction Device Settings Reversible control enable 00004 Control direction 0005 0006 0007 00008 0009 Error Status 00010 Preset value Current value Dual pulse output Forward 1000000 1 to 100 000 000 05 5 E100h 1 to 100 000 000 05 5 E100h Cancel Device Function Description Device Address Value 51 0 Operation mode Frequency range 1 kHz to 100 kHz DO 2 1 1 Steady pulse frequency 30 kHz D1 30 51 2 Initial pulse frequency 10 kHz D2 10 51 3 Frequency change time 2 000 ms D3 2000 1 4 Reversible control enable Reversible control with dual output D4 2 S145 Control direction Forward D5 0 S14
350. ging any of these settings If the ERR LED on the CPU module goes on when the AS Interface master module is connected download the user pro gram to the CPU module after making the above setting 24 8 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 24 AS INTERFACE MASTER COMMUNICATION Assigning a Slave Address AS Interface compatible slave devices are set to address O at factory Connect the slave to the AS Interface master mod ule as shown on page 24 6 Do not connect two or more slaves with slave address 0 otherwise the AS Interface master module cannot recognize slave addresses correctly 1 Power up the MicroSmart CPU module first Approximately 5 seconds later turn on the AS Interface power supply Note When slave address 0 is not mounted on the AS Interface bus the CPU module power supply and the AS Interface power supply can be turned on at the same time See page 24 7 2 From the WindLDR menu bar select Online Configure Master to open the Configure AS Interface Master dialog box Press Refresh to collect 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 1 0 7 ID2
351. gnated by D1 N W specifies the quantity of blocks to move N blocks of 16 bit data N blocks of 16 bit data S1 First 16 bit data D1 First 16 bit data S141 51 2 Second 16 bit data Second 16 bit data Third 16 bit data Third 16 bit data Block Move 01 1 j D1 2 m S1 N 1 Nth 16 bit data D1 N 1 Nth 16 bit data Applicable 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 Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S1 or N W the timer counter current value TC or CC is read out When T timer or C coun ter is used as D1 the data is written in as a preset value TP or CP which can be 0 through 65535 sure that the last source data determined by 51 1 and the last destination data determined by D1 N 1 are within the valid device range If the derived source or destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004
352. gram Protection Self Diagnostic Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol Configure 9600 7 Even 1 User Protocol Modem Protocol Configure 9600 7 Even 1 Data Link Master Data Link Slave Configure 9600 7 Even l Modbus ASCII Slave Configure 9600 7 Even 1 Modbus RTU Slave Modbus ASCII Master Configure 9600 7 Even 1 Communication Mode Comm Param Mode Selection Input Network No Modbus RTU Master MODBUS TCP Master Client Communica Slave Server MR Port In END Processing Every 10 ms Default 3 Click the Configure button The Communication Parameters dialog box appears Change settings if required Modem Protocol Port2 Baud Rate bps Data Bits Parity Stop Bits Receive Timeout ms Network Number Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 Data Bits 70r8 Parity Even Odd None Stop Bits 10 2 Receive Timeout ms 10 to 2540 10 ms increments Receive timeout is disabled when 2550 is selected Network Number Oto 31 OK Cancel Default The default communication parameters shown below are recommended Baud rate 9600 bps Only when the modem connected on the communication line uses differ ent communication parameters than the defa
353. hapter 25 Various communication functions such as computer link modem mode Modbus TCP AS Interface and expansion RS232C RS485 communication 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 correct component to suit their application and for choosing an application appropriate for the component individually or in combination with other equipment All diagrams and examples in this manual are for illustrative purposes only In no way does including these diagrams and examples in this manual constitute a guarantee as to their suitability for any specific application To test and approve all programs prior to installation is the responsibility of the end user Preface 4 FC5A MicroSmart User s Manual FC9Y B1273 I DEC RELATED MANUALS The following manuals related to the FC5A series MicroSmart are available Refer to them in conjunction with this man ual Type No Manual Name Description Describes basic instruction list move instructions data comparison instruc tions binary arithmetic instructions boolean computation instructions shift rotate instructions data conversion instr
354. he CPU module Valid Data Types When a word device such as D data register is designated as the source or destination 1 point word W word X is used integer D double word L long F float Example RNDM REN zu When input IO is turned on RNDM is executed to generate a pseu SOTU D100 dorandom value ranging between 1 and 6 and stores the result to data register D100 designated by destination device D1 IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 19 5 Binary Arithmetic Instructions 5 20 FC5A MicroSmart User s Manual FC9Y B1273 IDE 6 BOOLEAN COMPUTATION INSTRUCTIONS Introduction Boolean computations use the AND OR and exclusive OR statements as carried out by the ANDW ORW and XORW instructions in the word data type respectively ANDW AND Word 51 52 01 ANDW S1 R S2 R D1 R kkkkk When input is on 16 32 bit data designated by source devices 51 and S2 are ANDed bit by bit The result is set to destination device D1 51 1 1 1 0 bi 0 1 52 1 o ojo 1 1 1 1 0 0 0 0 1 ORW OR Word S1 S52 D1 ORW S1 R S2 R Di1 R REP FoR RK When input is on 16 32 bit data designated by source devices 51 and S2 are ORed bit by bit The result is set to destination device D1
355. he RS232C port 2 restores the state as before the telephone line was connected whether 08103 is set to 0 or 1 so that the RS232C port 2 can be controlled by turning on a start internal relay M8050 M8056 AT General Command Mode Data registers D8130 D8144 are allocated to the AT command string Before turning on start internal relay M8054 for the AT general command mode store an AT command string in data registers starting with D8130 One data register stores two characters the first character at the upper byte and the second character at the lower byte in the data register Use the MOV move instructions on WindLDR to set the AT command string and execute the MOV instructions before turn ing M8054 on 1 DEC FC5A MicCROSMART UsER s MANUAL FC9Y B1273 22 5 22 MODEM MODE Example of AT Command ATEOQOV1 CR LF AT and are appended at the beginning and end of the AT general command string automatically by the system pro gram and need not be stored in data registers To program the AT command string of the example above store the com mand characters and ASCII value ODh for data registers starting with 08130 D8130 4530h 45 30h 0 08131 5130h 51h Q 30h 0 D8132 5631h 56h V 31hs 1 D8133 ODOOh ODh CR All characters subsequent to CR are ignored When the AT general command has been co
356. he auto tuning otherwise the process variable S140 cannot reach the AT set point 51 21 and AT parameters cannot be determined 1422 AT Output Manipulated Variable The output manipulated variable specifies the amount of the output manipulated variable 0 through 100 during auto tuning When using auto tuning set a required AT output manipulated variable of O through 100 to the data register des ignated by 1 22 When 1 22 stores a value larger than 100 the AT output manipulated variable is set 100 While auto tuning is executed the specified value of the AT output manipulated variable S1 22 is outputted to the out put manipulated variable 51 1 and the control output S246 is turned on and off according to the AT control period S1 20 and the AT output manipulated variable 51 22 To keep the control output S246 on during auto tuning set 100 to 1 22 When using advanced auto turing with operation mode S143 set to 3 advanced AT PID or 4 advanced AT the AT out put manipulated variable is determined automatically and does not have to be set by the user IDEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 14 13 14 PID INSTRUCTION 1 23 Output Manipulated Variable While the PID action is in progress the data register designated by 51 23 holds the manipulated variable 32768 through 32767 327 68 through 327 67 indicating the value to the second decimal place While manual mode is enabled with the aut
357. he derived destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and ERROR LED on the CPU module Valid Data Types When a bit device such as input Q output M internal relay or R shift register is designated as W word X AM the source or destination 16 points word or integer data type or 32 points double word or long data I integer X type are used D double word X When a word device such as T timer C counter or D data register is designated as the source or L long X destination 1 point word or integer data type or 2 points double word long or float data type are F float yc MESE Example NRS F H D25 D26 123 4 gt D30031 123 4 10 5 025 30 032 033 123 4 m gt 034 035 123 4 m gt 036037 123 4 D25 D26 030 through 039 When input 10 is turned on data of data registers 025 026 designated by source device S1 is moved to 10 data registers starting with D30 designated by destination device D1 038 039 123 4 3 14 FC5A MicroSmart UsER s MANUAL FC9Y B1273 DE XCHG Exchange XCHG D1 D2 Word data type Double word data type D1 lt D2 exchanged with each other 3 MOVE INSTRUCTIONS D1 D1 1 D2 D2 1 When input is on the 16 or 32 bit
358. he initial pulse frequency thus the initial pulse frequency can be set in incre ments of 10 Hz The output frequency error is 5 maximum Operation Mode S140 Initial Pulse Frequency Hz 0102 1 to 100 Maximum frequency selected by 51 0 51 2 value 3 20 to 10 000 51 2 value x 10 1 3 Frequency Change Rate Frequency Change Time When 51 0 is set to O through 2 the value stored in the data register designated by device 143 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 51 0 Valid values for device S143 1 through 100 thus the frequency change rate can be 10 Hz to 1 kHz operation mode 0 100 Hz to 10 kHz operation mode 1 or 1 kHz to 100 kHz operation mode 2 When 51 0 is set to 3 the value stored in the data register designated by device 51 3 determines the frequency change time Valid values are 10 through 10 000 in increments of 10 thus the frequency change time can be 10 to 10 000 ms The value at the lowest digit is omitted Operation Mode Frequency Change Rate Frequency Change Time Frequency change rate in 10 ms Hz Maximum frequency Hz selected by 51 0 x 51 3 value 96 3 Frequency change time ms Frequency change time ms selected by S143 The same frequency change rate and frequency change time apply to the accelerating and decelerating periods of the trapezoidal frequency change pattern Mo
359. herwise the PULS instruction does not operate correctly Special internal relays cannot be designated as D1 For details see page 6 2 Basic Vol Source Device S1 Control Register Store appropriate values to data registers starting with the device designated by S1 before executing the PULS instruction as required and make sure that the values are within the valid range Devices 51 5 through 5147 are for read only Device Function Description R W 0 10 Hz to 1 kHz 1 100 Hz to 10 kHz 510 Operation mode 2 1 kHz to 100 kHz R W 3 200 Hz to 100 kHz Note 2 When S1 0 operation mode 0 to 2 1 to 100 96 S141 Output pulse frequency 1 to 100 of the maximum frequency of selected mode 51 0 R W When 51 0 operation mode 3 20 to 10 000 x10 Hz Note 3 13 2 FC5A MICROSMART UstER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Device Function Description R W 0 Disable pulse counting um Pulsecounting 1 Enable pulse counting PULS1 PULS3 only R w 1 3 Preset value high word 1 to 100 000 000 05F5 E100h PULS1 PULS3 only R W 51 4 Preset value low word S145 Current value high word 1 to 100 000 000 05F5 E100h PULS1 PULS3 only R S146 Current value low word S147 Error status Oto5 R Note 1 Devices for high and low words can be swapped on upgraded CPU modules with system program version 110 or higher See page 5 46 Basic Vol Note 2 The frequency range of mode
360. hour data is subtracted by a multiple of 24 and the day data is incremented D8008 D8009 D8010 D8011 D8012 D8013 D8014 Source 1 7 Year 8 Month 23 Day 4 D of W 20 Hour 30 Minute 40 Second Note D100 D101 D102 Source 2 30 Hour 35 Minute 15 Second D200 D201 D202 D203 D204 D205 D206 Destination 1 7 Year 8 Month 25 Day 6 D of W 3 Hour 5 Minute 55 Second 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 stored to D203 of destination 1 20 4 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 IDEC 20 CLOCK INSTRUCTIONS TSUB Time Subtraction 51 52 D1 CY TSUB S1 S2 D1 Mode When input is on time data designated by source device S2 are subtracted from date time data designated by source device S1 depending on the selected mode The result is stored to destination device D1 and borrow M8003 This instruction is available on upgraded CPU modules with system program version 210 or higher Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2
361. hrough M2557 be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S1 S2 or D2 the device data is the timer counter current value TC or CC When T timer or C counter is used as D1 the device data is the timer counter preset value TP or CP 0 through 65535 Either source device S2 or destination device D2 does not have to be designated If S2 or D2 is not designated the source or destina tion device is determined by S1 or D1 without offset Make sure that the source data determined by S1 S2 and the destination data determined by D1 D2 are within the valid device range If the derived source or destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Valid Data Types W word X integer D double word X L long F float Example IMOVN When a bit device such as 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 as T timer C counter or D data register is designated as the source or destination 1 point word data type or 2 points dou
362. ic Vol DATA Specify the first device address to extract the data to write to the intelligent module When T timer or C counter is used as DATA for Stop Access Write the timer counter current value TC or CC is writ ten to the intelligent module All data registers including special data registers and expansion data registers can be designated as DATA When a constant is designated as DATA Repeat cannot be selected For details about the data movement with or with out Repeat see page 16 7 STATUS Specify a data register to store the operating status code Data registers DO D1999 and D10000 D49999 can be desig nated as STATUS Special data registers and expansion data registers cannot be designated For status code description see page 16 6 SLOT Enter the slot number where the intelligent module is mounted A maximum of seven intelligent modules can be 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 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 instruction is executed when the CPU module is stopped regardless whether the input condition for the MCS instruction is on or off For MCS and MCR instructions
363. icable 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 Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Binary data to convert X X X X X D1 Destination 1 Destination to store conversion results X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 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 Valid values for the source device 0 through 9999 270Fh for the word data type and 0 through 9999 9999 5F5 EOFFh 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 program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Since the HTOB 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 W word X When a bit device such as input Q output M internal relay or R shift register is designated as the source 16 points word data type or 32 points doubl
364. ication mode while the telephone line is connected insert internal relay M8077 line connection as an input condition for the TXD or RXD instruction After the telephone line is connected make 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 restarted the user protocol is enabled again Disconnect Mode The disconnect mode includes only one command to disconnect the telephone line To disconnect the telephone line turn on internal relay M8053 The telephone line is disconnected by turning off the DTR signal since the initialization string includes the amp D2 command While a modem command is executed another command cannot be executed If two or more start internal relays are turned on simultaneously an error will result and error code 61 is stored in modem mode status data register D8111 see page 22 7 When the disconnect command has been completed successfully internal relay M8063 is turned on If the disconnect command fails internal relay M8073 is turned on The disconnect command is determined successful when the DCD signal is turned off After the telephone line is disconnected t
365. ice bits increases in 16 or 32 point increments D double word X When a word device such as T timer C counter or D data register is designated as the source or L long X destination 1 point word or integer data type or 2 points double word long or float data type are F float X used When repeat is designated for a word device the quantity of device words increases in 1 or 2 point increments IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 3 1 3 MOVE INSTRUCTIONS Examples MOV Data Type Word D10 MO H mo pem BER When input I2 is on the data in data register D10 designated by source device S1 2 is moved to 16 internal relays starting with MO designated by destination device D1 D10 12345 MO through M7 M10 through M17 The data in the source data register is converted into 16 bit binary data MSB LSB eae eee ecco SIS 4 roug an roug is the least significant bit MIT MIU M7 MO M17 is the MSB most significant bit Data Type Word 810 gt D2 DO MOV W 51 Dic REP When input IO is on constant 810 designated by source device S1 is moved to data register D2 desig nated by destination device D1 2 810 810 Data move operation for the integer data type is the same as for the word data type Data Type Dou
366. idge adjustment confirm the adjustment value indicated on the clock cartridge This value is an adjustment parameter measured on each clock cartridge at factory before shipment Adjustment Value The adjustment value indicated on the clock cartridge was measured at 25 C to achieve the best accuracy When using the clock cartridge at other temperatures the clock cartridge accuracy may be impaired Programming WindLDR 1 From the WindLDR menu bar select Configuration gt Cartridges and Modules The Function Area Settings dialog box for Cartridges and Modules appears MicroSmart Function Area Settines Run Stop Control Configure the cartridges and expansion modules Memory Backup Input Configuration Communication Ports Key Matrix Cartridges amp Modules Device Settings Memory Cartridge Program Protection __ E Enable Memory Cartridge Download Self Diagnostic AS Interface v Use AS Interface Master Module 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 battery in the clock cartridge and held for approximately 30 days at 25 C If the CPU module is not power
367. igh alarm output control relay S244 goes on When 51 0 is lower than 51 14 S244 is off DE FC5A MicROSMART User s MANUAL FC9Y B1273 14 15 14 PID INSTRUCTION S245 Low Alarm Output When the process variable S140 is lower than or equal to the low alarm value S115 the low alarm output control relay 245 goes on When 51 0 is higher than 51 15 S245 is off S246 Control Output During auto tuning in auto mode with the auto manual mode control relay S2 1 set to off the control output S246 is turned on and off according to the AT control period 1420 and AT output manipulated variable 51 22 During PID action in auto mode with the auto manual mode control relay S2 1 set to off the control output 52 6 is turned and off according to the control period 51 13 and the output manipulated variable S141 calculated by the PID action While advanced auto tuning is in progress the control output S246 remains on In manual mode with the auto manual mode control relay S2 1 set to on the control output S246 is turned on and off according to the control period 51 13 and the manual mode output manipulated variable S1 18 S247 AT Complete Output The AT complete output control relay 52 7 goes on when auto tuning is complete or failed and remains on until reset Operating status codes are stored to the operating status control register S142 See page 14 4 Source Device S3 Set Point The PID action
368. igher 5 13 Decrement Instruction DEC 5 13 Sum Instruction SUM 5 16 Random Instruction RNDM 5 19 Decrement Jump Non zero DJNZ 11 5 N Data Search Instruction NDSRC 210 or higher 210 or higher 210 or higher pu 19 5 Clock Instructions higher 20 1 TADD TSUB HTOS STOH and HOUR All in one 12V DC Power CPU Modules il Analog I O Modules Upgrade Basic Vol Version 200 or higher Any Any 2 56 Modbus TCP Communication 23 1 13 Modbus Slave Communication for Port 1 2100rhigher 210 or higher 210 or higher hi Basic Vol igher Note 4 12 11 Basic Vol Run Stop Selection at Power Up 220 or higher 5 4 FC5A SIFA4 Expansion RS485 Communica Basic Vol tion Module Compatibility Note 3 2 86 25 1 P y 220 or higher 220 or higher 6 2 or Data Link and Modbus Communication _ higher Basic Vol for Port 3 to Port 7 Note 4 11 1 12 1 Communication Refresh Selection for Basic Vol Port 3 to Port 7 5 43 246 or higher m FCSA D16Rx1 or PID Upgrade Integral Start Coefficient _ 246 or higher FCSA D32x3 72 or 14 9 Support for Proportional Band higher 131 or higher FCSA D12x1E Note 1 All functions are available FCSA D12K1E and FCSA D12S1E with system program version 100 Note 2 Optional HMI module FC4A PH1 is needed to use this function Note 3 Expansion RS232C and RS485 communication modules FC5A SIF2 and FCSA SIF4 cannot be used with the FCbA C24R2D CPU module Note 4 Mod
369. igits 1 to 5 decimal 1 to 4 hex Conversion BCD or BIN Applicable 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 Note The DGRD instruction requires transistor output terminals When using all in one 24 I O type CPU module FC5A C24R2 connect a transistor output module Valid Devices Device Function QM T C D Constan Repeat First input number to read a imme Q First output number for digit selection n qx Em Ex D1 Destination 1 Destination to store results 1 uem wen ume dem st For the valid device address range see pages 6 1 and 6 2 Basic Vol The DGRD instruction can read 65535 5 digits at the maximum When the read value exceeds 65535 with the quantity of digits set to 5 a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Note The DGRD instruction can be used up to 16 times in a user program When transferring a user program containing more than 16 DGRD instructions to the CPU a user program syntax error occurs turning on the ERR LED The user program cannot be executed Conversion BCD To connect BCD decimal digital switches BIN To connect BIN hexadecimal digital switches Input Points Inputs are used to read the data from digital switches The quantity of required input points is always 4 Four input points mus
370. ignated as S1 Data registers DO D1989 D2000 D7989 and D10000 D49989 can be designated as S1 For details see the following pages Destination device D1 status relay uses 4 internal relays starting with the device designated as D1 Internal relays MO to M2550 can be designated as D1 The least significant digit of the internal relay number designated as D1 must be otherwise the RAMP instruc tion does not operate correctly Special internal relays cannot be designated as D1 For details see page 6 2 Basic Vol 13 14 FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC Source Device S1 Control Register 13 PULSE INSTRUCTIONS Store appropriate values to data registers starting with the device designated as S1 before executing the RAMP instruc tion as required and make sure that the values are within the valid range Devices S148 through 51 10 are for read only Device Function Description R W 0 10 Hz to 1 kHz 1 100 Hz to 10 kHz 51 0 Operation mode 2 1 kHz to 100 kHz R W 3 200 Hz to 100 kHz Note 2 When S1 0 operation mode 0 to 2 1 to 100 S1 1 Steady pulse frequency 1 to 100 of the maximum frequency of selected mode S1 0 R W When S1 0 operation mode 3 20 to 10 000 x10 Hz Note 3 When S1 0 operation mode 0 to 2 1 to 100 51 2 Initial pulse frequency 1 to 100 of the maximum frequency of selected mode 51 0 R W When S1 0 operation mode 3 20 to 10 000 x10 Hz
371. il 2006 Upgraded and new functions listed below have been implemented in the MicroSmart CPU modules The availability of these functions depends on the model and the system program version of the 5 MicroSmart CPU modules To confirm the system program version of the MicroSmart CPU module use WindLDR on a computer connected with the CPU module The system program version is indicated on the PLC Status dialog box See page 13 1 Basic Vol To confirm the WindLDR version select the WindLDR application button at the upper left corner of the WindLDR screen followed by WindLDR Options gt Resources The WindLDR version is found under About WindLDR Upgraded and New Functions List Preface 2 FC5A MicroSmart User s Manual FC9Y B1273 All In One Type Slim Type FC5A C10R2 FC5A D16RK1 FC5A C10R2C FC5A D16RS1 CPU Module FC5A C10R2D FC gt AC24R2 FC5A D32K3 WindLDR Page FC5A C24R2C FC5A C16R2 FCSA C24R2D FC5A D32S3 FC5A C16R2C FC5A D12K1E FC5A C16R2D FC5A D12S1E Note 1 HMI Module Upgrade Note 2 110 or higher 101 or higher ca 110 or higher FC5A SIF2 Expansion RS232C Communi Basic Vol cation Module Compatibility Note 3 2 86 25 1 5 10r Basic Vol Modbus Master Upgrade Note 4 higher 12 6 110 or higher Essi Modbus Slave Upgrade Note 4 AMA 110 or higher 110 or higher Basic Vol 32 bit Data Storage Setting 5 46 B
372. ile generating output pulses the change takes effect when start input IO is turned on for the next cycle e f start input IO is turned off while generating output pulses of either initial or creep pulse frequency ZRN1 stops generating output pulses then internal relay M10 turns off and internal relay M11 turns on When input IO is turned on again ZRN1 restarts to generate output pulses for another cycle starting at the initial pulse frequency f deceleration input I2 is already on when start input IO turns on ZRN1 starts to generate pulse outputs of the creep pulse frequency 13 30 FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Sample Program ZRN1 This program demonstrates a user program of the ZRN1 instruction used for zero return operation to generate output pulses of 3 kHz initial pulse frequency from output QO while input I1 is on When deceleration input I3 is turned on the output pulse frequency reduces to the creep pulse frequency of 800 Hz When deceleration input I3 is turned off ZRN1 stops generating output pulses Initial pulse frequency 3 kHz Creep pulse frequency 800 Hz Deceleration input 13 high speed deceleration input Programming WindLDR On the WindLDR editing screen place the cursor where you want to insert the pulse instruction macro and type ZRNST Enter parameters as shown below ZRNST Set ZRN Instruction Parameters Type Control Register Settings
373. imeout rt3 ms Baud Rate bps 1200 2400 4800 9600 19200 38400 57600 115200 Data Bits 7 078 Parity Even Odd None Stop Bits 10r2 Receive Timeout ms OK Cancel Default 6 Click the OK button to save changes 10 to 2540 10 ms increments Receive timeout is disabled when or 2550 is selected The Communication 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 25 10 FC5A MicROSMART UseR s MANUAL FC9Y B1273 DEC 25 EXPANSION RS232C RS485 COMMUNICATION System Setup for Connecting a Printer Expansion RS232C Communication Module CPU Module FC5A SIF2 m The communication cable is prepared by the user refer ring to the diagram shown below Printer For the wiring precautions see page 2 89 Basic Vol To Port 3 RS232C Cable Connection and Pinouts FC5A SIF2 Printer D sub 9 pin i Description No Connection The name of BUSY terminal differs depending on printers such as DTR The functio
374. in D204 is changed after start input IO has been turned on the change can take effect only after the CPU starts again If start input IO is turned off before reaching the preset value RAMP1 stops generating output pulses immediately then internal relay M50 turns off and internal relay M51 turns on When input IO is turned on again RAMP1 restarts to generate output pulses for another cycle starting at the initial pulse frequency IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 21 13 PULSE INSTRUCTIONS Timing Chart for Reversible Control with Dual Pulse Output This program demonstrates a timing chart of the RAMP1 instruction when reversible control is enabled with dual pulse output D204 2 reversible control with dual pulse output RAMP S1 D1 D200 M50 13 22 Start Input 10 Control Direction D205 0 Forward 1 Reverse Steady Pulse Frequency gt EIU 1 Initial Pulse Frequency Forward CW Output Pulse QO Steady Pulse Frequency Initial Pulse Frequency 1 Reverse CCW Output Pulse Q1 Pulse Output ON M50 Pulse Output Complete M51 Pulse Output Status M52 When input 10 is turned RAMP1 generates output pulses starting at the initial frequency designated by the value stored in data register D202 While the output pulses are sent out from output 00 or Q1 internal relay M50 remains on Operation modes through 2 The pulse frequency increas
375. ine value X X D1 Destination 1 Destination to store conversion results X For the valid device address range see pages 6 1 and 6 2 Basic Vol When the data designated by S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the SIN 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 W word registers integer D double word L long F float X Example SIN SOTU SIN F S1 D1 D10 D20 IDEC 3 926991 rad 5 7 4 rad sin 57 4 0 707 1069 S1 3 926991 D10 D11 FC5A MicROSMART UsER s MANUAL FC9Y B1273 D20 D21 Since the floating point data type is used the source and destination devices use two consecutive data When input I1 is turned on the sine of the radian value of data registers D10 and D11 designated by source device S1 is stored to data registers D20 and D21 designated by destination device D1 D1 0 7071069 17 3 17 TRIGONOMETRIC FUNCTION INSTRUCTIONS COS Cosine cos 51 51 1 gt 01 01 1 COS F S1 D1 xokdekek When input is on the cosine of the radian value designated by source device S1 is store
376. ing a user program to transfer correct calendar clock data from special data registers allocated to the calendar clock Once the calendar clock data is stored the data is held by the backup battery in the clock cartridge 1 Select Online from the WindLDR menu bar then select Monitor The screen display changes to the monitor window 2 From the PLC menu select Status The MicroSmart PLC Status dialog box is displayed The current calendar clock data is read out from the clock cartridge and displayed in the Calendar field 3 Click the Change button for the Calendar The Set Calendar and Time dialog box comes up with the date and time values read from the computer internal clock Set Calendar and Time Calendar 01 15 Time 9 34 17 E OK 4 Click the Down Arrow button on the right of Calendar then a calendar is displayed where you can change the year month and date Enter or select new values 5 To change hours and minutes click 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 registers D8015 through D8021 do not hold the current values of the ca
377. ing completion output designated by device D2 is turned on When the quantity of sampling cycles designated by device S3 is 0 sampling is started when the input to the AVRG instruction is turned on and stopped when the sampling end input designated by device S2 is turned on Then the average maximum and minimum val ues are set to 3 devices starting with device designated 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 by D1 The average value is calculated to units rounding the fractions of one decimal place When the sampling end input is not used designate an internal relay or another valid device as a dummy for source device S2 When F float data type is selected and S1 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module When an error occurs incorrect S1 data are skipped Average maximum and minimum values are calculated from correct S1 data and set to 3 devices starting with device designated by D1 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 12 7 12 COORDINATE
378. insert the PIDST instruction click the right mouse button and select Macro Instructions gt PIDST Set PID Parameters In the PIDST dialog box program as shown below Select options and device address as with the PID instruction o PIDST Set PID Parameters y Module Type 9 Data Type Module Type 0 4095 FC4A L03A1 FC4A LO3AP1 FC4A J2A1 FC4A K1A1 Device to setAp Device Address Comment 0000 00000 52 0000 0000 53 00100 00100 PID Parameters 51 3 Operation mode Advanced AT PID action S243 Integral action Enable 1to 100 51 10 Proportion Proportional band lt 51 4 PID Action Parameters Input Settings 3 Set point 0 to 13000 Linear conversion Enable Maximum value 32768 to 32767 S145 Minimum value 32768 to 32767 S146 Input filter coefficient 0 to 99 51 11 High alarm value to 13000 51 14 Low alarm value 0 to 13000 51 15 51 26 Derivative gain 1 to 100 AT Parameters Output Settings Manipulated variable limit Disable 2 2 Proportional band offset 100 to 100 1 25 51 3 Operation mode 51 14 High alarm value 1 4 Control mode 51 15 Low alarm value 51 5 Linear conversion maximum value 51 25 Proportional band offset value 51 6 Linear conversion minimum value 51 26 Derivative gain 51 10 Int
379. instruction Device Address Data Format AS Interface Master Module 1 AS Interface Master Module 2 Bits 15 to 8 Bits 7 to 0 D1776 Slaves 15 A to 8 A Slaves 7 A to O D1777 Slaves 31 A to 24 A Slaves 23 A to 16 A D1778 Slaves 15B to 8B Slaves 7B to OB D1779 Slaves 31B to 24B Slaves 23B to 16B Slave Identification Information Slave Profile For AS Interface master module 1 data registers D1780 through D1940 are assigned to the slave identification informa tion or the slave profile The slave profile includes configuration data and parameters to indicate the slave type and slave operation 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 AS Interface master module The CDI is made up of four codes the ID code 1 code ID2 code and ID1 code The CDI of slaves not connected to the AS Interface bus is FFFFh The ASI command Read CDI can be used to read the CDI data to data registers D1780 through D1843 Execute the ASI command Read CDI before using the CDI data for program execution Device Address Data Format AS Interf
380. ion I QM T C D Constant Repeat S1 Source 1 Data to display X X X Q Output First output number to display data X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as Special internal relays cannot be designated as Q When T timer or C counter is used as S1 the timer counter current value TC or CC is read out Conversion BCD To connect BCD decimal display units BIN To connect BIN hexadecimal display units Latch Phase and Data Phase Select the latch and data phases to match the phases of the display units in consideration of sink or source output of the output module Output Points The quantity of required output points is 4 plus the quantity of digits to display When displaying 4 digits with output QO designated as the first output number 8 consecutive output points must be reserved starting with QO 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 period of time shown below to process all digits of the display data Display Processing Time 3 scan times x Quantity of digits When the scan time is less than 2 ms the data cannot be displayed correctly When the scan time is too short to ensure normal display set a value of 3 or more in ms to data reg
381. ion output Q1 turns off or on while input I1 is off or on to indicate the forward or reverse direction respec tively Steady pulse frequency 10 kHz Initial pulse frequency 500 Hz Frequency change time 2 000 ms Reversible control enable Preset value Programming WindLDR Reversible control with single pulse output 100 000 pulses total On the WindLDR editing screen place the cursor where you want to insert the pulse instruction macro and type RAMPST Enter parameters as shown below RAMPST Set RAMP Instruction Parameters Type RAMP Instruction Type Control Register 51 D0000 Device Address Comment Same device address as S1 for the RAMP1 instruction Device Settings Control Register Settings Function DR D0000 00001 00002 00003 00004 00005 00006 0007 00008 0009 00010 Operation mode Steady pulse frequency Initial pulse Frequency Frequency change time Reversible control enable Control direction Preset value Current value Error Status Setting Description Mode 3 200 Hz to 100 kHz 1000 20 to 10 000 in increments of 10 x10Hz 50 20 to 10 000 in increments of 10 x10Hz 2000 10 to 10 000 in increments of 1 ms Single pulse output Forward 100000 1 to 100 000 000 05F5 E100h 1 to 100 000 000 05 5 E100h Cancel Device Function Description Device Address Value 51 0 Operation mode Frequency
382. ipheral fault slaves LPF 24 26 of projected slaves LPS 24 27 upgraded and new functions 1 2 UMP 11 1 load compare equalto 4 8 greaterthan 4 8 orequalto 4 8 lessthan 4 8 orequalto 4 8 unequal to 4 8 local mode 24 15 LOG10 18 2 logarithm power instructions 18 1 LOGE 18 1 long press 24 14 LPF 24 26 LPS 24 27 LRET 11 3 M maintenance protocol 21 2 25 4 manipulated variable 14 16 maximum AS Interface bus cycle time 24 5 Modbus TCP communication 23 1 format 23 9 master communication 23 2 request table 23 3 slave communication 23 5 mode 9 1 modem cable 1 22 1 mode 22 1 status 22 3 status data register 22 7 protocol 22 10 module RS485 communication 21 1 monitor AS Interface slave 24 37 monitoring digital I O and changing output status 24 12 status 21 3 mounting position communication block 24 40 MOV 3 1 move 3 1 instructions 3 1 INDEX not 3 5 MOVN 3 5 MUL 5 1 multiplication 5 1 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 exchange off 24 15 mode 24 15 offline 24 15 Normal_Operation_Active 24 25 NRS 3 14 NSET 3 13 ODI 24 21 Off line 24 25 Offline_Ready 24 25 online mode protocol selection 22 3 opcode 2 7 operating procedure modem mode 22 11 operation basics 24 6 mode 24 15 Operational state 22 2 operator interface communication 25 6 OR word 6 1 originate mode 22 2 22 3
383. is ter stores two characters the first character at the upper byte and the second character at the lower byte in the data reg ister Since 30 data registers are allocated to the telephone number up to 60 characters can be stored as many as the modem capacity allows Use the MOV move instructions on WindLDR to set the telephone number and execute the MOV instructions before turning on start internal relays M8050 M8052 Example of Dial Command ATD1234 CR LF ATD and LF appended at the beginning and end of the dial command automatically by the system program and need not be stored in data registers To program the telephone number of the example above store the telephone number and ASCII value ODh for CR to data registers starting with D8170 It is also possible to store character T for touch tone phone or P for pulse or rotary phone 08170 3132h 3h21 32hz 2 D8171 3334h 33h 3 34h 4 08172 0000 ODh All characters subsequent to CR are ignored 22 4 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC 22 MODEM MODE As described above when start internal relay M8050 is turned on the initialization string is sent followed by the ATZ command and the dial command When start internal relay M8051 is turned on the ATZ command is sent followed by the dial command The dial command can also be sent separately by turning on start in
384. ister D8022 constant scan time preset value See page 5 50 Basic Vol IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 10 1 10 INTERFACE INSTRUCTIONS Example DISP The following example demonstrates a program to display the 4 digit current value of counter CNT10 on 7 segment dis play units IDEC s DD3S F31N connected to the transistor sink output module DISP S1 LAT DAT When input IO is on the 4 digit current value of counter C10 is displayed 10 BCDA C10 Q30 L H on 7 segment digital display units Output Wiring Diagram 8 Transistor Sink Output Module 08 1 030 031 032 Q33 Q34 Q35 Q36 Q37 COM V m t 24V DC Power Supply Upper Digit Lower Digit 10 2 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDE 10 INTERFACE INSTRUCTIONS DGRD Digital Read H When input is on data designated by devices and Q is set to a data register designated by destination device D1 DGRD Q D1 BCD4 This instruction be used to change preset values for timer and First output number counter instructions using digital switches The data that can be read using this instruction is 0 through 65535 5 digits or FFFFh First input number Quantity of d
385. itialization string see page 22 3 When the initialization string has been sent successfully internal relay M8065 is turned on If the initialization string fails internal relay M8075 is turned on When the subsequent ATZ command is also completed successfully M8066 will also be turned on ATZ Resetting the Modem in Answer Mode The default initialization string specifies to be stored in the non volatile memory of the modem using the amp W command The initialization string is restored when the modem is powered up or when the ATZ command is issued The MicroSmart sends the ATZ command to the modem following the initialization string when M8055 is turned on The ATZ command can also be issued separately by turning M8056 on ATZ Command ATZ CR LF When the ATZ command has been completed successfully internal relay M8066 is turned on If the ATZ command fails internal relay M8076 is turned on If the initialization string has been stored in the non volatile memory of the modem M8055 may be skipped Start with M8056 to send the ATZ command 22 6 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC Modem Mode Status Data Register When the modem mode is enabled data register D8111 stores a modem mode status or error code 22 MODEM MODE D8111 Value Status Description 0 Not in the modem mode Modem mode is not enabled 10 Ready for connecting line S
386. ity and high security The master monitors the AS Interface power supply voltage and data transmitted on the bus and detects slave failures and data errors Even when a slave is replaced or a new slave is added during operation the AS Interface master module need not be shut down and can continue uninterrupted communication with other active slaves on the bus 1 DEC FC5A MiCROSMART UsER s MANUAL FC9Y B1273 24 5 24 AS INTERFACE MASTER COMMUNICATION Operation Basics This section describes simple operating procedures for the basic AS Interface system from programming WindLDR ona computer to monitoring the slave operation AS Interface System Setup The sample AS Interface system consists of the following devices Name Type No Description FC5A MicroSmart Slim Type CPU Module FC5A D16RK1 MicroSmart AS Interface Master Module FC4A AS62M WindLDR FC9Y LP2CDW Version 5 0 or higher 1 unit AS Interface Standard Slave Address 0 ID 0 1 0 7 ID2 F ID1 7 AS Interface Power Supply PS2R Q30ABL Output 30 5V DC 2 4A 73W Slim Type CPU Module AS Interface Master Module FC5A D16RK1 FC4A AS62M Computer Link Cable 4C FC2A KC4C 3m 9 84 ft long Standard AS Interface Cable AS Interface Power Supply Standard Slave Address 0 ID 0 1 0 7 102 F ID1 7 AS Interface Cable Wiring Before wiring the AS Interface cable remove the A
387. ity of digits designated by S2 is converted into 16 bit binary data and stored to the destination designated by device D1 Valid values for source data to convert are 30h to 39h and 41h to 46h The quantity of digits to convert can be 1 through 4 Applicable 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 Valid Devices Device Function I QM 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 1 4 D1 Destination 1 Destination to store conversion results X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S2 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 Valid values for source S1 data to convert are 30h to 39h and 41h to 46h Make sure that the values for each source designated by S1 and the quantity of digits designated by S2 are within the valid range If the S1 or S2 data is out of the valid range a user program exe cution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Since the ATOH instruction is exe
388. l Modbus ASCII Slave Modbus RTU Slave MODBUS TCP Slave Server Maintenance Protocol Maintenance Protocol Maintenance Protocol Configure Configure Configure Configure Configure Configure Communication Refresh for Port 3 through Port 7 In END Processing Every 10 ms Comm Param 9600 7 Even 1 9600 7 Even 1 9600 7 Even 1 9600 7 Even 1 9600 7 Even 1 9600 7 Even 1 9600 7 Even 1 Mode Selection Input Network No Default 3 Click the Configure button The Communication Parameters dialog box appears Change settings if required Maintenance Protocol Port1 Baud Rate bps 1200 2400 4800 9600 19200 eee 38400 57600 115200 Data Bits Data Bits 7or8 Parity Parity Even Odd None Stop Bits Stop Bits 10 2 Receive Timeout ms 10 to 2540 10 ms increments Receive Timeout ms Receive timeout is disabled when 2550 is Network Number selected Mode Selection Input Network Number Oto 31 Mode Selection Input Any input number Note When a mode selection input has been designated and the mode selection input is turned on the selected communica tion parameters are enabled When communication parameters are changed without designating a mode selection input the changed communication parameters take effect immediately when the user program is downloaded 4 Click the OK button
389. l relay M8004 and the ERR LED on the CPU module but the input ON duration measurement is continued IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 20 11 20 CLOCK INSTRUCTIONS Examples HOUR The following examples demonstrate the HOUR instruction to measure the input ON duration value in hours minutes and seconds and to compare the value in two different ways Source Device S1 Data Register HOUR S1 D1 D2 D3 io DO D100 02 01900 DO D1 D2 Source 1 50 Hour 35 Minute 55 Second e Source Device S1 Constant HOUR 10 Constant 20 12 Source 1 50 Hour D100 D101 D102 Destination 1 3 pro Hour 25 0101 Minute 45 0102 51 D1 D2 D3 50 D100 Q2 D1900 Destination 1 3 Hour 25 Minute 45 Second DO D1 D2 lt gt 0100 0101 0102 gt 02 While input IO is on the ON duration is measured The measured time value hour minute and second is stored to data registers 0100 0101 0102 designated by destination device D1 and compared with the preset value stored in data registers 00 01 02 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
390. l relay number designated as D1 must be otherwise the PWM instruc tion does not operate correctly Special internal relays cannot be designated as D1 For details see page 6 2 Basic Vol 13 8 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Source Device S1 Control Register Store appropriate values to data registers starting with the device designated by S1 before executing the PWM instruc tion as required and make sure that the values are within the valid range Devices S145 through 51 7 are for read only Device Function Description R W FC5A D16RK1 RS1 FCSA D32K3 S3 0 11 44 Hz 1 45 78 Hz 2 366 2 Hz 51 0 Output pulse utput pulse frequency FCSA D12K1E S1E R W 0 15 26 Hz 1 61 04 Hz 2 488 3 Hz 3 3 1 0100 BET pulsewidth ratio 1 to 100 of the period determined by output pulse frequency S1 0 R W 0 Disable pulse counting Slita Pulse caunting 1 Enable pulse counting PWM1 PWM3 only R W S1 3 Preset value high word 1 to 100 000 000 05F5 E100h PWM1 PWM3 only R W S1 4 Preset value low word S1 5 Current value high word 1 to 100 000 000 05F5 E100h PWM1 PWM3 only R 51 6 Current value low word S147 Error status 0to5 R Note Devices for high and low words can be swapped on upgraded CPU modules with system program version 110 or higher See page 5 46 Basic Vol S140 Output Pulse Frequency The value stored in the data register designa
391. lapping Coordinates In this example the XYFS instruction sets up three coordinate points which define two different linear relationships between X and Y The three points are XO YO 0 100 X1 Y1 100 0 and X2 Y2 300 100 The two line seg ments define overlapping coordinates for X That is for each value of Y within the designated range there would be two X values assigned XYFS I S1 YO X1 x2 Y2 M8120 is the initialize pulse special internal 100 100 300 100 relay At startup XYFS specifies three points CVXTY S1 0 CVXTY converts the value in C10 and stores the result in D90 CVYTX I S1 S2 S1 0 D95 D30 CVYTX converts the value in D95 and stores the result in D30 YO X2 Y2 300 100 D90 75 D95 40 X1 Y1 100 0 D30 100 C10 300 X 60 250 The first line segment defines the following relationship for X to Y conversion Y X 100 The second line segment defines another relationship for X to Y conversion y ix so 2 For X to Y conversion each value of X has only one corresponding value for Y If the current value of counter C10 is 250 the value assigned to D90 is 75 For Y to X conversion the XYFS instruction assigns two possible values of X for each value of Y The relationship defined by the first two points has priority in these cases The line between points XO YO and X1 Y1 that is the line between 0 100 and 100 0 has p
392. lave are different from the failed slave the FLT LED will go on e The auto addressing function for a replacement slave works only when one slave has failed This function cannot be used to replace multiple slaves M1943 Auto Address Available M1943 indicates whether or not the conditions for the auto addressing function are satisfied M1943 goes on when the auto addressing function is enabled and there is one faulty slave a slave which cannot 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 while in other modes When M1945 turns on the CPU module starts to exchange data communication with the connected slaves M1946 APF not APO M1946 goes on when the AS Interface power supply has failed then the PWR LED goes off M1947 Offline Ready M1947 indicates that the AS Interface master module is in normal protected offline While in normal protected offline M1947 remains on and the OFF LED also remains on M1950 Periphery OK M1950 remains on while the AS Interface master module does not detect a failure in peripheral devices When a failure is found M1950 goes off M1960 Data Exchange Active M1960
393. lc enc 3 6 IMOVN Indirect Move Not 3 8 BMOV Block Move iiu een eren reco cR te Vr e P Da dae Greate RR 3 9 IBMV Indirect Bit Move 1 2 3 10 IBMVN Indirect Bit Move Not 3 12 NSET Data Set 2 2 2 2 4 44 2 2 222 22 3 13 NRS N Data Repeat Set conem erae ere use eere RR RO Rr RUP 3 14 XCHG Exchange betes doe ea eros li te er e ee edd 3 15 TCCST Timer Counter Current Value 3 16 Data Comparison Instructions CMP Compare Equal To 4 1 CMP lt gt Compare 4 1 CMP lt Compare Less Than 4 1 CMP gt Compare Greater Than 4 1 CMP lt Compare Less Than or Equal To 1 4 1 CMP gt Compare Greater Than or Equal To 4 2 ICMP gt Interval Compare Greater Than or 4 6 LC Load
394. lendar clock data but hold unknown values before executing a user program Special Data Registers for Calendar Clock Data Data Register No Data Value Read Write Updated D8008 Year current data to 99 D8009 Month current data 1to 12 D8010 Day current data 1to31 D8011 Day of week current data 0 to 6 Note Read only 4 time D8012 Hour current data 0 to 23 D8013 Minute current data 01059 08014 Second current data to 59 D8015 Year new data to 99 D8016 Month new data 1to 12 D8017 Day new data 1to31 D8018 Day of week new data 0 to 6 Note Write only Not updated D8019 Hour new data 0 to 23 D8020 Minute new data to 59 D8021 Second new data 01059 Note day of week value is assigned for both current and new data as follows oo 13 3 4 5 6 Sunday Wednesday Thursday Friday Saturday 9 6 FC5A MICROSMART USER S MANUAL FC9Y B1273 I DEC Special Internal Relays for Calendar Clock Data M8016 Calendar Data Write Flag 9 WEEK PROGRAMMER INSTRUCTIONS When M8016 is turned on data in data registers D8015 through D8018 calendar new data are set to the clock cartridge installed on the CPU module M8017 Clock Data Write Flag When M8017 is turned on data in data registers 08019 through 08021 clock new data are set to the clock cartridge installed on the CPU module M8020 Example Setting Calendar
395. lligent module access instructions are used to read or write data between the CPU module and a maximum of seven intelligent modules while the CPU module is running or when the CPU module is stopped Intelligent Module Access Overview The Run Access Read instruction reads data from the designated address in the intelligent module and stores the read data to the designated device while the CPU module is running The Run Access Write instruction writes data from the designated device to the designated address in the intelligent module while the CPU module is running The Stop Access Read instruction 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 Data movement while the CPU module is running Intelligent Module RUNA READ While the CPU module is running and the input is on RUNA READ is exe cuted to read data from the intelli gent module and RUNA WRITE to write data to the intelligent module RUNA READ RUNA WRITE RUNA xokeokokokek WRITE STPA 28 KR RK READ STPA WRITE Data movement when the CPU module is stopped Intelligent Module RUNA WRITE When the CPU module is stopped
396. llocated 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 Address Data Format AS Interface Master Module 1 AS Interface Master Module 2 Bits 15 to 8 Bits 7 to 0 D1772 8 Slaves 15 A to 8 A Slaves 7 A to 0 D1773 9 Slaves 31 A to 24 A Slaves 23 A to 16 A D1774 10 Slaves 15B to 8B Slaves 7B to OB D1775 11 Slaves 31B to 24B Slaves 23B to 16B Device Address represents the offset from the Device Address designated in the RUNA or STPA instruction dialog box 24 26 FC5A MicroSmart UsER s MANUAL FC9Y B1273 IDEC 24 AS INTERFACE MASTER COMMUNICATION List of Projected Slaves LPS For AS Interface master module 1 D1776 through D1779 are allocated to read and write the LPS The LPS settings are stored to the AS Interface master module when either Auto Configuration or Manual Configuration is executed on WindLDR The ASI command Read LPS can be used to read the LPS data to data registers D1776 through D1779 Then you can check the register bits to determine the slave projection When a bit is on it indicates that the corresponding slave is set as a projected slave After changing the LPS settings execute the ASI command Read LPS then you can use the updated data for program execution For AS Interface master module 2 the list of projected slaves cannot be accessed using the RUNA or STPA
397. lse Output Status M52 When input 10 is turned RAMP1 generates output pulses starting at the initial frequency designated by the value stored in data register D202 While the output pulses are sent out from output QO internal relay M50 remains on Operation modes through 2 The pulse frequency increases according to the frequency change rate value stored in data register D203 Operation mode 3 The pulse frequency increases as long as the frequency change time stored in data register D203 While the output pulse frequency is on the increase internal relay M52 remains on Depending on the control direction designated by the value stored in data register D205 control direction output Q1 turns off or on while D205 stores 0 forward or 1 reverse respectively When the output 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 turn off and internal relay M51 turns on If the parameter values in D200 through D207 except for D204 are changed while generating output pulses the change takes effect when start input IO is turned on for the next cycle If the value stored
398. lses the internal relay designated by device D1 0 turns off 01 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 designated by device D1 1 turns off IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 29 13 PULSE INSTRUCTIONS Timing Chart for Zero return Operation This program demonstrates a timing chart of the ZRN1 instruction when input 12 is used for a high speed deceleration input ZRN S1 S2 D1 io 1 D200 2 10 Start Input 10 Deceleration Input 12 Initial Pulse Frequency Creep Pulse Frequency 9 ee Output Pulse QO Pulse Output ON M10 Pulse Output Complete 11 e When input IO is turned on ZRN1 starts to generate output pulses of the initial pulse frequency designated by the value stored in data register D201 While the output pulses are sent out from output QO internal relay M10 remains on When deceleration input I2 is turned on the output pulse frequency immediately reduces to the creep pulse frequency des ignated by the value stored in data register 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 f parameter values in D200 through D203 are changed wh
399. m mand Go to Normal Protected Offline To return to normal protected mode and resume data communication either long press the PB2 button again or execute the ASI command Go to Normal Protected Mode For details about the ASI com mands see page 24 30 e Normal Protected Data Exchange Off Data communication with all slaves is prohibited To enter this mode execute the ASI command Prohibit Data 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 module Local mode is used to carry out maintenance operations such as checking the configuration and slave inputs Use the input LEDs to check the slave input data during operation When the CPU module is powered up the AS Interface master module initially enters normal protected mode of con nected mode if no error occurs To switch from any of connected mode to local mode protected mode long press the PB1 and PB2 buttons simultaneously It is not possible to switch from local mode back to connected mode using the pushbuttons To return to connected mode shut down the CPU module and power up again Local mode is comprised of two modes protected m
400. m 0 Disable linear conversion Proportional gain 1 Enable linear conversion Proportional gain 2 Disable linear conversion Proportional band 3 Enable linear conversion Proportional band Others Error status 101 Note While the PID action is in progress operating status 51 1 is 5X or 6X do not change the control mode S144 otherwise the PID action may result in an error and stop operation Disable linear conversion Linear conversion is not executed When the linear conversion is disabled S144 set to O 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 S140 without conversion Enable linear conversion 14 6 The linear conversion function is useful for scaling the process variable to the actual measured value in engineering units When the linear conversion is enabled S144 set to 1 or 3 the analog input data 0 through 4095 or 50000 depending on the ana log I O module type from the analog 1 0 module is linear converted and the result is stored to the process variable 51 0 When using the linear conversion set proper values to the linear conversion maximum value S145 and linear conversion minimum value 51 6 to specify the linear conversion output range When using the linear conversion function in a temperature control applica tion temperature values can be used
401. master module the following error message will be dis played 24 38 Configure AS Interface Master x FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 24 AS INTERFACE MASTER COMMUNICATION SwitchNet Data I O Port AS Interface Master Module 1 SwitchNet control units can be used as slaves in the AS Interface network and are available in 616mm L6 series and 22mm HW series Input signals to the MicroSmart AS Interface master module are read to internal relays allocated to each input point designated by a slave number and a DI number Similarly output signals from the MicroSmart AS Inter face master module are written to internal relays allocated to each output point designated by a slave number and a DO number When programming a ladder diagram for the MicroSmart use internal relays allocated to input signals and out put signals of SwitchNet control units L6 series and HW series SwitchNet control units have slightly different digital I O data allocations L6 Series Digital I O Data Allocation Input data is sent from slaves to the AS Interface master Output data is sent from the AS Interface master to slaves Input Data Output Data SwitchNet L6 Series Used 1 0 slave send data slave receive data Slave Unit DI3 DI2 011 DIO DO3 DO2 DO1 DOO Pushbutton 1in 0 x1 1 1 Pilot light 1 out 0 0 1 1 X1 Illuminated pushbutton 1 1 out 0 X1 1 1 X1 Selec
402. me is too long it takes a long time before the process variable 51 0 reaches the set point S3 The integral action is executed within the range between the plus proportional band and the minus proportional band When the process variable S140 runs out of the proportional band due to an external noise or a change the set point the integral action is disabled As a result the manipulated variable quickly follows up the set point with smaller over shoot and undershoot While the PID action is in progress the integral time value can be changed by the user Output Manipulated Variable 1 4 2 or 3 proportional band 722 Integral Action Range 51 7 1000 proportional band 10 50 Proportional Band f B PV 410 PV4205 ue PV 205 PV 410 4095 rocess Variable 5096 Proportional Band EE aaa 14 8 FC5A MICROSMART UsER s MANUAL FC9Y B1273 ZIDEC 14 PID INSTRUCTION 1 9 Derivative Time The derivative action is a function to adjust the process variable S1 0 to the set point S3 by increasing the manipulated variable D1 when the set point S3 is changed or when the difference between the process variable S1 0 and the set point S3 is increased due to disturbance The derivative time is a parameter to determine the amount of derivative action When auto tuning is used by setting the operation mode 1 3 to 1 AT PID 2 AT 3 advanced AT PI
403. me required for the CPU module to update the device data When using AS Interface master module 1 the scan time increases by a minimum of 10 ms For AS Interface master module 2 see page 24 32 2 These AS Interface device data can be read or written using WindLDR For details see page 24 34 3 The LPS PCD and PP are set and downloaded to the CPU module using WindLDR For details see page 24 36 4 The analog O data is updated only when an analog slave is connected to the AS Interface bus Accessing AS Interface Objects for AS Interface 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 IDEC FC5A MicROSMART USER s MANUAL FC9Y B1273 24 19 24 AS INTERFACE MASTER COMMUNICATION I O Data for AS Interface Master Module The AS Interface master module can process digital 1 0 data and analog 1 0 data Digital 1 0 data be a maximum of 4 digital inputs and 4 digital outputs per slave Analog 1 0 data consists of 4 channels of 16 bit analog input or output data per slave Digital I O Data of Standard Slaves and Expansion Slaves For AS Interface master module 1 the digital I O data for standard slaves and slaves sensors and actuators on the AS Interface bus are allocated to the AS Interface internal relays in the ascending o
404. monstrates a timing chart of the PWM1 instruction when pulse counting is enabled D202 1 enable pulse counting PWM S1 D1 0 1 0200 50 Start Input 10 Pulse Width Ratio D201 Preset Value D203 D204 PWR1 i PWR2 Output Pulse QO PV1 PV2 P gt gt Pulse Output ON M50 Pulse Output Complete M51 When input IO is turned PWM1 starts to generate output pulses at the frequency designated by the value stored in data register D200 The pulse width is determined by the value stored in data register D201 While the output pulses are sent out from output QO internal relay M50 remains on When the quantity of generated output pulses reaches the 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 f the pulse width ratio value 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 quency so that the pulse width ratio is changed successfully f input 10 is turned off before reaching the preset value PWM1 stops generating output pulses immediately then internal relay M50 turns off and internal relay M51 turns on IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 11 13 PULSE INSTRUCT
405. mples ADD Data Type Word This example demonstrates the use of a carry signal from special internal relay M8003 to set an alarm signal 51 D2 500 D2 D2 52 500 D1 D2 ADD W When a carry occurs output QO is set as a warning indicator Acknowledge M8003 Pushbutton When the acknowledge pushbutton input I1 is pressed the warning indicator is reset 11 Data Type Integer ADD 51 S2 Di ED gt 215 010 020 D30 Data Type Double Word ADD D 51 S2 Di D10 D20 D30 010 011 1957400 020 21 4112600 30 031 6070000 Data Long ADD S S2 Di io D10 020 D30 010 011 216283 020 21 964355 30 031 748072 Data Float ADD F S S2 Di REP io D10 020 D30 D10 D11 1 44 D20D2 3414 p30D31 4 554 Example SUB Data Word The following example demonstrates the use of special internal relay M8003 to process a borrow 012 7000 012 D1 D12 51 D12 52 7000 SUB W To process borrowing so that the number of times a borrow occurs is subtracted from D13 D1 D13 SUB W S1 REP D13 52 1 M8003 When a borrow occurs D13 i
406. mpleted successfully internal relay M8064 is turned on If the AT general command fails internal relay M8074 is turned on AT general command is determined successful when result code CR LF OKCR LF returned from the modem is received Answer Mode The answer mode is used to send an initialization string to the modem and to issue the ATZ command to reset the modem To execute a command turn on one of start internal relays M8055 or M8056 If two or more start internal relays are turned on simultaneously an error will result and error code 61 is stored in modem mode status data register D8111 see page 22 7 When a start internal relay is turned on a corresponding sequence of commands is executed once as described below M8055 Send initialization string and send the ATZ command M8056 Send the ATZ command Initialization String in Answer Mode When the modem mode is enabled as described on page 22 1 and the MicroSmart is started to run the default initializa tion string is 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 ATEOQOV1 amp D2 amp C1 VOX4 amp K3 A0 N5S0 2 amp W CR LF As described in the Originate Mode the initialization string can be modified to match your modem For details of modify ing the in
407. n RAMP1 restarts to generate output pulses for another cycle starting at the initial pulse frequency FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Sample Program RAMP1 Reversible Control Disabled This program demonstrates a user program of the RAMP1 instruction to generate 48 000 pulses from output QO Steady pulse frequency 6 kHz Initial pulse frequency 300 Hz Frequency change time 2 000 ms Reversible control enable Reversible control disabled Preset value 48 000 pulses total Programming WindLDR On the WindLDR editing screen place the cursor where you want to insert the pulse instruction macro and type RAMPST Enter parameters as shown below Same device address as S1 for RAMPST Set RAMP Instruction Parameters Type Control Register Settings Instruction Type Function DR Setting Description Operation mode D0000 Mode 3 200 Hz to 100 kHz Control Register Steady pulse frequency 00001 600 20 to 10 000 in increments of 10 x10Hz 51 Initial pulse Frequency 0002 30 20 to 10 000 in increments of 10 10 2 VEL 00000 Frequency change time 0003 2000 10 to 10 000 in increments of 1 ms Device Address Reversible control enable 00004 Disabled 00005 Preset value 00006 0007 48000 1 to 100 000 000 05 5 E100h Current value 00008 0009 1 to 100 000 000 05F5 E100h 00010 Comment Control direction Error Status the
408. n Xiang Building Tian an Cyber Park Fu Tian District Shenzhen Guang Dong 518040 PRC Tel 86 755 8356 2977 Fax 86 755 8356 2944 HONG KONG IDEC IZUMI H K CO LTD Unit G amp H 26 F MG Tower No 133 Hoi Bun Road Kwun Tong Kowloon Hong Kong Tel 852 2803 8989 Fax 852 2565 0171 E mail info hk idec com TAIWAN IDEC TAIWAN CORPORATION 8F 1 No 79 Hsin Tai Wu Road Sec 1 Hsi Chih District 22101 New Taipei City Taiwan Tel 886 2 2698 3929 Fax 886 2 2698 3931 E mail service tw idec com SINGAPORE IDEC IZUMI ASIA PTE LTD No 31 Tannery Lane 05 01 HB Centre 2 Singapore 347788 Tel 65 6746 1155 Fax 65 6844 5995 E mail info sg idec com THAILAND IDEC ASIA THAILAND CO LTD 20th FI Sorachai Bldg No 23 78 Soi Sukhumvit 63 Sukhumvit Rd Klongton Nua Wattana Bangkok 10110 Tel 66 2 392 9765 Fax 66 2 392 9768 E mail sales th idec com 2009 2014 IDEC Corporation All rights reserved http www idec com Manual No FC9Y B1273
409. n of this terminal is to send a signal to local equip ment whether the printer is ready to print data or not Since the operation of this signal may differ depending on printers confirm the operation before connecting the cable No Connection Receive Data No Connection Ground No Connection No Connection Busy Signal B WIN eB No Connection Caution Do not connect any wiring to the NC no connection pins otherwise the MicroSmart and the printer may not work correctly and may be damaged Description of Operation Printout Example The data of counter C2 and data register D30 are printed every minute A printout PRINT TEST example is shown on the right 11H 00M Programming Special Data Register CNT2 0050 Special data register D8105 is used to monitor the BUSY signal and to control the D030 3854 transmission of print data PRINT TEST Special DR Description While DSR is on not busy the CPU sends data 11H 01M While DSR is off busy the CPU stops data transmission If the off duration exceeds a limit 5 sec a transmission busy CNT2 0110 3 D030 2124 timeout error will occur and the remaining data is not sent The transmit status data register stores an error code For error codes see pages 10 11 and 10 32 Basic Vol The MicroSmart monitors the DSR signal to prevent the receive buffer of the printer from overflowing
410. nabled Repeated com parison results of CMP instructions can be selected from AND or OR operation and the result is outputted to an output or internal relay This option is available on upgraded CPU modules with system program version 200 or higher Repeat One Source Device When only S1 source is designated to repeat source devices as many as the repeat cycles starting with the device des ignated by S1 are compared with the device designated by S2 The comparison results are ANDed or ORed and set to the destination device designated by D1 Data Word Repeat Logical Operation AND S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 CMP gt W 51 52 D1 n AND D10 15 M10 3 D10 10 gt 15 Y D11 15 lt 15 gt AND gt M10 D12 20 lt 15 A Data Type Word Repeat Logical Operation OR S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 CMP gt W SIR S2 Di REP 3 0 penc io OR D10 15 M10 3 D10 10 lt gt 15 11 15 lt gt 15 n M10 D12 20 lt gt 15 Data Type Double Word Repeat Logical Operation AND S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 CMP gt D S1R 52 D1 REP Rep 10 D20 D30 M50 3 20 021 D30 D31 D22 D23 D30 D31 AND gt M50 024 025 lt 30 31 Repeat Two Source Devices When S1 source and
411. nce D2000 exceeds the valid range a user program syntax error occurs 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 MOUW F SIR REP The MOV move instruction sets data of data register DO to 16 outputs Q610 w DO 0610 2 through Q627 in the first repeat cycle The destination of the second cycle is the 8125 next 16 outputs Q630 through Q647 which are invalid resulting in a user pro gram syntax error For details about repeat operations of each advanced instruction see the fol lowing chapters NOP No Operation No operation is executed by the NOP instruction The NOP instruction may serve as a place holder Another use would be to add a delay to the CPU scan time in order to simulate communication with a machine or application for debugging purposes The NOP instruction does not require an input and device Details of all other advanced instructions are described in the following chapters 2 10 FC5A MICROSMART USER s MANUAL FC9Y B1273 I DEC 3 MOVE INSTRUCTIONS Introduction Data can be moved using the MOV move MOVN move not IMOV indirect move or IMOVN indirect move not instruction The moved data is 16 or 32 bit data and the repeat operation can also be used to increase the quantity of data moved In the MOV or MOVN instructi
412. nd input 110 turns on the average maximum and minimum values at this point are stored to data reg isters D200 D201 and D202 respectively Sampling completion output M100 is also set When sampling end input 110 turns off sampling resumes starting at the first scan 151stscan 152ndscan 153 scan i XXXthscan 1st scan Sampling Data D100 In operation Special IR M8125 hs Sampling End Input 110 04 ae ON Sampling Completion Output M100 Average Value D200 502 Maximum Value D201 513 Minimum Value D202 485 O Values are set when 110 is turned on 12 8 FC5A MICROSMART USER S MANUAL FC9Y B1273 DE 13 PULSE INSTRUCTIONS Introduction The PULS pulse output instruction is used to generate pulse outputs of 10 Hz through 100 kHz which can be used to control pulse motors for simple position control applications The PWM pulse width modulation instruction is used to generate pulse outputs of 14 49 45 96 or 367 65 Hz witha variable pulse width ratio between 0 and 100 which can be used for illumination control The RAMP instruction is used for trapezoidal control 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 FCSA D16RK1 and FC5A D16RS1 Instruction PULS PWM RAMP ZRN 00 PULS1 PWM1 ZRN1 RAMP1 01 PULS2 PWM2
413. ndLDR editing screen place the cursor where you want to insert the pulse instruction macro and type PWMST Enter parameters as shown below PWMST Set PWM Instruction Parameters Type Control Register Settings Instruction Type Control Register Tag Name Function DR Output pulse frequency D0000 Puls width ratio D0001 Pulse counting 00002 Preset value D0003 0004 Device Address Current value 0005 0006 Comment Error Status 00007 Same device address as S1 for the PWM2 instruc tion Device Settings Setting Description Mode 2 367 65 Hz 30 1 to 100 in increments of 1 Disable pulse counting 1 to 100 000 000 05 5 E100h 1 to 100 000 000 05 5 E100h Device Function Description Device Address Value 510 Output pulse frequency 367 65 Hz DO 2 1 1 Pulse width ratio 30 D1 30 51 2 Pulse counting Disable pulse counting D2 0 1 3 Preset value high word D3 Not used 1 4 Preset value low word D4 S145 Current value high word D5 Not used 51 6 Current value low word D6 S147 Error status D7 0 Pulse output OFF D1 0 Pulse output ON 1 Pulse output ON M100 D1 1 Pulse output complete IE COMPIETE M101 1 Pulse output complete 0 Overflow not occurred Diss Pulse output overflow 1 Overflow occurred PWM1 PWM3 only Mace PWMST S1 M8120 DO 51 30 D1 D1 REP MOV W MOV W
414. ng of the initiation of the download and the total time to execute all STPA Read and Write instructions some of the STPA instruc tions may not be executed If this is the case manually stop the CPU module After more than 1 second initiate user pro gram download as shown in the chart below Automatic Stop Sequence Initiate download Actual start Power up Automatic stop to download STPA instructions ex One cycle to execute all STPAs CPU module Manual Stop Sequence Power up Manual stop Initiate download TN More than 1 sec One cycle to execute all STPAs gt CPU module STPA instructions STPA Execution between MCS and MCR Instructions 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 16 6 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 16 INTELLIGENT MODULE ACCESS INSTRUCTIONS Example RUNA READ The following example illustrates the data movement of the RUNA READ instruction The data movement of the STPA READ is the same as the RUNA READ instruction While input IO is on data of 5 bytes is read from the os ud es area starting at address 1 in intelligent module 1 and 19 stored to the 5 byte area in data registers starting at D9 Status code is stored in data register D100 Intelligent Mod
415. nipulated variable S118 The control output S246 is turned on and off according to the control period 51 13 and the manual mode output manipulated variable S1 18 S1 18 value has no effect on the manipulated value 01 and the output manipulated variable 96 51423 While auto tuning is in progress manual mode cannot be enabled Only after auto tuning is complete auto or manual mode can be enabled Auto manual mode can also be switched while executing the PID instruction S242 Output Manipulated Variable Limit Enable The output manipulated variable upper limit 51 16 and the output manipulated variable lower limit 51 17 are enabled or disabled using the output manipulated variable limit enable control relay S242 To enable the output manipulated variable upper lower limits turn on S242 To disable the output manipulated variable upper lower limits turn off S242 5243 Integral Start Coefficient Disable The integral start coefficient S1 10 is enabled or disabled using the integral start coefficient disable control relay S2 3 To enable the integral start coefficient S1 10 turn off S243 the integral term is enabled as specified by the integral start coefficient S1 10 To disable the integral start coefficient S1 10 turn on 2 3 the integral term is enabled at the start of the PID action S244 High Alarm Output When the process variable S1 0 is higher than or equal to the high alarm value 51 14 the h
416. nputs IO to 1627 and internal relays MO to M2557 Special internal relays cannot be designated as S2 Destination device D1 status relay uses 2 internal relays starting with the device designated as D1 Internal relays MO to M2550 can be designated as D1 The least significant digit of the internal relay number designated as D1 must be 0 otherwise the ZRN instruction does not operate correctly Special internal relays cannot be designated as D1 For details see page 6 2 Basic Vol 13 26 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 13 PULSE INSTRUCTIONS Source Device S1 Control Register Store appropriate values to data registers starting with the device designated by S1 before executing the ZRN instruction as required and make sure that the values are within the valid range Device S144 is for read only Device Function Description R W 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 1 When 51 0 operation mode 0 to 2 1 to 100 S141 Initial pulse frequency 1 to 100 of the maximum frequency of selected mode 51 0 R W When 51 0 operation mode 3 20 to 10 000 x10 Hz Note 2 0 10 Hz to 1 kHz 1 100 Hz to 10 kHz S1 0 Initial operation mode R W S1 2 Creep operation mode 2 1 kHz to 100 kHz R W 3 200 Hz to 100 kHz Note 1 When S1 2 operation mode 0 to 2 1 to 100 S1 3 Creep pulse frequency 1 to 100 of the maximum frequency of sele
417. ns among other instructions Before executing the RXD instruction COMRF refreshes send and receive data of the expansion communication ports BMOV W S1 N W D1 DO 100 D500 TXD S1 D1 D2 4 100 MO D502 After executing the TXD instruction COMRF refreshes send and receive data of the expansion communication ports COMRF Execution Time While the expansion RS232C RS485 communication module sends or receives communication the CPU module requires the execution time to execute the instruction as shown in the table below Expansion RS232C RS485 Communication Module COMRF Maximum Execution Time Note 1 FC5A SIF2 Approx 4 ms FC5A SIF4 Note 2 Approx 10 ms Note 1 The values are the maximum execution time when one expansion RS232C RS485 communication module performs commu nication When multiple expansion RS232C RS485 communication modules perform communication at the same time the execution time is multiplied by the quantity of the expansion RS232C RS485 communication modules Note 2 To use FC5A SIF4 expansion RS485 communication module CPU modules with system program version 220 or higher is required Communication Refresh for Port 3 through port 7 The expansion communication buffers can also be refreshed automatically every 10 ms without using the COMRF instruction Select Every 10 ms under Communication Refresh for Port 3 through Port 7 in the Function Area Settings For details see page 5 43 Basic Vol IDE
418. nstructions is turned on When the con dition is not met the output is turned off LC lt gt Load Compare Unequal To Data type W or I Data type D L or F 51 52 LC lt gt 51 51 1 52 52 1 This instruction constantly compares 16 or 32 bit data designated by 51 52 When 51 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 lt Load Compare Less Than Data type W or I Data type D L or F 51 lt 52 LC lt 51 51 1 lt 52 52 1 This instruction constantly compares 16 or 32 bit data designated by 51 and 52 When 51 data is less than S2 data the output to the following instructions is turned on When the condition is not met the output is turned off LC Load Compare Greater Than Data type W or I Data type D L or F 51 gt 52 LC 51 51 1 gt 52 52 1 This instruction constantly compares 16 or 32 bit data designated by 51 52 When 51 data is greater than S2 data the output to the following instructions is turned on When the condi tion is not met the output is turned off LC lt Load Compare Less Than or Equal To Data type W or I Data type D L or F 51 lt 52 LC lt 51 51 1 lt 52 52 1 This instruction constantly compares 16 or 32 bit data d
419. nterface Marks When using two AS Interface master modules two AS Interface power supplies are needed Since the AS Interface cable transmits both signals and power each net work requires a separate power supply Caution Usea VLSV very low safety voltage to power the AS Interface bus The normal output voltage of the AS Interface power supply is 30V DC Recommended IDEC AS Interface Power Supplies Input Voltage Output Voltage Output Wattage Type No PS2R Q30ABL PS2R F30ABL 100 to 240V AC 30 5V DC Cables The AS Interface bus uses only one cable to transmit signals and power Use one of the following cable types the wire does not have to be stranded eStandard yellow unshielded AS Interface cable with polarity eOrdinary two wire flat cable AS Interface Cable Two wire Flat Cable Applicable Cable Specifications Cable Type Cable Size Manufacturer Cross sectional View Cable sheath color Yellow Conductor cross section 1 5 mm AS Interface Standard Cable LAPP s Cables Type No 2170228 sheath material EPDM saa tnc Type No 2170230 sheath material TPE 2 wire Flat Cable Conductor cross section or Stranded wire 0 5 to 1 0 mm Single Wires Solid wire 0 75 to 1 5 mm AS Interface AS Interface See Note AWG 20 to 16 blue brown Note When using single wires the maximum cable length is 200 mm See Maximum Communication Distance on page 24 1 IDEC FC5A MICROSMAR
420. nversion max S145 becomes high alarm R W 1415 Low alarm value When S144 control mode 0 or 2 disable linear conversion 0 to 4095 24096 designates 4095 0 to 50000 250001 designates 50000 When S144 control mode 1 or 3 enable linear conversion Linear conversion min X Low alarm lt Linear conversion max When 51 15 lt 51 6 linear conversion min S1 6 becomes low alarm When 51 15 gt 51 5 linear conversion max S145 becomes low alarm R W 1416 Output manipulated variable upper limit 100 10001 to 10099 other values designate 100 R W 1417 Output manipulated variable lower limit 100 2101 designates 100 FC5A MicROSMART UsER s MANUAL FC9Y B1273 R W 14 3 14 PID INSTRUCTION Device Function Description R W Manual mode output 51 18 manipulated variable 100 2101 designates 100 R W 1 to 10000 0 01 sec to 100 00 sec 0 designates 0 01 sec 210001 designates 100 00 sec 1 to 500 0 1 sec to 50 0 sec 0 designates 0 1 sec 2501 designates 50 0 sec When 51 4 control mode 0 or 2 4095 24096 designates 4095 0 to 50000 250001 designates 50000 1421 AT set point When S144 control mode 1 or 3 R W Linear conversion min lt AT set point lt Linear conversion max When 51 21 lt 51 6 linear conversion min S16 becomes AT set point When 51 21 gt 51 5 linear conversion max S145 becomes AT se
421. o the time data hour minute and second stored in 3 data registers starting with source device S1 The results are stored to 3 data reg isters starting with destination device D1 Source 1 Source 2 Destination 1 51 0 23 093 OF 0 23 S141 pag 4 S241 pss D141 51 2 an S242 ees 1 2 doe Hour data can be 0 through 23 Minute and second data can be 0 through 59 When the execution result exceeds 23 59 59 the result is subtracted by 24 hours and stored to the data register designated by destina tion device D1 turning on special internal relay M8003 carry When any of the hour minute or second data 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 Mode 1 When mode 1 is selected time data hour minute and second stored in 3 data registers starting with source device S2 are added to the date time data year month day day of week hour minute and second stored in 7 data registers starting with source device S1 The results are stored to 7 data registers starting with destination device D1 Source 1 Destination 1 S1 Men DI i99 S141 Het D141 ua S142 mE Dira ka 5143
422. o manual mode control relay S2 1 set to on 1 23 holds an indefinite value While auto tuning or advanced auto tuning is in progress 1 23 holds an indefinite value 1 24 Output Manipulated Variable for Analog Output Module While the PID action is in progress the data register designated by 1 24 holds a value of 0 through 4095 or 50000 depending on the analog 1 0 module type The value is converted from the value of through 100 stored in S141 to rep resent the output manipulated variable of 096 through 10096 While manual mode is enabled with the auto manual mode control relay S2 1 set to on 1 24 holds a value of 0 through 4095 or 50000 converted from the manual mode output manipulated variable S1 18 While auto tuning or advanced auto tuning is in progress 1 24 holds a value of 0 through 4095 or 50000 read from the AT output manipulated variable 51 22 1 25 Proportional Band Offset Value When the proportional band is selected S144 set to 2 or 3 the output manipulated variable S1 1 of 0 through 100 can be shifted by an offset of 10096 through 100 Set a required offset value of 100 through 100 to the data register designated by 1 25 before executing auto tuning When the proportional gain is selected 51 4 set to 0 or 1 the proportional band offset value 81425 has no effect S1426 Derivative Gain The derivative gain can be selected from 096 through 10096 When the derivative gain is set to a small value
423. oSmart User s Manual FC9Y B1273 I DEC 7 SHIFT ROTATE INSTRUCTIONS Introduction Bit shift instructions are used to shift the data string starting with source device S1 to the left or right by 1 to 15 bits as designated The data string can be 1 to 65535 bits The result is set to the source device S1 and a carry special internal relay M8003 The LSB or MSB is filled with O or 1 as designated Bit shift and rotate instructions are used to shift the 16 or 32 bit data string in the designated source device S1 to the left or right by the quantity of bits designated The result is set to the source device S1 and a carry special internal relay M8003 The BCD left shift instruction shifts the BCD digits in two consecutive data registers to the left The word shift instruction is used to move 16 bit data to a destination data register and shifts down the data of subse quent data registers as many as designated SFTL Shift Left 51 SFTL S1 52 Bits When input is N_B bit data string starting with source device 51 is shifted to the left 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 set to a carry special internal relay M8003 Zero or 1 designated by source device S2 is set to the LSB e 2 0 N B 16 Bits 1
424. oating point data type also uses two consecutive data registers to execute advanced instructions The FCSA MicroSmart supports the floating point data based on the single storage format of the IEEE The Institute of Electrical and Electronics Engineers Standard 754 Single Storage Format The IEEE single format consists of three fields a 23 bit fraction f an 8 bit biased exponent e and 1 bit sign s These fields are stored contiguously in one 32 bit word as shown in the figure below Bits 0 22 contain the 23 bit fraction f with bit being the least significant bit of the fraction and bit 22 being the most significant bits 23 30 contain the 8 bit biased exponent e with bit 23 being the least significant bit of the biased exponent and bit 30 being the most significant and the highest order bit 31 contains the sign bit s 31 30 23 22 0 8 bit biased exponent 23 bit fraction Sign bit 0 positive 1 negative Single Storage Format 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 program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Single Format Bit Patter
425. ode and configuration mode e Protected Mode This mode operates the slaves in accordance with the slave configuration data stored in the AS Interface master module If the configuration data stored in the AS Interface master module does not match the currently connected slave configu ration the FLT LED on the front of the AS Interface master module goes on and slaves are not operated correctly To enter protected mode from any of connected mode long press the PB1 and PB2 buttons simultaneously Configuration Mode This mode switches all currently connected slaves to active regardless of the slave configuration data stored in the AS Interface master module To store the current slave configuration data to the AS Interface master module EEPROM long press the PB1 button This way configuration is executed To enter configuration mode from protected mode long press the PB2 button To return to protected mode long press the PB1 and PB2 buttons simultaneously 1 DEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 15 24 AS INTERFACE MASTER COMMUNICATION LED Indicators The LED indicators on the AS Interface master module consist of status LEDs 1 0 LEDs and address LEDs Status LEDs Input LEDs Output LEDs LED Indicators PWR AS Interface power supply Address LEDs 0x to 3x Address LEDs x0 to x9 Address LEDs A and B ADDRESS Description Indicates the status of the AS Interfac
426. oefficient turn on the integral start coefficient disable relay S243 Process Variable Process Variable Set Point Set Point Reverse Control Action Time Reverse Control Action Time When the integral start coefficient is large When the integral start coefficient is small When the control mode 51 4 proportional term is proportional gain Specify a value between 1 and 100 1 to 100 or 101 or higher operates as 100 When the control mode 51 4 proportional term is proportional band The operation in regard to the preset value differs according to the system program version as detailed in the following table CPU modules System program version Operation FC5A C10R2x m 5 16 2 245 or lower This preset value is not used The integral start coefficient always operates as 100 FC5A C24R2x FC5A D16Rx1 246 or higher Specify a value between 10 001 and 10 100 196 to 100 FC5A D32x3 8 10 000 or lower or 10 101 or higher operates as 100 130 or lower This preset value is not used The integral start coefficient always operates as 100 FC5A D12x1E 1aiorhigher Specify a value between 10 001 and 10 100 196 to 100 8 10 000 or lower or 10 101 or higher operates as 100 1 11 Input Filter Coefficient The input filter has an effect to smooth out fluctuations of the process variable S4 Set a required value of 0 through 99 to specify an input filter coefficient of 096 through 99
427. of retries The D8110 value specifies the interval to start a retry of dialing when a dialing fails with the retry cycles set to a value more than 1 Other start commands are repeated contin uously as many as the retry cycles Retry Interval D8110 Valid value Oto 65535 d default 90 sec alid value seconds If a telephone line is not connected within the retry interval the MicroSmart starts a retry Consequently if the retry interval is set to a too small value the telephone line can not be connected correctly 08111 Modem Mode Modem mode status is stored see page 22 7 When not in the modem mode D8111 Status stores 0 D8115 D8129 AT Command Result Code AT command result codes returned from modem are stored When the result code exceeds 30 bytes first 30 bytes are stored D8130 D8144 AT Command String AT command string for the AT general command mode is stored Enter an AT command string to these data registers to send by turning on M8054 AT command start internal relay AT and LF OAh are appended automatically D8145 D8169 Initialization String Initialization string for the originate and answer modes is stored To change the initialization string enter a new value to these data registers The new value is sent by turning on M8050 or M8055 AT and LF OAh are appended automat ically D8170 D8199 Originate Mode Telephone Number Telephone number for dialing in the o
428. on the source and destination device are designated by S1 and 01 directly In the IMOV or IMOVN instruction the source and destination device are determined by the offset values designated by S2 and D2 added to source device S1 and destination device D1 The BMOV block move instruction is useful to move consecutive blocks of timer counter and data register values The IBMV indirect bit move and IBMVN indirect bit move not instructions move one bit of data from a source device to a destination device Both devices are determined by adding an offset to the device NSET N data set and NRS N data repeat set instructions can be used to set values to a group of devices The XCHG exchange instruction is used to swap word or double word data between two devices The current values of timer or counter can be changed using the TCCST timer counter current value store instruction Since the move instructions are executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required MOV Move MOV Si R D4 R undo n IR R When input is on 16 or 32 bit data from device designated by S1 is moved to device designated by D1 The float data type is available on upgraded CPU modules with system program version 200 or higher Applicable 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 Valid
429. on results SS X For the valid device address range see pages 6 1 and 6 2 Basic Vol When the data designated by source device S1 is less than or equal to 0 or does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the LOGE 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example LOGE When input I1 is on the natural logarithm of the binary data of data registers SOTU LOGE F en D10 and 011 designated by source device 51 is stored to data registers 020 and 1 D21 designated by destination device D1 log 86 4 454347 S1 D1 D10 D11 86 0 D20 D21 4 454347 IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 18 1 18 LOGARITHM POWER INSTRUCTIONS LOG10 Common Logarithm logy 1 S1 1 gt 01 01 1 LOG10 F S1 D1 on AKER When input is on the common logarithm of the binary data designated by source device S1 is stored to the destination designated by device D1 Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D
430. onfiguration LPS PCD PP file Help Displays explanations for functions on the screen OK Changes the slave address Cancel Discards the changes and closes the window OK Updates the PCD and PP Not written to the master module yet Cancel Discards the changes and closes the window 24 34 FC5A MicroSmart UsER s MANUAL FC9Y B1273 Slave Address Shading Colors 24 AS INTERFACE MASTER COMMUNICATION Operating status of the slave can be confirmed by viewing the shading color at the slave address on the Configure AS Interface Master dialog box The screen display can be updated by clicking the Refresh button LAS LDS LPF LPS Address Shading Description List of active Lista listof List of detected peripheral projected slaves slaves fault slaves slaves No Shade The slave is not recognized by the master OFF OFF OFF ON OFF Blue Shade The slave is active ON ON OFF ON Yellow Shade The slave is recognized but not enabled to operate OFF ON OFF OFF Red Shade An error was found in the slave ON OFF ON OFF ON ON OFF Change Slave Address When a slave is connected to the AS Interface master module the slave address can be changed using WindLDR Warning e 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
431. onfigure communication settings for the Modbus TCP slave communication through communication port 1 or 2 of the MicroSmart CPU module In the Modbus TCP communication when the Mod bus TCP slave receives a request 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 Modbus TCP Master Client Modbus TCP Slave Server off Web Server Module j All in one Type FC4A SX5ES1E 2 CPU Module RS232C Communication Adapter FC4A PC1 Ethernet RS232C Communication Mod ule FC4A HPC1 47 Slim Type CPU Module Web Server Module FC4A SX5ES1E Ethernet Note Only one Modbus TCP slave can be connected to one Modbus TCP master DE FC5A MicROSMART UsER s MANUAL FC9Y B1273 23 5 23 TCP COMMUNICATION Modbus TCP Slave Communication Specifications Mode Modbus TCP Slave Server Communication Applicable Communication Port Port 1 Port 2 Baud Rate 1 9600 19200 38400 57600 bps Data Bits 1 8 bits fixed Parity 1 Odd even none Stop bits 1 1 2 bits Slave Number
432. or 0 50000 Data Type Select the data type from Word W or Integer I when using analog module type 0 50000 For the valid device address range see pages 6 1 and 6 2 Basic Vol Source device S1 control register uses 27 data registers starting with the device designated by S1 Data registers DO D1973 D2000 D7973 and D10000 D49973 can be designated by S1 For details see the following pages Source device S2 control relay uses 8 points of outputs or internal relays starting with the device designated by S2 Outputs QO through Q620 and internal relays MO through M2550 can be designated by S2 For details see page 14 14 Source device S3 set point When the linear conversion is disabled S1 4 set to O or 2 the valid range of the set point S3 is O through 4095 or 50 000 which be designated using a data register or constant When the linear conversion is enabled S144 set to 1 or 3 the valid range is 0 to 65535 word data type or 32768 to 32767 integer data type that is a value after linear conversion For details see page 14 16 Source device 54 process variable is designated using a data register allocated as analog input data of the connected analog 1 0 mod ule To read input data from an analog 1 0 module designate a proper data register number depending on the slot position of the ana log I O module and the analog input channel number connected to the analog input source For details see page 14 16 Source de
433. or 3 set the linear conversion minimum value to the data register designated by 51 6 Valid values are 0 through 65535 word data type or 32768 through 32767 integer data type and the linear conversion minimum value must be smaller than the linear conversion maximum value S145 Select an appro priate value for the linear conversion minimum value to represent the minimum value of the input signal to the analog 1 O module When the linear conversion is disabled S144 set to O or 2 you do not have to set the linear conversion minimum value Example When type thermocouple is connected the analog input data ranges from 0 through 4095 To convert the analog input data to actual measured temperature values set the following parameters Linear conversion S144 1 or 3 enable linear conversion Linear conversion maximum value 51 5 1300 1300 C Linear conversion minimum value 51 6 0 0 C Process Variable after Conversion S140 Linear Conversion Maximum Value S145 1300 1300 C Linear Conversion Minimum Value 51 6 0 0 0 4095 Analog Input Data 51 7 Proportional Term The proportional term is a parameter to determine the amount of proportional action in terms of the proportional gain or proportional band according to the selection by the control mode S144 When auto tuning or advanced auto tuning is used by setting the operation mode S143 to 1 AT PID 2 AT advanced AT PID or 4 a
434. or CC is read out The quantity of digits to convert can be 1 through 5 for the word data type and 1 through 10 for the double word data type Make sure that the quantity of digits designated by S2 is within the valid range If the S2 data 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 Make sure that the last destination data determined by D1 S2 1 is within the valid device range If the derived destination device is out of the valid device range a user program execution error will result turning on special internal relay M8004 and ERROR LED on the CPU module Since the BTOA 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 W word X When a bit device such as input Q output M internal relay or R shift register is designated as the source 16 points word data type or 32 points double word data type are used integer D double word X L long F float When a word device such as T timer C counter or D data register is designated as the source or destination 1 point word data type or 2 points double word data type are used IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 9 8 DATA CONVERSION INSTRUCTIONS Examples BTOA W Quantity of Digits 5 SOTU BTOA W S1 S2 D1 Quan
435. ored to force off the heater power switch and force on the high alarm light System Setup FC5A C24R2 FC4A LO3AP1 POV DDD 590 000 5 Y o 5 7 WoW DC OUT B oood gt B AEO F INO 000000000 B Rl Thermocouple EOL ES GENS E MERO 41 009960509600000696 ease Fuse ii Output Q1 r High Alarm Light Output QO A A Temperature Control by Auto Tuning and PID Action Process Variable after Conversion S1 0 A High Alarm Value 51 14 2500 250 C Set Point S3 2000 200 C AT Set Point automatically determined Time PID Action a gt Auto Tuning 14 18 FC5A MICROSMART UstR s MANUAL FC9Y B1273 ZIDEC Device Settings 14 PID INSTRUCTION Device Function Description Device Address Value 5143 Operation mode Advanced AT auto tuning PID action D3 3 1 4 Control mode Enable linear conversion proportional band D4 3 1 5 Linear conversion maximum value 1300 C D5 13000 51 6 Linear conversion minimum value 0 D6 0 51 10 Integral start coefficient 100 D10 100 51 11 Input filter coefficient 70 D11 70 51 14 High alarm value 250 C D14 2500 51 15 Low alarm value 0
436. ortional band When the proportional band is selected the integral action is enabled only while the process variable S1 0 is within the proportional band that is while the calculated value for the output manipulated variable is between 0 and 100 While the process variable S1 0 is out of the proportional band the integral action is disabled While the PID action is in progress the proportional term value can be changed by the user 1 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 determine the amount of integral action When auto tuning or advanced auto tuning is used by setting the operation mode S143 to 1 AT PID 2 AT advanced AT PID or 4 advanced AT an integral time is determined automatically and does not have to be designated by the user When auto tuning is not used by setting the operation mode 51 3 to 0 PID set a required value of 1 through 65535 to specify an integral time of 0 1 sec through 6553 5 sec to the data register designated by S148 When 51 8 is set to O the integral action is disabled When the integral time is too short the integral action becomes too large resulting in hunching of a long period In con trast when the integral ti
437. ough 31 A Also when a standard slave takes a certain address the B address of the same number cannot be used for A B slaves AS Interface Bus Topology and Maximum Length The AS Interface bus topology is flexible and you can wire the bus freely according to your requirements When repeaters or extenders are not used the bus length can be 100m 328 feet at the maximum The FC4A AS62M AS Interface master module can use two repeaters to extend the bus length 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 e When up to 19 slaves are active the bus cycle time is 3 ms e When 20 to 62 slaves are active the bus cycle time is 0 156 x 1 N ms where N is the number of slaves When A slave and B slave have the same address number e g 12A and 12B the two slaves are alternately updated each cycle Therefore when the system consists of 31 A slaves and 31 B slaves then the AS Interface bus cycle time will be 10 ms Maximum AS Interface Bus Cycle Time e When 31 slaves are connected the maximum bus cycle time is 5 ms e When 62 slaves are connected the maximum bus cycle time is 10 ms High Reliability and Security The AS Interface employs a transfer process of high reliabil
438. pare Greater Than X X X X xX 4 1 CMP lt Compare Less Than or Equal To X X X X X 4 1 CMP gt Compare Greater Than or Equal To 4 2 Data Comparison ICMP gt Interval Compare Greater Than or X X xxix 4 6 Equal To LC Load Compare Equal To X X X Xx 4 8 LC lt gt Load Compare Unequal To 4 8 LC lt Load Compare Less Than X X 4 8 1 gt Load Compare Greater Than X X 4 8 LC lt Load Compare Less Than or Equal To 4 8 LC gt Load Compare Greater Than or Equal To X X X X X 4 8 ADD Addition X X X X X 5 1 SUB Subtraction X X X X xX 5 1 MUL Multiplication X X X Xx 5 1 DIV Division 5 1 Binary Arithmetic INC Increment 5 13 DEC Decrement 5 13 ROOT Root X X 5 15 Sum ADD X x SUM 5 16 Sum XOR X RNDM Random X 5 19 ANDW AND Word X 6 1 Boolean Computation ORW OR Word X X 6 1 XORW Exclusive OR Word X X 6 1 IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 2 ADVANCED INSTRUCTIONS Valid Data Type Group Symbol Name See Page 1 1 SFTL Shift Left 7 1 SFTR Shift Right 7 3 BCDLS BCD Left Shift X 7 5 Shift and Rotate WSFT Word Shift X 7 7 ROTL Rotate Left X X 7 8 ROTR Rotate Right X X 7 10 HTOB Hex to BCD X X 8 1 BTOH BCD to Hex X X 8 3 HTOA Hex to ASCII X 8 5 ATOH ASCII to Hex X 8 7 BT
439. party is used to set up a 1 N communication computer link system choose the USB RS485 converter that does not echo the received characters TIDEC FC5A MIcROSMART UsER s MANUAL FC9Y B1273 21 1 Mig 21 COMPUTER LINK COMMUNICATION Programming WindLDR In the 1 1 computer link system a computer can be connected to either port 1 or 2 on the MicroSmart CPU module In the 1 N computer link system a computer must be connected to port 2 on the CPU module and every CPU module must have a unique network number 0 through 31 The Communication page in the Function Area Settings must be pro grammed for each station in the computer link system If required communication parameters can also be changed Since these settings 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 1 or 2 select Maintenance Protocol MicroSmart Function Area Settings Run Stop Control Memory Backup Input Configuration E confor the communication ports Communication Ports Communication Ports Key Matrix Cartridges amp Modules Device Settings Program Protection Self Diagnostic Port Communication Mode Maintenance Protocol x Configure Maintenance Protocol User Protoco
440. peat All Source and Destination Devices Data Type Word and Integer When all devices are designated to repeat different results are set to 3 devices starting with D1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 SOTU ADD W S1R S2R D1R REP 11 D10 D20 D30 3 D10 10 D20 25 D30 35 D11 15 D21 35 031 50 D12 20 D22 45 D32 65 Data Type Double Word Long and Float When all devices are designated to repeat different results are set to 3 devices starting with D1 D1 1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 3 SOTU ADD D S1R S2R D1R REP 11 D10 D20 D30 3 D10 D11 D20 D21 LL D30 D31 D12 D13 D22 D23 D32 D33 D14 D15 D24 D25 D34 D35 Note Special 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 IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 7 5 Binary Arithmetic Instructions Repeat Operation in the MUL Instruction Since the MUL multiplication instruction uses two destination devices the result is stored to destination devices as described below Source devices S1 and S2 and destination device
441. portional term S1 7 integral time S148 derivative time 51 9 and control direction S2 0 then PID action is executed according to the derived PID parameters in addition to the designated PID parameters such as sampling period 51 12 and control period 51 13 2 AT auto tuning Auto tuning is executed according to designated AT parameters to determine PID parameters such as proportional term S147 integral time 51 8 derivative time S149 and control direction S240 PID action is not executed 1 DEC FC5A MiCROSMART UsER s MANUAL FC9Y B1273 14 5 14 3 PID INSTRUCTION Advanced AT auto tuning PID action Auto tuning is first executed according to the AT parameters which are designated automatically such as AT sampling period S1 19 AT control period 51 20 AT set point S1 21 and AT output manipulated variable S1 22 As a result of auto tuning PID parameters are determined such as proportional term S1 7 integral time S1 8 derivative time S1 9 sampling period S1 12 control period S1 13 and control direction S2 0 then PID action is executed according to the derived PID parameters Advanced AT auto tuning Auto tuning is executed according to automatically designated AT parameters except for AT set point 51 21 to determine PID parameters such as proportional term 51 7 integral time S148 derivative time S149 sampling period S1 12 control period 1413 and control direction 52
442. put S246 OFF ON 4 sec ON 3 sec ON 2 5 sec Control Period S1 13 5 sec 5 sec 1 14 High Alarm Value The high alarm value is the upper limit of the process variable 51 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 S244 is turned on When the process variable is lower than the high alarm value the high alarm output control relay S24 is turned off When the linear conversion is disabled S144 set to O or 2 set a required high alarm value of through 4095 or 50000 depending on the analog 1 0 module type to the data register designated by 1 14 When 51 14 stores a value larger than 4095 or 50000 the high alarm value is set to 4095 or 50000 respectively When the linear conversion is enabled S144 set to 1 or 3 set a required high alarm value of through 65535 word data type or 32768 through 32767 integer data type to the data register designated by 51 14 The high alarm value must be larger than or equal to the linear conversion minimum value 51 6 and must be smaller than or equal to the linear conver sion maximum value 51 5 If the high alarm value is set to a value smaller than the linear conversion minimum value 51 6 the linear conversion minimum value will become the high alarm value If the high alarm value is set to a value larger than the linear conversion maximum value 51 5 the linear conversion maximum val
443. r 15 1 DIME 10 ms DUA Timer e e eR nt Re ete cic e Knit RD E 15 1 IIMS 1 ms Dual Timer x n ace roe n ae Cae Rl acts t Te Ra en ce e Rc cae x ARD cn 15 1 TIIM Teaching Titmer 3 3 3 ce ac crea rec nit her a e ca e abate c Fe n n RR Dee cd a 15 3 Intelligent Module Access Instructions READ Run Access Read 16 2 WRITE Run Access Write 16 3 STPA READ Stop Access 16 4 STPA WRITE Stop Access Write 2 16 5 Trigonometric Function Instructions RAD Degree to Radian 1 17 1 DEG Radian to Degree 2 17 2 SIN Sine ea e e eee 17 3 COSINE tenes Seen tcd o Y 17 4 TAN Tangent Qus elo dion ae Ripa n bU 17 5 ASIN Arc SIDE uo atre Roe er sel nbn eee Ru Rc Ne EANA Due Ru A 17 6 ACOS Arc COSINE dep e o ne Peto e Re Rr uei beca Ru aUe 17 7 ATAN Arc Tangent ec e
444. r installation will result in falling failure or malfunction of the MicroSmart Caution notices are used where inattention might cause personal injury or dam age to equipment MicroSmart is designed for installation in a cabinet Do not install the MicroSmart outside a cabinet Install the MicroSmart in environments described in this user s manual If the MicroSmart is used in places where the MicroSmart is subjected to high temperature high humidity condensation corrosive gases excessive vibrations and excessive shocks then electrical shocks fire hazard or malfunction will result environment for using the MicroSmart is Pollution degree 2 Use the MicroSmart in environments of pollution degree 2 according to IEC 60664 1 Prevent the MicroSmart 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 e Use a power supply of the rated value Use of a wrong power supply may cause fire hazard Use an IEC 60127 approved fuse on the power line outside the MicroSmart This is required when equipment containing the MicroSmart is destined for Europe e Use an IEC 60127 approved fuse on the output cir
445. r interrupt designated by source device S1 are dis abled Enable Interrupt H E e When input is on interrupt inputs and timer interrupt designated by source device S1 are enabled Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Interrupt inputs and timer interrupt Se mc 1 31 Interrupt inputs I2 through I5 and timer interrupt selected in the Function Area Settings are normally enabled when the CPU starts When the DI instruction is executed interrupt inputs and timer interrupt designated as source device S1 are disabled even if the interrupt condition is met in the user program area subsequent to the DI instruction When the EI instruction is executed disabled interrupt inputs and timer interrupt designated as source device S1 are enabled again in the user program area subsequent to the El instruction Different devices can be selected for the DI and El instructions to disable and enable interrupt inputs selectively For Interrupt Input and Timer Interrupt see pages 5 34 and 5 36 Basic Vol Make sure that interrupt inputs and timer interrupt designated as source device S1 are selected in the Function Area Set tings Otherwise when the DI or El instruction is executed a user program execution error will result turning on special internal
446. rce Repeat 0 Destination Repeat 3 MOV W S1 D1R REP D10 D20 3 D10 110 gt D20 110 D11 111 m gt D21 110 D12 112 i D22 110 Data Type Double Word Source Repeat 0 Destination Repeat 3 MOV D S1 D1 R REP E Bum one de pio 110 020 110 011 111 J 021 111 012 112 022 110 L D13 113 023 111 014 114 024 110 015 115 025 111 Repeat Source and Destination Devices When both 1 source and D1 destination are designated to repeat devices 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 Source Repeat 3 Destination Repeat 3 H MOV W S1R D1 R REP 15 ELM D10 D20 3 010 110 D20 110 D11 111 021 111 12 112 022 112 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 3 3 3 MOVE INSTRUCTIONS Data Type Double Word MOV D S1R 16 D10 Data Type Float DIR D20 REP 3 Source Repeat 3 D10 D11 D12 D13 D14 D15 110 m 020 110 gt
447. rder starting with slave 0 The input data image IDI for each slave is allocated to M1300 through M1617 and the output data image ODI is allocated to M1620 through M1937 For example in the case of slave 3A the input data is allocated to M1314 DIO through M1317 DI3 and the output data is allocated to M1634 DOO through M1637 For AS Interface master module 2 the digital 1 0 data be accessed using or STPA instruction Digital Input Data Image 101 Device Address Data Format AS Interface Master AS Interface Master 7 6 5 4 3 2 1 0 Module 1 Module 2 DI3 012 011 010 013 012 011 010 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 low byte Slave 13 A Slave 12 A M1370 3 high byte Slave 15 A Slave 14 A M1380 4 low byte Slave 17 A Slave 16 A M1390 4 high byte Slave 19 A Slave 18 A M1400 5 low byte Slave 21 A Slave 20 A M1410 5 high byte Slave 23 A Slave 22 A M1420 6 low byte Slave 25 A Slave 24 A M1430 6 high byte Slave 27 A Slave 26 A M1440 7 low byte Slave 29 A Slave 28 A M1450 7 high byte Slave 31 A Slave 30 A M1460 8 low byte
448. res the current slave configuration data LDS CDI Pl to the AS Interface master module ROM LPS PCD PP To execute auto configuration press Auto Configuration in the Configure AS Interface Master dialog box Auto configuration has the same effect as the configuration using the pushbuttons on the AS Interface master module Slave Configuration Data AS Interface Master Module ROM List of detected slaves LDS List of projected slaves LPS Configuration data image CDI Configuration gt Permanent configuration data PCD Permanent parameter PP Parameter image Manual Configuration Manual configuration is the procedure GOD TIO to write the LPS PCD and PP desig PED Slave Configuration nated on WindLDR to the AS Interface FFFFh 0 Data Structure ID IO ID2 ID1 master module ROM LPS is automati Other values 1 CDI cally generated by WindLDR based on PCD the value for PCD Parameters PP To change PCD and PP use the Configure Slave dialog box Set the Permanent PCD of each slave to the same value as its CDI If the PCD is different iio 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
449. result of the advanced instruction is set to the preset value of the timer or counter Timer and counter preset values can be 0 through 65535 When a timer or counter preset value is designated using a data register the timer or counter cannot be designated as a destination of an advanced instruction When executing such an advanced instruction a user program execution error will result For details of user program execution error see page 13 2 Basic Vol Note When a user program execution error occurs the result is not set to the destination IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 2 7 2 ADVANCED INSTRUCTIONS Data Types for Advanced Instructions Integer Type When using move data comparison binary arithmetic Boolean computation bit shift rotate data conversion and coor dinate conversion instructions data types can be selected from word W integer 1 double word D long 1 or float F For other advanced instructions the data is processed in units of 16 bit word Data Type Symbol Bits 2 Range of Decimal Values Word Unsigned 16 bits Ww 16 bits 1 0 to 65 535 Integer Signed 15 bits 1 16 bits 1 32 768 to 32 767 Double Word Unsigned 32 bits D 32 bits 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 10 to 3 402823x10 Decimal Values and Hexadecimal Storage Word Integer Double and Long
450. result EN For the valid device address range see pages 6 1 and 6 2 Basic Vol Source S1 data specifies the value to be sought and the valid range depends on the data type The search range cannot straddle data registers expansion data registers and special data registers Make sure that the sum of data register numbers designated by S1 and S2 does not result in a different data register range For source S3 and destination D1 1 word is always used without regard to the data type Destination D1 occupies two consecutive data registers starting with the device designated by D1 Data registers DO D1998 D2000 D7998 and D10000 D49998 can be designated as destination D1 When F float data type is selected and S1 or S2 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module When S3 is an invalid number or the sum of S2 and S3 is not within the valid data register range a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the NDSRC 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 W word When a word device such as 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 use
451. rface master module modes 24 14 trigonometric function instructions 17 1 troubles at system start up 24 13 troubleshooting 25 13 modem communication 22 14 TSUB 20 5 TTIM 15 3 user communication 25 9 program adjusting clock 9 7 setting calendar clock 9 6 protocol 25 10 using WindLDR 24 34 very low safety voltage 24 3 24 7 VLSV 24 3 24 7 week programmer instructions 9 1 table 9 2 timer 9 1 WindLDR programming clock cartridge accuracy 9 8 computer link 21 2 Dl or El 11 7 Modbus TCP master 23 3 slave 23 7 modem mode 22 10 setting calendar clock 9 6 system WKTBL 9 2 requirements 24 2 WKTIM 9 1 setup 24 6 word shift 7 7 modem mode 22 1 WSFT 7 7 TADD 20 1 XCHG 3 15 TAN 17 5 XORW 6 1 tangent 17 5 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 vii INDEX viii XY format set 12 1 XYFS 12 1 zero return 13 26 ZRN1 13 26 ZRN2 13 26 ZRN3 13 26 FC5A MicroSmart User s Manual FC9Y B1273 IDEC NOTE n DE FC5A MICROSMART UsER s MANUAL 9 1273 1 NOTE FC5A MiCROSMART UsER s MANUAL FC9Y B1273 EipEC UNITED STATES IDEC CORPORATION 1175 Elko Drive Sunnyvale CA 94089 2209 USA Tel 1 408 747 0550 Toll Fr
452. ri 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 point 300 100 could be assigned first as XO YO and the point 100 0 could be defined next as X1 Y1 In this case this linear relationship would have priority In this case if the value in data register D95 is 40 the value assigned to D30 is 180 not 60 12 6 FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC 12 COORDINATE CONVERSION INSTRUCTIONS AVRG Average z When input is on sampling data designated by device S1 is H AVRG 51 52 53 D1 D2 processed according to sampling conditions designated by RK KK KK KK devices S2 S3 When sampling is complete average maximum and mini mum values are stored to 3 consecutive devices starting with device designated by D1 then sampling completion output designated by device D2 is turned on Data Type W Average D1 1 01 1 Maximum value D141 D1 2 D1 3 Minimum value D1 2 D1 4 D1 5 The AVRG instruction is effective for data processing of analog input values A maximum of 32 AVRG instructions can be programmed in a user program Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E
453. riginate mode is stored ATD and LF OAh are appended automatically The originate mode is used to send an initialization string to the modem issue the ATZ command to reset the modem and dial the telephone number To execute a command turn on one of start internal relays M8050 M8052 If two or more start internal relays are turned on simultaneously an error will result and error code 61 is stored in modem mode status data register D8111 see page 22 7 When a start internal relay is turned on a corresponding sequence of com mands is executed once as described below When the start command fails the same command is repeated as many as the retry cycles specified by D8109 M8050 Send an initialization string send the ATZ command and dial the telephone number M8051 Send the ATZ command and dial the telephone number M8052 Dial the telephone number Initialization String in Originate Mode When the modem mode is enabled as described on page 22 1 and the MicroSmart is started to run the default initializa tion string is stored to data registers D8145 D8169 at the END processing of the first scan To send the initialization string from the MicroSmart to the modem turn M8050 on then the ATZ command is issued and the telephone number is dialed successively Default Initialization String ATEOQOV1 amp D2 amp C1 VOX4 amp K3 A0 N5S0 2 amp W ICR LF IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 22 3 22 MODEM MODE AT an
454. ring stored in data registers 08145 08169 and try initialization again Dialing completes successfully but the telephone line is disconnected in a short period of time Cause 1 The modem settings at the both ends of the line are different Solution 1 Make the same settings for the modems at the both ends Cause2 The model of the modems at the both ends of the line is different Solution 2 Use the same modems at the both ends Cause3 The quality of the telephone line is low Solution 3 Decrease the baud rate of the MicroSmart to lower than 9600 bps 22 14 FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC 23 TCP COMMUNICATION Introduction This chapter describes the Modbus TCP master client and slave server communication function of the FC5A MicroSmart CPU module All FCSA MicroSmart CPU modules with system program ver 210 or higher can use the Modbus TCP communication to send and receive data with Modbus devices through the Ethernet line Modbus TCP Communication General Information When connected with the web server module FC4A SX5ES1E the FC5A MicroSmart CPU module can be used as a mas ter client or a slave server of the Modbus TCP communication Using the Modbus TCP master communication the CPU module can change or monitor data 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 MicroSma
455. rmal 1 Operation mode designation error 51 0 or S142 stores other than 0 through 3 Output pulse frequency designation error 2 S141 stores a value that is not within the frequency range of the initial pulse output or 51 3 stores a value that is not within the frequency range of the creep pulse output Source Device S2 Deceleration Input When the deceleration input turns on while the ZRN instruction is generating output pulses of the initial pulse frequency the pulse frequency is changed to the creep pulse frequency When the deceleration input turns off the ZRN instruction stops generating output pulses When using the ZRN1 ZRN2 ZRN3 instructions designate different input or internal relay numbers as deceleration inputs for the ZRN1 ZRN2 and ZRN3 instructions If the same deceleration input is used and the ZRN1 ZRN2 and ZRN3 instructions are executed at the same time the pulse outputs may not 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 12 13 14 15 S2 Normal deceleration input 10 11 16 through 1627 MO through M2557 High speed Deceleration Input 12 14 15 The high speed deceleration input uses interrupt processing to read the deceleration input signal immediately without regard to the scan time When I2 through 15 are used as a deceleration input for the ZRN instruction
456. rmation and data registers for LAS LDS LPF are updated in every scan Data registers for analog 1 0 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 updated using the RUNA instruction AS Interface Objects MicroSmart CPU Module IDI ODI Ladder Status Information AS Interface Processing Analog 1 0 Master Module 2 LAS LDS LPF Constantly 1101 ODI i Updated Devices i Status Information M1300 M1997 Analog I O 1 D1700 D1775 LAS LDS LPF AS Interface Command AS Interface Processing D1941 D1945 Master Module 1 7 fASICommand f LPS CDI PCD Other Updated Devices emgp PP Processing D1776 D1940 i Slave 0 ID1 24 18 FC5A MICROSMART USER S MANUAL FC9Y B1273 24 AS INTERFACE MASTER COMMUNICATION Accessing AS Interface Objects for AS Interface Master Module 1 The 1 0 data and parameters of slaves on the AS Interface bus the status of the AS Interface bus and various list infor mation of the slaves are allocated to the AS Interface master mo
457. rol action S240 is on or that the current process variable is larger than or equal to the previous process variable during reverse control action S240 is off When using advanced auto turing with operation mode S143 set to 3 advanced AT PID or 4 advanced AT the AT sampling period is determined automatically and does not have to be set by the user 1 20 AT Control Period The AT control period determines the duration of the ON OFF cycle of the control output S246 during auto tuning For operation of the control output see Control Period on page 14 10 When using auto tuning with operation mode 51 3 set to 1 AT PID or 2 AT set a required value of 1 through 500 to specify an AT control period of 0 1 sec through 50 0 sec to the data register designated by 51 20 When 51 20 stores 0 the AT control period is set to 0 1 sec When 51 20 stores a value larger than 500 the AT control period is set to 50 0 sec When using advanced auto turing with operation mode S143 set to advanced AT PID or 4 advanced AT the AT con trol period is determined automatically and does not have to be set by the user 51 21 AT Set Point While auto tuning is executed the AT output manipulated variable S1422 is outputted to the output manipulated vari able S141 until the process variable S140 reaches the AT set point 51 21 When the process variable S1 0 reaches the AT set point 51 21 auto tuning is complete and the output manipul
458. rrect ipe sid ami to make inputs Basic Vol more than 5 TXD instructions do not go on simulta ously 10 6 neously Is duration of the busy signal at the remote terminal less Make sure that the busy signal at the remote termi Basic Vol than 5 sec nal does not exceed 5 sec 10 38 Did you make sure of source 1 device of the TXD instruc Make sure that the transmit data designated as Basic Vol tion source 1 device is correct 10 7 Basic Vol Is the PWR LED on the FC5A SIF4 module flashing Supply the rated voltage to the CPU module 3 1 Data is not received at all in the user communication Check Action Page i a Basic Vol Is the communication cable connected correctly Make sure of correct wiring 2 89 25 11 Are the communication settings for the remote terminal Set the same communication parameters for expan and expansion RS232C RS485 communication port the sion RS232C communication port as the remote ter 25 10 same minal 5 Upgrade the CPU module system program version Is the modul licable t the expansion RS2SAC RSASS communication module 19 110 or higher to use the FCSA SIF2 orto 220 or higher to use the FC5A SIF4 Is the correct port number designated in the RXD instruc Designate a correct port number in the RXD instruc Basic Vol tion tion 10 6 5 Basic Vol Is the start input for the RXD instruction on Turn on the start input for the RXD instruction 10 39 Is the PWR LED on the CPU
459. rror are turned on A user program execution error also occurs in the following division operations Datatype 32768 1 Data type L 2147483648 1 FC5A MicroSmart User s Manual FC9Y B1273 5 1 5 Binary Arithmetic Instructions Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Data for calculation 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When T timer or C counter is used as S1 or S2 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 S2 When F float data type is selected and S1 or S2 does not comply with the normal floating point format a user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the binary arithmetic instructions are executed in each scan while input is on a p
460. rt 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 the Modbus TCP communication FC5A MicroSmart CPU modules with system program ver 210 or higher and WindLDR ver 5 3 or higher are required The system program version can be confirmed using WindLDR See page 13 1 Basic Vol When the CPU module system program version is lower than 210 you can download the latest system program using WindLDR ver 5 1 or higher See page A 9 Basic Vol Applicable CPU Modules All CPU modules System Program Version 210 or higher WindLDR Version 5 3 or higher IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 23 1 23 TCP COMMUNICATION Modbus TCP Master Communication Basic functions and specifications of the Modbus TCP master communication are the same as those of the Modbus mas ter communication except that only one slave can be connected WindLDR Function Area Settings are used to configure communication settings for the Modbus TCP master and to create requests to be sent to the Modbus TCP slave Modbus TCP master communication is processed in asynchronism with user program execution Requests are sent through the web server module FC4A SX5ES1E to the Modbus TCP slave Modbus TCP Master Client o Eu S j Web Server Modul
461. rt User s Manual FC9Y B1273 IDE 8 DATA CONVERSION INSTRUCTIONS Introduction Data conversion instructions convert data format among binary BCD and ASCII The double word data type has been added to BTOA BCD to ASCII and ATOB ASCII to BCD instructions As a result of added data type BTOA and ATOB instructions can convert double word data on the upgraded CPU modules with system program version 200 or higher The ENCO encode DECO decode and BCNT bit count instructions processes bit device data The ALT alternate output instruction turns on and off an output each time an input button is pressed The CVDT convert data type instruction converts data types among W word integer D double word L long and F float The DTDV data divide DTCB data combine and SWAP data swap instructions have been added as new instructions on the upgraded CPU modules with system program version 200 or higher The DTDV and DTCB instructions convert data between two one byte data and one word data The SWAP exchanges upper and lower byte or word data of word or double word data respectively HTOB Hex to BCD S1 D1 HTOB S1 D1 xokkekek When input is on the 16 or 32 bit data designated by S1 is converted into BCD and stored to the destination designated by device D1 Valid values for the source device 0 through 9999 for the word data type and 0 through 9999 9999 for the double word data type Appl
462. ruction is ignored even if it is programmed 1 Additional days in the week table When the current time reaches the hour minute comparison data set for S2 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 table using the WKTBL instruction followed by the WKTIM instruction If the WKTBL instruction is not programmed when 1 or 2 is set for MODE in the WKTIM instruction a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module The same error also occurs if the WKTIM instruction is executed before the WKTBL instruction IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 9 1 9 WEEK PROGRAMMER INSTRUCTIONS S1 Day of week comparison data 0 through 127 Specify the days of week to turn on the output or internal relay designated by D1 Designate the total of the values as device S1 to turn on the output or internal relay Example To turn on the output on Mondays through Fridays designate 62 as S1 because 2 4 8 16 32 62 S2 Hour minute comparison data to turn on S3 Hour minute comparison data to turn of
463. ruction must be used to separate the main program from any subroutines called by the LCAL instruction A maximum of four LCAL instructions can be nested When more than four LCAL instructions are nested a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Applicable 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 Valid Devices Device Function QM T C D Constant Repeat S1 Source 1 Label number to call X 0 127 0 255 For the valid device address range see pages 6 1 and 6 2 Basic Vol Since the LCAL instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Note Make sure that a LABEL instruction of the label number used for a LCAL instruction is programmed When designating S1 using other than a constant the value for the label is a variable When using a variable for a label make sure that all probable LABEL num bers 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 LRET Label Return This instruction is placed at the end of a subroutine called by the LCAL instruction When the subroutine is LRET completed normal program execution resumes by returning to the instr
464. s 1 3 51 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 Enable pulse counting PULS1 PULS3 only When programming PULS2 store to the data register designated by S142 61 3 Preset Value High Word 61 4 Preset Value Low Word With pulse counting enabled as described above PULS1 or PULS3 generates a predetermined number of output pulses as designated by devices S143 and S144 The preset value be 1 through 100 000 000 05F5 E100h stored two consec data registers designated by 51 3 high word and S144 low word When pulse counting is disabled for PULS1 or PULS3 or when programming PULS2 store 0 to data registers designated by 143 and 51 4 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 3 13 PULSE INSTRUCTIONS 1 5 Current Value High Word S146 Current Value Low Word While the PULS1 or PULS3 instruction is executed with pulse counting enabled the output pulse count is stored in two consecutive data registers designated by devices 1 5 high word and 51 6 low word The current value be 1 through 100 000 000 05F5 E100h and is updated in every scan 51 7 Error Status When the start input for the PULS instruction is turned on device values are checked When any error is found in the device values the data register designated by device 51 7 stores an error code
465. s SWAP Data Type W word When input IO is turned on upper and lower byte data of the 16 bit data in data register D10 designated by source device S1 are exchanged and the result is stored to data register D20 designated by destination device D1 H SWAP W S1 D1 REP Before Execution After Execution 10 D10 D20 14640 D10 D20 3930h Data Type D double word When input I1 is turned on upper and lower word data of the 32 bit data in data registers D10 and D11 designated by source device S1 are exchanged and the result is stored to data registers D20 and D21 designated by destination device D1 H SWAP D S1 D1 REP Before Execution After Execution 11 D10 D20 D10 100 me D20 200 D11 200 D21 100 IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 23 8 DATA CONVERSION INSTRUCTIONS 8 24 FC5A MicroSmart User s Manual FC9Y B1273 IDE 9 WEEK PROGRAMMER INSTRUCTIONS Introduction WKTIM instructions can be used as many as required to turn on and off designated outputs and internal relays at prede termined times and days of the week Once the internal calendar clock is set the WKTIM instruction compares the predetermined time with the clock data in the clock cartridge When the preset time is reached internal relay or output designated as destination device is turned on or off as scheduled For setting the calendar clock see page 9
466. s The operating status of each slave can be determined by viewing the address LEDs and 1 0 LEDs Address LED 1 O LED Description ON ON or OFF The slave at this address is active ON Flash The slave at this address is active but has an error Flash OFF This address is not assigned a slave The AS Interface bus communication is disabled because the AS Interface power is not OFF OFF 27 supplied or the AS Interface master module is in normal protected offline Slave I O Status The 1 0 status of each slave can be monitored on the address LEDs and 1 0 LEDs Use the short press to change the slave address when monitoring slave I O status on the AS Interface master module A short press on PB1 increments the address At the 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 if no slave is assigned Short press on PB1 1 LEDs indicate statuses Ox 1x 2x 3x x0 x1 2 x3 x4 x5 x6 x7 x8 9 E Monitoring Slave Address 25A Address LEDs are flashing since no slave is assigned Monitoring Slave Address 26A Ad
467. s MO through M2557 be designated as S1 Special internal relays cannot be designated as 51 The quantity of bits to rotate can be 1 through 15 for the word data type or 1 through 31 for the double word data type Since the ROTL 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 W word X When a bit device such as Q output M internal relay or R shift register is designated as the source 16 points word data type or 32 points double word data type are used integer D double word X When a word device such as D data register is designated as the source 1 point word data type or 2 points double word data type are used L long F float 7 8 FC5A MicroSmart User s Manual FC9Y B1273 IDE Example ROTL Data Type Word D1 D10 REP MOV W S1 40966 ROTL W S1 bits D10 1 Bits to rotate 1 Before rotation D10 40966 After first rotation D10 16397 After second rotation D10 32794 Data Type Double Word SOTU ROTL D S1 bits 11 D10 1 Bits to rotate 1 Before rotation 010 011 2 684 788 742 cy MSB 7 SHIFT ROTATE INSTRUCTIONS M8120 is the initialize pulse special internal relay When the CPU starts operation the MOV move instruction sets 40966 to data register D10 Each time input IO is turned on 16 bit data of dat
468. s Timer Subtracting 10 ms timer 0 to 655 35 sec Vol 7 8 7 2 Basic TMHO 10 ms Off delay Timer Subtracting 10 ms off delay timer 0 to 655 35 sec Vol 7 11 TML 1 sec Timer Subtracting 1 sec timer to 65535 sec Vol 7 8 Basic TMLO 1 sec Off delay Timer Subtracting 1 sec off delay timer 0 to 65535 sec Vol 7 11 1 ms Timer Subtracting 1 ms timer 0 to 65 535 sec Basic TMS 8 Vol 7 8 F TMSO 1 ms Off delay Timer Subtracting 1 ms off delay timer to 65 535 sec Vol 7 11 1 2 FC5A MICROSMART UsER s MANUAL FC9Y B1273 IDEC 2 ADVANCED INSTRUCTIONS Introduction This chapter describes general rules of using advanced instructions terms data types and formats used for advanced instructions Advanced Instruction List Valid Data Type Group Symbol Name WITII TE See Page NOP NOP No Operation 2 10 MOV Move X x 3 1 MOVN Move Not 3 5 IMOV Indirect Move X X X 3 6 IMOVN Indirect Move Not X X 3 8 BMOV Block Move X 3 9 Move IBMV Indirect Bit Move X 3 10 IBMVN Indirect Bit Move Not X 3 12 NSET N Data Set X X X X x 3 13 NRS N Data Repeat Set X X X 3 14 XCHG Exchange X X 3 15 TCCST Timer Counter Current Value Store X X 3 16 CMP Compare Equal To X X X Xx 4 1 CMP Compare Unequal To X X 4 1 CMP lt Compare Less Than 4 1 CMP gt Com
469. s Value 0 lt lt 255 1 26 7 1 numbers e 0 f 0 all bits in f are zero 1 x 28 127 x 0 0 signed zero Carry and Borrow in Floating Point Data Processing When advanced instructions involving floating point data are executed special internal relay M8003 carry and borrow is updated M8003 Execution Result Value 1 0 Overflow out of the range between 3 402823 10 and 3 402823x10 5 1 0 Not zero within the range between 1 175495x10 and 1 175495 10 3 0 0 Zero Not Zero Overflow Overflow M8003 1 1 Execution Result 3 402823 103 1 175495 1038 0 1 175495x1078 3 402823 1038 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 2 9 2 ADVANCED INSTRUCTIONS Double word Devices in Data Registers When the double word data type is selected for the source or destination device the data is loaded from or stored to two consecutive data registers The order of the two devices depends on the device type When a data register timer or counter is selected as a double word device the high word data is loaded from or stored to the first device selected The low word data is loaded from or stored to the subsequent device Example When data register D10 is designated as a double word source device and data register D20 is designated as a double word destination device the data is loaded from or stored to two consecutive data registers as illustrated below
470. s decremented by one IDEC FC5A MicroSmart User s Manual FC9Y B1273 5 3 5 Binary Arithmetic Instructions Examples MUL Data Type Word MUL W 51 52 Di REP 500 600 300000 P D10 020 030 010 0201 0258h 7 030031 000493E0h D30 When input 11 is on data of D10 is multiplied by data of D20 and the result is set to D30 and 0004h D31 37856 031 93E0h Data Type Integer S1 52 Di REP 500 600 300000 P D10 020 30 010 reoch 220 0258h 30031 FFFB6C20h 65531 D30 EFEBh 27680 031 6 20 Data Type Double Word MUL D S S2 D1 REP 1 010 D20 D30 D10 D11 100000 x D20D21 5000 030 031 500000000 Note In multiplication of double word data type the lower 32 bit data of the result is set to destination device D1 D1 1 Data Type Long MUL L S S2 Di REP 1 D10 D20 D30 D10 D11 100000 x D20D21 5000 030 031 500000000 Note In multiplication of long data type the lower 32 bit data of the result is set to destination device 01 01 1 Data Type Float MUL F S S2
471. s than greater than less than or equal to and greater than or equal to When the comparison result is true an output or internal relay is turned on The repeat operation can also be used to compare more than one set of data New logical OR operation option is added to the CMP instructions when the repeat operation is enabled Repeated com parison results of CMP instructions can be selected from AND or OR operation and the result is outputted to an output or internal relay This option is available on upgraded CPU modules with system program version 200 or higher Three values can also be compared using the ICMP gt instruction Load comparison instructions have been added The comparison result is loaded so that the following instructions can be initiated These instructions are available on upgraded CPU modules with system program version 200 or higher Since the data comparison instructions are executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required CMP Compare Equal To Data type W or I S1 S2 D1 on CMP S1 R S2 R D1 R REP Data type D L or F 51 51 1 52 52 1 D1 on AND OR When input is 16 or 32 bit data designated by source devices 51 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 CMP lt gt Compare Unequal To Dat
472. s turned on When the subsequent commands of ATZ and dialing are also completed successfully M8061 and M8062 will also be turned on The default initialization string or the modified initialization string stored in D8145 D8169 is also used for the initialization in the answer mode ATZ Resetting the Modem in Originate Mode The default initialization string specifies to be stored in the non volatile memory of the modem using the amp W command The initialization string is restored when the modem is powered up or when the ATZ command is issued The MicroSmart sends 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 ATZCommand 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 dialing is also completed successfully M8062 will also be turned on If the initialization string has been stored in the non volatile memory of the modem M8050 may be skipped Start with M8051 to send the ATZ command Dialing the Telephone Number Data registers D8170 D8199 are allocated to the telephone number Before turning on one of the start internal relays M8050 M8052 for the originate mode store the telephone number in data registers starting with D8170 One data reg
473. saction Protocol Message Length Function ID ID bytes Code 2 bytes 2 bytes 2 bytes 1 byte Modbus TCP Header Function RTU Mode Idle No Code Pate Communication Format 3 5 characters CRC Idle 3 5 characters 1 byte 1 byte N bytes 2 bytes Transaction ID The Modbus TCP slave server returns the request ID sent from the master client without change When receiving the returned request ID the master can confirm to which request the response was returned When confirmation is not required designate O 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 status See page 23 6 Data Designate required data for each function IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 23 9 23 TCP COMMUNICATION 23 10 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 24 AS INTERFACE MASTER COMMUNICATION Introduction This chapter describes general information about the Actuator Sensor Interface abbreviated AS Interface and detailed information about using the AS Interface master module About AS Interface AS Interface is a type of field bus that is primarily intended to be used to control sensors and actuators AS
474. se the ASI command 08h Executing configuration is not executed correctly 14h Peripheral device failure The CPU module stores all values automatically except 24h ASI command error 74h Impossible to execute 84h Execution resulting in error Sample Program Change Slave PI This sample program changes the PI value of slave 1A to 3 To use the ASI command Change Slave PI store new parame ter value 3 to D1943 and 1 to D1944 to designate the slave address using the MACRO instruction on WindLDR Command Data Hexadecimal Program D1941 D1942 D1943 D1944 D1945 Write parameter 3 to slave 1A To designate slave 31A set 001F 01944 For slave 1B set 0021 Parameters P3 through PO are weighted as shown in the table below When the PI parameter is set to 3 P3 and P2 are turned off and P1 and PO are turned on Parameter PO Weight 1 ON OFF ON When input IO turns on the MACRO instruction stores hexa decimal values 0306 0102 0003 0001 and 0001 to five data registers D1941 through D1945 soru H MACRO 51 D1 2 io 10 01941 01945 Constant Hexadecimal Hexadecimal 030601 02000300010001 MACRO MACRO Type 51 MACRO 03 06 01 02 00 03 00 01 00 01 Tag Name i TE Device Address Comment Insert Delete Edit FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 31 24 AS INTERFACE MASTER COMMUNICATION Using Two AS Interfac
475. 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 Data Type Word Integer Xn X value 0 to 65535 0 to 65535 Yn Y value 0 to 65535 32768 to 32767 IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 12 1 12 COORDINATE CONVERSION INSTRUCTIONS Y Y 65535 32767 Valid Coordinates x 0 65535 32768 0 65535 Valid Data Types W word X When a bit device such as input Q output M internal relay or R shift register is designated as or Yn 16 points are used integer X D double word When a word device such as T timer C counter or D data register is designated as Xn or Yn 1 point is used L long F float CVXTY Convert X to Y When input is on the X value designated by device S2 is converted into corre CVXTY pis sponding Y value according to the linear relationship defined in the XYFS instruction Device S1 selects a format from a maximum of 6 all in one CPU or 30 slim CPU XY conversion formats The conversion result is set to the device designated by D1 Applicable 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 Valid Devices Device Function I QM T C D Constant Repeat 0 to 5 all in one CPU S1 Source 1 Format number 0 to 29 slim CPU S2
476. signated as DATA Repeat cannot be selected For details about the data movement with or with out Repeat see page 16 7 Specify a data register to store the operating status code Data registers DO D1999 and D10000 D49999 can be desig nated as STATUS Special data registers and expansion data registers cannot be designated For status code description see page 16 6 Enter the slot number where the intelligent module is mounted A maximum of seven intelligent modules can be used Specify the first address in the intelligent module to store the data 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 W word X When a bit device such as input Q output M internal relay or R shift register is designated as integer DATA 16 points are used D double word When a word device such as T timer C counter or D data register is designated as DATA 1 point is used L long F float IDEC FC5A MicROSMART USER s MANUAL FC9Y B1273 16 3 16 INTELLIGENT MODULE ACCESS INSTRUCTIONS STPA READ Stop Access Read When the CPU module stops data is read from the area starting at ADDRESS in the intelligent module designated by SLOT and stored to the device desig Start input is not n
477. 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 slaves 4 Select initial settings of parameters PP PO through P3 if required Configure AS Interface Master Slave A Master Module No Yellow Shade 1 2 Close Auto Configuration Manual Configuration Configure Slave 01 Slave Configuration Refresh Data Structure ID IO ID2 ID1 CDI 07F7 07 Switch Slave File Open File Save Data Structure of CDI PCD 10 10 102 101 Parameters PO P1 P2 P3 On e On Off 2 off off off OK Cancel 5 Click the Manual Configuration button to store the selected PCD and parameter values to the master module 6 Check that the blue shade appears at slave address 01 Now configuration is complete Configure AS Interface Master ETE Master Module No Blue Shade 1 2 Close Auto Configuration Manual Configuration Switch Slave File Open File Save Data Structure of CDI PCD 10 10 102 101 n DE FC5A MICROSMART UsER s MANUAL 9 1273 24 11 24 AS INTERFACE MASTER COMMUNICATION Monitoring Digital I O
478. source 1 device is correct 10 16 Basic Vol Is the PWR LED on the FC5A SIF4 module flashing Supply the rated voltage to the CPU module 34 If the communication is still unstable after going through the trouble shooting described above check and adjust the fol lowing points and confirm if the communication stability can be improved e Use slower communication speed e Increase the transmission wait time e Increase the retry count e Increase the timeout setting e Add COMRE instructions in the ladder program e Select Every 10 ms under Communication Refresh for Port 3 through port 7 in Function Area Settings IDEC FC5A MicROSMART USER s MANUAL FC9Y B1273 25 15 25 EXPANSION RS232C RS485 COMMUNICATION 25 16 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE INDEX 1 N computer link 21 1 100 ms dualtimer 15 1 10 ms dualtimer 15 1 1 ms dual timer 15 1 1 sec dualtimer 15 1 slaves 24 4 ACOS 17 7 active slaves LAS 24 26 adapter RS485 communication 21 1 ADD 5 1 addition 5 1 address LEDs 24 16 and I O LEDs 24 17 addressing tool 24 4 adjusting clock cartridge accuracy 9 8 using a user program 9 7 scan time 10 4 advanced instruction 2 1 ACOS 17 7 ADD 5 1 ALT 8 18 ANDW 6 1 applicable CPU modules 2 4 ASIN 17 6 ATAN 17 8 ATOB 8 12 ATOH 8 7 AVRG 12 7 BCDLS 7 5 BCNT 8 17 BMOV 3 9 BTOA 8 9 BTOH 8 3 CMP 4 1 CMP 4 1 CMP lt gt 4 1 4 1 CMP 4 1 CMP 4 2 COMRF 11
479. structions are executed FIFO data file is placed in the area starting with the device designated by D1 and occupies as many as 51 52 2 data registers The size of each record is equal to S1 S2 records of data can be stored in an FIFO data file using FIEX instructions The stored data can be retrieved from the FIFO data file using FOEX instructions Device Function Description The pointer indicates the position to store new data into the FIFO data file D1 0 pointer When an FIEX instruction is executed the new data in data registers starting with the device designated by S1 of the FIEX instruction is stored at the posi tion indicated by the pointer and the FI pointer is incremented by 1 to indi cate the position to store the next data When the FI pointer indicates the last record of the FIFO data file and an FIEX instruction is executed the pointer will return to 0 D1 1 FO pointer The FO pointer indicates the position to retrieve the stored data from the FIFO data file When an FOEX 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 pointer will return to 0
480. t 4 1 CMP gt 4 2 common logarithm 18 2 communication block mounting position 24 40 parameters 21 2 22 10 25 4 25 10 25 12 port number 25 1 refresh 11 13 settings 21 3 23 4 compare equalto 4 1 greaterthan 4 1 orequalto 4 2 lessthan 4 1 orequalto 4 1 unequal to 4 1 comparison result M8150 M8151 M8152 4 2 4 6 computer link cable 4 24 6 25 2 25 6 communication 21 1 25 2 COMRF 11 13 execution time 11 13 Config OK 24 24 Configuration 24 25 configuration 24 36 data image CDI 24 27 mode 24 15 configure AS Interface master 24 34 configuring a slave 24 10 Connected Mode 24 25 connected mode 24 15 connector pinout 22 1 control register 13 2 13 9 13 15 13 27 14 3 relay 14 14 conversion 10 1 10 3 linear 12 5 convert data type 8 19 XtoY 122 YtoX 12 3 coordinate conversion instructions 12 1 COS 17 4 cosine 17 4 CVDT 8 19 CVXTY 12 2 CVYTX 12 3 INDEX cycle time 24 5 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 Active 24 25 DEC 5 13 deceleration input 13 28 decimal values and hexadecimal storage 2 8 DECO 8 16 decode 8 16 decrement 5 13 jump non zero 11 5 DEG 17 2 degree 17 2 destination device 2 7 detected slaves LDS 24 26 device areas discontinuity 2 10 AS Interface 24 18 DGRD 10 3 DI 11 7 di
481. t be reserved starting with the input number designated by device For example when input IO is designated as device inputs IO through I3 are used When using input terminals on the CPU module the filter value has an effect default value is 3 ms Input terminals on expansion input modules 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 QO is designated as device Q to read 3 digits outputs QO through O2 are used Digital Switch Data Reading Time Reading digital switch data requires the following time after the input to the DGRD instruction is turned on Keep the input to the DGRD instruction for the period of time shown below to read the digital switch data For example when reading data from 5 digital switches to the destination device 14 scans are required Digital Switch Data Reading Time 2 scan times x Quantity of digits 2 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 10 3 10 INTERFACE INSTRUCTIONS Adjusting Scan Time The DGRD instruction requires a scan time longer than the filter time plus 6 ms Minimum Required Scan Time Scan time 2 Filter time 6 ms The filter time dep
482. t point 1419 AT sampling period R W S1 20 AT control period R W S1 22 AT output manipulated variable 0 to 100 2101 designates 100 R W S1 23 Output manipulated variable 32768 to 32767 327 68 to 327 67 R Converted from output manipulated variable S1 1 depending on analog output mod 1424 Output manipulated variable for ule type R analog output module 0 to 4095 0 to 100 0 to 50000 0 to 100 100 to 100 100 to 100 lt 101 designates 100 2101 designates 100 0 to 100 0 to 100 2101 designates 100 1 25 Proportional band offset value R W S1 26 Derivative gain R W Note The value stored in the data register designated by S1 3 operation mode is checked only when the start input for the PID instruction is turned on Values in all other control registers are refreshed in every scan 1 0 Process Variable after conversion When the linear conversion is enabled S1 4 set to 1 or 3 the data register designated by S1 0 stores the linear conver sion result of the process variable S4 The process variable S1 0 takes a value between the linear conversion minimum value S1 6 and the linear conversion maximum value S1 5 When the linear conversion is disabled S1 4 is set to O or 2 the data register designated by S140 stores the same value as the process variable S4 S141 Output Manipulated Variable While the PID action is in progress the data register designat
483. t the 0 4 000 input to 0 50 000 input and store the result to the process variable S4 of the PID instruction e When using analog output module FC4A K2C1 with voltage outputs use the XYFS and CVXTY instructions to convert the output manipulated variable for analog output module 51 24 and store the result to the data register designated as analog output data of the analog output module e 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 X1 Y M8120 is the initialize pulse special internal relay 1 60000 50000 At startup XYFS specifies two points CVXTY W S1 S2 D1 When input 10 is on CVXTY converts the value in D410 and 1 D410 D510 stores the result to D510 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 14 23 14 PID INSTRUCTION 14 24 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 DE 15 DUAL TEACHING TIMER INSTRUCTIONS Introduction Dual timer instructions generate ON OFF pulses of required durations from a designated output internal relay or shift register bit Four dual timers are available and the ON OFF duration can be selected from 1 ms up to 65535 sec Teaching timer instruction measures the ON duration of the start input for the teaching timer instruction and stores the measured data to a designated data register which can be used as a preset value for
484. t the address indicated by the address LEDs Goes on when the corresponding output at the indicated address is on Ox 3x place of 10 Address LEDs x0 x9 place of 1 A A or B slave Indicates the slave address of OA through 31B Goes on when the selected address exists Flashes when the selected address does not exist 24 16 FC5A MicroSmart UsER s MANUAL FC9Y B1273 DE 24 AS INTERFACE MASTER COMMUNICATION Status LEDs The operation modes of the AS Interface master module can be changed by pressing the pushbuttons on the front of the AS Interface master module or by executing ASI commands The operation modes can be confirmed on the six status LEDs on the AS Interface master module For details about the ASI commands see page 24 30 Status LED Indication Status LED PWR FLT LMO CMO OFF CNF Normal Protected Mode OFF OFF ON OFF OFF Connected Made Normal Protected Offline ON ON OFF ON ON OFF Normal Protected Data Exchange Off ON ON OFF ON OFF OFF Protected Mode OFF ON OFF OFF OFF Local Mode Configuration ON OFF ON OFF OFF Flash 1 Goes off when AS Interface power is not supplied 2 Goes on when an error is found on the AS Interface bus Address LEDs and I O LEDs The operating status and 1 0 status of each slave can be monitored on the address LEDs and 1 0 LEDs on the front of the AS Interface master module Slave Operating Statu
485. t to 3 devices starting with D1 S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 SOTU ANDW W S1 S2 DIR 11 D10 D20 D30 3 D10 D20 D30 D10 D20 LI D31 D10 D20 D32 Data Type Double Word When only 01 destination is designated to repeat the same result is set to 3 devices starting with 01 01 1 S1 Repeat 0 S2 Repeat 0 D1 Repeat 3 SOTU ANDW D S1 S2 D1 R REP 11 D10 D20 D30 3 D10 D11 D20 D21 030 031 10 011 20 021 D32 D33 D10 D11 20 021 D34 D35 Repeat Two Source Devices Data Word When S1 and S2 source are designated to repeat the final result is set to destination device D1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 SOTU ANDW W 518 S2R D1 REP 11 D10 D20 D30 3 D10 D20 5 030 011 D21 E D30 D12 D22 D30 Data Type Double Word When 51 and S2 source are designated to repeat the final result is set to destination device 01 01 1 S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 SOTU ANDW D 518 S2R D1 REP 11 D10 D20 D30 3 10 011 s 20 021 gt 030 031 D12 D13 022 023 mae 030 031 D14 D15 024 025 D30 D31 IDEC FC5A MicroSmart User s Manual FC9Y B1273 6 3 6 BOOLEAN COMPUTATION INSTRUCTIONS Repeat Source and Destination Devices Data Type Word When S1 source and 01 destination are designated to repeat different results are set to 3 devices starting with D1 S1 Repeat 3 S2 Repeat 0 D1
486. t value TC or CC is read out Destination device D1 uses 2 data registers starting with the device designated by D1 Since the DTDV 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 W word X When a bit device such as input Q output M internal relay or R shift register is designated as the source 16 points word data type are used I integer integer When a word device such as T timer C counter or D data register is designated as the source or D double word destination 1 point word data type is used L long F float Example DTDV Before Execution After Execution P 12345 48 pi D30 D10 3039h gt D20 30h Upper byte 57 D21 39h Lower byte IDEC FC5A MicroSmart User s Manual FC9Y B1273 8 21 8 DATA CONVERSION INSTRUCTIONS DTCB Data Combine mln DTCB W D1 979 Applicable CPU Modules FC5A C10R2 C D FC5A C16R2 C D S1 S1 1 gt 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 byte data from the next source device is moved to
487. ta Data registers 00 01997 D2000 D7997 and D10000 D49997 be desig nated as these devices When source device S1 is designated by a constant the preset value be 0 through 65535 in hours then minutes and seconds set to 0 amp Special internal relays cannot be designated as destination device D2 Destination device D3 requires 1 data register reserved for system work area Hour data can be 0 through 65535 Minute and second data can be 0 through 59 When the measured input ON duration value in destination device D1 reaches the preset value designated by source device S1 the comparison output designated by destination device D2 turns on As long as the input remains on the measured input ON duration value continues to increase When the measured input ON duration value exceeds 65535 hours 59 minutes 59 seconds the value returns to 0 hours 0 minutes 0 seconds to repeat another 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 after the comparison output has turned on the comparison output is turned off Then a user program execution error will result turning on special interna
488. tart internal relays except for disconnecting line can be turned on 20 Sending initialization string originate mode 21 Sending ATZ originate mode 22 Dialing A start internal relay is in operation in the first try or subse 23 Disconnecting line quent retrial 24 Sending AT command 25 Sending initialization string answer mode 26 Sending ATZ answer mode 30 Waiting for resending initialization string originate mode 31 Waiting for resending ATZ originate mode 32 Waiting for re dialing 33 Waiting for re disconnecting line The command started by a start internal relay was not com pleted and is waiting for retrial 34 Waiting for resending AT command 35 Waiting for resending initialization string answer mode 36 Waiting for resending ATZ answer mode 40 T Telephone line is connected Only M8053 disconnect line can be turned on C d started by M8054 M8056 i leted 50 AT command completed successfully um MO idu Invalid character is included in the initialization string dial 60 AT command program error number or AT command string Correct the program to include ODh in the AT command Two or more start internal relays are on 61 Simultaneous start of commands Correct the user program so that only one start internal relay goes on at a time A start IR other than M8053 disconnect line is turned on z while the telephone line is connected 62 Invalid command in online mode Correct the program so th
489. tarting to access the slave I O data IDE FC5A MicROSMART UsER s MANUAL FC9Y B1273 24 21 24 AS INTERFACE MASTER COMMUNICATION Analog I O Data of Analog Slaves For AS Interface master module 1 the I O data for a maximum of seven analog slaves four channels for each slave on the AS Interface bus is stored to AS Interface data registers in the CPU module The analog slave addresses 1 to 31 are in the ascending order The input data for each analog slave is allocated to data registers D1700 to D1731 and the output data is allocated to D1732 to D1763 For AS Interface master module 2 the analog 1 0 data can be accessed using RUNA or STPA instructions The AS Interface master module is compliant with analog slave profile 7 3 Caution The maximum number of analog slaves that can be connected to the AS Interface bus is seven Do not connect eight or more analog slaves to one bus otherwise the slaves will not function correctly e When data registers D1700 through D1731 allocated to analog inputs contain 7FFF do not use this data 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 e When using analog slaves read the user s manual for th
490. ted by device 51 0 determines the pulse output frequency FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E 0 11 44 Hz 0 15 26 Hz 1 45 78 Hz 1 61 04 Hz 2 366 2 Hz 2 488 3 Hz 51 1 Pulse Width Ratio The value stored in the data register designated by device 1 1 specifies the pulse width ratio of the pulse output in per cent of the period determined by the output pulse frequency selected with 1 0 Valid values for device S141 are 1 through 100 Pulse Width Period x Pulse Width Ratio Pulse Width Ratio Pulse Width Period x 100 _ 1 Pulse Width Ratio Output Pulse Frequency 100 gt Period 69 01 21 76 2 72 ms 1 2 Pulse Counting Pulse counting can be enabled for the PWM1 PWM3 instructions only With pulse counting enabled PWM1 or PWM3 generates a predetermined number of output pulses as designated by devices S143 and 51 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 to the data register designated by S142 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 13 9 13 PULSE INSTRUCTIONS 1 3 Preset Value High Word S144 Preset Value Low Word With pulse counting enabled as described above PWM1 PWM3 generates a predetermined number of output pulses as designated b
491. tegral time S148 and derivative time S149 determined by the auto tun ing may not always be the optimum values depending on the actual application To make sure of the best results adjust the parame ters Once the best PID parameters are determined perform only the PID action in usual operation unless the control object is changed IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 14 17 14 PID INSTRUCTION Application Examples The following two application examples demonstrate an advanced auto tuning and PID action to keep a heater tempera ture at 200 C In both examples when the program is started the PID instruction first executes advanced auto tuning to determine the AT parameters such as AT sampling period AT control period AT set point and AT output manipulated variable using the temperature data inputted to the analog input module then executes auto tuning to determine PID parameters such as proportional term integral time derivative time sampling period control period and control action When auto tuning is complete PID action starts to control 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 monit
492. ter modules can be mounted Note The AS Interface master module can not be mounted to the right of the expansion inter face module The AS Interface master module can connect a maximum of 62 digital I O slaves A maximum of seven analog 1 0 slaves can also be connected to the AS Interface master module compliant with AS Interface ver 2 1 and analog slave profile 7 3 Caution AS Interface master module cannot be connected to the all in one 10 I O and 16 1 0 type CPU modules and the expansion interface module One or two AS Interface 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 1 O type CPU module But when one or two AS Interface master modules are connected only a total of three expansion modules can be connected including the AS Interface master modules Do not connect more than three expansion modules due to the amount of heat generated If more than three expansion modules including the AS Interface master module are connected an error occurs and special data register 08037 quantity of expansion I O modules stores error code 20 hex Similarly slim type CPU modules can normally connect a maximum of sev
493. ternal relay M8052 If retry cycles are set to data register D8109 the dial command is repeated at retry intervals specified by D8110 default 90 seconds as many as the specified retry cycles default 3 cycles until the telephone line is connected When the dial command has been completed successfully internal relay M8062 is turned on If the dial command fails internal relay M8072 is turned on The dial command is determined successful when the DCD signal is turned on Note When the MicroSmart is powered down while the telephone line is connected the telephone line is disconnected because the DTR signal is turned off This method should not be used for disconnecting the telephone line Always use M8053 to disconnect the telephone line as described below RS232C Port Communication Protocol Before the telephone line is connected in the modem mode after powerup the RS232C port 2 can only send out an AT command by turning on a start internal relay M8050 M8056 The communication protocol for the RS232C port 2 after the telephone line is connected is selected by the value stored in data register D8103 D8103 Value RS232C Port 2 Communication Protocol in the Online Mode 0 other than 1 Maintenance protocol 1 User protocol When the telephone line is disconnected the RS232C port 2 restores the state as before the telephone line was con nected whether D8103 is set to O or 1 When using a TXD or RXD instruction in the user commun
494. the PULS2 instruction without pulse counting D102 0 disable pulse counting PULS S1 D1 1 2 D100 M20 Start Input 11 Output Pulse Frequency D101 Output Pulse Q1 FR1 FR2 Pulse Output ON M20 Pulse Output Complete M21 When input 11 is turned PULS2 starts to generate output pulses at the frequency designated by the value stored in data register D101 While the output pulses are sent out from output 01 internal relay M20 remains on When input 11 is turned off PULS2 stops generating output pulses immediately then internal relay M20 turns off and inter nal relay M21 turns on f the output pulse frequency value D101 is changed while generating output pulses the change takes effect in the next scan When changing the pulse frequency make sure that the timing of the change is much slower than the output pulse fre quency so that the pulse frequency is changed successfully 13 6 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 IDEC 13 PULSE INSTRUCTIONS Sample Program PULS1 This program demonstrates a user program of the PULS1 instruction to generate 5 000 pulses at a frequency of 200 Hz from output QO followed by 60 000 pulses at a frequency of 500 Hz Programming WindLDR On the WindLDR editing screen place the cursor where you want to insert the pulse instruction macro and type PULSST Enter parameters as shown below PULSST Set PULS Instru
495. the data register designated by device 51 10 stores an error code Error Code Description 0 Normal Operation mode designation error 1 S140 stores other than 0 through 3 2 Initial pulse frequency designation error S1 2 stores a value that is not within the frequency range of the initial pulse output 3 Preset value designation error S1 6 and 5147 store other than 1 through 100 000 000 4 Steady pulse frequency designation error S1 1 stores a value that is not within the frequency range of the steady pulse output Frequency change rate designation error 5 Modes 0402 5133 stores other than 1 through 100 Mode 3 51 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 S145 stores other than 0 and 1 The number of pulses for the frequency change areas calculated from the steady pulse frequency S1 1 initial pulse frequency S142 and frequency change rate time S143 exceeds the preset value S1 6 7 of the total out 8 put pulses To correct this error reduce the value of the steady pulse frequency 51 1 or initial pulse frequency 51 2 or increase the frequency change rate time 5133 The initial pulse frequency S142 is equal to or larger than the steady pulse frequency 51 1 3 Reduce the initial pulse frequency 51 2 to a value smaller than the steady pulse frequency 51 1 Modes 0 to
496. the modem originate mode to move values to data registers assigned to the modem mode initialize the modem dial the telephone number and disconnect the telephone line While the tele phone line is connected user communication instruction TXD2 sends a character string Connect MOV W Sl Di 1 D8103 MOV W Sl Di 12594 08170 MOV W Sl Di 13108 D8171 MOV W Sl D1 3328 D8172 M8120 is the initialize pulse special internal relay The MOV instruction stores 1 to D8103 to enable user protocol after telephone line is connected MOV instructions set a dial command ATD1234 CR LF 12 3132h 12594 D8170 34 3334h 13108 D8171 CR ODOOh 3328 D8172 to enter CR at the end of the telephone number When input IO 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 is on while telephone line is connected When 11 is turned on TXD2 sends seven characters Connect See the WindLDR dialog box shown below When input I2 is turned on M8053 disconnect line is turned on to disconnect the telephone line The TXD2 instruction in the sample program for the modem originate mode is programmed using WindLDR with parame ters shown below TXD Transmit 51 Connect Insert Delete
497. ting point format user program execution error will result turning on special internal relay M8004 and ERR LED on the CPU module Since the DEG 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 W word Since the floating point data type is used the source and destination devices use two consecutive data registers integer D double word L long F float X Example DEG e zm When input 11 is turned on the radian value of data registers 010 and D11 des SOTU F D10 D20 ignated by source device S1 is converted into a degree value and stored to data 1 registers D20 and D21 designated by destination device D1 4 712389 rad x 180 x 270 0 S1 D1 D10 D11 4 712389 20 021 270 0 17 2 FC5A MicroSmart UsER s MANUAL FC9Y B1273 I DE SIN Sine H Applicable CPU Modules FC5A C10R2 C D X FC5A C16R2 C D SIN F S1 D1 17 TRIGONOMETRIC FUNCTION INSTRUCTIONS sin 51 51 1 gt 01 01 1 When input is on the sine of the radian value designated by source device S1 is stored to the destination designated by device D1 FC5A C24R2 C D FC5A D16RK1 RS1 FC5A D32K3 S3 FC5A D12K1E S1E X X X X X X Valid Devices Device Function I QM T C D Constant Repeat S1 Source 1 Radian value to convert into s
498. tion 10 status may be changed by the subroutine upon return Example LCAL and LRET The following example demonstrates a program to call three different portions of program depending on the input When the subroutine is complete program execution returns to the instruction following the LCAL instruction When input IO is on program execution jumps to label O 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 oscillates in 1 sec increments Program execution returns to the address of input I1 M8122 is the 100 ms clock special internal relay When jump occurs to label 1 output Q1 oscillates in 100 ms increments Program execution returns to the address of input I2 M8123 is the 10 ms clock special internal relay When jump occurs to label 2 output Q2 oscillates in 10 ms increments Program execution returns to the address of END 11 4 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DE 11 PROGRAM BRANCHING INSTRUCTIONS DJNZ Decrement Jump Non zero When input is on the value stored in the data register designated by 1 is decremented DJNZ Eo En by one and is checked If the resultant value is not 0 program execution jumps to address with label O through 127 all in one CPU or 255 slim CPU designated by S2 If the decrement results in O no jump takes plac
499. tion 1 Dual timer output D2 Destination 2 System work area For the valid device address range see pages 6 1 and 6 2 Basic Vol ES Internal relays MO through M2557 be designated as D1 Special internal relays cannot be designated as D1 Destination device D2 system work area uses 2 data registers starting with the device designated as D2 Data registers DO D1998 D2000 D7998 and D10000 D49998 can be designated as D2 The two data registers are used for a system work area Do not use these data registers for destinations of other advanced instructions and do not change values of these data registers using the Point Write function on WindLDR If the data in these data registers are changed the dual timer does not operate correctly The dual timer instructions 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 Examples DTML DTIM DTMH DTMS While input IO is on four dual timer instructions turn on and off the S1 52 D1 D2 ae 0 2 1 M10 D100 destination devices according to the on and off durations designated by source devices S1 and S2 S1 52 D1 D2 10 5 M20 D200 S1 52 D1 D2 50 25 M30 D300 S1 52 D1 D2 250 125 M40 D400 ON 0 ON M10 ON M20 ON M30 off ON M40 250 ms 125 ms Instruction Increments 1 ON duration 52 O
500. tity of Digits 4 SOTU BTOA W S1 S2 D1 Quantity of Digits 3 sotu H BTOA W 51 52 D1 Quantity of Digits 2 SOTU BTOA W S1 52 D1 Quantity of Digits 1 sotu H BTOA W 651 52 D1 8 10 FC5A MicroSmart User s Manual FC9Y B1273 BCD Binary 12345 3039h BCD Binary 12345 3039h BCD Binary BCD Binary 12345 3039h BCD Binary D20 D21 D22 D23 D24 D20 D21 D22 D23 D20 D21 D22 D20 D21 ASCII 49 0031h 50 0032h 51 0033h 52 0034h 53 0035h ASCII 50 0032h 51 0033h 52 0034h 53 0035h ASCII 51 0033h 52 0034h 53 0035h ASCII 52 0034h 53 0035h ASCII IDEC 8 DATA CONVERSION INSTRUCTIONS Examples BTOA D Quantity of Digits 10 BCD ASCII r H Snu TAE OAM m m 49 DIO 10 020 ees 0 D10 D11 499602 2 020 0031h 50 0032h D21 51 0033h 52 0034h D22 D23 53 D24 0035h 54 025 0036h 55 D26 0037h 56 027 0038h 57 028 0039h 48 029 0030h Quantity of Digits 6
501. to designate as source device S4 see page 9 3 Basic Vol Specify the data register number shown under Data in the Configure Parameters dialog box as source device S4 process variable of the PID instruction The analog input data in the selected data register is used as the process variable of the PID instruction Destination Device D1 Manipulated Variable The data register designated by destination device D1 stores the manipulated variable of 32768 through 32767 calcu lated by the PID action When the calculation result is less than 32768 D1 stores 32768 When the calculation result is greater than 32767 D1 stores 32767 While the calculation result is less than 32768 or greater than 32767 the PID action still continues When the output manipulated variable limit is disabled 52 2 set to off while the PID action is in progress the data reg ister designated by 1 1 holds O through 100 of the manipulated variable D1 omitting values less than and greater than 100 The percent value in S141 determines the ON duration of the control output 52 6 in proportion to the control period S1 13 When the output manipulated variable limit is enabled S242 set to on the manipulated variable D1 is stored to the output manipulated variable S141 according to the output manipulated variable upper limit 514 16 and the output manipulated variable lower limit S1 17 as summarized in the table below 14 16 FC5A MICROSMART UsER s MA
502. to designate the set point S3 high alarm value S1 14 low alarm value 1415 and AT set point S121 and also to read the process variable S140 FC5A MIcROSMART USER s MANUAL FC9Y B1273 I DEC 14 PID INSTRUCTION Linear Conversion Result Linear Conversion Maximum Value S1 5 Set point S3 AT set point S1 21 and process vari able S1 0 must be within this range Linear Conversion Minimum Value S146 gt Analog Input Data 0 4095 50000 Analog Input Minimum Value Analog Input Maximum Value Proportional gain or proportional band The proportional term S147 can be selected from the proportional gain 51 4 set to 0 or 1 or the proportional band S144 set to 2 or 3 S145 Linear Conversion Maximum Value When the linear conversion is enabled 51 4 set to 1 or 3 set the linear conversion maximum value to the data register designated by 51 5 Valid values 0 through 65535 word data type or 32768 through 32767 integer data type and the linear conversion maximum value must be larger than the linear conversion minimum value S146 Select an appro priate value for the linear conversion maximum value to represent the maximum value of the input signal to the analog I O module When the linear conversion is disabled S1 4 set to or 2 you do not have to set the linear conversion maximum value 1 6 Linear Conversion Minimum Value When the linear conversion is enabled 51 4 set to 1
503. to the data register designated by 51 11 When 51 11 stores a value larger than 99 the input filter coefficient is set to 9996 The larger the coefficient the larger the input filter effect The input filter is effective for reading a process variable S4 such as temperature data when the value changes at each sampling time The input filter coefficient is in effect during auto tuning and PID action H 1 DEC FC5A MicROSMART UsER s MANUAL FC9Y B1273 14 9 14 PID INSTRUCTION 1 12 Sampling Period The sampling period determines the interval to execute the PID instruction Set a required value of 1 through 10000 to spec ify a sampling period of 0 01 sec through 100 00 sec to the data register designated by 51 12 When 51 12 stores 0 the sam pling period is set 0 01 sec When 51 12 stores a value larger than 10000 the sampling period is set to 100 00 sec When a sampling period is set to a value smaller than the scan time the PID instruction is executed every scan Example Sampling period 40 ms Scan time 80 ms Sampling period lt Scan time 80 ms 80 ms 80 ms 80 ms 80 ms gt PID PID PID PID PID PID Executed Executed Executed Executed Executed Executed Example Sampling period 80 ms Scan time 60 ms Sampling period gt Scan time 60 ms 60 ms 60 ms 60 ms 60 ms 60 ms 60 ms PID PID Not PID PID PID PID Not PID PID Executed Executed Executed Executed Executed Executed Executed Executed 60ms
504. tor Configuration Basic Network Services Port Services Baud Rate Data Bits Parity Stop Bits Flow Control Advanced 3 Onthe Advanced tab page enter a value 10 ms or larger in the field under Send after the following number of idle millisec onds E Web Server Unit Settings Home Configuration Network Serial Ports Security Alarms Administration Backup Restore Restore Factory Defaults System Information Reboot PLC Monitor al Configuration Basic Network Services Port Services Advanced vj Send data only under any of the following conditions Send when data is present on the serial line Match string Strip match string before sending 10 ms 1 65535 nd after the following number of bytes 512 bytes 4 4098 v Send after the following number of idle milliseconds Close connection after the following number of idle seconds Timeout 20 secs 1 65535 23 8 FC5A MicroSmart UsER s MANUAL 9 1273 23 MopBUs TCP COMMUNICATION Modbus TCP Communication Format This section describes the communication format used for Modbus TCP master and slave communication Modbus TCP communication format starts with the Modbus TCP header followed by the RTU mode communication format without the idle 3 5 characters at both ends and CRC as shown below Modbus TCP Communication Format Tran
505. tor Key selector Lever 2 position lin 0 2 1 1 Selector Key selector Lever 3 position 2in 1 1 Illuminated selector 2 position 1 in 1 out 0 x2 1 1 X1 Illuminated selector 3 position 2 in 1 out 1 1 X1 Notes 1 The AS Interface master uses bit for addressing A B slaves 5 input data from 3 position selector key selector and illumi 2 In the above table bits marked with X1 X2 and are used for nated selector switches and 3 position lever switches depend on SwitchNet I O data the operator position as shown below 3 X1 When pushbutton is pressed input data is 1 on When not Selector lever pressed input data is O off When output data is 1 on LED is on Center Up When output data is O off LED is off 3 position Operator lt dener 4 X2 The input data from 2 position selector key selector and illumi Down nated selector switches and 2 position lever switches depend on the operator position as shown below Operator Position Left Down Center Right Up DI3 0 0 1 Selector Lever DI2 1 0 0 U 2 position Operator Left Right SF 6 Unused input bits DI3 and DI2 are off and unused input bits DI1 Down and DIO are 1 on Slaves ignore unused output data sent from Operator Position Left Down Right Up the master DI2 0 1 e Write Parameter Command A4 A3 A2 A1 AO Sel p2 pi 1 P
506. uction following the LCAL instruction The LRET must be placed at the end of the subroutine starting with a LABEL instruction When the LRET is pro grammed at other places a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 11 3 11 PROGRAM BRANCHING INSTRUCTIONS Correct Structure for Calling Subroutine When a LCAL instruction is executed the remaining program instructions on the same rung may not be executed upon return if input conditions are changed by the subroutine After the LRET instruction of a subroutine program execution begins with the instruction following the LCAL instruction depending on current input condition When instructions following a LCAL instruction must be executed after the subroutine is called make sure the subroutine does not change input conditions unfavorably In addition include subsequent instructions in a new ladder line sepa rated from the LCAL instruction Correct Incorrect MOV W Sl Di MOV W 51 Di 10 DO D1 10 DO D1 LCAL S1 LCAL S1 0 0 S S MOV W Sl Di MOV W 51 Di D20 D21 D20 D21 Separate the ladder line for each LCAL instruc
507. uctions week programmer FC5A Series instructions interface instructions program branching instructions refresh instructions interrupt control instructions coordinate conversion instruc MicroSmart Pentra i j FC9Y B1273 TOR MA MM tions average instructions pulse output instructions PID instructions dual teaching timer instructions intelligent module access instructions trigono Advanced Volume this manual nach 4 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 FC5A Series Describes module specifications installation instructions wiring instructions MicroSmart Pentra basic operation function settings device list basic instruction list basic FC9Y B1268 i mE User s Manual instructions analog modules user communication data link communication Basic Volume Modbus ASCII RTU communication and troubleshooting FC5A Series MicroSmart Pentra Describes 5 Slim Type Web Server CPU Module specifications and func FC9Y B1278 User s Manual tions Web Server CPU Module Volume FC5A Series FC9Y B1283 PID Module Describes PID Module specifications and functions IDEC User s Manual FC5A MicroSmart User s Manual FC9Y B1273 Preface 5 Preface 6 FC5A MicroSmart
508. udax d E ese E AL hoes e RAM EC C Re gets 12 3 AVRG AVeraBge ce eR RR ne AA E ee a UR Ae S 12 7 Pulse Instructions PULS1 Pulse 1 222222222 2 2 2 2 13 2 PULS2 Pulse 2 2 2 2 2 4 24 2 2 2 2 13 2 PULS3 Pulse 3 2 22222 2 2 2 1 4 1 4 4 0 0 0 13 2 PWM1 Pulse Width Modulation 1 13 8 PWM2 Pulse Width Modulation 2 13 8 PWM3 Pulse Width Modulation 3 13 8 RAMP1 Ramp Control 1 13 14 RAMP2 Ramp Control 2 13 14 ZRNI Zero Ret rn ncciae ce mee Ret beoe Ot RR SU St needles 13 26 ZRN2 Zero Ret rn2 eue te Pe Rt ro Ret pit da BR pb P RU s bd 13 26 ZRN3 Zero Ret rn 3 iem oe se eR EG PR lb RS UR 13 26 PID Instruction PID4PID COhttol 2 33 52 x ede ER IR Rr n mur dp d di 14 1 Application Exambpl s isis x RR RR etes en Sean ege ele REUS 14 18 Dual Teaching Timer Instructions DIME Tsec Dual tore ica rre Ri Teen Re ete tn 15 1 DTIM 100 ms Dual Time
509. ue slave address so that the master can communicate with the slave correctly From the WindLDR menu bar select Online gt Configure Master The Configure AS Interface Master dialog box appears Change Slave Address Current Address New Address Slave Slave A 2 Slave B Click the slave address to Configure AS Interface Master open the Change Slave Address dialog box OK Cancel Configure Slave 02 Slave Configuration Data Structure CDI PCD Parameters PP PO P1 2 On On e off e off ID I0 ID2 1D1 FFFF P2 2 On Click a PCD value to open the Configure Slave dialog box P3 2 On Off OK Cancel Dialog Box Button Slave A Master Module No 2 2 Close Auto Configuration Data Structure of CDI PCD ID IO ID2 ID1 Description Writes the currently connected AS Interface slave configuration LDS Configure AS Interface Master Change Slave Address Configure Slave Auto Configuration 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 Switches the dialog box for setting Slave A or Slave B File Open Opens the configuration LPS PCD PP file File Save Saves the c
510. ue will become the high alarm value 14 10 FC5A MICROSMART USER s MANUAL FC9Y B1273 1 DEC 14 PID INSTRUCTION 1 15 Low Alarm Value The low alarm value is the lower limit of the process variable 140 to generate an alarm When the process variable is lower than or equal to the low alarm value the low alarm output control relay S245 is turned on When the process variable is higher than the low alarm value the low alarm output control relay S2 5 is turned off When the linear conversion is disabled S144 set to 0 or 2 set a required low alarm value of through 4095 or 50000 depending on the analog 1 0 module type to the data register designated by 51 15 When 51 15 stores a value larger than 4095 or 50000 the low alarm value is set to 4095 or 50000 respectively When the linear conversion is enabled 51 4 set to 1 or 3 set a required low alarm value of through 65535 word data type or 32768 through 32767 integer data type to the data register designated by 51 15 The low alarm value must be larger than or equal to the linear conversion minimum value 51 6 and must be smaller than or equal to the linear con version maximum value 51 5 If the low alarm value is set to a value smaller than the linear conversion minimum value 51 6 the linear conversion minimum value will become the low alarm value If the low alarm value is set to a value larger than the linear conversion maximum value S145 the linear conversion maxim
511. ule the operating statuses of the CPU module can be monitored using WindLDR on the PC connected to the expansion RS232C RS485 communication module The operating procedures for computer link communication using expansion RS232C RS485 communication module are as follows 1 Connect the PC to communication port 1 or 2 RS232C on the CPU module using the computer link cable 4C FC2A KC4C 2 From the WindLDR menu bar select Configuration gt 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 MicroSmart Function Area Settings Run Stop Control contiaurethe communication ports Memory Backup Input Configuration Communication Ports Communication Ports Port Communication Mode Comm Param Mode Selection Input Network No Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol Configure 9600 7 Even 1 Maintenance Protocol v Configure 9600 7 Even 1 Teer Configure 9600 7 Even 1 ser Protocol Data Link Master Configure 9600 7 Even 1 Data Link Slave i Modbus RTU Master Configure 9600 7 Even 1 Modbus RTU Slave Configure 9600 7 Even 1 Modbus ASCII Master Modbus ASCII Slave Communication Port 3 Port 7 In END Processing Every 10 ms Key Matrix Cartridges amp Modules Device Settings Program Protection Self Diagnostic 1 2 3 4 5 6 7
512. ule 1 CPU Module High Low Address 0 00h D9 02h OLA jme Address 1 01h Address 2 02h 010 04h O3h pm Address 3 03h X Address 4 04h D11 05 pm Address 5 05h Example RUNA WRITE without Repeat The following example illustrates the data movement of the RUNA WRITE instruction without repeat designation The data movement of the STPA WRITE is the same as the RUNA WRITE instruction RUNA W DATA STATUS IOT ADDRESS BVE While input I1 is on data in data register D19 is writ WRITE D19 D101 1 1 5 ten to the 5 byte area starting at address 1 in intelli gent module 1 Status code is stored in data register D101 Intelligent Module 1 CPU Module High Low Address 0 019 02h 01 p 5 gt Address 1 1 Address2 02h 20 um eus gt Address3 Oth Address 4 02h D21 b gt Address5 01 Example RUNA WRITE with Repeat The following example illustrates the data movement of the RUNA WRITE instruction with repeat designation The data movement of the STPA WRITE is the same as the RUNA WRITE instruction H RUNAW DATAR STATUS SLOT ADDRESS BYTE Yata regieter D22 s
513. ulse input from a SOTU or SOTD instruction should be used as required Valid Data Types W word When a bit device such as input Q output M internal relay or R shift register is designated as integer the source 16 points word or integer data type or 32 points double word long or float data type are used When repeat is designated for a bit device the quantity of device bits increases in 16 or 32 D double word point increments L long When a word device such as T timer C counter or D data register is designated as the source 1 x F float point word or integer data type or 2 points double word long or float data type are used When repeat is designated for a word device the quantity of device words increases in 1 or 2 point incre ments Using Carry or Borrow Signals When the 01 destination data is out of the valid data range as a result of any binary arithmetic operation a carry or bor row occurs and special internal relay M8003 is turned on Data Type Carry borrow occurs when D1 is out of the range between W word 0 and 65 535 integer 32 768 and 32 767 D double word 0 and 4 294 967 295 L long 2 147 483 648 and 2 147 483 647 F float 5 2 3 402823 103 and 1 175495x10 8 1 175495 10 3 and 3 402823x1078 FC5A MicroSmart User s Manual FC9Y B1273 I DEC 5 Binary Arithmetic Instructions Exa
514. ult values of the Start bit 1 MicroSmart set the matching communication parameters Since the total Data bits 7 of modem communication parameters is 10 bits set the value to a total Parity Even of 10 bits Stop bit 1 Total 10 bits 4 Click the OK button 22 10 FC5A MICROSMART UstR s MANUAL FC9Y B1273 22 MODEM MODE Operating Procedure for Modem Mode 1 After completing the user program including the Function Area Settings download the user program to the MicroSmart from a computer running WindLDR 2 Start the MicroSmart to run the user program 3 Turn on start internal relay M8050 or M8055 to initialize the modem When originating the modem communication 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 non volatile memory of the modem turn on M8056 to send the ATZ command only 4 Transmit or receive communication through the modem 5 Turn on start internal relay M8053 to disconnect the telephone line IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 22 11 22 MODEM MODE Sample Program for Modem Originate Mode This program demonstrates a user program for
515. um value will become the low alarm value 1 16 Output Manipulated Variable Upper Limit The value contained in the data register designated by 51 16 specifies the upper limit of the output manipulated variable S141 in two ways direct and proportional 1 16 Value 0 through 100 When 51 16 contains a value 0 through 100 the value directly determines the upper limit of the output manipulated variable S141 If the manipulated variable D1 is greater than or equal to the upper limit value 1416 the upper limit value is outputted to the output manipulated variable S1 1 Set a required value of 0 through 100 for the output manip ulated variable upper limit to the data register designated by 51 16 When 51 16 stores a value larger than 100 except 10001 through 10099 the output manipulated variable upper limit S1 16 is set to 100 The output 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 S242 When 52 2 is turned off the output manipulated variable upper limit 514 16 has no effect 1 16 Value 10001 through 10099 disables Output Manipulated Variable Lower Limit 51 17 When 51 16 contains a value 10001 through 10099 the value minus 10000 determines the ratio of the output manipu lated variable S11 in proportion to the manipulated variable D1 of
516. uses two word devices in the division operation of integer data type data register D1999 cannot be used as destination device D1 When using a bit device such as internal relay for destination 32 internal relays are required so M2521 or a larger number cannot be used as destination device D1 Data Type Double Word DIVD 51 S2 01 REP 11 010 020 D30 010 011 100000 20 021 70000 D30 D31 1 D32 D33 30000 Quotient Remainder Note Since the destination uses four word devices in the division operation of double word 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 M2481 or a larger number cannot be used as destination device D1 Data Type Long DIV L S1 S2 Di REP 1 D10 D20 D30 D10 D11 100000 D20 D21 70000 gt D30 D31 D32 D33 30000 Quotient Remainder 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 M2481 or a larger number cannot be used as destination device D1 Data Type Float DIV F S1 S2 Di REP 11
517. ut manipulated variable 51 23 Auto Tuning AT and Advanced Auto Tuning Advanced AT When auto tuning is selected with the operation mode 51 3 set to 1 AT PID or 2 AT the auto tuning is executed before starting PID control to determine PID parameters such as proportional term 5147 integral time 51 8 deriva tive time S149 and control action 52 0 automatically The MicroSmart uses the step response method to execute auto tuning To enable auto tuning set four parameters for auto tuning before executing the PID instruction such as AT sampling period 51 19 AT control period S1 20 AT set point 51 21 and AT output manipulated variable S1 22 When advanced auto tuning is selected with the operation mode S143 set to 3 advanced AT PID or 4 advanced AT most AT parameters are determined automatically and do not have to be designated by the user Only when advanced auto tuning is used with 143 set to 4 advanced AT the user has to designate the AT set point 1421 AT Parameters Before executing auto tuning AT parameters must be designated by the user as summarized in the table below AT sampling period ATcontrol period AT set point AT output manipulated 1419 51 20 1421 variable S1 22 0 PID action Operation Mode 51 3 1 AT auto tuning PID action By user By user By user By user 2 AT auto tuning 0 to 100 3 Advanced AT PID action Automatic Automatic A
518. ut memory when the END instruction is exe 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 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 11 9 11 PROGRAM BRANCHING INSTRUCTIONS Example IOREF The following example demonstrates a program to transfer the input 10 status to output QO using the IOREF instruction Input 12 is designated as an interrupt input For the interrupt input function see page 5 34 Basic Vol MOV W S1 D1 8120 is the initialize pulse special internal relay 0 D8032 08032 stores 0 to designate jump destination label for interrupt input 12 When input I2 is on program execution jumps to label 0 M8125 is the in operation output special internal relay IOREF immediately reads input IO status to internal relay M300 M300 turns on or off the output QO internal memory Another IOREF immediately writes the output QO internal memory status to actual output QO Program execution returns to the main program 11 10 FC5A MiCROSMART UsER s MANUAL FC9Y B1273 I DE 11 PROGRAM BRANCHING INSTRUCTIONS HSCRF High speed Counter Refresh When input is on the HSCRF instruction refreshes the high speed counter current values in special data H d registers in real time The current values of four high speed counters HSC1 through HSC4 are usually updated in every scan The HSCRF can be used in
519. ut pulse frequency 50 500 Hz 60000 D3 D3 D4 preset value 60 000 Pulse data update flag 1 is set pulse data updated When start input 10 is turned on PULS1 starts to generate 5 000 output pulses at 200Hz in the first stage S1 DO D1 M100 Pulse output complete M101 is turned off n DE FC5A MicROSMART UsER s MANUAL FC9Y B1273 13 7 13 PULSE INSTRUCTIONS PWM 1 Pulse Width Modulation 1 uM ww S1 D1 uM ww When input is the PWM1 instruction generates 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 1 sends out output pulses from output 00 PWM1 can be programmed to generate a predetermined number of output pulses When pulse counting is disabled PWM1 generates output pulses while the start input for the PWM1 instruction remains on 2 Pulse Width Modulation 2 p S1 D1 When input is on the PWM2 instruction generates 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 2 sends out output pulses from output 01 2 generates output pulses while the start input for the PWM2 instruction remains on PWM2 cannot be programmed to generate a predetermined number of output pulses PWM3 Pulse Width Modulation 3 A Wo S1 D1
520. ut statuses and parameter image PI can also be changed using WindLDR To open the Monitor AS Interface Slaves dialog box from the WindLDR menu bar select Online gt Monitor then select Online Monitor Slaves Slave Status 01 Outputs D00 001 Off Parameters Monitor AS Interface Slaves Master Module No 1 2 Slave A In Out 00 0000 0000 Parameter Image PI Switch Slave Dialog Box Button Description Switch Slaves Switches between Slave A screen and Slave B screen Monitor AS Interface Slaves Close Closes the window Help Displays explanations for functions on the screen Store Stores output statuses and parameters to the slave Slave Status Close Closes the window Change Slave Output Statuses and Parameters The output statuses and parameter image PI of the slaves connected to the AS Interface master module can be changed To open the Slave Status dialog box click the output of a required slave address in the Monitor AS Interface Slaves dialog box Then click the On or Off button to change the statuses of outputs DOO through DO3 and parameters PO 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 changed in the following cases Error
521. utomatic Automatic 4 Advanced AT Automatic Automatic By user Automatic Step Response Method The MicroSmart uses the step response method to execute auto tuning and determine PID parameters such as proportional Process Variable 51 0 Maximum Slope term S147 integral time S148 derivative time S149 and A control action S2 0 automatically The auto tuning is executed AT Set Point S1 21 in the following steps 1 Calculate the maximum slope of the process variable S140 before the process variable reaches the AT set point 51 21 Calculate the dead time based on the derived maximum slope Dead Time Based on the maximum slope and dead time calculate the four PID parameters 14 12 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC 14 PID INSTRUCTION 1 19 AT Sampling Period The AT sampling period determines the interval of sampling during auto tuning When using auto tuning with operation mode 51 3 set to 1 AT PID or 2 AT set a required value of 1 through 10000 to specify AT sampling period of 0 01 sec through 100 00 sec to the data register designated by 51 19 When 51 19 stores 0 the AT sampling period is set to 0 01 sec When 51 19 stores a value larger than 10000 the AT sampling period is set to 100 00 sec Set the AT sampling period to a long value to make sure that the current process variable is smaller than or equal to the previous process variable during direct cont
522. utputs QO Q2 O4 O6 and Q10 6 2 FC5A MicroSmart User s Manual FC9Y B1273 I DEC 6 BOOLEAN COMPUTATION INSTRUCTIONS Repeat Operation in the ANDW ORW and XORW Instructions Source devices S1 and S2 and destination device D1 can be designated to repeat individually or in combination When destination device D1 is not designated to repeat the final result is set to destination device D1 When repeat is desig nated consecutive devices as many as the repeat cycles starting with the designated device are used Since the repeat operation works similarly on the ANDW AND word ORW OR word and XORW exclusive OR word instructions the following examples are described using the ANDW instruction Repeat One Source Device Data Type Word When only S1 source is designated to repeat the final result is set to destination device D1 S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 SOTU ANDW W S1R 52 D1 REP 11 D10 D20 D30 3 D10 020 D30 D11 D20 LIE D30 D12 D20 gt D30 Data Type Double Word When only S1 source is designated to repeat the final result is set to destination device D1 D1 1 S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 SOTU ANDW D S1R 52 D1 REP 1 010 020 D30 3 D10 D1i1 D20 D21 D30 D31 012 013 20 021 _ 030 031 014 015 20 021 ce D30 D31 Repeat Destination Device Only Data Word When only D1 destination is designated to repeat the same result is se
523. ve data 24 39 24 40 send data 24 39 24 40 SOTU SOTD instructions using with program branching 11 2 source and destination devices 2 7 device 2 7 special data register for calendar clock data 9 6 for modem mode 22 3 for pulse outputs 13 5 13 19 special internal relay for calendar clock data 9 7 for interrupt status 11 7 for modem mode 22 2 specifications Modbus TCP master communication 23 2 slave communication 23 6 standard slaves 24 4 start and result internal relays 22 2 status code intelligent module access 16 6 data register modem mode 22 7 information 24 24 internal relays 24 24 internal relays 22 2 LEDs 24 16 24 17 relay 13 4 13 10 13 19 13 29 step response method 14 12 STOH 20 10 stop access read 16 4 write 16 5 STPA READ 16 4 STPA WRITE 16 5 structure of an advanced instruction 2 7 SUB 5 1 subroutine 11 4 subtraction 5 1 SUM 5 16 sum 5 16 SWAP 8 23 SwitchNet data I O port 24 39 slaves internal relays 24 41 INDEX 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 disable pulse counting 13 6 13 12 enable pulse counting 13 5 13 11 reversible control disabled 13 20 with dual pulse output 13 22 with single pulse output 13 21 zero return operation 13 30 topology 24 5 transition of AS Inte
524. vice S4 is compatible with the binary 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 1 0 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 module 51 24 Module Type Analog 1 0 Module FC4A LO3A1 FC4A LO3AP1 0 4095 FC4A J2A1 FC4A K1A1 FC4A K4A1 Note The FC4A J8AT1 analog input module for PTC and NTC FC4A J4CN1 thermistors can be used only in the range where the thermis FC4A J8C1 tor linearity is maintained 0750990 FC4A J8AT1 Note d FCAA K2C1 Data Type When using an analog I O module type of 0 50000 select the data type from Word W or Integer I When using an analog 1 O module type of 0 4095 the data type is fixed at Integer 1 The data type selection has an effect on the set point S4 the linear conversion maximum and minimum values S145 and 51 6 the high and low alarm values 51 14 and 51 15 the AT set point 1421 and the output manipulated value for analog output mode 51 24 14 2 FC5A MICROSMART UstR s MANUAL FC9Y B1273 I DEC Source Device S1 Control Register 14 PID INSTRUCTION Store appropriate values to data registers starting with the device designated by S1 before executing the
525. vice is determined by S1 or D1 without offset Examples IBMV sotu H S1 S2 Di D2 REP M10 D10 gt Q30 C5 10 M10 D10 C5 Source device S1 and destination device D1 determine the type of device Source device S2 and destination device D2 are the offset values to determine the source and destination devices If the value of data register D10 designated by source device S2 is 5 M27 M20 M17 M15 M10 the source data is determined by adding the offset to internal relay 10 designated by source device 51 MU WU XJ XJ NJ 5th from M10 If the current value of counter C5 designated by destination device D2 is 12 the destination is determined by adding the offset to output Q30 designated by destination device D1 V W W WV YV W W W Y wW W wW 12th from Q30 Q47 Q44 Q40 Q37 Q30 As result when input IO is on the ON OFF status of internal relay M15 is moved to output Q44 3 10 FC5A MICROSMART UsER s MANUAL FC9Y B1273 I DEC sotu H S1 S2 D1 D2 D10 5 D20 12 Since source device 1 is a data register and the value of source device S2 is 5 the source data is bit 5 of data register D10 designated by source device S1 Since destination device D1 is a data register and the value of source device D2 is 12 the destination is bit 12 of data register D20 designated by destination device D1
526. west digit as many as the quantity of digits designated by S2 converted into ASCII data and stored to the destination starting with the device designated by D1 The quantity of digits to convert can be 1 through 4 Applicable 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 Valid Devices Device Function I QM 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 For the valid device address range see pages 6 1 and 6 2 Basic Vol When T timer or C counter is used as S1 or S2 the timer counter current value TC or CC is read out The quantity of digits to convert can be 1 through 4 Make sure that the quantity of digits designated by S2 is within the valid range If the S2 data 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 Since the HTOA 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 W word X When a bit device such as input Q output M internal relay or R shift register is designated as the source 16 points word data type used integer
527. when any trouble occurs while operating the expansion RS232C RS485 communication module When a problem occurred check the points and take the actions described below If the problem cannot be solved call IDEC for assistance The PWR power LED does not go on Check Action Page Basic Vol Is power supplied to the CPU module Supply power to the CPU module 3 18 3 19 Supply the rated power voltage Basic Vol Is the power voltage correct All in one type 100 240 AC or 24V DC 3 18 3 19 Slim type 24V DC The expansion RS232C RS485 communication module cannot communicate with WindLDR Check Action Page eer Basic Vol Is the communication cable connected correctly Connect the communication cable correctly 2 89 25 2 Is the PWR LED on the CPU module on See The PWR power LED does not go on 25 13 Basic Vol Is the PWR LED on the FC5A SIF4 module flashing Supply the rated voltage to the CPU module 3 1 Are the communication settings for WindLDR and expan Set the same communication parameters for 25 4 sion communication port the same WindLDR and expansion communication port Upgrade the CPU module system program version to 110 or higher t the FC5A SIF2 or to 220 Is the CPU module system program version applicable to 5 ae or Basic Vol nan higher to use the FC5A SIFA the expansion RS232C RS485 communication module A 9 To download or upload a user program upgrade
528. wnten to the S byte area star 12 eZ l 7 2 ing at address 7 in intelligent module i Status code is stored in data register D102 CPU Module Intelligent Module 1 High Low Address 6 022 04h seen gt Address 7 03h gt Address 8 04h D23 O6h 5 Jmm gt Address9 05h Address 10 06 D24 07h jme gt Address 11 07h IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 16 7 16 INTELLIGENT MODULE ACCESS INSTRUCTIONS 16 8 FC5A MICROSMART UsER s MANUAL FC9Y B1273 DE 17 TRIGONOMETRIC FUNCTION INSTRUCTIONS Introduction Trigonometric function instructions are used for conversion between radian and degree values conversion from radian value to sine cosine and tangent and also calculation of arc sine arc cosine and arc tangent values RAD Degree to Radian 51 51 1 x 1 180 gt 01 01 1 rad RAD F S1 D1 f dokkoek When input is on the degree value designated by source device S1 is converted into a radian value and stored to the destination designated by device D1 Applicable 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 Valid Devices Device Function I QM R T C D Constant Repeat S1 Source 1 Degree value to convert into radian X X D1 Destination 1 Destination to store conversion results SS FX For the valid device
529. y destination device D1 D 10 20 D30 As a result when input IO is on the data in data registers 022 023 is moved to data registers 030 031 IDEC FC5A MICROSMART User s MANUAL FC9Y B1273 D20 D21 D22 D23 D24 6450 D25 20 V T D30 6450 TR C10 4 D20 D21 D22 D23 2 73 22 030 031 2 73 122 D50 2 D51 20 3 7 3 MOVE INSTRUCTIONS IMOVN Indirect Move Not 51 52 NOT gt 01 D2 IMOVN S1 R S2 D1 R D2 REP RRR RRR When input is the values contained devices designated by S1 and S2 are added to determine the source of data The Applicable CPU Modules 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 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 Valid Devices Device Function I QM 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 D1 Destination 1 Base address to move to X X X X X 1 99 D2 Destination 2 Offset for D1 X X X X X X X For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays MO t
530. y devices S143 and 51 4 The preset value be 1 through 100 000 000 05F5 E100h stored in two con secutive data registers designated by S143 high word and S144 low word When pulse counting is disabled for PWM1 PWM3 or when programming PWMO2 store to data registers designated by S143 and S144 61 5 Current Value High Word 1 6 Current Value Low Word While the PWM1 PWM3 instruction is executed the output pulse count is stored in two consecutive data registers designated by devices S145 high word and 51 6 low word The current value can be 1 through 100 000 000 05F5 E100h and is updated in every scan 5147 Error Status When the start input for the PWM instruction is turned on device values are checked When any error is found in the device values the data register designated by device 51 7 stores an error code Error Code Description 0 Normal 1 Output pulse frequency designation error 51 0 stores other than 0 through 2 2 Pulse width ratio designation error S1 1 stores other than 1 through 100 3 Pulse counting designation error S142 stores other than 0 and 1 4 Preset value designation error S143 and S144 store other than 1 through 100 000 000 5 Invalid pulse counting designation for PWM2 S142 stores 1 Destination Device D1 Status Relay Three internal relays starting with the device designated by D1 indicate the status of the PWM instruction These devices are for read only
Download Pdf Manuals
Related Search
Related Contents
CowBoss User Manual Myscouts.ca Report User's Guide – Membership Listing EN ATTENDANT... LES ARTISTES RÊVENT ! StarTech.com Ethernet to VGA over IP Converter BADU®Jet Samsung 900X3F-EG1 用户手册(Windows 7) The Situation - Carnegie Mellon University Personal Noise Exposure Model: TES-1354 Copyright © All rights reserved.
Failed to retrieve file