Home

MICRO3C Manual Book

image

Contents

1. E To RS232C Port 2 1188 d To RS232C Port m 9 11188 8 11158 R 88 RS232C Cable is SUPPLY 2 83 Fa d A a i HD9Z C52 D sub 9 pin o SUD 4 gt PIN 1 5m 4 92 ft long Female Male Connector Connector 24V DC or AC Adapter 9V DC 350 mA 1st Unit 2nd Unit Function selector switch O Function selector switch O Protocol selector switch 2 3 or 4 Protocol selector switch 2 3 or 4 FUN9 O FUN9 1 see esas essa ae aaa eses a e s s a 9a1 818 5000 I oono I A BSG A BSG BIISIN QIRIQ See RSS SISI hd hd 2 Shielded twisted pair cable 200m 656 ft maximum Nth Unit N lt 32 3rd Unit Function selector switch O Function selector switch O Protocol selector switch 2 3 or 4 Protocol selector switch 2 3 or 4 FUN9 N 1 FUN9 2 bbilibb y elelelelelelelelelele
2. ESSSSSSSEEEEEEER Modem Cable 1C ooooooood FC2A KMIC To RS232C Port Aaa 08 3m 9 84 ft long j Modem il 0000 o To Loader Port L BS D sub 25 pin ulejelejejejeleelajel jejeje J Male Connector Cable Connector Pinouts Description Frame Ground Transmit Data Receive Data Request to Send Signal Ground Data Carrier Detect Connecting RS232C Equipment through Loader Port Data Terminal Ready To connect equipment with an RS232C communication port to the loader port on the MICRO C use the user communica tion cable 1C FC2A KP1C One end of the user communication cable 1C is not provided with a connector and it can be terminated with a proper connector to plug in to communicate with the RS232C port When the protocol selector switch is set to 1 or 3 MICROSC can communicate with RS232C equipment through the loader port using the user protocol When the protocol selector switch is set to 0 2 or 4 MICRO C can communicate through the loader port using the loader protocol Cable Connector Pinouts Description Request to Send Data Terminal Ready eleleleleleleleleja
3. Base Station Expansion Station Function selector switch O Function selector switch 7 Protocol selector switch O or 1 Protocol selector switch O or 1 Ste ciekuenua The RUN indicator on the expan foes i ano i sion station remains off whether the base station is running or stopped Data Link System The data link system consists of one master station connected to a maximum of six slave stations to communicate control data for distributed control Every MICROSC or MICRO base unit can be used as a master or slave station When a slave sta tion performs communication at 19 200 bps through the loader port multi stage comparison instruction HSC1 cannot be used at the slave station Master Station Slave Station 1 Slave Station 2 Slave Station 6 Function selector switch O Function selector switch 1 Function selector switch 2 Function selector switch 6 Protocol selector switch O or 1 Protocol selector switch O or 1 Protocol selector switch O or 1 Protocol selector switch O or 1 el EE Berrea eobbkkkik
4. Sensor 9 o 5 Protocol Selector Switch Switch Ls o eS Set to 1 or 3 to select user protocol 10 11 4 for the loader port Bee elelelelejelel ejelelelelelejelelelajelelel Te Modem Modem a e ere h aa ae E r e Telephone Line eleleleleleBl EEEE EE 0 ninii 0 1 Q Communication Enable Button Q Q 9 Error Indicator Press to enable the new communication mode a after changing the protocol selector switch Remote Station Local Station Modem Cable 1C Mini DIN Connector Pinouts FC2A KM1C D sub 25 pin Connector Pinouts 3m 9 84 ft long Description Shield RTS Request to Send Black DTR Data Terminal Ready Yellow TXD Transmit Data Blue RXD Receive Data Green DSR Data Set Ready Brown SG Signal Ground Gray SG Signal Ground Red NC No Connection White Description Frame Ground Transmit Data Receive Data Request to Send Signal Ground Data Carrier Detect Data Terminal Ready IN O a A WIN E N o A Caution AN Cauti Do not connect the NC No Connection pin to any line otherwise the MICRO C may be damaged auton Modem cables for Apple Macintosh computers cannot be used for the MICROSC dec USER S MANUAL 10 1 10 SAMPLE PROGRAM MODEM COMMUNICATION MICRO C Allocation Numbers Remote Station Allocation Number Description Input from a switch to start modem communication manually to send the 11 status
5. When BI R is received receive completion M1 is turned on When MO is turned on output QO is turned on and output Q1 is turned off When M1 is turned on output QO is turned off and output 01 is turned on When receiving is complete and MO or M1 is turned on TXD is executed to send c a When transmission is complete transmit completion M2 is turned on then MO M1 and M2 are reset 6 D499 to enable the expansion control data register ser vice for D486 through D495 1 gt D495 to enable the modem mode 1 gt D492 to select user protocol for the loader port after telephone line is connected 0 gt D101 to select 103 in the initialization string for AIWA s modems MICRO C 11 TROUBLESHOOTING Introduction This chapter describes the procedures to determine the cause of trouble and actions to be taken when any trouble occurs while operating the MICRO C programmable controller For descriptions about error indicators ERR1 and ERR2 reading error data using FUN20 and general error codes see the MICRO User s Manual In addition to error information for the MICROS the MICRO C has two extra functions for detecting errors e Additional causes for type codes 5 and 6 in the user program syntax error e User communication error codes Error Causes and Actions 80h User Program Syntax Error Syntax This error indicates that the user program has a syntax error or that FUN through FUN10 is set inc
6. D10 000Ch lt r To Do a 2 Binary SpBCDOASCII conversion 30h 30h 30h 31h 32h 31h 32h Intermediate result of conversion Lowest 2 digits 2 Transmit Digits 1 D10 000Ch or o o ea 2 Binary gt BCD gt ASCII conversion 30h 30h 30h 31h 32h Intermediate result of conversion Lowest 1 digit Repeat Cycles When a data register is designated to repeat consecutive data registers as many as the repeat cycles are used for transmit data in the same conversion type and transmit digits Example Data register D10 is converted in Binary gt BCD gt ASCII and is designated with transmit digits 2 1 Repeat Cycles 2 STEER ES a FAR 31h 32h 33h 34h Repeat 1 D10 000Ch gt 00012 D11 0022n PA 00034 gt Binary BCD conversion BCD ASCII conversion 2 Repeat Cycles 3 P DE CBP e SES SG 31h 32h 33h 34h 35h 36h Repeat 1 D10 000Ch gt 00012 Repeat 2 D11 0022h gt 00034 D12 ooa J 00056 gt Binary gt BCD conversion BCD ASCII conversion BCC Block Check Character Block check characters can be appended to the transmit data The start position for t
7. Ww receive 5 8 completion output 5 8 5 15 Y data byte count 5 16 digits 5 9 format 5 8 5 9 status 5 8 5 16 code 5 16 repeat cycles 5 3 5 10 operation in comparison instruction 6 retry cycles 4 2 RS232C cable 7 1 7 4 equipment 1 6 RS232C RS485 converter 7 1 7 2 7 3 RTS control signal ON OFF timer 2 9 option 2 8 RXD 5 8 editing 5 18 2 sample program modem communication 10 1 modem originate mode 4 9 user communication TXD 8 1 user communication TXD amp RXD 9 1 selecting communication mode 1 3 serial interface specifications 7 3 setting communication parameters 4 8 skip 5 13 special internal relays 2 3 start and result internal relays 4 2 delimiter 5 11 syntax 11 1 USER S MANUAL MICR C telephone number 4 2 4 4 transmit 5 1 bytes 5 3 completion output 5 1 5 5 data 5 1 5 2 data byte count 5 5 digits 5 3 status 5 1 5 5 status code 5 5 troubleshooting 11 1 diagrams 11 3 TXD 5 1 editing 5 7 sample program 8 1 user communication cable 1C 1 6 8 1 data monitor 3 2 error 11 2 error code 5 5 11 2 instructions 5 1 mode specifications 1 8 status readout 3 1 user program syntax error 11 1 user protocol 1 2 weight Preface 2 year calendar 2 5
8. 14Fh gt 4Fh Only the last 1 or 2 digits are used as BCC Conversion Type The BCC calculation result can be converted or not according to the designated conversion type as described below Example BCC calculation result is 0041h 1 Binary S5ASCII conversion ep DP Binary gt ASCII conversion 34h 31h p ESEK SZ 2 digits 0041h 2 No conversion A ote No conversion A 2 digits BCC Digits Bytes The quantity of digits bytes of the BCC code can be selected from or 2 Example A ay sy pr ep ERN ary sy 2 BCC Digits 1 5 14 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Comparing BCC Codes MICRO3C compares the BCC calculation result with the BCC code in the received incoming data to check for any error in the incoming communication due to external noises or other causes If a disparity is found in the comparison an error code is stored in the data register designated as receive status in the RXD instruction For user communication error code see page 11 2 Example 1 BCC is calculated for the first byte through the sixth byte using the XOR format converted in binary ASCII and compared with the BCC code appended to the seventh and eighth bytes of the incoming data Incoming Data in inn tan om BCC Calculation Range BCC Calculation Result Comparison result is true to indicate 31h O 32h O 3
9. 31h 32h 33h es D100 SE D101 eh Ist Oo TERET character D100 n 2h The incoming data is divided converted and stored to data registers according to the receive format 2 When RXD instructions with start delimiters STX 02h and ENQ 05h are executed Incoming Data STX 1 o 3 02h 31h 32h 33h ENQ ar B SOn Sees gt 05h 41h 42h 43h A D100 h RXD Instruction 1 pior Gem When D100 is designated as the first data register 1 D100 n eh Compare D200 h RXD Instruction 2 p201 m When D200 is designated as the first data register D200 n _ h The incoming data is divided converted and stored to data registers according to the receive format Start delimiters are not stored to data registers der USER S MANUAL 5 11 5 USER COMMUNICATION INSTRUCTIONS MICRC C Designating Constant as End Delimiter An end delimiter can be programmed at other than the first byte in the receive format of an RXD instruction the MICRO C will recognize the end of valid communication although RXD instructions without an end delimiter can also be executed When a constant value is designated at other than the first byte of source operand S1 the one byte data serves as an end delimiter to end the processing of the received data The va
10. Input from a sensor to start modem communication every hour to send the I1 status Error output which goes on when retry countout initialization string or ATZ failure occurs Goes on at O minutes Goes on at O seconds Start transmission internal relay Start retry transmission internal relay Retry interval internal relay Transmit completion output for transmitting A to indicate input 11 on Transmit completion output for transmitting B to indicate input 11 off Receive completion output for receiving C to start disconnecting the telephone line Start initialization string internal relay for the originate mode Start disconnect line internal relay Disconnect line completion internal relay Initialization string failure internal relay ATZ failure internal relay Dialing failure internal relay Telephone line connection status internal relay ON Connected OFF Disconnected Initialize pulse special internal relay In operation output special internal relay Hour data destination of CLKR clock read instruction Minute data destination of CLKR clock read instruction Second data destination of CLKR clock read instruction Transmit status data register for TXD instruction to send A Transmit data byte count data register for TXD instruction to send A Transmit status data register for TXD instruction to send B Transmit data byte co
11. MICRO C uses this function to disconnect the telephone line WO Set bps rate adjust off The bps rate between the modem and the MICRO C or data terminal equipment is constant and independent of the telephone line bps rate Q3 When Ois set to D101 for AIWA s modems 103 is enabled so that CTS and RTS are used for bidirectional hard ware flow control When 1 is set to D101 for OMRON s modems 1Q2 is substituted to set unidirectional hardware flow control The XON XOFF flow control cannot be used for the MICRO C modem mode v1 Word result code 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 presence of a carrier VO MNP result codes disabled Result codes returned to those controlled by the ATV1 command are set Reliable link result codes are not used amp W Write active profile The current configuration profile is saved to a non volatile memory Command which requires a proper preset value SO Ring to answer ON 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 SO 0 disables the auto answer function Most modems have a default of SO 0 Commands which are optional X4 Enables dial tone and busy detection amp MS5 Enables error correction N2 Sets the MNP operating mode to the reliable mode buffered error detection V 42
12. MOV S1 REP 1 D492 xk MOV S1 REP 0 D101 xk MOV S1 21554 z REP D100 k Dl REP D160 jok MOV S1 13108 D1 REP D161 xk MOV S1 13622 D1 REP D162 xk MOV S1 D1 REP E 14136 D163 ek l MOV S1 D1 REP 3328 D164 ek END 10 SAMPLE PROGRAM MODEM COMMUNICATION When A or B is transmitted successfully RXD is executed to wait for incoming data C CR When receiving is complete receive completion M13 is turned on When C CR is received successfully M13 turns M263 on to disconnect the telephone line 6 D499 to enable the expansion control data register ser vice for D486 through D495 1 gt D495 to enable the modem mode 1 gt D492 to select user protocol for the loader port after telephone line is connected 0 gt D101 to select Q3 in the initialization string for AIWA s modems 0 gt D100 to select no retry in the modem mode In this example retry cycles are programmed using timer and counter See Note below D160 through D164 store touch tone modifier T telephone number 234 5678 and an end delimiter D160 21554 54 32h T2 D161 13108 33 34h 34 D162 13622 35 36h 56 D163 14136 37 38h 78 D164 3328 OD 00h CR 0 Note At the END processing in the first sean when the modem mode is enabled default values are set to data registers
13. aasa aaaea 6 1 C HAPTER 7 COMPUTER LINK Computer Link 1 N Communication n a aaaea aaa 7 1 Computer Link 1 N Communication Using Modems 000 0 eee eae 7 2 RS232C RS485 Converter FC2A MD1 2 l ls 7 3 RS232C Cable HD9Z C52 aiii ai a as OMe Eye dee ae A 7 4 AGAdapter he crate A A A a A la dida dd 7 4 der USER S MANUAL i TABLE OF CONTENTS MICRO C C HAPTER 8 ChaprER 9 C HAPTER 10 C HAPTER 11 APPENDIX Inoex SAMPLE PROGRAM USER COMMUNICATION TXD SYSTEM SETUP 4 wie ete a a A a a 8 1 Description of Operation o o oooooooroo eee 8 1 Programming Expansion Control Data Registers o o o oooooooooooooo 8 1 Setting Communication Parameters o o o ooccoocconocn ee 8 2 Ladder Diagram ias A A AA AA AA Se ag 8 2 SAMPLE PROGRAM USER COMMUNICATION TXD 8 RXD System SETUP ca A A A A es eee aide ae oe 9 1 Description of Operation o o oooooooroo ee eee 9 1 Setting Communication Parameters 0 00 eee 9 2 BASIC Program Display Example 20 0000 eee 9 2 BASIG Program spa ir as aoe ede a oe eae dha RS cd 9 3 Ladder Diagraii uz dacs Spats Reka Re a Aa ee pe rae RR 9 4 SAMPLE PROGRAM MODEM COMMUNICATION System SetuP A ed e ita Ei ad hy aes 10 1 Allocation Numbers Remote Station 2 00 ce es 10 2 Allocation Numbers Local Station 0 0 00 cee ees 10 3 Description of Operation 2 0 0 00 cee 10 3 Ladder Diagram Remote Stati
14. another RXD instruction with or with out a start delimiter is executed The receive completion output of the RXD instruc tion at a smaller address goes on Reserved Reserved The first byte of received data does not match the specified start delimiter No effect on the receive completion output If incoming data with a matching start delimiter is received subsequently the receive completion output goes on When ASCll binary or ASCIl gt BCD gt binary con version is specified in the receive format any code other than O to 9 and A to F is received These codes are regarded as O during conver sion The receive completion output goes on BCC calculated from the RXD instruction does not match the BCC appended to the received data The receive completion output goes on The end delimiter code specified in the RXD instruction does not match the received end delimiter code The receive completion output goes on Receive timeout between characters After receiving one byte of data the next byte is not received in the period specified for the receive timeout value in FUN8 The receive completion output goes on Overrun error Before the receive processing is completed the next data is received The receive completion output goes on Framing error Detection error of start bit or stop bit No effect on the completion output Parity check error Error is found in the par
15. z 0 142 gt gt gt H 3 6mm 110 mm 4 331 3 6mm 5mm 0 142 0 142 0 197 AC Adapter Jack mr D sub 25 pin Connector Note When mounting the RS232C RS485 converter on a panel surface remove the rubber feet then attach A 34 mm 1 339 24 4 mm the supplied mounting brackets on the bottom of the e b 0 961 converter using screws Y 7 mm 0 276 RS232C Cable HD9Z C52 Connector for RS232C RS485 Converter Connector for Computer Description 1 5m 4 92 ft long GND Frame Ground TXD Transmit Data RXD Receive Data RTS Request to Send Ar a os olearto Send s DSR Data Set Reay 6 009 Data Carrier Deea 8 C oR Data Terminal Ready 20 D sub 25 pin male connector D sub 9 pin female connector AC Adapter 9 5 a Polarity The RS232C RS485 converter is powered by a 24V DC source S 92 1 or an AC adapter with 9V DC 350mA output capacity A Y ner ma ota cp Ie eeo The output plug of the AC adapter is shown on the right Dimensions in mm 7 4 USER S MANUAL idec MICR C 8 SAMPLE PROGRAM USER COMMUNICATION TXD Introduction This example demonstrates a program to send data to a printer using the user communication TXD transmit instruction Serial printers used for this example are Seiko Electronic s DPU 201GS and Citizen s iDP3110 printers System Setup Protocol Sel
16. S1 Source 1 Receive format OOh FFh D1 Destination 1 Receive completion output D2 Destination 2 Receive status Receive format designated by operand S1 can be a maximum of 200 bytes When data receive is complete an output or internal relay designated by operand D1 is turned on Destination 2 occupies two consecutive data registers starting with the operand designated by D2 The receive status data register designated by D2 stores the status of data receive and error code The next data register stores the byte count of received data The same data registers cannot be used as transmit status data registers for TXD instructions and receive sta tus data registers for RXD instructions If the same data register numbers are programmed as status data registers for TXD and RXD instructions syntax error 80 will result Precautions for Programming RXD Instruction 1 MICROC can execute a maximum of 5 RXD instructions that have a start delimiter at the same time If a start delimiter is not programmed in RXD instructions MICRO C can execute only one receive instruction at a time If the start input for an RXD instruction is turned on while another RXD instruction without a start delimiter is executed a user commu nication error occurs 2 Since RXD instructions are executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required 3 In the
17. See the result code stored in data registers D104 through D119 BECOME econ error Check the modem power modem cable and the remote modem Two or more start IRs are on Correct the program so that only one start IR goes on at a time Modem mode enabled Correct the program so that only the disconnect command is issued while the line is connected Start IR program error Reserved Reserved Retrying AT command AT command program error Correct the program to include ODh in the AT command D492 Protocol selection in modem mode When the modem mode is enabled see above the protocol at the loader port is switched from the user protocol depend ing on the value in D492 after the telephone line is connected D492 1 User protocol is continued at the loader port D492 0 Loader protocol is enabled at the loader port dec USER S MANUAL 2 5 2 ALLOCATION NUMBERS MICR C Group 2 D491 Control signal status When group 2 is enabled as expansion control data registers D491 stores a value to show that RTS DSR and DTR are on or off The data of D491 is updated at every END processing D491 Value Description All RTS DSR and DTR are off RTS is on DSR is on RTS and DSR are on DTR is on RTS and DTR are on DSR and DTR are on All RTS DSR and DTR are on 0 1 2 3 4 5 6 7 D490 DSR control signal option When group 2 is enabled as expa
18. When repeat cycle is 1 BPS these keys may be omitted 2 BRD Lo 1 STX 02 ees ra 2D 10 B4 2 a A A _10p 3 pal Repeat cycles de Transmit digits Conversion type selected using the REP key A Binary gt ASCII conversion B Binary gt BCD gt ASCI conversion No conversion Data register as transmit data source Data position Nth byte Constant D10 Dil BCC Constant 5 6 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Enter a BCC code of 2 digits calculated using the ADD format binary CASCII conversion calculation is started at the first byte of the transmit data p Pae 2 1 a REP her BRD gt BPS E SS AA When BCC calculation starts at the first byte these keys may be omitted 1 STX 02 2D10 B4 2 10 BCC AA2 1 AAA 12 fan Calculation start position Quantity of digits Conversion type selected using the REP key A Binary gt ASCII conversion No conversion Calculation format selected using the REP key X XOR exclusive OR A ADD addition Enter hexadecimal constant value 03 for ETX at the end of transmit data OUT 2D10 B4 2 LL 10 BCC AA2 1 12 ETX 03 LARES e E Constant 3 BPP Designate internal relay M10 as an operand for transmit completion output ev o 1 o vo 1 S1 Da
19. after the preceding TXD instruction is completed 3 Since TXD instructions are executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required 4 In the high speed processing mode user communication instructions TXD and RXD cannot be used dec USER S MANUAL 5 1 5 USER COMMUNICATION INSTRUCTIONS MICRO C Transmit Data Transmit data is designated by source operand S1 using constant values or data registers BCC code can also be calculated automatically and appended to the transmit data One TXD instruction can transmit 200 bytes of data at the maximum S1 Source 1 Transmit Digits Calculation Calculation Transmit Data Operand Conversion Type Bytes Start Position Constant OOh FFh 7Fh No conversion A Binary gt ASCIl Data Register DO D498 B Binary gt BCD ASCII No conversion A Binary gt ASCII BCC No conversion Designating Constant as S1 When a constant value is designated as source operand S1 one byte data is transmitted without conversion The valid transmit data value depends on the data bits selected in FUN8 loader port communication mode setting When 8 data bits are selected 00h through FFh is transmitted When 7 data bits are selected as default OOh through 7Fh is transmitted Con stant values are entered in hexadecimal notation into the source data Designating Data Register as S1 When a data register is desig
20. command PRINT 1 TXD1S Transmit monitor command RXDS INPUTS 10 1 Receive reply message PRINT D50 value MIDS RXDS 2 4 Display D50 value PRINT D51 value MIDS RXD 6 5 Display D51 value GOTO 1360 Transmit receive write command WDATS Clear write data buffer INPUT Enter D50 value WDATS Enter new value for D50 TXD2 W WDATS Define write command 1 WDATS Clear write data buffer INPUT Enter D51 value WDATS Enter new value for D51 TXD2S TXD2S WDATS CRS Define write command 2 PRINT 1 TXD2S Transmit write command RXDS INPUTS 4 1 Receive reply message PRINT MIDS RXD 2 3 Display receive data GOTO 1360 To Select Transmit Command 1 Continue or guit program INPUT Type C to continue or Q to quit BS PRINT IF BS C THEN GOTO 1130 IF BS Q THEN CLOSE 1 END BEEP GOTO 1360 USER S MANUAL 9 3 9 SAMPLE PROGRAM USER COMMUNICATION TXD amp RXD MICRO C Ladder Diagram When the MICRO C is started M301 is turned on to execute a MOV instruction and 0 is set to data register D499 to disable the expansion control data register service When expansion control data registers are not required programming to set 0 to D499 is recommended to make sure that the modem communication mode is not enabled unexpectedly MOV SIl D1 REP M301 is the initialize pulse special internal relay M301 A 0 gt D499 to disable expa
21. de E USER S MANUAL PREFACE 1 MICR C MICRO C USER S MANUAL This user s manual primarily describes MICRO C s additional functions not included in the MICRO programmable control lers For installation instructions general specifications and common functions shared with the MICRO such as basic and advanced instructions allocation numbers and FUN settings see the MICRO user s manual MICRO C and MICRO Comparison MICRO3C Advanced nstructions E RXD CMP2 added ANR1 deleted 38 Standard Processing 500 points 100 points High speed Processing 32 points 32 points 1 point 10 1 0 type 2 points 16 24 I O types Loader Port Standards ElA RS232C ElA RS485 Standards EIA RS485 ElA RS485 Communication Data Link Expansion data link communication Specifications Terminal Baid Bate 19 200 bps fixed Expansion data link communication Loader protocol communication 19 200 bps fixed 9 600 bps fixed Data Registers Analog Potentiometers 1 point 290g 10 I O type 380g 16 1 0 type 350g 16 I O type 430g 24 I O type 390g 16 I O AC input type 400g 24 I O type EN55011 Group 1 Class A EN61131 1 EN61131 2 EN60204 1 EN50082 2 1EC801 2 3 4 UL508 CSA C22 2 No 142 PrEN50082 2 EN55011 EN61131 1 EN61131 2 EN60204 1 UL508 CSA C22 2 No 142 TUV Product Service E9 95 09 13332 313 UL E102542 CSA LR66809 Weight approx Standards TUV Product Service B9509
22. disable expansion control data registers D484 through D498 and cannot be used as an ordinary data register to store data For details see page 2 4 USER S MANUAL 2 1 2 ALLOCATION NUMBERS 1 0 Allocation Numbers for Expansion Link System MICR C Input and output allocation numbers do not continue from the base station to the expansion station At the expansion sta tion inputs start at 120 and outputs start at Q20 Inputs and outputs are allocated depending on the MICRO C base units used in the expansion link system as shown below 1 0 Points Total IN OUT MICRO C Base Station 1 0 Allocation Numbers 16 1 0 Type 10 17 110 QO 06 MICRO C Expansion Station 1 0 Allocation Numbers 24 1 0 Type 10 17 110 115 QO Q7 010 Q11 16 1 0 Type 16 1 0 Type 10 17 110 QO 06 120 127 130 Q20 Q26 16 1 0 Type 24 1 0 Type 10 17 110 QO 06 120 127 130 135 Q20 Q27 Q30 Q31 24 1 0 Type 16 1 0 Type 10 17 110 115 QO Q7 010 011 120 127 130 020 026 2 2 24 1 0 Type 24 1 0 Type 10 17 110 115 USER S MANUAL QO Q7 Q10 Q11 120 127 130 135 Q20 Q27 Q30 Q31 MICRO C 2 ALLOCATION NUMBERS Special Internal Relays Internal relays M290 through M317 are special internal relays with the following functions Allocation Number Description CPU Stopped Pow
23. enter any value to these data registers while the modem mode is enabled 4 8 USER S MANUAL MICRO C 4 MODEM MODE Operating Procedure 1 After completing the user program including FUNS settings transfer the user program to the MICRO C from the pro gram loader or a computer running CUBIQ through the loader port or the data link terminals To transfer the user pro gram the loader port or the data link terminals must be set to loader protocol using the protocol selector switch For example when transferring the user program from the program loader through the data link terminals set the protocol selector switch to 2 3 or 4 2 After transferring the user program set the protocol selector switch to 1 or 3 to select user protocol for the loader port Press the communication enable button for 4 seconds until the ERR indicator blinks once if necessary 3 Start the MICRO C to run the user program 4 Turn start internal relay M260 or M265 on to initialize the modem When originating the modem communication turn M260 on 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 M261 on to start with the ATZ command followed by the dial command When answering an incoming call turn M265 on send the initialization string and the ATZ command If the initializa tion string has been stored in the non volatile memory of the modem tur
24. issued subsequently Default Initialization String ATEOQOV1X4 Q3 amp D2 amp C1 VO WO A0 amp MS N2S0 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 initialization string see page 4 3 When the initialization string has been sent successfully internal relay M275 is turned on If the initialization string fails internal relay M285 is turned on When the subsequent ATZ command is also completed successfully M276 will also be turned on ATZ Resetting the Modem The default initialization string specifies to be stored in the non volatile memory of the modem using the W command The initialization string is restored when the modem is powered up or the ATZ command is issued MICRO C sends the ATZ command to the modem following the initialization string when M265 is turned on The ATZ command can also be issued separately by turning M266 on ATZ Command ATZ CR LF When the ATZ command has been completed successfully internal relay M276 is turned on If the ATZ command fails internal relay M286 is turned on If the initialization string has been stored in the non volatile memory of the modem M265 may be skipped Start with M266 to send the ATZ command Modem Mode Status Data Register When the modem mode is enabled data register D493 stores a modem mode status D493 Value Description Remarks AT
25. loader FUN 22 V V Pass Word 4 For details see the MICRO User s Manual 11 TROUBLESHOOTING Troubleshooting Diagram 10 Expansion link or data link is impossible MICR C Is the protocol selector switch set to 0 or 1 Set the protocol selector switch to O or 1 to select data link protocol for the data link terminals Did you press the NO communication enable button for 4 sec Did you power down and up after changing the protocol selector Press the communication enable button for more than 4 sec until the ERR indicator blinks once switch on at the base station expansion link or master station data link Turn M306 off using the program loader MON M306 RST J Is the FUN20 PLC error data readout and reset FUN27 Link formatting sequence M306 Link communication prohibit flag special internal relay M307 Link communication initialize flag special internal relay base or master station communication cable correctly Make sure of correct wiring See Expansion Link Function or Data Link Function in the MICRO User s Manual Check error codes at the base station expansion link or at all stations data link FUN 20 V Is the error code 0 at all stations Reset the error codes at the base station expansion link or at all statio
26. see the user s manual for the printer Communication Parameters Baud rate 9600 bps Baud Rate FUN 8 COM FORM Note noe Data bits 8 9600bps 0D i es Se Data Bits 8bit NON stopl lt Stop Bit pie GI 500ms Note 1 In the user communication mode com i t munication is based on the end delimiter code Mode Selection Input Parity Receive Timeout specified in the TXD or RXD instruction Note 3 Check Note 2 Note 2 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 Note 3 When the protocol selector switch is set to 1 or 3 to select user protocol for the loader port the mode selection input is not used and need not be specified to enable the FUNS values Ladder Diagram The CLKR clock read instruction is used to read the hour minute and second data to three data registers The second data is compared with 0 using the CMP compare equal to instruction Each time the condition is met the TXD instruc tion is executed to send the C2 and D30 data to the printer A counting circuit for counter C2 is omitted from this sample program M301 is the initialize pulse special internal relay 3 D490 to enable the DSR option for busy control 4 gt D499 to enable expansion control data register service for D486 through D491 M317 is the in operation output special internal r
27. telephone line the following settings are needed 1 Program to move 6 7 14 or 15 to data register D499 to enable expansion control register service for D486 through D495 2 Program to move to data register D495 to enable the modem mode 3 Program the destination telephone number if dialing is required Enter the ASCII values of the telephone number to data registers starting with D160 Store two characters each in one data register Enter ODh at the end of the telephone num ber See page 4 4 4 Program to move 0 or 1 to data register D101 depending on your modem When you use AIWA s modem enter 0 to use the default initialization string When you use OMRON s modem enter 1 to substitute Q2 for Q3 in the default initial ization string 5 If the default initialization string does not match your modem program a proper initialization string and enter the ASCII values to data registers starting with D135 Make sure that internal relay M260 initialization string start IR is turned on after the new values have been stored to the data registers See page 4 3 6 If you want to change the default value of 3 retry cycles program to move a required value to data register D100 7 Include internal relays M260 through M287 in the user program to control the modem communication as required N Caution AN Cauti Since the modem mode uses control data registers D488 through D490 to control the RTS DTR auson and DSR signals do not
28. the amount of time to turn on and off the RTS signal before and after transmitting data The RTS control signal ON OFF timer can be used only in the user protocol to communicate through the loader port D486 0 through 249 Increments 10 msec Any value over 249 is regarded as 249 The maximum timer error is 20 msec 2 scan time Example D488 0 RTS control signal option and D486 5 ON RTS signal l OFF Transmit data Transmit data_ Transmit data 50 msec 50 msec o lt gt MICRO C transmits data 50 msec after RTS is turned off and RTS is turned on 50 msec after data transmission is completed Since a sufficient amount of time is allowed for the remote terminal after MICRO C has issued RTS this option is useful when the remote terminal has a slow communication receiving speed e Operating Status and Control Signals Communication Mode MICRO C Stopped MICRO C Running DTR and RTS are on except Control signal statuses depend on D488 DTR is off when D489 O through D490 options RTS is off when D488 2 User Protocol Initial settings are Modem Mode DTR and RTS are on as standard D488 2 D489 0 D490 0 Control signal options have no effect Communication is executed with D488 O D489 0 D490 0 Loader Protocol When DSR control is used with D490 set to 1 through 4 transmit condition must be satisfied within 5 seconds after the DSR signal has turned to allow t
29. the remote station Transmit completion output for transmitting C to start disconnecting the telephone line Start initialization string internal relay for the answer mode Telephone line connection status internal relay ON Connected OFF Disconnected Initialize pulse special internal relay In operation output special internal relay Receive status data register for RXD instruction to receive A Receive data byte count data register for RXD instruction to receive A Receive status data register for RXD instruction to receive B Receive data byte count data register for RXD instruction to receive B Transmit status data register for TXD instruction to send C Transmit data byte count data register for TXD instruction to send C Modify initialization string data register O specifies Q3 for AIWA s modems On line mode protocol 1 specifies user protocol after telephone line is connected Modem mode selection 1 enables the modem mode Expansion control data register service selection 6 enables D486 through D495 1 sec delay timer before transmitting the initialization string 5 sec delay timer before executing the RXD instructions after telephone line connection Description of Operation Remote Station When the MICRO C is powered up the MOV instructions are executed by initialize pulse M301 to store values to data reg isters which enable the modem mode The telephone number is al
30. transmit data from MICRO C Transmit data Transmit data DTR si oe signal op l ider USER S MANUAL 2 7 2 ALLOCATION NUMBERS MICR C D489 2 While MICRO C is transmitting data DTR remains off While MICRO C is not transmitting data DTR is turned on The DTR operation at this option is contrary to the operation at D489 1 Transmit data Transmit data DTR si l e CE TO signal pp D489 3 DTR remains off D489 4 While MICRO C can receive data DTR is turned on Use this option when flow control of receive data is required D489 5 DTR is turned on or off according to DSR When DSR is on DTR is turned on When DSR is off DTR remains off Use this option for returning control signal and acknowledgment when data flow control with the remote terminal is required ON DSR signal l OFF DTR si l S signal op l D489 6 or more Same as D489 0 D488 RTS control signal option When group 2 is enabled as expansion control data registers D488 is used to control the RTS Request to Send signal to indicate the MICROSC transmitting receiving status or operating status The RTS control signal option can be used only in the user protocol to communicate through the loader port D488 0 system default While MICRO C is transmitting data RTS remains off While MICRO C is not transmitting data RTS is turned on Use this option when a remote terminal operates in the half duplex mode since RTS goe
31. used for the modem mode D100 stores the default retry cycles of 3 and D135 through D159 store the default initialization string These values can be changed in a subsequent scan In this sample program SOTD single output down is used to replace the D100 default value with 0 USER S MANUAL 10 5 MICR C 10 SAMPLE PROGRAM MODEM COMMUNICATION Ladder Diagram Local Station In operation M317 10 1 sec Start Initialization String TO M265 Line Connected M287 50 pase IsoTUH RXD si DI D2 SOTU M287 T2 2 MO DO RXD Data A CR 41h ODh RXD S1 D1 D2 2 M1 D2 RXD Data B CR 42h ODh Receive A Complete SET MO 00 RST Ql Receive B Complete RST M1 Q0 SET Ql SOTU TXD S1 D1 D2 MO 2 M2 D4 TXD Data c cr M1 43h ODh Transmit C Complete Receive A Complete Initialize Pulse MOV Sl D1 REP M301 6 D499 Lx MOV S1 D1 10 6 USER S MANUAL When MICRO C is started M317 is turned on to start timer TO for 1 sec time delay to enable the modem mode before sending the initialization string When timer TO times out M265 is turned on to send the initialization string to the modem When the telephone line is connected M287 is turned on and timer T2 starts to time down before user communica tion is started When timer T2 times out 5 sec RXD is executed to wait for incoming communication When A CR is received receive completion MO is turned on
32. 13332 Certification File No UL E102542 CSA LR66809 Program Loader for MICRO Cc To use the expanded capabilities of the MICROSC such as new advanced instructions for communication and comparison and increased data registers use an upgraded program loader of version 2 00 or later To check the program loader version read FUN31 program loader version readout hardware check using the FUN31 and keys on the program loader To edit user programs for MICRO C read FUN11 program capacity and PLC type selection on the program loader and set the fourth line in the FUN11 screen to 1 to select MICRO C as the PLC type using the FUN11 V V V 1 and Y keys Since the loader port on the MICRO C uses RS232C communication while the loader port on the MICRO uses RS485 a dif ferent loader cable is needed to connect the program loader to MICROSC or MICRO Use loader cable 3C FC2A KL3C to connect a program loader to the MICRO C loader port A program loader can also be connected to the data link terminals on the MICRO C using loader cable 4C FC2A KL4C In either case loader protocol must be selected for the loader port or data link terminals using the protocol selector switch For selection of the protocol selector switch see page 1 2 Note The upgraded program loader of version 2 00 or later can also be connected to the MICRO using MICRO loader cable FC2A KL1 or FC2A KL2 IMPORTANT INFORMATION Under no circumstances shall IDE
33. 22 5631h 56h V 31h 1 D123 OD00h ODh R All characters subsequent to R are ignored When the AT general command has been completed successfully internal relay M274 is turned on If the AT general com mand fails internal relay M284 is turned on a RY LFJOK CR LF returned from the modem is The AT general command is determined successful when result code received dec USER S MANUAL 4 5 4 MODEM MODE MICRO C 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 M265 or M266 If two or more start internal relays are turned on simultaneously an error will result and error code 33h is stored in modem mode status data register D493 see below When a start internal relay is turned on a corresponding sequence of commands is executed once as described below M265 Send initialization string and send the ATZ command M266 Send the ATZ command Initialization String When the modem mode is enabled as described on page 4 1 and the MICRO C is started to run the default initialization string is stored to data registers D135 through D154 at the END processing of the first scan To send the initialization string from the data registers to the modem turn M265 on then the ATZ command is
34. 33 for D50 and press the Enter key followed by the new value 5555 for D51 and the Enter key Type R to D50 value D51 value Type C to Type R to Enter D50 Enter D51 OK Type C to read from or W to write to D50 amp D51 R 1234 5678 continue or Q to quit C read from or W to write to D50 amp D51 W value 3333 value 5555 continue or Q to quit _ To quite the program type Q and press the Enter key Type C to Ok 9 2 continue or Q to quit Q USER S MANUAL MICRO C 9 SAMPLE PROGRAM USER COMMUNICATION TXD amp RXD BASIC Program 1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 110 120 130 140 150 160 170 180 190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 1300 1310 1320 1330 1340 1350 1360 1370 1380 1390 1400 PRPRPRPP RPP PA SAVE MONWRITE BAS A Monitor Data Registers D50 amp D51 Write to Data Registers D50 amp D51 Mpa aa SS A Soa ee Sere eie SSeS CLS Ne See SESS See ee aS Se ee ae ee aS Open Communication Line OPEN COM1 9600 E 7 1 AS 1 Even parity 7 data bits 1 stop bit Loi a a A eee eS Set Transmit Data CRS CHRS 13 End delimiter code CR TXD1 R CR Monitor command Va Select Transmit Command INPUT Type R to read from or W to write to D50 D51 AS IF AS R THEN GOTO 1190 IF AS W THEN GOTO 1240 BEEP GOTO 1140 Transmit receive monitor
35. 3h O 34h O 35h 9 36h 07h that data is received correctly Binary gt ASCII Conversion lt gt 30h 37h Example 2 BCC is calculated for the first byte through the sixth byte using the ADD format converted in binary ASCII and compared with the BCC code appended to the seventh and eighth bytes of the incoming data Incoming Data eto em cin om on en omom BCC Calculation Range Comparison result is false BCC Calculation Result 31h 32h 33h 34h 35h 36h 135h ns status data register Binary ASCII Conversion uam aan 33h 35h Receive Completion Output Designate an output QO through Q31 or internal relay MO through M287 as an operand for the receive completion out put When the start input for an RXD instruction is turned on preparation for receiving data is initiated followed by data con version and storage When a sequence of all data receive operation is complete the designated output or internal relay is turned on dec USER S MANUAL 5 15 5 USER COMMUNICATION INSTRUCTIONS MICRC C Receive Status Designate a data register DO through D497 as an operand to store the receive status information including a receive status code and a user communication error code When the data register designated for the receive status is monitored in hexadecimal notation on the program loader the second lowest digit indicates a receive status code and the lowest digit indicates a
36. 64 start IR for AT general command to send the AT command to the modem 2 Send the AT command from the terminal mode of communication software on a computer to the modem Determine the type of the telephone line Consult your local telephone company whether your telephone line is for touch tone phones or pulse dial phones Deter mine the dial command according to the type of the telephone line ATDT Touch tone phones ATDP Pulse dial phones Test the modem operation After the initialization string has been sent to the modem use the AT S and AT R commands on a computer to check the modem configuration and parameters Setting Communication Parameters Set the FUN8 loader port communication parameters to match those of the modem and DTE connected on the communi cation line Since the total of modem communication parameters is 10 bits set the FUN8 value to a total of 10 bits Example FUN8 Default Data bits 7 Stop bit Parity Even Start bit 1 Total 10 bits When the loader protocol is used for communication the communication parameters shown above are recommended Set the baud rate of the MICRO C to a value between 2400 bps and 9600 bps using FUNS When the program transfer function is used with the loader protocol set the communications rate between modems to the same value as the baud rate of the MICROSC or a higher speed Programming Data Registers and Internal Relays To enable the modem mode and communicate through the
37. 9 D492 and D493 have special functions in the modem mode See page 4 2 Data Register Number DO to D31 Standard Processing Mode Data Link Data Link Other than Data Link Master Station Slave Station Available D32 to D59 Available Available D60 to D84 For data link D85 to D89 MICR C High speed Processing Mode Available For data link D90 to D99 Can be designated as control data registers using FUN10 Note D100 to D483 Available D484 to D485 When expansion control data register service is enabled for each group of these D486 to D491 data registers using D499 the selected data registers work as expansion con D492 to D495 trol data registers others can be used as ordinary data registers When expansion control data register service is disabled using D499 these D496 to D498 data registers can be used as ordinary data registers D499 Reserved to enable or disable expansion control data register service Not available Note When FUN 10 is set to enable control data registers selected data registers D90 through D99 work as control data registers others can be used as ordinary data registers For details of the data link function see the MICRO User s Manual Expansion Control Data Registers Data registers D484 through D499 are allocated as expansion control data registers D499 is used to enable or disable expans
38. 9600 19200 bps Data Bits 7 or 8 bits Parity Odd Even None Stop Bits 1 or 2 bits 10 to 2550 msec 10 msec increments or none Receive timeout is disabled when 2550 msec is selected Communication Method Start stop synchronization system half duplex Maximum Transmit Data 200 bytes Maximum Receive Data 200 bytes Receive Timeout 1 8 USER S MANUAL MICRO C 1 GENERAL INFORMATION Data Link Terminal Communication Specifications Standards EIA RS485 termination resistor is not required Recommended Cable 0 9 mm shielded twisted cable Conductor Resistance 85 Q km maximum Shield Resistance 12 Q km maximum Maximum Cable Length 200m 656 ft Isolation Between data link terminals of multiple MICRO C units Not isolated Expansion or data link communication 19200 bps fixed Loader protocol communication 9600 bps fixed Expansion link Master station normal scan time approx 9 to 10 msec Communication Delay Data link Master station normal scan time approx 12 5 to 13 msec Slave station scan time Connection to Program Loader Using optional loader cable 4C FC2A KL4C Baud Rate Data Link Terminal Communication with Program Loader When the protocol selector switch is set to 2 3 or 4 to select loader protocol for the data link terminals the MICRO C can communicate through the data link terminals with the program loader or computer to monitor the MICRO
39. BCC Conversion Type The BCC calculation result can be converted or not according to the designated conversion type as described below Example BCC calculation result is 0041h 1 Binary gt ASCIU conversion a Tp Binary gt ASCII conversion 34h 31h O a 2 digits 0041h 2 No conversion A 0041h No conversion w SEN 2 digits BCC Digits Bytes The quantity of digits bytes of the BCC code can be selected from 1 or 2 Example atx 4 he 4 he ies ary sy 2 BCC Digits 1 5 4 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Transmit Completion Output Designate an output QO through Q31 or an internal relay MO through M287 as an operand for the transmit completion output When the start input for a TXD instruction is turned on preparation for transmission is initiated followed by data trans mission When a sequence of all transmission operation is complete the designated output or internal relay is turned on Transmit Status Designate a data register DO through D497 as an operand to store the transmit status information including a transmission status code and a user communication error code When the data register designated for the transmit status is monitored in hexadecimal notation on the program loader the second lowest digit indicates a transmission status code and the lowest digit indicates a user c
40. BCC are included in the received data the byte counts for these codes are also included in the receive data byte count Example Data register D200 is designated as an operand for receive status D200 lt x Receive status D201 e Receive data byte count 5 16 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Key Operation for Programming RXD Instruction on Program Loader The following example demonstrates how to program an RXD instruction including a start delimiter skip BCC and end delimiter using the program loader Converted data is stored to data registers D20 and D21 Internal relay M20 is used as destination D1 for the receive completion output Data register D200 is used as destination D2 for the receive status and data register D201 is used to store the receive data byte count Receive data example BCC calculation range Start Skip Stored to D20 Stored to D21 BCC End Delimiter Delimiter Start to program an RXD instruction B ADV REP 1 S1 Data lt RXD Source 1 receive format BRD Destination 1 receive completion output Destination 2 receive status Enter hexadecimal constant value 02 for STX as a start delimiter in the receive format gt our E 1 STX 02 18 BRD 2 gt E A constant entered at the first 3 e byte specifies the start delimiter 4 Designa
41. C 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 appli cation 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 pro grams prior to installation is the responsibility of the end user PREFACE 2 USER S MANUAL MICRO C TABLE OF CONTENTS C HAPTER 1 GENERAL INFORMATION PO ALUICS catar A daa Manan as 1 1 Parts Descriptio a ias A eee a aa E s 1 1 SYSTEM SEUL it A A A A a 1 3 Communication Specifications o o o ooooooonnooaa a 1 8 DIMENSIONS a a eh Gee Se eae Pao A A ee Se aie es 1 10 C HAPTER 2 ALLOCATION NUMBERS Allocation NUMDerS vii ranana ao she eR ee a ate ee ea E E eae ees 2 1 1 0 Allocation Numbers for Expansion Link System 0000 0c ee eae 2 2 Special Internal RelayS 00 oremi ona harada eee 2 3 Data Register Allocation Numbers 0000 eee 2 4 Expansion Control Data Registers 0 00 ee 2 4 Carrer 3
42. C operation transfer user programs and perform other communications The communication parameters using the loader protocol for the data link terminals are fixed to the same values as the FUN8 loader port communication mode setting default shown below and cannot be selected unlike the communication through the loader port Data Link Terminal Communication Parameters Loader Protocol Baud Rate 9600 bps Terminator Code OD CR Data Bits 7 bits Parity Even Stop Bit 1 bit Receive Timeout 500 msec When the protocol selector switch is set to 2 or 4 the MICROSC can perform loader communication through both the loader port and data link terminals at the same time If data write operation write N bytes or write 1 bit is attempted to the same operand through both the loader port and data link terminals at the same time the command through the data link termi nals has priority although communication error does not occur at both ports Some of the program transfer operation cannot be performed as described below 1 While a user program is written through either the loader port or data link terminals a user program cannot be written through the other port The prior write user program operation is executed normally but the subsequent write user program operation results in a protect error 2 While a user program is written through either the loader port or data link terminals a user program cannot be read through the othe
43. C2A MD1 directly use RS232C cable HD9Z C52 24V DC or AC Adapter 9V DC 350 mA 1st Unit 2nd Unit Function selector switch O Function selector switch O Protocol selector switch 2 3 or 4 Protocol selector switch 2 3 or 4 FUN9 O FUN9 1 aljejejelalelalelalelalelelelel D bleee T Suie l MICROSC Seni l MICRO A BSG A BSG Sle elelelefeleielel B alelelelelelslelelel ee 4 t Shielded twisted pair cable 200m 656 ft maximum MICRO can also be connected to Nth Unit N lt 32 the computer link 1 N communica Funerion Selector switch 0 tion using RS232C RS485 con verter FC2A MD1 for modems elle Computer Link Interface Unit Me ROSES FC2A LC1 ooooooono For connecting the MICRO to the panonna 69 5H x 55W x 35 5D mm oooo network use the computer link 2 736 H x 2 165 W x 1 398 D interface unit and computer link interface cable Computer Link I
44. COMMUNICATION MONITOR System SETUP ki aise aa ha dash dt rd a fi 3 1 FUN29 User Communication Status Readout o oo oocococoooooomoooo 3 1 FUN5O User Communication Data Monitor 0 0 0 ooo momo 3 2 C HAPTER 4 MODEM MoDE SYSTEMS UL a A e aa le ace Se a a e ee ez 4 1 Applicable Modems 0 00 ce eee 4 1 Internal Relays for Modem Mode 2 0 00 ce ee eee 4 2 Data Registers for Modem Mode 0 0 eee 4 2 Originate Mode como wes oie ge apy ee ease gaa pis a ee al ale le paw week 4 3 Disconnect Mode cies isc ew Gower see en ed a Gee eee eae bel 4 5 AT General Command Mode 0 0 ce eet 4 5 Answer Mode ico da o e 2 Ab MOR A ae eile Saab hal ase catia span a ence a ees a ad E 4 6 Initialization String Commands 0000 ee 4 7 Preparation before Using Modem oo ocoocococon eee 4 8 Setting Communication Parameters o o o ooocooocoooon ee 4 8 Programming Data Registers and Internal Relays o o ooooooooooo 4 8 Operating Procedure asse ccam aia set ed ea ee 4 9 Sample Program for Modem Originate Mode 00 0 eee eee eee 4 9 Checking Modem Operation o o oo oooocooce eee 4 10 C HAPTER 5 USER COMMUNICATION INSTRUCTIONS B1 TXD ClransSmiit 0 0 hw dt he ae eh oe Sachi ba bee Blobs a eee 5 1 B2 RXD RecelVve zess ratur gga koro Dale bles aaa aaa nee oe a 5 8 C HAPTER 6 COMPARISON INSTRUCTION B3 CMP2 Double word Comparison n
45. EBEEEBEBELTLEEBEL 1 GENERAL INFORMATION To RS232C Port 5 D sub 9 pin Female Connector Description Data Carrier Detect Receive Data Transmit Data Data Terminal Ready Signal Ground Data Set Ready Clear to Send O 0 N 0 oR W N e To RS232C Port INNE D sub 9 pin Female Connector Description Receive Data Transmit Data Signal Ground Computer Link Cable 6C FC2A KC6C 2m 6 56 ft long l RS232C RS485 Converter A B ESE UUU RS485 NE AC Adapter Output 5V DC Connect an AC adapter to the RS232C RS485 converter in the middle of the computer link cable 6C The computer link cable 6C is not supplied with an AC adapter which must be prepared by the user For applicable output plug of the AC adapter see page 1 4 Request to Send Clear to Send Note AC adapters for IDEC s FA series PLCs cannot be used USER S MANUAL 1 2 3 4 5 6 7 8 9 1 5 1 GENERAL INFORMATION Connecting Modem through Loader Port MICR C To connect a modem to the loader port on the MICROSC use the modem cable 1C FC2A KMIC Set the protocol selector switch to 1 or 3 to select user protocol for the loader port
46. KE1 RS232C RS485 Converter Used for interface between an IBM PC and the MICRO C base units in the computer link 1 N communication system or through modems FC2A MD1 RS232C Cable 4 wire 1 5m 4 92 ft long Used to connect the RS232C RS485 converter to an IBM PC with D sub 9 pin female connector to connect to computer HD9Z C52 DIN Rail 1m 3 28 ft long 35 mm wide DIN rail to mount the MICRO C base unit BAA1000 Mounting Clip Used on DIN rail to fasten the MICROSC base unit BNL6 CUBIQ Programming and monitoring software used on a PC 3 5 diskette USER S MANUAL FC9Y LP1E314 A 1 APPENDIX MICRO C ASCII Character Code Table 0 Decimal 1 Decimal 2 Decimal 3 Decimal 4 Decimal 5 Decimal 6 Decimal 7 Decimal 8 Decimal 9 Decimal A Decimal B Decimal c Decimal D Decimal E Decimal F Decimal A 2 USER S MANUAL MICR C INDEX 1 1 communication 1 5 1 N communication 7 1 AC adapter 1 4 1 5 7 4 advanced instruction CMP2 6 1 RXD 5 8 TXD 5 1 allocation numbers 2 1 analog potentiometer 1 1 answer mode 4 2 4 6 AT command result code 4 2 general command mode 4 2 4 5 E ATH 4 5 ATZ 4 2 4 3 4 6 BASIC program 9 3 display exa
47. MICRO C This is required when exporting equipment containing MICRO C to Europe e Use an IEC127 approved fuse on the output circuit This is required when exporting equipment containing MICRO C to Europe e Use an EU approved circuit breaker This is required when exporting equipment containing MICRO C to Europe e Make sure of safety before starting and stopping the MICRO C or when operating the MICRO C to force outputs on or off Incorrect operation on the MICRO C may cause machine damage or accidents e If relays in the MICROSC output circuit fail outputs may remain on or off For output signals which may cause heavy acci dents provide a monitor circuit outside of the MICRO C e Do not connect to the ground directly from the MICROSC Connect a protective ground to the equipment containing MICROSC using an M4 or larger screw This is required when exporting equipment containing MICRO C to Europe e Do not disassemble repair or modify the MICROSC e When the battery in the MICRO C is dead dispose of the battery in accordance with pertaining regulations When taking back the dead battery to the store or disposing of the dead battery use a proper container installed for that purpose This is required when exporting equipment containing MICROSC to Europe e When disposing of the MICRO C do so as an industrial waste e When the battery in the memory card is dead dispose of the battery in accordance with pertaining regulations y
48. MUNICATION MONITOR Introduction This chapter describes FUN29 user communication status readout and FUN50 user communication data monitor The FUN29 and FUN30 communication monitor functions can be used when the protocol selector switch is set to 3 to select user protocol for the loader port and loader protocol for the data link terminals While the MICRO C is communicating through the loader port using the user protocol the communication status or com munication data can be monitored on a program loader or computer connected to the data link terminals The communica tion monitor functions are useful for debugging user communication programs System Setup Protocol Selector Switch elejelalelalalelelelelelelele Set to 3 to select user protocol for the loader port RS232C Equipment and loader protocol for the data link terminals moden printer computer one lo 0000 To Loader Port To RS232C Port A BSG EBEEEEEBEELLTEHE To Data Link Terminals RS485 Loader Cable 4C FC2A KLAC Computer Link Cable 6C 2m 6 56 ft long FC2A KC6C m 2m 6 56 ft long Power Supply Box i ae S AC Adapter Output 5V DC y ECO init ae a For communication monitor functions using a computer see the CUBIQ User s Manua
49. Type 146 mm 5 748 Minimum center to center 29 mm 1 142 1 10 USER S MANUAL dec MICR C 2 ALLOCATION NUMBERS Introduction This chapter describes allocation numbers available only for the MICRO C For details about allocation numbers shared with the MICROS see the MICRO User s Manual Expanded functions in the MICROSC include MICROSC has 500 data registers DO through D499 while MICRO has 100 data registers DO through D99 D499 is used to enable or disable expansion control data registers D484 through D498 and cannot be used as an ordinary data register to store data Special internal relay M307 has different functions when used as a base or expansion station in the expansion link system or when used as a master station or slave station in the data link system Allocation Numbers Available I O numbers depend on the type and combination of the MICROSC base units used in the expansion link system For details of available I O numbers in the expansion link system see the next page Processing Mode Allocation Number Maximum Points Standard and High speed 10 17 110 115 Standard only 120 127 130 135 14 points Base 14 points Expansion Standard and High speed QO Q7 Q10 Q11 Standard only Q20 Q27 Q30 Q31 10 points Base 10 points Expansion Internal Relay Standard and High speed MO M7 M30 M37 M10 M17 M40 M47 M20 M27 S
50. V V REP 4 Make sure of correct wiring Turn the input to the TXD instruction on See Troubleshooting Diagram 1 The POW power indicator does not go on in the MICRO User s Manual See Communication Monitor FUN29 on page 3 1 and FUNSO on page 3 2 in this user s manual USER S MANUAL 11 TROUBLESHOOTING MICRO C Troubleshooting Diagram 16 2 Data is not transmitted correctly in the user communication mode Are communication parameters set correctly using FUN8 Set the communication parameters to match those of the remote terminal using FUN8 Is the data register designated as transmit status used repeatedly Correct the program to replace the repeated data register with a different data register Are more than 5 inputs to TXD instructions on simultaneously YES Correct the program to make sure that more than 5 inputs to TXD instructions do not go on simultaneously Is duration of the busy signal at the remote terminal within 5 sec Make sure that the busy signal at the remote terminal does not exceed 5 sec Did you make sure of source 1 operand of the TXD instruction NO Make sure that the transmit data designated as source operand is correct Call IDEC for assistance When the user communication still has a pro
51. XD instruction matches data that of the incoming data YES f Is the receive NO Make sure that the receive time timeout value set correctly out value is larger than character using FUN8 intervals of the incoming data YES Did you make NO Make sure that the receive data sure of source 1 operand of the designated as the source 1 oper RXD instruction and is correct YES Call IDEC for assistance 11 10 USER S MANUAL MICR C APPENDIX Type List MICROC CPU Base Units Expansion I O and Program Loader AC Power Power Voltage 100 240V AC 50 60Hz MICRO3C CPU Base Total 1 0 Points Inputs Outputs Clock and Calendar 16 points Relay Output 9 in 7 out 24V DC Input 240V AC 2A FC2A C16A1C Sink Source 24 points 14 in 10 out 30V DC 2A FC2A C24A1C Unit Expansion 1 0 DC Power Power Voltage 24V DC 16 points Relay Output 9 in 7 out 24V DC Input FC2A C16A4C 240V AC 2A Sink Source 30V DC 2A 24 points 14 in 10 out FC2A C24A4C Program Loader loader cable not included FC2A HL1E Note To use the expanded capabilities of the MICROSC such as new advanced instructions for communication and compar ison and increased data registers use an upgraded program loader of version 2 00 or later To check the program loader version read FUN31 program loader vers
52. at the same time to perform communications shown below multi stage comparison instruction HSC1 cannot be used Data link terminals Used for loader protocol communication Loader port Used for loader protocol communication at 19 200 bps 1 4 USER S MANUAL MICR C Computer Link through Loader Port To set up a 1 1 computer link system connect an IBM PC or compatible to the MICROSC using the computer link cable 4C FC2A KC4C Set the protocol selector switch to 0 2 or 4 to select loader protocol for the loader port Computer Link through Data Link Terminals A 1 1 computer link system can also be set up through the data link terminals on the MICROSC using the computer link cable 6C FC2A KC6C Set the protocol selector switch to 2 3 or 4 to select loader protocol for the data link terminals oo0o000000 OoOoooooo coco gies SEBEBBEE Connect the three spade ter minals on the computer link cable 6C to data link termi nals A B and SG as indi cated on the maker tubes rebekbebbebbeble T l Computer Link Cable 4C soonenned e FC2A KC4C Ooooooo 8 3m 9 84 ft long 3 Sill To Loader Port RS232C EB
53. ation data transmitted through the loader port while user communication or modem communication is performed with the protocol selector switch set to 3 Loader Cable 4C FC2A KL4C 2m 6 56 ft long The loader cable 4C has a power supply box in the middle Connecting the Cable The program loader has a cover on the top to select the loader cable connection port or AC adapter jack Slide the cover to the right to open the loader cable connection port Connect the connector of the loader cable to the loader cable con nection port on the program loader and the three spade terminals on the other end of the cable to the data link terminals on the MICRO C as indicated on the marker tubes Connecting an AC Adapter Connect an AC adapter to the power supply box in the middle of the loader cable 4C to supply power to the program loader Applicable output plug of the AC adapter is shown on the right RS485 ae AC Adapter Output 5V DC The loader cable 4C is not supplied with an AC adapter which must be prepared by the user Note AC adapters for IDEC s FA series PLCs cannot be used Slide the cover to the right Loader Cable Connection Port N e Polarit ee 92 1 d FHS oe Dimensions in mm AN caution N Caution When a program loader or computer running CUBIQ is connected to the data link terminals and a communication device is connected to the loader port
54. ble in ASCII Binary ASCII gt BCD gt Binary and no conversion When repeat is designated received data is divided converted and stored in data registers as many as the repeat cycles starting with the designated data register Repeat cycles can be up to 99 Receive Digits The received data is divided into a block of specified receive digits before conversion as described below Example Received data of 6 bytes are divided in different receive digits Repeat is also designated 1 Receive Digits 2 ep om lt 3 Toa sz Tes 31h 32h 33h 34h 35hb G6h 2 digits 2 digits 2 digits 1st block 2nd block 3rd block 2 Receive Digits 3 alo lt 3 ar lt 5 Te 31h 32h 33h 34h 35h 36h 3 digits 3 digits 1st block 2nd block d BE USER S MANUAL 5 9 5 USER COMMUNICATION INSTRUCTIONS MICRO C Conversion Type The data block of the specified receive digits is then converted according to the designated conversion type as described below Example Received data has been divided into a 2 digit block 1 ASCII Binary conversion p gt gt pi 12h 31h 32h ASCII Binary conversion 0012h 2 ASCII BCD Binary conversion Y lt p SS gt 00012 000Ch 31h 32h ASCII BCD conversion 00012 BCD gt Binary conversion 000Ch 3 No conversion yp 2 sagan 31h 32h No conversi
55. blem after completing the above procedure also perform the procedure of Diagram 16 1 described on the preceding page 11 8 USER S MANUAL MICR C Troubleshooting Diagram 16 3 Data is not received at all in the user communication mode Is the protocol selector switch set to 1 or 3 Did you press the NO 11 TROUBLESHOOTING Set the protocol selector switch to 1 or 3 to select user protocol for the loader port communication enable button for 4 sec YES Did you power down and up after changing the protocol selector switch NO YES Is the standard processing mode selected NO YES communication cable NO connected correctly YES Is the input to the NO RXD instruction on YES Is the POW power NO indicator on YES Did you check the receive data using the communication monitor NO YES Call IDEC for assistance Press the communication enable button for more than 4 sec until the ERR1 indicator blinks once Select the standard processing mode FUN 5 V V REP 4 Make sure of correct wiring Turn the input to the RXD instruction on See Troubleshooting Diagram 1 The POW power indicator does not go on in the MICRO User s Manual See Communication Monitor FUN29 on page 3 1 and FUNSO on pa
56. bps 0D ete E Data Bits 7bit EVEN stopl lt Stop Bit a I___ 500ms Note 1 In the user communication mode com t munication is based on the end delimiter code Mode Selection Input Parity Receive Timeout specified in the TXD or RXD instruction Note 3 Check Note 2 Note 2 The receive timeout value is used for the RXD instruction in the user communication mode When the interval between characters in the receive data exceeds 500 msec receive timeout occurs and the RXD instruction is aborted Note 3 When the protocol selector switch is set to 1 or 3 to select user protocol for the loader port the mode selection input is not used and need not be specified to enable the FUN8 values BASIC Program Display Example The following example shows a screen display when data registers D50 and D51 store values 1234 and 5678 before moni toring and when the data changes to 3333 and 5555 respectively When the BASIC program shown on the next page is loaded and run the screen shows the following message Type R to read from or W to write to D50 D51 _ If you type R and press the Enter key to read the data from data registers D50 and D51 the read data are displayed Type R to D50 value D51 value Type C to read from or W to write to D50 amp D51 R 1234 5678 continue or Q to quit _ Type C and press the Enter key to continue Then type W and press the Enter key to write data Enter the new value 33
57. button is depressed Communication Protocols for Loader Port and Data Link Terminals Protocol Selector Switch Position Loader Port Protocol Data Link Terminal Protocol Remarks Loader protocol Data link protocol User protocol Data link protocol Loader protocol Loader protocol User protocol Loader protocol Loader protocol Loader protocol For maintenance Note 1 5 through 7 Reserved Reserved Note 2 Loader protocol The protocol used for communication between MICRO C and program loader or CUBIQ on computer User protocol The protocol used for user communication instructions RS232C Data link protocol The protocol used for communication in the expansion link or data link RS485 Note 1 When the protocol selector switch is set to 4 the communication parameters for the loader port are arbitrarily set to the default values of FUN8 loader port communication mode setting baud rate 9 600 bps terminator code OD 7 data bits even parity 1 stop bit and receive timeout 500 msec Any change in FUNS values does not take effect The communi cation parameters for the data link terminals using the loader protocol are fixed and the same as the FUNS default values Note 2 When the protocol selector switch is set to 5 through 7 the ERR1 indicator on the MICROSC blinks and the MICROSC does not start to run Communication Enable Button While the MICROSC is powered up pressing the communication enable button for more
58. can also be used Error correction function is used to improve the communication reliability AO Set MNP maximum block size to 64 bytes Modems are generally configured so that the incoming data from DTE is compressed to a small amount as much as possible before the modem sends out the data to the telephone line this is in consideration of higher data transmis sion efficiency and reduced cost Consequently modems require processing time after receiving data but before sending out the data to the telephone line In most applications of the MICRO C it is desirable that the modem sends out data immediately after the modem has received the data In addition the amount of incoming and outgoing data for each communication is considered to be small so the effect of data compression is small Note After setting the initialization string in the primary test phase of modem application it is recommended that you use the AT S display on line status and AT R display configuration registers commands on a computer to confirm the modem configuration and parameters dec USER S MANUAL 4 7 4 MODEM MODE MICRO C Preparation before Using Modem Before using a modem read the user s manual for your modem Determine commands for the initialization string To check if a particular AT command can be used for your modem use the following method 1 Store the ASCII values of the command to data registers starting with D120 and turn on internal relay M2
59. col selector switch to 1 or 3 enter 6 to data register D499 and enter 1 to data register D495 Modem mode status data register D493 holds a value 32h AT command execution error Use the communication monitor function on the program loader or a computer running CUBIQ Connect the program loader to the data link terminals and set the protocol selector switch to 3 as shown on page 3 1 Use FUN50 user communication data monitor Start the MICRO C to run and issue an AT command Check to see if the AT command and result code are displayed on the program loader The AT command is displayed but the result code is not displayed on the program loader Check the modem s TXD and RXD signal lines are connected correctly Modem mode status D493 holds a value 33h Check if two or more start internal relays are on simultaneously If so correct the user program to make sure that only one start internal relay is on at a time 4 An AT command is issued successfully and a result code is received but the following problem occurs Problem Solution 1 Solution 2 Problem Solution 4 10 When a dial command is issued NO DIALTONE is returned and stored in the AT command result code data registers starting with D104 Check that the modular cable is plugged into the LINE jack on the modem If the modular cable is plugged into the TEL jack on the modem plug the cable to the LINE jack When dialing an outside number in a PBX env
60. command completed normally AT command start IR is completed normally Issuing AT command See the result code stored in data registers D104 through D119 Check the modem power modem cable and the remote modem Two or more start IRs are on Correct the program so that only one start IR goes on at atime Modem mode enabled AT command execution error Correct the program so that only the disconnect command is issued while the line is connected Start IR program error Reserved Reserved Retrying AT command AT command program error Correct the program to include ODh in the AT command 4 6 USER S MANUAL MICRO C 4 MODEM MODE Initialization String Commands The default initialization string includes the commands shown below The commands are described in three categories of importance For details of modem commands see the user s manual for your modem When modifying the initialization string include the commands in the first category to make sure of correct modem communication Commands which must be included in the initialization string Commands in this category are essential to use the modem mode Some modems have the same function by a different command name Modify the initialization string to match your modem E0 Characters NOT echoed Q0 Result codes displayed amp D2 Hang up and disable auto answer on DTR detection When the DTR signal turns off the telephone line is disconnected
61. data registers MICROSC has 500 data registers DO through D499 expanded from 100 data registers in the MICROS All expanded data registers except D499 can be used to program instructions In the high speed processing mode available data registers are limited to 32 DO through D31 as with the MICROS Double word Comparison of Data Registers Double word comparison instruction is added to compare data in data registers Two consecutive data registers designated by a source operand are compared with two consecutive data registers designated by another source operand When used with a repeat designation one double word comparison instruction can execute a maximum of 31 double word compari son operations With a repeat designation the results of all double word comparisons can not only be available individu ally but also be ANDed so the comparison results can be easily determined even when comparing a large quantity of data Parts Description Function Selector Switch Selects the station function in the expansion or data link system Analog Potentiometer i Sets the analog value for the analog timer frequency or pulse width glalele of pulse outputs MICRO C has only one potentiometer while 16 and 24 I O type MICRO base units have two potentiometers 6 Protocol Selector Switch 0 Selects the communication protocol for the loader port loader proto A a 2 col or user protocol and the data
62. differ depend ing on printers confirm the operation before connecting the cable Descript ion of Operation The data of counter C2 and data register D30 are printed every minute A printout example is shown on the right Programming Expansion Control Data Registers Expansion control data register D490 is used to monitor the BUSY signal and to con trol the transmission of print data Expansion Control DR Description Enables expansion control data registers D486 through D491 for control signals While DSR is on not busy MICROSC sends data While DSR is off busy MICRO C stops data transmission If the off duration exceeds a limit approx 5 sec a transmission busy timeout error will occur and the transmit status data register stores 22h See pages 5 5 and 11 2 Printout Example Do not connect any wiring to the NC No Connection pins otherwise the MICRO C and the printer may not work correctly and may be damaged PRINT TEST 11H 00M CNT2 0050 D030 3854 PRINT TEST 11H 01M CNT2 0110 MICRO C monitors the DSR signal to prevent the receive buffer of the printer from overflowing For the DSR signal see USER S MANUAL 8 1 8 SAMPLE PROGRAM USER COMMUNICATION TXD MICRO C Setting Communication Parameters Set the FUNS loader port communication parameters to match those of the printer For details of the communication parameters of the printer
63. e a e rocce wT Y MICRO3C PLC User s Manual SAFETY PRECAUTIONS MICRO C e Read this user s manual to make sure of correct operation before starting installation wiring operation maintenance and inspection of the MICRO C e All MICRO C s are manufactured under IDEC s rigorous quality control system but users must add a backup or failsafe provision to the control system using the MICRO C in applications where heavy damage or personal injury may be caused in case the MICROSC should fail e In this user s manual safety precautions are categorized in order of importance to Warning and Caution W Warning notices are used to emphasize that improper operation may cause arning severe personal injury or death Caution notices are used where inattention might cause personal injury or damage to equipment Caution e Turn power off to the MICROSC before starting installation removal wiring maintenance and inspection on the MICRO C Failure to turn power off may cause electrical shocks or fire hazard e Special expertise is required to install wire program and operate the MICRO C People without such expertise must not use the MICRO C e Emergency and interlocking circuits must be configured outside the MICRO C If such a circuit is configured inside the MICROSC failure of the MICRO C may cause disorder of the control system damage or accidents e Install the MICRO C according to instructions described in thi
64. e input to the 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 CMP2 SI S2 D1 REP Input I0 off 10 D10 D20 Q0 de Comparison D10 D11 D20 D21 Result D10 D11 D20 D21 ON OFF Comparison Output QO This program turns the output off when the input is off Input IO br CMP2 SI D10 S2 D20 D1 REP MO kk Comparison D10 D11 D20 D21 Result D10 D11 D20 D21 Output QO ae dec USER S MANUAL 6 1 6 COMPARISON INSTRUCTION MICRO C Repeat Operation in the Double word Comparison Instruction Unlike other advanced instructions when S1 and or S2 source is designated to repeat and D1 destination is not desig nated to repeat the comparison results are ANDed and set to one destination When only S1 source is designated to repeat double word operands as many as the repeat cycles starting with the oper and designated by S1 are compared with the double word operand designated by S2 The comparison results are ANDed and set to the operand designated by D1 H CMP SIR 32 DI REP S1 Repeat 3 S2 Repeat 0 D1 Repeat 0 TI D20 D30 M50 3 D20 D21 gt D30 D31 D22 D23 gt D30 D31 AND M50 D24 D25 e D30 D31 When only S2 source is designated to repeat the double word operand designated by S1 is compared with double word operands as
65. ected whether D492 is set to 0 or 1 When using a TXD or RXD instruction in the user communication mode while the telephone line is connected insert internal relay M287 line connection as an input condition for the TXD or RXD instruction After the telephone line is connected make sure of an approximately 5 second interval before executing the TXD or RXD instruction until the tele phone line connection stabilizes Note When the MICRO C is stopped while the telephone line is connected the loader port protocol changes to the loader protocol even if D492 is set to 1 user protocol in the on line mode then the telephone line remains connected When the MICRO C is started again the MICRO C restores the on line mode 4 4 USER S MANUAL MICRO C 4 MODEM MODE Disconnect Mode The disconnect mode includes only one command to disconnect the telephone line To disconnect the telephone line turn internal relay M263 on The telephone line is disconnected by turning the DTR signal off 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 33h is stored in modem mode status data register D493 see page 4 6 When the disconnect command has been completed successfully internal relay M273 is turned on If the disconnect com mand fails internal relay M283 is turn
66. ector Switch Set to 1 or 3 to select user protocol for the loader port eleleleelekekleekiebe ooo ooo ooog Oooooa ooog FC2A KP1C 2 4m 7 87 ft long User Communication Cable 1C Printer E ElIl To Loader Port RS232C eJelejejelelelelele el Mini DIN Connector Pinouts Shield Description Cable Connection for Seiko Electronics DPU 201GS Attach a connector to the open end of the user communication cable 1C referring to the cable connector pinouts shown below D sub 9 pin Connector Pinouts NC Description No Connection NC No Connection NC No Connection NC No Connection DATA Receive Data Transmit Data NC No Connection NC No Connection GND Ground Data Set Ready NC No Connection SG Signal Ground NC No Connection SG Signal Ground IN o1 A WO ND PE Busy signal NC No Connection wu NC No Connection The name of BUSY terminal differs depending on printers such as DTR The function of this terminal is to send a signal to remote equipment whether the printer is ready to print data or not Since the operation of this signal may
67. ed by the MICRO C When the internal clock reaches 0 minutes and O seconds at every hour the MICRO C at the remote station dials the telephone number and sends the status of input I1 to the MICRO C at the local sta tion using the user communication TXD instruction The MICRO C at the local station turns output QO or Q1 on depending on the incoming communication whether input I1 is on or off at the remote station Modem communication can also be started by turning input IO on at the remote station to send the input I1 status at any time System Setup To connect a modem to the loader port on the MICRO C at both the local and remote stations use the modem cable 1C FC2A KMIC To enable the modem mode make the three settings described below 1 Set the protocol selector switch to 1 or 3 to select user protocol for the loader port See page 1 2 After changing the protocol selector switch setting while the MICRO C is powered up press the communication enable button to enable the new communication mode 2 Enter 6 7 14 or 15 to data register D499 to enable expansion control register service for D486 through D495 See page 2 5 3 Enter 1 to data register D495 to enable the modem mode See page 2 5
68. ed on The disconnect command is determined successful when the DCD signal is turned off After the telephone line is disconnected the loader port restores the state as before the telephone line is connected whether D492 is set to 0 or 1 so that the loader port can be controlled by turning on a start internal relay M260 through M266 Note The disconnect mode does not use the escape sequence and the ATH command AT General Command Mode When the modem mode is enabled data registers D120 through D134 are allocated to the AT general command string Before turning on start internal relay M264 for the AT general command mode store an AT command string in data regis ters starting with D120 One data register stores two characters the first character at the upper byte and the second charac ter at the lower byte in the data register Use the MOV move instructions to set the ASCII values of the AT command string and execute the MOV instructions before turning M264 on Example of AT Command ATEOQOV 1 CR LF AT and IF are appended at the beginning and end of the AT general command string automatically by the system program and need not be stored in data registers To program the AT command string of the example above store ASCII values of the command characters and R to data registers starting with D120 D120 4530h 45h E 30h 0 D121 5130h 51h Q 30h 0 D1
69. elay on CLKR sets hour minute and second data to D20 through CMP Sl S2 D1 REP D22 D22 0 MO eK g CMP compares the D22 second data with 0 MOV S1 D1 REP C2 D31 wok Counter C2 data is moved to D31 TXD S1 D1 D2 When the D22 data equals to 0 second TXD is executed to MO 73 MI DO send 73 byte data through the loader port to the printer SP SP SP SP P R I N T SP T 20h 20h 20h 2Dh 2Dh 2Dh 20h 50h 52h 49h 4Eh 54h 20h 54h E S T SP CR LF CR LF SP SP SP 45h 53h 54h 20h 2Dh 2Dh 2Dh ODh OAh ODh OAh 20h 20h 20h D20 Conversion BCD ASCII Digits 2 REP 01 H SP 48h 20h D20 hour data is converted into binary BCD ASCI and 2 digits are sent D21 minute data is converted into binary gt BCD gt ASCIT D21 Conversion BCD gt ASCII Digits 2 REP 01 42 digi M CR LF CR LF an igits are sent 4Dh ODh OAh ODh OAh SP SP SP C N T 2 d 20h 20h 20h 43h 4Eh 54h 32h 2Eh 2Eh 2Eh D31 Conversion BCD gt ASCII Digits 4 REP 01 D31 counter C2 data is converted into binary gt BCD gt CR LF SP SP SP D 0 3 0 ASCIL and 4 digits are sent ODh OAh 20h 20h 20h 44h 30h 33h 30h 2Eh 2Eh 2Eh D30 Conversion BCD gt ASCII Digits 4 REP 01 D30 data is converted into binary gt BCD gt ASCII and 4 CR LF CR LF digits are sent ODh OAh ODh OAh 8 2 USER S MANUAL MICRO C 9 SAMPLE PROGRAM USER COMMUNICATION TXD amp RXD Introduction This example demonstrates a program of the user commun
70. er OFF Input IO Operating Cleared Input 11 Operating Cleared Input 12 Operating Cleared Catch Input Status Set Input 13 Operating Cleared See Note below Input 14 Operating Cleared Input 15 Operating Cleared Input 16 Operating Cleared Input 17 Operating Cleared Start Control Maintained Maintained Initialize Pulse See Note below Cleared Cleared All Outputs OFF Cleared Cleared Carry Cy or Borrow Bw Cleared Cleared User Program Execution Error Cleared Cleared Link Communication Error Expansion mode and data link mode Maintained Cleared Link Communication Prohibit Flag Expansion mode and data link mode Maintained Maintained Link Communication lnitialize Flag Master Station Expansion mode and data link mode Link Communication Stop Flag Slave Station Data link mode 1 sec Clock Reset Cleared Cleared 1 sec Clock Operating Cleared 100 msec Clock Operating Cleared 10 msec Clock Operating Cleared Timer Counter Preset Value Changed Maintained Maintained High speed Counter Soft Reset Maintained Cleared High speed Counter HSC3 Overflow Cleared Cleared In operation Output Cleared Cleared Note M290 through M297 and M301 are used only for reading in the user program but can be directly set or reset using the program loader or optional software CUBIQ on a computer M307 Link Communicati
71. erand for receive completion output 6D20 A4 2 14 BCC AA2 1 16 ETX 03 A constant entered at other than 17 the first byte specifies the end El delimiter 2 BRD sor M elv ey 1 S1 Data RXD To edit the source 1 data move D1 the cursor to the colon and D2 M 20 D 0 press the p key Designate data register D200 as an operand for r eceive status E oR 2 D BRD Lo JLo 1 S1 Data TXD D200 Receive status DI M 20 D201 Receive data byte count D2 gt D200 Complete the programming of the RXD instruction 0 LOD 1 RXD 11 gt END 12 END I 1 Editing the RXD Instruction Pressing the d key writes the RXD instruction into the program loader memory To discard the edited data before pressing the Y key press the CLR key To edit an existing RXD instruction move the cursor to the left of the RXD and press the key then the RXD editor screen appears To edit the source 1 data press the key again with the cursor at the left of the Data and follow the same procedure described above 5 18 USER S MANUAL MICRO C 6 COMPARISON INSTRUCTION Introduction This chapter describes the programming of the CMP2 double word comparison instruction This instruction is useful to compare data received using the user communication The CMP2 instruction compares data in data registe
72. f Receiving Data D100 n eh The incoming data is divided converted and stored to data registers according to the receive format The end delimiter and BCC code are not stored into data registers After receiving the end delimiter MICRO C receives only the one byte BCC code 5 12 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Skip When skip is designated in the receive format a specified quantity of digits in the incoming data are skipped and not stored to data registers A maximum of 99 digits bytes of characters can be skipped continuously Example When an RXD instruction with skip for 2 digits starting at the third byte is executed Incoming Data D102 h D103 h D104 h D105 h Skipped When D100 is designated as the first data register D100 h D101 h HE EEEE BCC Block Check Character MICROSC has an automatic BCC calculation function to detect a communication error in incoming data If a BCC code is designated in the receive format of an RXD instruction MICRO C calculates a BCC value for a specified starting position through the position immediately preceding BCC and compares the calculation result with the BCC code in the received incoming data The start position for the BCC calculation can be specified from the first byte through the 15th byte The BCC calculated
73. for a simple modem control function so that the MICRO C can initialize a modem dial a destination telephone number or answer an incoming call The performance 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 System Setup To connect a modem to the loader port on the MICRO C use the modem cable 1C FC2A KMIC To enable the modem mode make the three settings described below 1 Set the protocol selector switch to 1 or 3 to select user protocol for the loader port See page 1 2 2 Enter 6 7 14 or 15 to data register D499 to enable expansion control data register service for D486 through D495 See page 2 5 3 Enter 1 to data register D495 to enable the modem mode See page 2 5 X Protocol Selector Switch Set to 1 or 3 to select user protocol for the loader port To RS232C Port S 7B Modem L Em a S ME To Loader Port Modem Cable 1C L RS232C FC2A KMIC 3m 9 84 ft long Deba pun EEBEBEBBBEBL I EB dia Male Connector Mini DIN Connector Pinouts D sub 25 pin Connec
74. ge 3 2 in this user s manual USER S MANUAL 11 9 11 TROUBLESHOOTING Troubleshooting Diagram 16 4 Data is not received correctly in the user communication mode MICR C Are communication NO Set the communication parame parameters set correctly ters to match those of the remote using FUN8 terminal using FUN8 YES s the data register NO Correct the program to replace designated as receive status the repeated data register with a used repeatedly different data register YES Is a start delimiter NO specified in the RXD instruction YES Is one input used to start multiple RXD instructions Correct the program to make NO Kre more than sure that more than 5 inputs to inputs to RXD instructions on RXD instructions do not go on simultaneously Use one input to start one RXD imul 1 Y i i i i simultaneously instruction without a start delim YES iter Did you check NO Make sure that the start delimiter the start delimiter of incoming in the RXD instruction matches data that of the incoming data YES Did you check NO Make sure that the receive format the format of incoming of the RXD instruction matches data that of the incoming data YES NO Is an end delimiter specified in the RXD instruction YES Did you check NO Make sure that the end delimiter the end delimiter of incoming in the R
75. gram capacity over error Note When type code 5 6 or 7 is displayed the details are shown by the error code of the ADV Error advanced instruc tion syntax error See page 18 5 in the MICRO User s Manual dec USER S MANUAL 11 1 11 TROUBLESHOOTING User Communication Error When a user communication error occurs a user communication error code is stored in the data register designated as a transmit status in the TXD instruction or as a receive status in the RXD instruction When multiple errors occur the final error code overwrites all preceding errors and is stored in the status data register MICR C To correct the error correct the user program by referring to the error causes described below User Communication Error Code User Communication Error Code Error Cause Start inputs to more than 5 TXD instructions are on simultaneously Transmit Receive Completion Output Transmit completion outputs of the first 5 TXD instructions from the top of the ladder diagram are turned on Transmission destination busy timeout Goes on after busy timeout Start inputs to more than 5 RXD instructions with a start delimiter are on simultaneously Among the first 5 RXD instructions from the top of the ladder diagram receive completion out puts of RXD instructions go on if the start delim iter matches the first byte of the received data While an RXD instruction without a start delimiter is executed
76. he BCC calculation can be specified from the first byte through the 15th byte The BCC calculated in either XOR or ADD can be 1 or 2 digits Ist 2nd 3rd 4th Sth 6th BCC calculation start position can be selected from this range 15th 16th 17th 18th 19th TT BCC 2 digits ne ae eee i 1 N 1 1 BCC calculation range when starting with the 1st byte of the data dec USER S MANUAL 5 3 5 USER COMMUNICATION INSTRUCTIONS MICRO C BCC Calculation Start Position The start position for the BCC calculation can be specified from the first byte through the 15th byte The BCC is calculated for the range starting from the designated position up to the byte immediately before the BCC of the transmit data Example Transmit data consists of 17 bytes plus 2 BCC digits 1 Calculation Start Position 1 lst 2nd 3rd 4th Sth 6th 15th 16th 17th 18th 19th ae ARA BCC calculation range BCC 2 digits 2 Calculation Start Position 2 lst 2nd 3rd 4th Sth 6th 15th 16th 17th 18th 19th S BCC calculation range BCC 2 digits BCC Calculation Formula BCC calculation formula can be selected from XOR exclusive OR or ADD addition operation Example Conversion results of transmit data consist of 41h 42h 43h 44h and 45h 1 BCC Calculation Formula XOR 41h O 42h O 43h O 44h 45h 41h 2 BCC Calculation Formula ADD 41h 42h 43h 44h 45h 14Fh gt 4Fh Only the last 1 or 2 digits are used as
77. high speed processing mode user communication instructions RXD and TXD cannot be used 5 8 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Receive Format Receive format designated by source operand S1 specifies data registers to store received data data digits for storing data data conversion type and repeat cycles A start delimiter and an end delimiter can be included in the receive format to discriminate valid incoming communication When some characters in the received data are not needed skip can be used to ignore a specified number of characters BCC code can also be appended to the receive format to verify the received data One RXD instruction can receive 200 bytes of data at the maximum S1 Source 1 Receive Calculation Operand Digits Conversion Type Calculation Start Bytes Position A ASCIIl gt Binary Data Register DO D498 B ASCII gt BCD gt Binary No conversion Receive Format Start Delimiter OOh FFh 7Fh No conversion End Delimiter OOh FFh 7Fh No conversion A Binary gt ASCIl No conversion Skip BCC Designating Data Register as S1 When a data register is designated as source operand S1 receive digits and conversion type must also be designated The received data is divided into a block of specified receive digits converted in a specified conversion type and stored in the designated data register Conversion types are availa
78. ication Specifications This section describes the MICRO C communication specifications For general specifications function specifications I O specifications and program loader specifications see the MICRO User s Manual Loader Port Communication Specifications Standards EIA RS232C Maximum Cable Length 15m 49 2 ft Baud Rate 1200 2400 4800 9600 19200 bps Data Bits 7 or 8 bits Parity Odd Even None Parameters Stop Bits 1 or 2 bits 10 to 2550 msec Receive Timeout In the user communication receive timeout is disabled when 2550 msec is selected Connection to Program Loader Using optional loader cable 3C FC2A KL3C Connection to RS232C Equipment Using optional user communication cable 1C FC2A KP1C or other cables Communication User Communication Mode Specifications When the protocol selector switch is set to 1 or 3 to select user protocol for the loader port the MICROSC can communicate through the loader port with external equipment which has an RS232C port such as a computer modem printer or bar code reader Using transmit and receive instructions for user communication user programs can be created to match the communica tion protocol of the equipment to communicate with Determine the possibility of communication referring to the user communication mode specifications described below Standards EIA RS232C Control Signal TXD RXD DTR RTS DSR Baud Rate 1200 2400 4800
79. ication TXD and RXD instructions to read and write data regis ters When the computer sends a message to read data from data registers using a BASIC program the MICRO C sends back data from predetermined data registers to the computer using the TXD instruction When the computer sends a mes sage to write data to data registers and new data register values the MICRO C stores the new values to predetermined data registers using the RXD instruction and returns an acknowledge reply to the computer using the TXD instruction System Setup Protocol Selector Switch 0 Set to 1 or 3 to select user protocol O for the loader port eleblbbbbbleblelele e y Computer Link Cable 4C nonanannn FC2A KC4C To RS232C Port ooooooo 3m 9 84 ft long Y p ET MES gt A To Loader Port LL RS232C D sub 9 pin F ana aa J eee Female Connector Mini DIN Connector Pinouts Description Data Carrier Detect Receive Data p Request to Send Black Data Terminal Ready Yellow Transmit Data Blue Transmit Data Data Terminal Ready Signal Ground Data Set Ready Receive Data Green Data Set Ready Brown Signal Ground Gray Signal Ground Red No Connection White Clear to Send O CG N or A N AN Caution NN Caut
80. iew the next or preceding screen of monitor data press the W or A key A maximum of 30 screens can be displayed A communication data block consists of transmit and or receive data When the interval between communication charac ters exceeds 20 msec the communication data block ends at this point and are displayed on a new line to mark the beginning of the next communication data block To return to the FUNSO screen press the CLR key To return to the editor screen press the CLR key again After the FUNSO user communication data monitor is completed press the communication enable button on the MICROSC for 4 seconds until the ERR1 indicator blinks once then normal communication using the program loader is enabled If the communication enable button is pressed while a user transmit or receive instruction is executed the execution is aborted and all outputs are forced off 3 2 USER S MANUAL MICRO C 4 MoDEM MODE Introduction This chapter describes the modem mode designed for communication between the MICROSC and another MICRO C or any data terminal equipment through telephone lines Using the modem mode the MICRO C can initialize a modem dial a tele phone number send an AT command enable the answer mode to wait for an incoming call and disconnect the telephone line All of these operations can be performed simply by turning on a start internal relay dedicated to each operation AN Caution N Caution The modem mode provides
81. in either XOR or ADD can be or 2 digits When an end delimiter is not used in the RXD instruction the BCC code must be positioned at the end of the receive for mat designated in Source 1 operand When an end delimiter is used the BCC code must be immediately before or after the end delimiter MICRO C reads a specified number of BCC digits in the incoming data according to the receive format to calculate and compare the received BCC code with the BCC calculation results BCC Calculation Start Position The start position for the BCC calculation can be specified from the first byte through the 15th byte The BCC is calculated for the range starting from the designated position up to the byte immediately before the BCC of the receive data Example Received data consists of 17 bytes plus 2 BCC digits 1 Calculation Start Position 1 15th 16th 17th 18th 19th Ist 2nd 3rd 4th Sth 6th BCC calculation range BCC 2 digits 2 Calculation Start Position 2 15th 16th 17th 18th 19th lst 2nd 3rd 4th Sth 6th BCC calculation range BCC 2 digits d BE USER S MANUAL 5 13 5 USER COMMUNICATION INSTRUCTIONS MICRO C BCC Calculation Formula BCC calculation formula can be selected from XOR exclusive OR or ADD addition operation Example Incoming data consist of 41h 42h 43h 44h and 45h 1 BCC Calculation Formula XOR 41h O 42h O 43h O 44h 45h 41h 2 BCC Calculation Formula ADD 41h 42h 43h 44h 45h
82. in the transmit data the byte count of the BCC is also included in the transmit data byte count Example Data register D100 is designated as an operand for transmit status D100 Transmit status D101 e Transmit data byte count dec USER S MANUAL 5 5 5 USER COMMUNICATION INSTRUCTIONS MICRO C Key Operation for Programming TXD Instruction on Program Loader The following example demonstrates how to program a TXD instruction using the program loader Data register contents D010 04D2h 1234 D011 162Eh 5678 Transmit data example BCC calculation range sTX 1 e2 3 ar s 6 7 g gt BCC BCC ETX 02h 31h 32h 33h 34h 35h 36h 37h 38h 3Ah 36h 03h 10 D11 Constant D BCC Constant Start to program a TXD instruction 1 S1 Data Source 1 transmit data B ADV REP BPS TXD Dl M 0 Destination transmit completion output D2 D 0 lt Destination 2 transmit status Enter hexadecimal constant value 02 for STX as transmit data p gt our 2 E 1 STX 02 BRD tee 18 gt E Constant Ai wis Designate data register D10 binary gt BCD gt ASCII conversion 4 transmit digits and 2 repeat cycles for the next transmit data B 4 AMICS 5 OR 1 D
83. ion Do not connect any wiring to the NC No Connection pin otherwise the MICRO C and the com puter may not work correctly and may be damaged Description of Operation In this example the computer uses a BASIC program to send request messages to the MICRO C to receive data from the MICRO C and to display the received data on the screen The MICRO C uses TXD and RXD instructions to transmit and recelve user communications and does not use the RTS DSR and DTR control signals Communication data between the computer and the MICRO C are shown below Monitoring Data Registers D50 and D51 If data registers D50 and D51 store 1234 and 5678 before monitoring the data shown below are communicated Computer MICRO C w cr AA pa ele Teel E e 52h ODh 06h D50 monitor data 4 bytes D51 monitor data 4 bytes ODh Reply Writing Data to Data Registers D50 and D51 If 3333 and 5555 are written to data registers D50 and D51 the data shown below are communicated Computer MICRO C Ww er es y O o e e 57h D50 write data 4 bytes D51 write data 4 bytes ODh Reply 06h 4Fh 4Bh ODh d BE USER S MANUAL 9 1 9 SAMPLE PROGRAM USER COMMUNICATION TXD amp RXD Setting Communication Parameters Set the FUN8 loader port communication parameters to the default values Communication Parameters MICR C Baud rate 9600 bps Baud Rate FUN 8 COM FORM Roe Code Data bits 7 ea ee 9600
84. ion control data register service for D484 through D498 divided into group 0 through 3 Data registers in the group disabled for expansion control data registers can be used as ordinary data registers D499 cannot be used as an ordinary data register and must not be programmed to store data of operation results Group Expansion Control DR Description D499 Expansion control data register service selection D498 Day Calendar D497 Month Calendar D496 Year Calendar D495 Modem mode selection D494 Reserved D493 Modem mode status D492 Protocol selection in modem mode D491 Control signal status D490 DSR control signal option D489 DTR control signal option Available only for communication through D488 RTS control signal option the loader port using user protocol D487 Reserved protocol selector switch set to 1 or 3 D486 RTS control signal ON OFF timer D485 Lower byte Protocol selector switch value D485 Upper byte For maintenance Function selector switch value 24 D484 Lower byte D484 Upper byte For maintenance USER S MANUAL MICRO C 2 ALLOCATION NUMBERS D499 Expansion Control Data Register Service Selection D499 is used to enable or disable expansion control data register service for D484 through D498 divided into group 0 through 3 D499 cannot be used as an ordinary data register and must not be program
85. ion readout hardware check using the FUN31 and keys on the loader Cables and Accessories Loader Cable 3C 2m 6 56 ft long Note Function Used to connect the program loader to the MICROSC loader port loader cable 3C is not included with program loader FC2A KL3C Loader Cable 4C 2m 6 56 ft long Note Used to connect the program loader to MICRO C data link terminals loader cable 4C is not included with program loader FC2A KL4C Computer Link Cable 4C 3m 9 84 ft long Note Used to connect an IBM PC to the MICROSC loader port 1 1 com puter link with D sub 9 pin female connector to connect to computer FC2A KC4C Computer Link Cable 6C 2m 6 56 ft long Note Used to connect an IBM PC to MICRO C data link terminals 1 1 com puter link with D sub 9 pin female connector to connect to computer FC2A KC6C Modem Cable 1C 3m 9 84 ft long Note Used to connect a modem to the MICROSC loader port with D sub 25 pin male connector to connect to modem FC2A KM1C User Communication Cable 1C 2 4m 7 87 ft long Note Used to connect RS232C equipment to the MICROZC loader port without a connector to connect to RS232C equipment FC2A KP1C Memory Card SRAM memory card to store 31 user programs maximum 64K bytes FC2A MC1 Expansion Cable 250mm 9 84 long Used to connect the MICRO C base units for close mounting in the expansion link system FC2A
86. ious system configurations using the MICRO C and required settings Selecting Communication Mode Set the function selector switch and the protocol selector switch to select a desired communication mode for the loader port and data link terminals After changing the settings of the function selector switch and protocol selector switch while the MICRO C is powered up press the communication enable button for more than 4 seconds until the ERR1 indicator blinks once then the new communication mode takes effect When the MICRO C is powered up the MICROSC checks the settings of the function selector switch and protocol selector switch and enables the selected communication mode auto matically You have to press the communication enable button only when you change the communication mode while the MICRO C is powered up N Warning N Warning If the communication enable button is pressed while the MICRO C is in operation the user program execution is stopped and all outputs are forced off Connecting Program Loader to the Loader Port When connecting a program loader to the loader port on the MICRO C set the protocol selector switch to 0 2 or 4 to select loader protocol for the loader port Use the loader cable 3C to connect the program loader to the MICRO C loader port Special cables are needed to connect to the loader port on the MICRO C Loader cables for the MICRO such as FC2A KL1 2m 6 56 ft long and FC2A KL2 5m 16 4 ft long cann
87. ir cables from the RS232C RS485 converter can be connected to data link terminals on the MICRO C directly without the need for the computer link interface units and computer link interface cables A computer can also communicate with a MICRO C network through modems For the MICROSC computer link 1 1 communication see page 1 5 Computer Link 1 N Communication To set up a 1 N computer link system connect a computer to RS232C RS485 converter using RS232C cable HD9Z CS2 Connect the RS232C RS485 converter to MICROSC units using shielded twisted pair cables Supply power to the RS232C RS485 converter by connecting a 24V DC source to terminals 6 and 7 or by plugging an AC adapter to the DC IN jack For specifications of the AC adapter see page 7 4 RS232C RS485 Converter FC2A MD1 132H x 110W x 34D mm POWER 5 917 H x 4 331 W x 1 339 D RS232C RS485 m5 y CONVERTER F Type FC2A MD1 o
88. ironment insert the digit used to obtain an outside line after ATDT or ATDP followed by the W modifier wait for dial tone or the modifier delay a dial sequence When a dial command is issued repeatedly NO CARRIER is returned and stored in the AT command result code data registers starting with D104 Make sure that the same communication parameters and initialization string are set on both the local and remote modems USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Introduction This chapter describes the programming of the TXD transmit instruction and RXD receive instruction for user commu nication With the protocol selector switch set to 1 or 3 to select user protocol for the loader port MICRO C can transmit data using the TXD instruction through the loader port to an RS232C remote terminal such as a computer printer or modem MICRO C can also receive data through the loader port from a remote terminal with an RS232C port The received data is converted and stored in data registers as designated by the RXD instruction B1 TXD Transmit When input is on data designated by S1 is converted into a specified format TXD S1 D1 D2 3 ds a Stee and transmitted through the loader port to a remote terminal with an RS232C port Key Operation B Enter operands S1 D1 and D2 ADV 1 S1 gt Data REP aps TXD Detailed key operation is described on page 5 6 D1 M 0 To e
89. ity check No effect on the completion output 11 2 TXD or RXD instruction is executed while the pro tocol selector switch is set to select loader proto col for the loader port USER S MANUAL No effect on the completion output MICRO C 11 TROUBLESHOOTING Troubleshooting Diagrams When one of the following problems is encountered see the troubleshooting diagrams described in the MICRO User s Manual or on the following pages in this manual Problem Troubleshooting Diagram See Manual The POW power indicator does not go on Diagram 1 MICRO User s Manual The RUN indicator does not go on Diagram 2 MICRO User s Manual Error indicator ERR1 is on Diagram 3 MICRO User s Manual Error indicator ERR2 is on Diagram 4 MICRO User s Manual Inputs do not operate normally Diagram 5 MICRO User s Manual Outputs do not operate normally Diagram 6 MICRO User s Manual Communication between the program loader and the MICRO3C base unit is not possible Diagrams 7 1 through 7 3 This manual Stop and reset operation cannot be performed Diagram 8 MICRO User s Manual Normal voltage does not appear on sensor power terminals Diagram 9 MICRO User s Manual Expansion link or data link is impossible Diagram 10 This manual Output pulses are not generated at output QO when using the 3 PULS or PWM instruction Diagram 11 MICRO User s Manual High speed counter d
90. keee aaa REREREEREER EEI REBEREERER RRI elJelelejelejelele EE REBERERRER RRI S md 5 Dd 1x GENEP Fa poa SUE AU E e oe e _e __ Computer Link System In the computer link system a personal computer is connected to one or a maximum of 32 MICRO C base units to control the operation of all MICRO C base units The 1 1 computer link system requires the computer link cable 4C FC2A KC4C or computer link cable 6C FC2A KC6C The 1 N computer link system using MICRO C base units requires RS232C RS485 converter FC2A MD1 and cables computer link interface unit FC2A LC1 is not required 1st Unit 2nd Unit Nth Unit N lt 32 Function selector switch O Function selector switch O Function selector switch O Protocol selector switch 2 3 or4 Protocol selector switch 2 3 or 4 Protocol selector switch 2 3 or 4 FUN9 O FUN9 1 FUN9 N 1 PEREEREREERERE PeERERREREERERE a i EE RRRRREEEEE SEERERRREI EE RS232C RS485 j Bal rt i HASi EA ry Converter pe o Re A A pee ee E FC2A MD1 The figure above illustrates a 1 N computer link system for MICRO C dec USER S MANUAL 1 7 1 GENERAL INFORMATION MICRO C Commun
91. l FUN29 User Communication Status Readout User communication error data execution of transmit receive instructions and communication parameters can be read using FUN29 on the program loader FUN 2 9 v FUN 29 COM ERR 0 lt Error code BRD JMP E TXDO lt 0 No error 1 Error occurred in received data RXDO 7 E parity framing overrun error etc 9600 EVEN 7 1 i Transmit instruction se tne Not transmitting data Ps E T itting dat 2400 bps Parity ransmitting data 4800 bps Even Receive instruction 9600 bps Odd Data bits Stop bits Not receiving data 19200 bps None 7 or 8 bits 1 or 2 bits E Receiving data To return to the editor mode press the CLR key dec USER S MANUAL 3 1 3 COMMUNICATION MONITOR MICRO C FUN50 User Communication Data Monitor Transmit and receive data of user communication between the MICRO C and RS232C equipment can be monitored using FUNSO on the program loader connected to the data link terminals Before using the FUN50 user communication data monitor make sure of the correct system setup shown on the preceding page If the protocol selector switch setting has been changed to 3 after power up press the communication enable button on the MICRO C until the ERR1 indicator bli
92. lelelalela pete y User Communication Cable 1C RS232C Equipment oooooooogo FC2A KPIC Ooooooo OE 2 4m 7 87 ft long To RS232C Port E an gt To Loader Port RS232C Attach a proper connector to the SEBBBBEEBEB ccc open end referring to the cable ele 1 connector pinouts shown below Signal Direction Yellow Transmit Data Blue Receive Data Green tt Data Set Ready Brown Signal Ground Gray Signal Ground No Connection Red Shield 1 6 USER S MANUAL MICRO C 1 GENERAL INFORMATION Link Systems MICRO C has three link functions expansion link data link and computer link When using a link function the function selector switch and protocol selector switch have to be set and the FUN settings may be required For details of these set tings see Expansion Link Function and Data Link Function in the MICRO User s Manual and Computer Link 1 N Com munication on page 7 1 in this manual The expansion link cannot be used in the data link system Expansion Link System The expansion link system consists of two MICRO C or MICRO base units connected through the data link terminals using the optional expansion cable FC2A KE1 250 mm 9 84 long or a shielded twisted pair cable as shown below The cable for the expansion link system can be extended up to 200 meters 656 feet Every MICROSC or MICRO base unit can be used as an expansion station
93. lelelele oooa I 0000 I A BSG A BSG elelelelelelelelele Ligg acera agag pitta zi aS Select a unique device number from 0 through 31 for each MICROSC using FUN9 PLC address for network communica tion on the program loader and transfer the user program to the MICROSC dec USER S MANUAL 7 1 7 COMPUTER LINK MICRO C Computer Link 1 N Communication Using Modems A 1 N computer link system can also be controlled through modems using RS232C RS485 converter FC2A MD1 Connect a computer and the RS232C RS485 converter to modems using RS232C straight cables Connect the RS232C RS485 converter to MICROSC units using shielded twisted pair cables Supply power to the RS232C RS485 converter by connecting a 24V DC source to terminals 6 and 7 or by plugging an AC adapter to the DC IN jack For specifications of the AC adapter see page 7 4 RS232C RS485 Converter FC2A MD1 132H x 110W x 34D mm PoweR 5 917 H x 4 331 W x 1 339 D ED RS485 RS232C RS485 Fa CONVERTER Type FC2A MD1 D m 2 5 p S 4 o Telephone Line RS232C SERIAL PORT 00000qgpo0000 0000000000000 SRS alee ARAS RS232C RS232C POWER Surry Straight Cable Straight Cable Note When connecting a computer to RS232C RS485 converter F
94. lid end delimiter value depends on the data bits selected in FUNS loader port communication mode setting When 8 data bits are selected end delimiters can be 00h through FFh When 7 data bits are selected as default end delimiters can be 00h through 7Fh Constant values are entered in hexadeci mal notation into the source data If a character in incoming data matches the end delimiter the RXD instruction ends receiving data at this point and starts subsequent receive processing as specified Even if a character matches the end delimiter at a position earlier than expected the RXD instruction ends receiving data there If a BCC code is included in the receive format of an RXD instruction an end delimiter can be positioned immediately before or after the BCC code If a data register or skip is designated between the BCC and end delimiter correct receiving is not ensured When an RXD instruction without an end delimiter is executed data receiving ends when the specified bytes of data in the receive format such as data registers and skips have been received In addition data receiving also ends when the interval between incoming data characters exceeds the receive timeout value specified in FUN8 loader port communication mode setting whether the RXD has an end delimiter or not The character interval timer is started when the first character of incoming communication is received and restarted each time the next character is received When a characte
95. link terminals data link expansion 3 link or loader protocol B O aQ Loader Port For connecting the program loader or computer The loader port can also be used as a user communication port when user protocol is selected with the protocol selector switch DATA LINK A B sa E SES Communication Enable Button Enables the communication mode selected with the protocol selector switch When the protocol selector switch setting is changed while the MICRO C is powered up press this button to enable the new com munication mode for the loader port and data link terminals Data Link Terminals For connecting the data link line in the expansion link or data link system The data link terminals can also be used for connecting the program loader or computer when loader protocol is selected with the The figure above illustrates the 16 I O protocol selector switch type MICRO C base unit der USER S MANUAL 1 1 1 GENERAL INFORMATION MICRO C Protocol Selector Switch The protocol selector switch is used to select communication modes for the RS232C loader port and the RS485 data link terminals When the MICRO C is powered up the selected communication modes are enabled automatically If the protocol selector switch setting is changed after the MICRO C is powered up the new setting does not take effect until the commu nication enable
96. many as the repeat cycles starting with the operand designated by S2 The comparison results are ANDed and set to the operand designated by D1 CMP SI SOR DI REP S1 Repeat 0 S2 Repeat 3 D1 Repeat 0 2 D20 D30 M50 3 D20 D21 lt gt D30 D31 y D20 D21 gt D32 D33 gt AND gt M50 D20 D21 lt D34 D35 When S1 source and S2 source are designated to repeat double word operands as many as the repeat cycles starting with the operands designated by S1 and S2 are compared with each other The comparison results are ANDed and set to the operand designated by D1 H CMP SIR SOR DI REP S1 Repeat 3 S2 Repeat 3 D1 Repeat 0 B D20 D30 M50 3 D20 D21 gt D30 D31 4 D22 D23 D32 D33 gt AND M50 D24 D25 gt D34 D35 When S1 source and D1 destination are designated to repeat double word operands as many as the repeat cycles starting with the operand designated by S1 are compared with the double word operand designated by S2 The compari son results are set to operands as many as the repeat cycles starting with the operand designated by D1 H CMP SIR 32 DIR REP S1 Repeat 3 S2 Repeat 0 D1 Repeat 3 14 D20 D30 M50 3 D20 D21 D30 D31 M50 D22 D23 D30 D31 M5 1 D24 D25 D30 D31 M52 When S2 s
97. med to store data of oper ation results If an unexpected value is set to D499 the modem mode may be enabled or disabled during operation Store a value in D499 to enable or disable expansion control data service for group 0 through 3 as described below D499 Value 7 8 0 D496 D498 1 D492 D495 2 D486 D491 3 D484 D485 The D499 value marked with indicates that the data registers in the corresponding group are enabled for expansion con trol data register service The enable disable of expansion control data register service is determined by the lower 4 bits in D499 Although a value over 15 can be entered to D499 upper 12 bits do not take effect Group 0 D498 Day Calendar D497 Month Calendar D496 Year Calendar When group 0 is enabled as expansion control data registers the calendar data are stored to D496 through D498 The year is indicated with the lower 2 digits Group 1 D495 Modem mode selection When group is enabled as expansion control data registers and 1 is set to D495 the modem mode is enabled When Q is set to D495 the modem mode is disabled For the modem mode see page 4 1 D494 Reserved D493 Modem mode status When the modem mode is enabled see above D493 stores a modem mode status D493 Value Description Remarks AT command completed normally AT command start IR is completed normally Issuing AT command
98. mination Resistor Fr pe rcza mD1 Receive Data Indicator Transmit Receive Data A 8 fx 5 Goes on when RS232C receive data pin 3 is on Transmit Receive Data B E El Signal Ground 1169 KG E 88 RS2320 1 0 Frame Ground 16 5 o 11188 a 8 1188 Connect to the RS232C port on the computer Vcc 24V 169 ES power SUPPLY 2188 p p GND Q z7 24V DC 5 SS AC Adapter Jack Connect AC adapter to supply 9V DC 350mA Note The FC2A MD1 contains a 2200 termination resistor on the RS485 line eliminating the need for an external termi nation resistor To use the internal termination resistor connect terminal T to terminal B When the termination resistor is not needed disconnect terminal T from terminal B Specifications General Specifications Rated Power Voltage Power terminals 24V DC 20 Ripple 10 maximum DC IN adapter jack 9V DC 350mA supplied from AC adapter Current Draw Power terminals Approx 40 mA at the rated voltage Operating Temperature O to 60 C Storage Temperature 20 to 70 C Operating Humidity 45 to 85 RH no condensation Vibration Resistance 5 to 55 Hz 60 m sec 2 hours each in 3 axes Shock Resistance 300 m sec 3 shocks each in 3 axes Dielectric Strength 1500V AC 1 minute between live parts and dead parts Insulation Resistance 10 MQ minimum between live parts and dead part
99. mple 9 2 BCC block check character 5 3 5 13 busy control 2 6 signal 8 1 checking modem operation 4 10 F CLKR 8 2 10 4 clock read instruction 8 2 10 4 CMP2 6 1 communication enable button 1 1 1 2 monitor 3 1 parameters 8 2 9 2 specifications 1 8 comparison instruction 6 1 computer link 1 N communication 7 1 using modems 7 2 cable 4C 1 5 9 1 cable 6C 1 5 3 1 interface I cable 7 2 unit 7 2 system 1 7 through data link terminals 1 5 K through loader port 1 5 connecting modem through loader port 1 6 program loader to L data link terminals 1 4 loader port 1 3 RS232C equipment through loader port 1 6 control signal status 2 6 conversion type 5 2 5 10 data link protocol 1 2 system 1 7 terminal communication parameters 1 9 specifications 1 9 with program loader 1 9 terminals 1 1 USER S MANUAL data register allocation numbers 2 4 data registers for modem mode 4 2 day calendar 2 5 dialing 4 2 telephone number 4 4 dimensions 1 10 7 4 disconnect line 4 2 mode 4 2 4 5 double word comparison 6 1 DSR control signal option 2 6 DTR control signal option 2 7 editing RXD instruction 5 18 TXD instruction 5 7 end delimiter 5 12 error causes and actions 11 1 escape sequence 4 5 expansion control data register service selection 2 5 control data registers 2 4 link system 1 7 2 2 FUN1O control data register setting 2 4 FUN11 program capacity and PLC type selection Preface 2 FUN20 PLC error data read
100. n dec USER S MANUAL 10 3 10 SAMPLE PROGRAM MODEM COMMUNICATION Ladder Diagram Remote Station In operation D2 0 MO pen CMP Sl S2 D1 REP D3 0 M1 ek O min O sec Error Line Connected Start Transmission A MO M1 00 M287 M2 Start Transmission M2 Manual Start 10 Retry Timer Error Line Connected Start Retry Trans A YH M2 T3 QO M287 M3 M3 Retry Counter Reset SOTU M2 C2 2 10 Retry Timer Pulse T3 Retry Counter Initialization String Failure M280 ATZ Failure M281 Start Retry Transmission Start Initialization String M260 Retry Interval M3 Dialing Failure AA m M280 M281 M282 T3 M4 Retry Timer 60 sec T3 600 Transmission Delay Timer 10 sec k TO 100 M4 Line Connected M287 SOTU TO TI 2 M11 TXD Data a CR 41h ODh TXD S1 D1 D2 II 2 M12 D13 TXD Data B CR 42h 0Dh 10 4 CLKR CMP SI S2 D1 REP USER S MANUAL MICR C M317 is the in operation output special internal relay CLKR clock read stores the hour minute and second data to D1 D2 and D3 respectively When D2 minute equals 0 MO is turned on When D3 second equals 0 M1 is turned on At 0 minutes and 0 seconds every hour transmission is started When manual start input IO is turned on transmission is started When retry timer T3 times out T3 output goes on and off then start retry transmission M3 is turned on again When sta
101. n When the subsequent commands of ATZ and dialing are also completed successfully M271 and M272 will also be turned on The default initialization string or the modified initialization string stored in D135 through D159 is also used for the ini tialization in the answer mode ATZ Resetting the Modem 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 MICRO C sends the ATZ command to the modem following the initialization string when M260 is turned on The ATZ command can also be issued separately by turning M261 on followed by the dial command to be executed automatically ATZ Command ATZ CR LF When the ATZ command has been completed successfully internal relay M271 is turned on If the ATZ command fails internal relay M281 is turned on When the subsequent dialing is also completed successfully M272 will also be turned on If the initialization string has been stored in the non volatile memory of the modem M260 may be skipped Start with M261 to send the ATZ command d BE USER S MANUAL 4 3 4 MODEM MODE MICRO C Dialing the Telephone Number When the modem mode is enabled data registers D160 through D209 are allocated to the telephone number Before turn ing on one of the start internal relays M260 through M262 for the originate mode sto
102. n M266 on to send the ATZ command only 5 Transmit or receive communication through the modem 6 Turn start internal relay M263 to disconnect the telephone line Sample Program for Modem Originate Mode This program demonstrates a user program for the modem originate mode to move values to data registers initialize the modem dial the telephone number and disconnect the telephone line MOV SI D1 REP M301 is the initialize pulse special internal relay E PAR Six MOV instructions are used to store values to data registers for the MOV S1 D1 REP modem mode l ia E 6 D499 to enable control data register service for D486 through D495 MOV S1 DI REP 21554 D160 T 1 gt D495 to enable the modem mode 21554 5432h gt D160 to designate touch tone and telephone number MOV Sl D1 REP H 54h T 32h 2 Dial command ATDT2 Q F 3328 D161 ok 3328 OD00h gt D161 to enter CR at the end of the telephone number MOV S1 D1 REP D492 xx 0 gt D492 to enable loader protocol for the loader port after connecting the telephone line D1 REP D101 ak 0 D101 to use Q3 in the default initialization string M317 is the in operation output special internal relay Timer TO starts to time down when the MICRO C is started to run When timer TO times out 10 seconds M260 is turned on to send the initial ization string ATZ and dial command to the modem When input IO is turned on M263 i
103. n Mode set to default mode to default YES Call IDEC for assistance USER S MANUAL MICR C 11 TROUBLESHOOTING Troubleshooting Diagram 7 2 Communication between the program loader and the MICRO C base unit data link terminals is not possible s the protocol selector switch set to 2 3 or 4 Set the protocol selector switch to 2 3 or 4 to select loader protocol for the data link terminals Did you press the NO communication enable button for 4 sec Did you power down and up after changing the protocol selector switch Is the loader cable 4C connected correctly Is the POW power indicator on Call IDEC for assistance Troubleshooting Diagram 7 3 When only program transfer is not possible both the loader port and data link terminals Only program transfer is not possible Is Protected PC displayed on the program loader YES Call IDEC for assistance USER S MANUAL Press the communication enable button for more than 4 sec until the ERR1 indicator blinks once Connect the wires of the cable to terminals A B and SG correctly r No S See Troubleshooting Diagram 1 The POW power indicator does not go on in the MICRO User s Manual Cancel the program protection using the program
104. nated as source operand S1 conversion type and transmit digits must also be designated The data stored in the designated data register is converted and a designated quantity of digits of the resultant data is transmit ted Conversion types are available in Binary S ASCII Binary gt BCD gt ASCI and no conversion When repeat is designated data of data registers as many as the repeat cycles are transmitted starting with the designated data register Repeat cycles can be up to 99 Conversion Type The transmit data is converted according to the designated conversion type as described below Example D10 stores 000Ch 12 1 Binary gt ASCIU conversion Been are 000Ch D10 000C Binary gt ASCII conversion 30h 30h 30h 43h When transmitting 4 digits 2 Binary gt BCD gt ASCII conversion ral BOG VRC 000Ch 00012 D10 000Ch pnay BCD conversion gt 00012 asaran em 60 com im 62 When transmitting 5 digits 3 No conversion FF D10 000Ch No conversion ee When transmitting 2 digits 5 2 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Transmit Digits Bytes After conversion the transmit data is taken out in specified digits Possible digits depend on the selected conversion type Example D10 stores 000Ch 12 and is converted in Binary gt BCD gt ASCI 1 Transmit Digits 2
105. nks once then the new communication setting is enabled First bring the FUNSO screen up pressing the keys FUN 5 0 Vv FUN 50 LINE MON eos STOP lt Monitoring ON OFF DATA 0 lt STOP Monitoring is off RUN Monitoring is on Communication Data Blocks Indicates the quantity of transmit and receive data blocks communicated during monitoring To start monitoring move down the cursor to the asterisk on the second line and set the monitoring ON OFF to RUN DM FUN 50 LINE MON RUN lt RUN indicates monitoring is on DATA 2 lt L Increments as MICROSC transmits and receives data during monitoring To move the cursor up or down press the A or Y key Pressing the REP key toggles RUN and STOP to start or stop monitoring When monitoring is started by switching to RUN monitor data stored in the previous monitoring is cleared from memory Monitor data can be stored up to 30 screens When the monitor buffer reaches full capacity FULL is displayed in place of the communication data blocks stopping communication data monitor Before displaying the monitored data first stop monitoring then move the cursor down to the colon and start to display the monitored data mely xx marks the start of a communication data block 4 05303132333435 14012345 3637383941424344 6789ABCD Hex code ASCII character display To v
106. ns data link FUN 20 V DEL 4 At the base or master station execute FUN27 Y FUN 27 V Or turn M307 on during operation Turn power off at the base or master station and turn power on after a few seconds MON M307 SET Are error codes YES cleared to 0 at all stations Call IDEC for assistance 11 6 END USER S MANUAL MICR C Troubleshooting Diagram 16 1 Data is not transmitted at all in the user communication mode Is the protocol selector switch set to 1 or 3 Did you press the NO 11 TROUBLESHOOTING Set the protocol selector switch to 1 or 3 to select user protocol for the loader port communication enable button for 4 sec YES Did you power down and up after changing the protocol selector switch NO YES Is the standard processing mode selected NO YES communication cable NO connected correctly YES Is the input to the NO TXD instruction on YES Is the POW power NO indicator on YES Did you check the transmit data using the communication monitor NO YES Call IDEC for assistance Press the communication enable button for more than 4 sec until the ERR1 indicator blinks once Select the standard processing mode FUN 5
107. nsion control data register service RXD S1 D1 D2 M301 2 MO DO RXD Data 1 see below RXD S1 D1 D2 Mis 10 MI D2 RXD Data 2 see below RST When M301 transmit completion output M2 or M3 is turned on M3 M2 RXD instructions are executed to wait for incoming communica tion When RXD is complete receive completion output MO or we M1 is turned on to execute a corresponding TXD TXD S1 D1 D2 MO 10 M2 D4 TXD Data 1 see below When TXD is complete transmit completion output M2 is turned T on to execute RXD instructions TXD S1 D1 D2 M1 4 M3 D6 TXD Data 2 see below RST When TXD is complete transmit completion output M3 is turned M1 on to execute RXD instructions END RXD Data 1 R CR 52h ODh End Delimiter Start Delimiter RXD Data 2 W D50 B4 2 CR 57h Data Register ODh End Delimiter D50 ASCIl gt BCD gt Binary Conversion 4 digits Repeat 2 Start Delimiter TXD Data 1 ACK D50 B4 2 CR 06h Data Register ODh End Delimiter D50 Binary gt BCD gt ASCII Conversion 4 digits Repeat 2 Start Delimiter TXD Data 2 ACK O K CR 06h 4Fh 4Bh ODh E EN E End Delimiter Reply Message OK Start Delimiter 9 4 USER S MANUAL MICRO C 10 SAMPLE PROGRAM MODEM COMMUNICATION Introduction This example is an automatic monitor system using the MICRO C s modem mode Both modems at the local and remote stations are initializ
108. nsion control data registers D490 is used to control data flow between the MICROSC and the remote terminal depending on the DSR Data Set Ready signal of the remote terminal The DSR signal is an input to the MICRO C to determine the status of the remote terminal The remote terminal informs the MICRO C using DSR whether the remote terminal is ready for receiving data or is sending valid data The DSR control signal option can be used only in the user protocol to communicate through the loader port D490 0 system default DSR is not used for data flow control When DSR control is not needed set 0 to D490 D490 1 When DSR is on MICRO C can transmit and receive data DSR si pe signal e l Transmit receive Impossible Impossible Transmit receive data Data D490 2 When DSR is off MICRO C can transmit and receive data DSR si e signal e l Transmit receive Impossible Impossible Transmit receive data Daa D490 3 When DSR is on MICRO C can transmit data This function is usually called Busy Control and is used for controlling transmission to a remote terminal with a slow processing speed such as a printer When the remote terminal is busy data input to the remote terminal is restricted DSR si pa signal e l Transmit Impossible Impossible Transmit data Data 2 6 USER S MANUAL MICRO C 2 ALLOCATION NUMBERS D490 4 When DSR is off MICROSC can transmit data This function is c
109. nterface Cable FC2A KC3 Pp 100 mm 3 937 long MICRO In the 1 N communication network MICROSC cannot send the initialization string to the modem The modem must be ini tialized in advance using the following initialization string This string is different from the default initialization string in the MICROSC modem mode Initialization String ATEOVOXO VJ I NO Q0 amp DOS0 2 amp W E0 Character NOT echoed VO Digit result code X0 Disables dial tone and busy detection J1 Set bps rate adjust on NO Normal mode buffered no error detection Q0 Disables flow control amp DO0 Ignore DTR signal S0 2 Answer on the second ring SW Write active profile into non volatile memory 7 2 USER S MANUAL idec MICRO C 7 COMPUTER LINK RS232C RS485 Converter FC2A MD1 The RS232C RS485 converter FC2A MD1 is used with the MICRO C and the MICRO to convert data signals between EIA RS232C and EIA RS485 This converter makes it possible to connect a host device with RS232C interface to multiple MICRO C and MICRO programmable controllers using one cable RS485 ES Signal Level RS232C Converter Signal Level Parts Description Power Indicator Goes on when power is supplied POWER Ea rue Transmit Data Indicator RS485 1 0 seran R5232C RS483 ED Goes on when RS232C transmit data pin 2 is on Ter
110. oes not work correctly Diagram 12 MICRO User s Manual The catch input function cannot receive short pulses Diagram 13 MICRO User s Manual The calendar clock does not operate correctly Diagram 14 MICRO User s Manual Transfer to and from the memory card is impossible Diagram 15 MICRO User s Manual Data is not communicated in the user communication mode Diagrams 16 1 through 16 4 This manual der USER S MANUAL 11 3 11 TROUBLESHOOTING MICRO C Troubleshooting Diagram 7 1 11 4 Communication between the program loader and the MICRO C base unit loader port is not possible NO Set the protocol selector switch to 0 2 or 4 to select loader protocol for the loader port Is the protocol selector switch set to 0 2 or 4 YES Did you press the communication enable button for 4 sec NO YES Did you power down and up after changing the protocol selector switch Press the communication enable NO button for more than 4 sec until the ERR1 indicator blinks once YES Is the loader cable 3C connected correctly N Q Connect the cable completely YES See Troubleshooting Diagram 1 Is the POW power NO The POW power indicator does indicator on not go on in the MICRO User s Manual YES Is FUN8 Loader Port NO Set the loader port communication Communicatio
111. ommunication error code If no error exists the lowest digit indicates 0 To view the transmit status monitor the designated data register in hexadecimal notation on the program loader Example Data register DO is designated as an operand for the transmit status Mon FoR 0 OUT Lv MON D 16 D 0 40 gt AA User communication error code see page 11 2 Transmit status code see below Transmit Status Code Pe vee Status Description From turning on the start input for a TXD instruction until the transmit data is stored in the internal transmit buffer From enabling data transmission by an END processing until all data transmission is completed From completing all data transmission until the END processing is completed for the TXD instruction All transmission operation is completed and the next transmission is made possible Preparing transmission Transmitting data Data transmission complete Transmit instruction complete Data transmission may be aborted depending on an error If data transmission is aborted by an error remove the cause of the error and turn the start input for the TXD instruction on again For error codes and causes see User Communication Error Code on page 11 2 Transmit Data Byte Count The data register next to the operand designated for transmit status stores the byte count of data transmitted by the TXD instruction When BCC is included
112. on 0 0 00 cee es 10 4 Ladder Diagram Local Station 2 000 es 10 6 TROUBLESHOOTING Error Causes and ActiOnsS wane araa etan eee eee a p aa ee wee 11 1 User Communication Error 2 0 ee 11 2 Troubleshooting Diagrams 0 0c ee 11 3 TYPe ISE vicio ited aa ee ee ated hee dhe Wide ieee ee th eel We tet whe ES th A 1 ASCII Character Code Table 0 u a a E ee A 2 USER S MANUAL MICRO C 1 GENERAL INFORMATION Introduction This chapter describes general information about additional functions and specifications incorporated in the MICRO C For general information functions and specifications inherited from the MICROS see the MICROS User s Manual Features MICROSC has upgraded functions for communications The new functions are particularly useful for modem communica tion user communication and monitoring data communication User Communication Function MICROSC has an RS232C loader port in place of the RS485 loader port on the MICRO The more widely applicable RS232C loader port can be directly connected to any equipment with an RS232C communication port New advanced instructions for transmitting and receiving data make it possible to set up a communication system using various communication formats The user communication function can be used only in the standard processing mode not in the high speed processing mode Increased Data Registers Since data communication requires more
113. on Repeat Cycles When a data register is designated to repeat the received data is divided and converted in the same way as specified and the converted data is stored in consecutive data registers as many as the repeat cycles Example Received data of 6 bytes is divided into 2 digit blocks converted in ASCII Binary and stored to data registers starting at D20 1 Repeat Cycles 2 aq lt a lt 3 gn 31h 32h 33h 34h 2 digits 2 digits Ist block 2nd block ASCII Binary conversion Repeat 1 gt D20 0012h Repeat 2 gt D21 0034h 1 Repeat Cycles 3 aq Ta Tar Te 31h 32h 33h 34h 35h 36h 2 digits 2 digits 2 digits 1st block 2nd block 3rd block ASCII Binary conversion Repeat 1 D20 I 00124 Repeat 2 gt D21 0034h Repeat 3 gt D22 0056h 5 10 USER S MANUAL MICRO C 5 USER COMMUNICATION INSTRUCTIONS Designating Constant as Start Delimiter A start delimiter can be programmed at the first byte in the receive format of an RXD instruction the MICRO C will recog nize the beginning of valid communication although an RXD instruction without a start delimiter can also be executed When a constant value is designated at the first byte of source operand S1 the one byte data serves as a start delimiter to start the processing of
114. on Initialize Flag Master Station Link Communication Stop Flag Slave Station Special internal relay M307 has different functions when used as a base or expansion station in the expansion link system or when used as a master station or slave station in the data link system Base or master station Link communication initialize flag When M307 at the base or master station is turned on during operation the link configuration is checked to initialize the expansion or data link system When an expansion station or slave station is powered up after the base or master station turn M307 on to initialize the link system After an expansion link or data link setup is changed M307 must also be turned on to ensure correct communication Slave station Link communication stop flag When a slave station does not receive communication data from the master station for 800 msec or more in the data link system M307 turns on When the slave station receives correct communication data M307 turns off In the expansion station M307 has no effect and cannot be monitored using the program loader dec USER S MANUAL 2 3 2 ALLOCATION NUMBERS Data Register Allocation Numbers Available data registers are limited in the high speed processing mode or in the data link system configuration Some data registers are allocated to special functions in the data link system as shown below For the data link function see the MICRO User s Manual D100 through D20
115. one line disconnected Protocol Transition Operational State Line Connection Note While M267 protocol transition is on the MICRO C cannot send and receive communication Data Registers for Modem Mode When the modem mode is enabled data registers D100 through D209 D492 and D493 are allocated to special functions At the first scan in the modem mode D100 and D135 through D159 store the default values Stored Data Description O No retry 1 99 Executes a specified number of retries 100 or more executes 99 retries Modify Initialization String O Q3 used for AIWA s modems Change Q3 in the default 1 or more Q2 used for OMRON s modems and others D102 D103 Reserved D104 D119 AT Command Result Code AT command result codes returned from modem are stored D120 D134 AT Command String AT command string for the AT general command mode is stored D135 D159 Initialization String Initialization string for the originate and answer modes is stored D160 D209 Telephone Number Telephone number for dialing in the originate mode is stored Retry Cycles D100 Default 3 D101 Protocol for the loader port after telephone line is connected is selected D492 On line Mode Protocol O Loader protocol Be User protocol D493 Modem Mode Status Modem mode status is stored see page 4 6 4 2 USER S MANUAL MICRO C 4 MODEM MODE Originate Mode The originate mode is
116. ontrary to D490 3 DSR si eee signal e l Transmit Impossible Impossible Transmit data Data D490 5 When DSR is on MICROC can receive data ON DSR signal l OFF e gt MICRO C receives data arriving while DSR is on Data out of this range are not received D490 6 When DSR is off MICRO C can receive data This function is contrary to D490 5 DSR si pr signal pp ne gt MICRO C receives data arriving while DSR is off Data out of this range are not received D490 7 or more Same as D490 0 DSR is not used for data flow control D489 DTR control signal option When group 2 is enabled as expansion control data registers D489 is used to control the DTR Data Terminal Ready sig nal to indicate the MICRO C operating status or transmitting receiving status The DTR control signal option can be used only in the user protocol to communicate through the loader port D489 0 system default While MICRO C is running DTR is on whether MICRO is transmitting or receiving data While MICRO C is stopped DTR remains off Use this option to indicate the MICRO C operating status MicRo c ___ Stopped Stopped DTR si i signal pp l D489 1 While MICRO C is transmitting data DTR is turned on While MICRO C is not transmitting data DTR remains off Use this option when a remote terminal operates in the half duplex mode since DTR goes on or off according to the
117. orrectly Correct the user program or FUN settings and transfer the corrected user program to the MICROSC The error code is cleared when a correct user program is transferred When this error occurs the error message is displayed with a type code and an address code of 7 digits total FUN gt 20 ERROR 80 Syntax0060026 al Error Message Address Code Type Code Error Code User Program Syntax Error Type Code and Address Code Type Code Address Code Error Details Stop input number selection error FUN1 Reset input number selection error FUN2 FUN3 FUN4 Processing mode selection error FUN5 Internal relay keep designation error Shift register keep designation error Catch input edge selection error FUN6 Input filter time selection error FUN7 Loader port communication mode setting error FUNS PLC address error for network communication FUN9 Control data register setting error FUN10 Invalid opcode for basic instruction Invalid operand for basic instruction Invalid timer counter preset value 0000 to 1012 Invalid opcode for advanced instruction Address of the incorrect TXD RXD programmed in the high speed processing mode program Invalid data for advanced instruction Same data register designated as status DR for TXD and RXD Invalid repeated usage of advanced instruction User pro
118. ot be used for the MICRO C Cables used for connecting to the loader port on the MICROSC cannot be used for the MICROS If a wrong cable is used machine damage may result Loader Cable 3C FC2A KL3C 2m 6 56 ft long The loader cable 3C has an RS232C RS485 converter in the middle When connecting and disconnecting the loader cable be sure to hold the connec tor Since the connector has a latch the cable cannot be removed holding the cable Make sure of correct direction of the cable as indicated on the direction labels attached near the connectors on the cable Connecting the Cable The program loader has a cover on the top to select the loader cable connection port or AC adapter jack Slide the cover to the right to open the loader cable connection port Slide the cover to the right 5 Loader Cable Connection Port Connect the connector of the loader cable to the loader cable connec tion port on the program loader and the other connector of the cable to the loader port on the MICRO C as indicated on the direction labels d BE USER S MANUAL 1 3 1 GENERAL INFORMATION Connecting Program Loader to the Data Link Terminals MICR C A program loader can also be connected to the data link terminals on the MICRO C when the protocol selector switch is set to 2 3 or 4 to select loader protocol for the data link terminals This capability is particularly useful to monitor the com munic
119. ource and D1 destination are designated to repeat the double word operand designated by S1 is compared with double word operands as many as the repeat cycles starting with the operand designated by S2 The comparison results are set to operands as many as the repeat cycles starting with the operand designated by D1 CMP2 SI QR DIR REP S1 Repeat 0 S2 Repeat 3 D1 Repeat 3 15 D20 D30 M50 3 D20 D21 lt gt D30 D31 M50 D20 D21 lt D32 D33 gt M51 D20 D21 lt D34 D35 M52 When S1 S2 source and D1 destination are designated to repeat double word operands as many as the repeat cycles starting with the operands designated by S1 and S2 are compared with each other The comparison results are set to oper ands as many as the repeat cycles starting with the operand designated by D1 D20 D30 M50 3 D20 D21 D30 D31 M50 D22 D23 D32 D33 M5 1 D24 D25 D34 D35 M52 1 Repeat 2 Repeat D1 Repeat H CMP2 SIR S2R DIR REP me Repent SI oo pi 16 6 2 USER S MANUAL MICRO C 7 COMPUTER LINK Introduction This chapter describes the computer link 1 N communication system for controlling multiple MICRO C units from a com puter Unlike the computer link 1 N communication system for the MICRO shielded twisted pa
120. out and reset 11 6 FUN27 link formatting sequence 11 6 FUN29 user communication status readout 3 1 FUN31 program loader version readout hardware check Preface 2 A 1 FUNSO user communication data monitor 3 2 4 10 FUNS8 loader port communication mode setting 1 9 4 8 4 9 5 2 5 11 5 12 8 2 9 2 FUN9 PLC address for network communication 7 1 function selector switch 1 1 1 2 value 2 10 T O allocation numbers for expansion link system 2 2 initialization string 4 2 4 3 4 6 7 2 commands 4 7 internal relays for modem mode 4 2 key operation for programming RXD instruction 5 17 TXD instruction 5 6 ladder diagram 8 2 9 4 10 4 10 6 line connection 4 2 link communication initialize flag 2 3 stop flag 2 3 systems 1 7 loader cable 3C 1 3 cable 4C 1 4 3 1 port 1 1 communication protocol 4 4 status internal relays 4 2 protocol 1 2 INDEX M modem 1 6 7 2 T cable 1C 1 6 4 1 10 1 mode 4 1 mode selection 2 5 mode status 2 5 4 2 data register 4 6 modify initialization string 4 2 month calendar 2 5 mounting hole layout 1 10 7 4 on line mode protocol 4 2 operating status and control signals 2 9 operational state 4 2 originate mode 4 2 4 3 parts description 1 1 U preparation before using modem 4 8 program loader 1 3 1 4 1 9 programming data registers and internal relays 4 8 expansion control data registers 8 1 protocol selection in modem mode 2 5 selector switch 1 1 1 2 value 2 10 transition 4 2
121. r is not received after a predetermined time timeout occurs and the RXD ends data receive operation Example 1 When an RXD instruction without an end delimiter is executed Incoming Data When D100 is designated D100 h 2 as the first data register a yr gy 3 ie D 101 eH 30h 31h 32h 33h D100 n eh Total of received characters The incoming data is divided converted and stored to data registers according to the receive format Receive operation is completed when the total characters programmed in RXD are received 2 When an RXD instruction with end delimiter ETX 03h and without BCC is executed gt Incoming Data When D100 is designated D100 h as the first data register PD DP PB ETX D101 h 31h 32h 33h 03h End Delimiter End of Receiving Data The incoming data is divided converted and stored to data registers according to the receive format The end delimiter is not stored to a data register Any data arriving after the end delimiter is discarded D100 n h 3 When an RXD instruction with end delimiter ETX 03h and one byte BCC is executed gt Incoming Data When D100 is designated D100 h as the first data register i ia ae ETX BCC D101 h 31h 32h 03h Code End Delimiter End o
122. r port The prior write user program operation is executed normally but the subsequent read user program operation results in a protect error 3 A user program cannot be read through either the loader port or data link terminals if a user program is written through the other port before the read user program operation is completed The subsequent write user program operation is executed normally but the prior read user program operation may fail to read the complete user program and result in a CRC error der USER S MANUAL 1 9 1 GENERAL INFORMATION MICRO C Dimensions MICRO C Base Unit Program Loader A 068 wo ss 30 mm a lec 95 mm 3 740 1 181 g E we p ES Y h gt 16 I O Type 135 mm 5 315 60 mm 2 362 2 24 1 0 Type 165 mm 6 496 9 A LE E E ES Y WKLY rR gt 80 mm 3 150 25 mm 0 984 Mounting Hole Layout A Minimum M4 tapped holes or center to center 94 5 0 177 dia drilled holes 58 mm 2 283 19 77 mm 3 031 Y WV pe gt lt gt 16 I O Type 116 mm 4 567 24 1 0
123. ransmission If transmit condition is not met within 5 seconds the transmit data is invali dated Then RTS and DTR take the same statuses as if the data were transmitted When group 2 is disabled and user communication is used without control signal options the communication is performed under the same conditions as expansion control data registers are set D488 0 D489 0 and D490 0 d BE USER S MANUAL 2 9 2 ALLOCATION NUMBERS MICRO C Group 3 D485 Protocol selector switch value When group 3 is enabled as expansion control data registers the lower byte of D485 stores the value set on the protocol selector switch The upper byte of D485 is reserved for maintenance To view the protocol selector switch value monitor D485 in hexadecimal notation on the program loader Mon FOR 4 5 OUT v MON For cc Eu D485 03 i Protocol selector switch value For maintenance 8 MCS R D484 Function selector switch value When group 3 is enabled as expansion control data registers the lower byte of D484 stores the value set on the function selector switch The upper byte of D484 is reserved for maintenance To view the function selector switch value monitor D484 in hexadecimal notation on the program loader mon ZoR 4 8 4 Ela MON D MCS R 16 D484 01 gt A Function selector switch value For maintenance 2 10 USER S MANUAL idec MICRO C 3 COM
124. re the telephone number in data reg isters starting with D160 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 Since 50 data registers are allocated to the telephone number up to 100 characters can be stored as many as the modem capacity allows Use the MOV move instructions to set ASCII values of the telephone number and execute the MOV instructions before turning on start internal relays M260 through M262 Example of Dial Command ATDT123 CR 1F ATD and LF are 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 ASCII values of T for touch tone phone or P for pulse or rotary phone followed by the telephone number and CR to data registers starting with D160 D160 5431h D161 3233h D162 OD00h 54h T 3lh 1 32h sie Ad 33h 3 ODh All characters subsequent to R are ignored As described above when start internal relay M260 is turned on the initialization string is sent followed by the ATZ com mand and the dial command When start internal relay M261 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 internal relay M262 If
125. results of the command M267 M277 and M287 are used to indicate the status of the loader port All of internal relays M260 through M287 are turned off at the first scan in the modem mode Start and Result Internal Relays Command Start IR Completion IR Failure IR Data Registers Initialization String D135 D159 Originate Mode ATZ Dialing D160 D209 Disconnect Mode Disconnect Line AT General Command Mode AT Command D120 D134 Initialization String D135 D159 ATZ Answer Mode When one of start internal relays M260 through M266 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 The command is transmitted repeatedly as many as the retry cycles specified in data register D100 When the command is completed successfully the completion IR is turned on and the command is not executed for the remaining cycles Failure The command is transmitted repeatedly but failed in all trials as many as the retry cycles specified in data register D100 Loader Port Status Internal Relays Status IR Status Description Loader port protocol is in transition between loader protocol and user protocol Loader port protocol is settled to loader protocol or user protocol Note Command mode On line mode Telephone line connected Teleph
126. retry cycles are set to data register D100 the dial command is repeated at intervals of approximately 1 minute as many as the specified retry cycles until the telephone line is connected When the dial command has been completed successfully internal relay M272 is turned on If the dial command fails internal relay M282 is turned on The dial command is determined successful when the DCD signal is turned on and when result code CR LF CONNECT CR LF or CR LF CARRIER OK CR LF returned from the modem is received Note When the MICRO C 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 M263 to disconnect the telephone line as described on page 4 5 Loader Port Communication Protocol Before the telephone line is connected in the modem mode after power up the loader port can only send out an AT com mand by turning on a start internal relay M260 through M266 The communication protocol for the loader port after the telephone line is connected is selected by the value stored in data register D492 D492 Loader Port Communication Protocol in the On Line Mode 0 Loader protocol 1 User protocol When the telephone line is disconnected the loader port restores the state as before the telephone line is conn
127. rs Two consecutive data registers designated by a source operand are compared with two consecutive data registers designated by another source operand When used with a repeat designation one CMP2 instruction can execute a maximum of 31 double word comparison operations With a repeat designation the results of all double word comparisons can be ANDed so the comparison results are easily determined even when com paring a large amount of data 3 CMP2 Double word Comparison TXD SIR SXR DIR REP SD S1 1 S2 S2 1 gt D1 on kikk le ok al When input is on 32 bit data designated by source operands S1 and S1 1 is compared with 32 bit data designated by source operands S2 and S2 1 When S1 S1 1 data is equal to S2 S2 1 data destination operand D1 is turned on When the condition is not met D1 is turned off Key Operation Ent ds S1 S2 and D1 ADV am 1 81 nter operan 7 an BPP CMP2 S2 When repeat is required press the REP key for the operand D1 to repeat and enter the number of repeat cycles To exit press the dd key Valid Operands Standard Processing Operand Function Constant S1 Source 1 Data to compare S2 Source 2 Data to compare D1 Destination 1 Comparison output In the high speed processing mode operands for advanced instructions are limited See page 2 1 Examples CMP2 The comparison output is usually maintained while th
128. rt transmission M2 or manual start 10 is turned on the retry counter is reset Retry counter C2 counts the pulse inputs from retry timer T3 When T3 times out 2 cycles C2 counts out When retry counter C2 counts out initialization string fail ure M280 is turned on or ATZ failure M281 is turned on then error output 00 is set to on When start retry transmission M3 is turned on M260 is turned on to send the initialization string to the modem When the initialization string and ATZ are completed but dialing has failed M4 is turned on to start retry timer T3 When T3 times out 60 sec M4 is turned off and T3 is reset turning M3 on and off to retry initialization string M260 When the telephone line is connected M287 is turned on and timer TO starts to time down before user communica tion is started When timer TO times out 10 sec TXD is executed When input I1 is on AIR is transmitted When transmission is complete transmit completion M11 is turned on When input I1 is off BIR is transmitted When transmission is complete transmit completion M12 is turned on mICRO C Ladder Diagram Remote Station continued Transmit A Complete RXD S1 D1 D2 M11 2 M13 D15 RXD Data C CR 43h ODh Transmit B Complete RST M12 M11 RST M12 Receive C Complete Start Disconnect Line M13 M263 Disconnect Line Complete RST M273 M13 Initialize Pulse MOV S1 D1 REP M301 6 D499 MOV S1 REP 1 D495 xk E
129. s 500V DC megger Noise Resistance Power terminals 1 kV 1 usec using noise simulator Weight Serial Interface Specifications Standards in Compliance Approx 5508 ElA standard RS232C D sub 25 pin female connector ElA standard RS485 screw terminals Communication Method Half duplex Communication Configuration 1 N N lt 32 Communication Cable Shielded twisted pair cable Communication Baud Rate 9600 bps fixed Slave Stations 32 slave stations maximum RS485 line Maximum Cable Length RS232C 15m 49 2 ft RS485 Total 200m 656 ft USER S MANUAL 7 3 7 COMPUTER LINK MICRO C RS232C Connector Pinouts D sub 25 pin Female Connector Pinno Description 13 lt 1 GND Frame Ground TXD Transmit Data O Cee O RXD Receive Data 000000000000 RTS Unused 25 14 CTS Unused NC Unused Note Terminals 4 and 5 are connected together internally GND Signal Ground NC Unused Dimensions Mounting Bracket Mounting Hole Layout Y a 10 mm 0 394 E Fo 3 6 mm Y e i 0 142 4 q D CoO oO Sy D O LA CA 142 mm 132 mm 5 197 H a 5 591 mal r Rubber Feet LY j o 4 5 mm hole x 2 e 0 177 dia Y cS 3 6mm Y Y e 10 mm 0 394 o
130. s on or off accord ing to the transmit data from MICRO C Transmit data Transmit data ON RTS signal OFF D488 1 While MICRO C is transmitting data RTS is turned on While MICRO C is not transmitting data RTS remains off Use this option when a remote terminal operates in the half duplex mode since RTS goes on or off accord ing to the transmit data from MICRO C Transmit data Transmit data RTS si a signal pp l D488 2 While MICRO C is running RTS is on whether MICROSC is transmitting or receiving data While MICRO C is stopped RTS remains off Use this option to indicate the MICRO C operating status MicRo c ___ Stopped Stopped ON RTS signal Bes l D488 3 RTS remains off 2 8 USER S MANUAL MICRO C 2 ALLOCATION NUMBERS D488 4 While MICRO C can receive data RTS is turned on Use this option when flow control of receive data is required D488 5 RTS is turned on or off according to DSR When DSR is on RTS is turned on When DSR is off RTS remains off Use this option for returning control signal and acknowledgment when data flow control with the remote terminal is required DSR si pe signal pp ON RTS signal OPF D488 6 or more Same as D488 0 D487 Reserved D486 RTS control signal ON OFF timer When group 2 is enabled as expansion control data registers and D488 is set to 0 or 1 to synchronize the transmit data with the RTS signal D486 is used to set
131. s turned on to disconnect the telephone line Note If the MICRO C status transition occurs while a user communication TXD or RXD instruction is executed the user communication is invalidated Such status transitions include e Modem mode is enabled 6 is set to D499 and 1 is set to D495 e Telephone line is connected e Loader port communication protocol is changed to loader protocol 0 is set to D492 d BE USER S MANUAL 4 9 4 MODEM MODE MICRO C Checking Modem Operation Confirm the modem operation referring to the user s manual for your modem Indicator names may differ depending on the brand and model of modems but have the same functions 1 Make sure the modem is powered up The POWER indicator must be on 2 Check that the modem s DTR indicator is on while the MICRO C is in operation Problem Solution 1 Solution 2 The DTR indicator is not on Check the modem cable connection using a VOM Check that control signal options D488 through D490 have not been changed Check that control signal status data register D491 holds a value 4 through 7 indicating that the DTR is on Above 1 and 2 are confirmed but modem operation still has a problem 3 It is not clear if an AT command is issued successfully Problem Solution Problem Solution Problem Solution Problem Solution Modem mode status data register D493 does not hold a value 30h or 34h Enable the modem mode set the proto
132. s user s manual and the MICRO user s manual Improper installation will result in falling failure or malfunction of the MICROSC e MICROSC is designed for installation in equipment Do not install the MICRO C outside of equipment e Install the MICROSC in environments described in this user s manual and the MICRO user s manual If the MICROSC is used in places where the MICRO C is subjected to high temperature high humidity condensation corrosive gases excessive vibrations and excessive shocks then electrical shocks fire hazard or malfunction will result e MICRO C is designed for use in Pollution degree 2 Use the MICROSC in environments of pollution degree 2 according to TEC664 1 e All DC power type MICRO C units are PS2 type according to EN61131 e Prevent the MICRO C from falling while moving or transporting the MICRO C otherwise damage or malfunction of the MICROSC will result e Prevent metal fragments and pieces of wire from dropping inside the MICRO C housing Put a cover on the MICRO C during installation and wiring Ingress of such fragments and chips may cause fire hazard damage or malfunction e Use a power supply of the rated value Use of a wrong power supply may cause fire hazard e Use wires of a proper size to meet voltage and current requirements Tighten M3 terminal screws to a proper tightening torque of 0 3 to 0 5 N m e Use an IEC127 approved fuse 2A maximum on the power line outside the
133. so stored to data registers At 0 minutes and 0 seconds every hour the MICRO C at the remote station sends the initialization string to the modem and dials the telephone number 234 5678 If the modem initialization or ATZ fails output QO is turned on to indicate an error When dialing fails two more attempts will be made When the retry fails output QO is turned on to signal that the tele phone line connection failed Ten seconds after the telephone line is connected the status of input I1 is sent to the local station When Il is on Ala is sent When I1 is off BIG is sent The status of input I1 can also be sent any time by turning input IO on When receiving C R from the local station the MICRO C at the remote station disconnects the telephone line Local Station When the MICRO C is powered up the MOV instructions are executed by initialize pulse M301 to store values to data reg isters which enable the modem mode One second later the MICRO C at the local station sends the initialization string to the modem Five seconds after the telephone line is connected the RXD instructions are executed to wait for incoming communica tion When receiving A CR output QO is turned on and output Q1 is turned off When receiving B CR output QO is turned off and output Q1 is turned on When receiving is complete the MICROSC at the local station sends C R to reply to the remote statio
134. ta M BPS TXD To edit the source 1 data move D1 M 10 the cursor to the colon and D2 gt D 0 press the gt key Designate data register D100 as an operand for transmit status E For 1 0 0 1 S1 Data D BPS TXD D100 Transmit status D1 M10 D101 Transmit data byte count D2 D100 Complete the programming of the TXD instruction 4J 0 LOD I 0 Pressing the d key writes the TXD instruction into the program 1 TXD loader memory To discard the edited data before pressing the d 10 gt END key press the CLR key 11 END Editing the TXD Instruction To edit an existing TXD instruction move the cursor to the left of the TXD and press the key then the TXD editor screen appears To edit the source 1 data press the Pp key again with the cursor at the left of the Data and follow the same procedure described above ider USER S MANUAL 5 7 5 USER COMMUNICATION INSTRUCTIONS MICRO C B RXD Receive 2 RXD SI Di D When input is on data received through the loader port from a remote ter minal with an RS232C port is converted and stored in data registers accord ing to the receive format designated by S1 Key Operation B 2 Enter operands S1 D1 and D2 ADV 1 sl Data ate i REP arp RXD Detailed key operation is described on page 5 17 D1 M 0 To exit press the dd key D2 D 0 Valid Operands Standard Processing Operand Function Constant
135. tandard only M50 M57 M80 M87 M110 M117 M140 M147 M170 M177 M200 M207 M230 M237 M260 M267 M60 M67 M90 M97 M120 M127 M150 M157 M180 M187 M210 M217 M240 M247 M270 M277 M70 M77 M100 M107 M130 M137 M160 M167 M190 M197 M220 M227 M250 M257 M280 M287 232 points 40 points Catch Input Relay Standard and High speed M290 M297 8 points 8 points Special Internal Relay Standard and High speed M300 M307 M310 M317 16 points 16 points Timer Standard and High speed TO T15 Standard only T16 T31 Counter Standard and High speed CO C15 Standard only C16 C31 32 points total 16 points total Shift Register Standard and High speed RO R31 Standard only R32 R63 64 points 32 points Data Register Standard and High speed DO D31 Standard only D32 D499 500 points 32 points Notes Input and output allocation numbers for the expansion station start with 120 and Q20 For the I O allocation num bers in the expansion link system see the next page The maximum points shown in are values for the high speed processing mode The same number cannot be used for a counter and a timer in a user program Internal relays M260 through M287 have special functions in the modem mode See page 4 2 Data register D499 is reserved to enable or
136. te 4 bytes to skip B 1 STX 02 free ner ele 3 see om 6 gt Skip byte count E oe Designate data register D20 eG conversion 4 digits and 2 repeat cycles Ag e Sa JL When repeat cycle is 1 1 STX 002 these keys may be omitted 2 SKIP 4 Ed BRD 6 D 20 A4 2 14 gt Repeat cycles Receive digits Conversion type selected using the REP key A ASCII Binary conversion B ASCI gt BCD gt Binary conversion No conversion Data register to store received data Data position Nth byte dec USER S MANUAL 5 17 5 USER COMMUNICATION INSTRUCTIONS MICR C Enter a BCC code of 2 digits calculated using the ADD format binary CASCII conversion calculation is started at the first byte of the received data B B B kep P nee ree oro gt om When BCC calculation starts at the first byte these keys may be omitted 2 SKIP 4 6 D 20 A4 2 14 BCC AA2 1 16 AAA 4 Calculation start position Quantity of digits Conversion type selected using the REP key A Binary SASCII conversion No conversion Calculation format selected using the REP key X XOR exclusive OR A ADD addition Enter hexadecimal constant value 03 for ETX as an end delimiter in the receive format OUT 16 e 3 BPP Designate internal relay M20 as an op
137. ters DR 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 AT EO QO V1 X4 XQ 38 D2 8 C 1 JO AV ov AO Jem 5 N2 SO 2 amp W 100007 LF This initialization string is used for AIWA s modems Depending on your modem and telephone line the initialization string may have to be modified To replace Q3 with Q2 to be used for OMRON s modems and others set 1 to data regis ter D101 modify initialization string More changes can also be made by entering required values to data registers D135 through D159 Store two characters in one data register 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 to set ASCII values of the initialization string characters and CR at the end Program the MOV instructions to replace the default values in D135 through D154 stored in the first scan and execute the MOV in a subsequent scan For essential commands which must be included in the initializa tion string see page 4 7 After the new values are stored turn M260 on to send the new initialization string to the modem When the initialization string has been sent successfully internal relay M270 is turned on If the initialization string fails internal relay M280 is turned o
138. than 4 seconds until the ERR1 indicator blinks once makes the MICRO C read the settings on the protocol selector switch and function selector switch Then the MICRO C updates the communication modes for the loader port and data link terminals This button is useful when you want to change the communication mode without turning power off N Warning N Warning If the communication enable button is pressed while the MICRO C is in operation the user program execution is stopped and all outputs are forced off Function Selector Switch When the protocol selector switch is set to O or 1 the data link terminals can be used for expansion link or data link com munication Then the function selector switch selects the station function for each MICROZC in the expansion link or data link system The function of the function selector switch on the MICRO C is the same as that on the MICROS When the pro tocol selector switch is set to 2 through 4 to select loader protocol for the data link terminals the function selector switch setting has no effect MICRO C Station Function by Function Selector Switch Position Function Selector Switch Position MICRO C Station Function Base or master station Slave station 1 Slave station 2 Slave station 3 Slave station 4 Slave station 5 Slave station 6 Expansion station 1 2 USER S MANUAL MICRO C 1 GENERAL INFORMATION System Setup This section describes var
139. the received data The valid start delimiter value depends on the data bits selected in FUN8 loader port communication mode setting When 8 data bits are selected start delimiters can be 00h through FFh When 7 data bits are selected as default start delimiters can be 00h through 7Fh Constant values are entered in hexadecimal notation into the source data A maximum of 5 RXD instructions with different start delimiters can be executed at the same time When the first byte of the incoming data matches the start delimiter of an RXD instruction the received data is processed and stored according to the receive format specified in the RXD instruction If the first byte of the incoming data does not match the start delimiter of any RXD instruction that is executed MICRO C discards the incoming data and waits for the next communication While an RXD instruction without a start delimiter is executed any incoming data is processed continuously according to the receive format Only one RXD instruction without a start delimiter can be executed at a time If start inputs to two or more RXD instructions without a start delimiter are turned on simultaneously one at the smallest address is executed and the corresponding completion output is turned on Example 1 When an RXD instruction without a start delimiter is executed Incoming Data When D100 is designated as the first data register 0 sr 9 er mekk S oh 30h
140. tor Pinouts Description i i Description Shield Frame Ground RTS Request to Send Black DTR Data Terminal Ready Yellow TXD Transmit Data Blue RXD Receive Data Green DSR Data Set Ready Brown SG Signal Ground Gray SG Signal Ground Red NC No Connection White Transmit Data Receive Data Request to Send Signal Ground Data Carrier Detect Data Terminal Ready 0 N O a AO DO BP N o Do not connect the NC No Connection pin to any line otherwise the MICRO C may be damaged AN aurion Modem cables for Apple Macintosh computers cannot be used for the MICRO C 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 In making this user s manual the correct operation has been confirmed on four modems AIWA s PV AF144V5 AIWA s PV BF144 AIWA s PV BF288M2 and OMRON s ME1414BIT When using other modems set a proper initialization string by referring to page 4 3 and confirm operation dec USER S MANUAL 4 1 4 MODEM MODE MICRO C Internal Relays for Modem Mode When the modem mode is enabled internal relays M260 through M287 are allocated to special functions M260 through M266 are used to send an AT command or disconnect the telephone line M270 through M276 and M280 through M286 turn on to indicate the
141. unt data register for TXD instruction to send B Receive status data register for RXD instruction to receive C Receive data byte count data register for RXD instruction to receive C Retry cycle data register Retry cycle 0 Modify initialization string data register O specifies Q3 for AIWA s modems Telephone number T2 54 32h 21554 Telephone number 34 33 34h 13108 Telephone number 56 35 36h 13622 Telephone number 78 37 38h 14136 Telephone number end delimiter code CR OD OOh 3328 On line mode protocol 1 specifies user protocol after telephone line is connected Modem mode selection 1 enables the modem mode Expansion control data register service selection 6 enables D486 through D495 10 sec delay timer before transmitting A or B representing input 11 status 60 sec delay timer before retrying to send the initialization string 10 2 Retry counter to count the retry cycles of 2 USER S MANUAL MICRO C 10 SAMPLE PROGRAM MODEM COMMUNICATION Allocation Numbers Local Station Allocation Number Description Goes on when receiving A indicating input 11 on at the remote station Goes on when receiving B indicating input 11 off at the remote station Receive completion output for receiving A to indicate input 11 on at the remote station Receive completion output for receiving B to indicate input 11 off at
142. 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 M260 through M262 If two or more start internal relays are turned on simultaneously an error will result and error code 33h is stored in modem mode status data register D493 see page 4 6 When a start internal relay is turned on a corresponding sequence of commands is exe cuted once as described below M260 Send initialization string send the ATZ command and dial the telephone number M261 Send the ATZ command and dial the telephone number M262 Dial the telephone number Initialization String When the modem mode is enabled as described on page 4 1 and the MICRO C is started to run the default initialization string is stored to data registers D135 through D154 at the END processing of the first scan To send the initialization string from the MICROSC to the modem turn M260 on then the ATZ command is issued and the telephone number is dialed successively Default Initialization String ATEOQOV1X4 Q3 amp D2 amp C1 JO WO A0 amp MS5 N2S0 2 amp WCRI LF When D101 modify initialization string is set to 0 the default initialization string shown above is stored to data registers D135 through D154 AT and IF are appended at the beginning and end of the initialization string automatically by the sys tem program and are not stored in data regis
143. user communication error code If no error exists the lowest digit indicates 0 To view the receive status monitor the designated data register in hexadecimal notation on the program loader Example Data register DO is designated as an operand for the receive status von Fe o D 16 User communication error code see page 11 2 Receive status code see below Receive Status Code Receive Status Code Description From turning on the start input for an RXD instruction to read the Preparing data receive receive format until the RXD instruction is enabled by an END pro cessing From enabling the RXD instruction by an END processing until incom ing data is received From receiving incoming data until the received data is converted and stored in data registers according to the receive format All data receive operation is completed and the next data receive is made possible Receiving data Data receive complete Receive instruction complete Data receive may be aborted depending on an error If data receive is aborted by an error remove the cause of the error and turn the start input for the RXD instruction on again For error codes and causes see User Communication Error Code on page 11 2 Receive Data Byte Count The data register next to the operand designated for receive status stores the byte count of data received by the RXD instruction When a start delimiter end delimiter and
144. xit press the dd key D2 D 0 Valid Operands Standard Processing Operand Function Constant S1 Source 1 Transmit data OOh FFh D1 Destination 1 Transmit completion output D2 Destination 2 Transmit status Transmit data designated by operand S1 can be a maximum of 200 bytes When transmission is complete an output or internal relay designated by operand D1 is turned on Destination 2 occupies two consecutive data registers starting with the operand designated by D2 The transmit status data register designated by D2 stores the status of transmission and error code The next data register stores the byte count of transmitted data The same data registers cannot be used as transmit status data registers for TXD instructions and receive status data registers for RXD instructions If the same data register numbers are programmed as status data registers for TXD and RXD instructions syntax error 80 will result Precautions for Programming TXD Instruction 1 MICRO C has 5 formatting areas for executing TXD instructions so more than 5 TXD instructions cannot be executed at the same time An error code is set to the transmit status data register designated by operand D2 in the excessive TXD instructions that cannot be executed 2 If the input for a TXD instruction is turned on while another TXD instruction is executed the subsequent TXD instruc tion is executed 2 scan time

Download Pdf Manuals

image

Related Search

Related Contents

  裁判実務 - MakeShop  Diver-Mate user manual  Exido 246-029 User's Manual  ipcop-quickstart-fr-1.4  Manual - Eelectron  JVC LET0089-001A User's Manual  FRM 1800 A1  Manuel d'utilisation  Ficha técnica Active Stylus 1  

Copyright © All rights reserved.
Failed to retrieve file