C200HBAT09 Omron, C200HBAT09 Datasheet

no-image

C200HBAT09

Manufacturer Part Number
C200HBAT09
Description
C200H REPLACEMENT BATTERY
Manufacturer
Omron
Datasheet

Specifications of C200HBAT09

Rohs Compliant
NO
Leaded Process Compatible
No
Peak Reflow Compatible (260 C)
No
Cat. No. W165-E1-04
SYSMAC
C200H-ASC02
ASCII Unit
OPERATION MANUAL

Related parts for C200HBAT09

C200HBAT09 Summary of contents

Page 1

Cat. No. W165-E1-04 SYSMAC C200H-ASC02 ASCII Unit OPERATION MANUAL ...

Page 2

...

Page 3

C200H-ASC02 ASCII Unit Operation Manual Revised September 2002 ...

Page 4

... Cancellation; Etc. Orders are not subject to rescheduling or cancellation unless Buyer indemnifies Omron against all related costs or expenses. 10. Force Majeure. Omron shall not be liable for any delay or failure in delivery resulting from causes beyond its control, including earthquakes, fires, floods, strikes or other labor disputes, shortage of labor or materials, accidents to machinery, acts of sabotage, riots, delay in or lack of transportation or the requirements of any government authority ...

Page 5

... OMRON. No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice ...

Page 6

vi ...

Page 7

TABLE OF CONTENTS PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intended Audience ...

Page 8

TABLE OF CONTENTS Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 9

... About this Manual: It has been assumed in the writing of this manual that the reader is already familiar with the hardware, programming, and terminology of OMRON PCs review of this information is necessary, the read- er should refer to the appropriate OMRON PC manuals for assistance. This manual is organized into six topic sections and six supplementary appendixes and was designed to be read from the beginning to the end in the presented sequence ...

Page 10

...

Page 11

This section provides general precautions for using the C200H Temperature Sensor Unit and related devices. The information contained in this section is important for the safe and reliable application of the C200H Temperature Sensor Unit. You must read this section ...

Page 12

... It is extremely important that a PC and all PC Units be used for the specified purpose and under the specified conditions, especially in applications that can directly or indirectly affect human life. You must consult with your OMRON representative before applying a PC system to the above-mentioned applications. ...

Page 13

Application Precautions • Locations subject to corrosive or flammable gases. • Locations subject to dust (especially iron dust) or salts. • Locations subject to exposure to water, oil, or chemicals. • Locations subject to shock or vibration. Caution Take appropriate ...

Page 14

Application Precautions • Do not apply voltages to the Input Units in excess of the rated input voltage. • Do not apply voltages or connect loads to the Output Units in excess of the • Disconnect the functional ground terminal ...

Page 15

The ASCII Unit is an intelligent PC peripheral device designed to make a PC-based control system more flexible and powerful. The ASCII Unit, programmed in BASIC, can be used for statistical quality control, system monitoring, data processing, report generation, and ...

Page 16

Front Panel 1-1 Front Panel The front panel contains two RS-232C communication ports, the program- mer’s START/STOP switch, a unit number selector, and several indicator LEDs. The back panel contains two sets of DIP switches for setting ASCII Unit parameters ...

Page 17

Front Panel Front Panel RUN 1 Indicator LEDs Run T/R for ports 1 and 2 ERR 1 (error for port 1) ERR 2 (error for port 2) BASIC Indication: ASC 02 BASIC LED Display ...

Page 18

Back Panel 1-2 Back Panel This section explains the operations of the back panel of the ASCII Unit. There are two 8-pin DIP switches on the Backplane side of the ASCII Unit. The desired configuration must be set before the ...

Page 19

Back Panel 6: The pin numbers for port 2 corrected in the diagram. Left-Side DIP Switch Settings Screen size Pin No. 6 Setting Not ...

Page 20

Back Panel Right-Side DIP Switch Definitions Pins 1, 2, and 3 are used for setting the baud rate of port 1. Pin 4 is not used. Pins 5, 6, and 7 are used for setting the baud rate of port ...

Page 21

System Configuration 1-3 System Configuration If the ASCII Unit is plugged into either of the 2 CPU Backplane slots next to the CPU Unit, it will not be possible to mount a Host Link Unit or a Program- ming Device, ...

Page 22

...

Page 23

This section explains the data section of the PC, a special memory area used to communicate with the ASCII Unit. This section also defines several important terms which are used throughout this manual. The material in this section will be- ...

Page 24

Bits and Bytes 2-1 Bits and Bytes The PC’s memory is divided up into many sections, each of which has its own name and purpose. The ASCII Unit can access any of these memory areas using the BASIC READ(@) and ...

Page 25

Data Section 2-2 Data Section Each ASCII Unit is assigned four memory words called the Data Section for communication with the PC. The words are assigned from addresses 100 to 199 of the PC IR memory area. How this information ...

Page 26

Data Section Bit Definitions I/O Word No. Bit Output 100 + unit no Name --- ...

Page 27

Data Section Bit Definitions Continued I/O Word No. Bit Output ( 100 + 10 x unit no Input 100 + ...

Page 28

...

Page 29

Section 3-1 explains how the ASCII Unit and the PC exchange information. Section 3-2 explains how to transfer pro- grams from one device to another. The ASCII Unit BASIC program is written on a personal computer. To run the pro- ...

Page 30

Programs 3-1 Programs To use the ASCII Unit in conjunction with the PC, an ASCII Unit program writ- ten in BASIC is needed. A data exchange routine must also be incorporated into the PC program except when the READ(@...) and ...

Page 31

Program Transfer 3-2 Program Transfer Preparation For the personal computer to communicate with the ASCII Unit, set the com- puter communication software as follows: Baud rate: Data length: Parity: No. stop bits: Also: Full duplex, no echo, no XON/XOFF buffer ...

Page 32

Assembly Routines Direction of Data Transfer ASC 02 RUN 1 Note Refer to the explanation of the OPEN command in Section 4-2-4 Device Control Statements for details on COMU 3-3 Running the BASIC Program The ASCII Unit can store and ...

Page 33

This section contains an explanation of the terminology, components, structure, and use of the BASIC programming lan- guage on the ASCII Unit. Even those familiar with BASIC should study this section carefully, as many of the ASCII Unit BASIC commands, ...

Page 34

Program Configuration 4-1 Program Configuration A BASIC program consists of commands, statements, and functions. BASIC Language Basic Statements designate and control the flow of programs and are gen- erally used in program lines within a program. Basic Commands are usually ...

Page 35

Program Configuration Constants Character Constants A character constant is a character string enclosed by double quotation marks (”). It can 255 characters long has no character called an “empty character string” ...

Page 36

Program Configuration Integer: Uses 2 bytes per variable. ! Single-precision real: Uses 4 bytes per variable. # Double-precision real: Uses 8 bytes per variable. $ Character: Uses a maximum of 255 characters. There is a second way to declare variable ...

Page 37

Program Configuration Expressions Expressions refer to constants, variables, and functions that have been com- bined by operators. Numeric values, variables, or characters alone can also form expressions. There are four types of expressions: • Arithmetic • Relational • Logical • ...

Page 38

Program Configuration formed after arithmetic and relational operations. The outcome of a logical operation is determined as shown in the following table. The operators are listed in the order of precedence. NOT (negation) AND (logical product) OR (logical sum) XOR ...

Page 39

BASIC Language OR (logical sum) XOR (exclusive OR) EQV (equivalent) IMP (implication) 4-2 BASIC Language This section explains, in detail, the BASIC commands, statements, and func- tions. They are presented in alphabetical order by section. Each description is formatted as ...

Page 40

BASIC Language Remarks: Examples: Show sample code to demonstrate the use of the instruction. Notes: 4-2-2 Commands This section describes all of the BASIC commands for the ASCII Unit. AUTO Command Purpose: Format: Examples: AUTO 100, 10 Remarks: Auto begins ...

Page 41

BASIC Language DEL 100- DEL -150 DEL 100-150 Remarks: A period may be used in place of the line number to indicate the current line. EDIT Command Purpose: Format: Remarks: The EDIT Command is used to display a specified line ...

Page 42

BASIC Language LIST 200- LOAD Command Purpose: Format: Remarks: The contents of the program area specified with the MSET Command are loaded from the EEPROM. Purpose: Format: Example: Remarks: When this command is executed, the BASIC indicator LED will begin ...

Page 43

BASIC Language If no MSET address is specified, the default MSET boundary address will be set at &H2000. Do not specify an address higher than &H7FFF or the system stack will be overwritten. The address specified by this command is ...

Page 44

BASIC Language Examples: PINF 1 Remarks: This Command displays the amount of program area currently being used and the program names that have been assigned by the PNAME command. Specify <arg> for a specific program ...

Page 45

BASIC Language Format: Remarks line number is specified, execution begins from that line. If the line num- ber is omitted, execution starts from the first line of the program. The RUN command clears all variables and closes all ...

Page 46

BASIC Language Format: Remarks: If the contents of the program area are identical to those of the EEPROM, the message “READY” will be displayed; otherwise, the message “PROM ER- ROR” is displayed. 4-2-3 General Statements CLEAR Statement Purpose: Example: Remarks: ...

Page 47

BASIC Language DATA Statement Purpose: Format: Example: Remarks: Any number of DATA statements can be used in a program. READ state- ments access DATA statements in order (by line number). The data con- tained therein may be thought of as ...

Page 48

BASIC Language This statement may define either numeric or string functions type is spe- cified in the function name, the value of the expression is forced to that type before it is returned to the calling statement. If ...

Page 49

BASIC Language Example: Remarks array variable name is used without a DIM statement, the maximum val the array’s subscript(s) is assumed subscript is used that is greater than the maximum specified, ...

Page 50

BASIC Language <var> is used as a counter. The first numeric expression (<x>) is the initial value of the counter. The second numeric expression (<y>) is the final value of the counter. The program lines following the FOR statement are ...

Page 51

BASIC Language GOTO Statement Purpose: Format: Remarks: If <line> non-executable statement, execution will proceed at the first executable statement encountered after <line>. IF...THEN Statement Purpose: Format: Example: Remarks: If the result of <expression> is not zero, the THEN ...

Page 52

BASIC Language A comma may be used instead of a semicolon after the prompt string to sup- press the question mark. Data is not accepted by the INPUT statement until a carriage return is en- tered. Therefore input can be ...

Page 53

BASIC Language LET Statement Purpose: Format: Example: Remarks: Notice the word LET is optional, i.e., the equal sign is sufficient when assign- ing an expression to a variable name. Assignment of a character variable to a numeric variable, and the ...

Page 54

BASIC Language Example: Remarks: The characters in <string 1>, beginning at position <n> are replaced by the characters in <string 2>. The optional <m> refers to the number of characters from <string 2> that will be used in the replacement. ...

Page 55

BASIC Language Program Remarks interrupt from port 1 is detected, the buffer contents are displayed. Note interrupt is received on a communications line during processing of 2. When determining the contents of processing for interrupt ...

Page 56

BASIC Language If the value of <expression> is zero or greater than the number of items in the list, execution continues with the next executable statement. If the value of <expression> is negative or greater than 255, an error message ...

Page 57

BASIC Language Example: Remarks statement specified by the branch line number is non-executable, execu- tion will begin with the first executable statement following the branch line number. If zero is specified as the branch line number ...

Page 58

BASIC Language If zero is specified as the branch line number assumed that the KEY OFF statement has been executed. If the interrupt number is omitted, the same branch destination is assumed for all interrupt numbers, 1 through ...

Page 59

BASIC Language 100 110 120 Remarks: An interrupt is invoked at the ASCII Unit from the PC program, avoiding the time at which the ASCII busy flag is ON. When the WRITE flag turns ...

Page 60

BASIC Language at the highest line number will be executed regardless of which interrupt is invoked. Program Example: PC PUT Statement Purpose: Format: Examples: PC PUT I Remarks: Data is written to bits 8 through 15 of word n+3, where ...

Page 61

BASIC Language Refer to Appendix D Formatting and Data Conversion for details on READ and WRITE statement formatting. Example “2H1, A3, I4, O2” PC READ A$; WRITE Statement Purpose: Format: Note Examples: PC ...

Page 62

BASIC Language Example: Remarks: The list of expressions must be separated by commas, semicolons, or blanks. When the expressions are separated with blanks or semicolons, the next value is output immediately after the preceding value. When the expres- sions are ...

Page 63

BASIC Language ^^^^ “” If the port number is omitted, port 1 is assumed for the PRINT USING state- ment and port 2 for the LPRINT USING statement. The LPRINT statement outputs data under control of the peripheral device connected ...

Page 64

BASIC Language Format: Example: Remarks: The REM statement is used to provide titles to programs and to insert helpful comments to be used during program debugging or modification. Remarks may be added to the end of a line by preceding ...

Page 65

BASIC Language Example: Remarks: The delay time is set in the form MM.SS.F, where: The statement immediately following the WAIT statement is the monitored statement. If execution of this statement is not completed within the set wait time, program execution ...

Page 66

BASIC Language The END statement and the NEW command automatically close the ports, but the STOP statement does not. CLS Statement Purpose: Format: Remarks: This statement clears the screen and moves the cursor to the home position. If the port ...

Page 67

BASIC Language Remarks: To make the CTS signal invalid at port 2, pull the CTS line high or connect it to the RTS line. ...

Page 68

BASIC Language The following two tables illustrate peripheral device output levels during ex- ecution of the OPEN statement. TERM SCRN KEYB COMU LPRT 1 2 Remarks: The default selection for the ports is as follows: port 1: Terminal device port ...

Page 69

BASIC Language Example: Remarks: ASIN Function Purpose: Format: Example: Remarks: ATN Function Purpose: Format: Example: Remarks: CDBL Function Purpose: Format: Example: CINT Function Purpose: Format: Example: COS Function Purpose: Format: Example: CSNG Function Purpose: Format: Example: FIX Function Purpose: Format: ...

Page 70

BASIC Language INT Function Purpose: Format: Example: Remarks: Returns the largest integer value less than or equal to the value specified by the argument. If the value of the argument is negative, this function returns a different value than the ...

Page 71

BASIC Language Example: 4-2-6 Character String Functions ASC Function Purpose: Format: Example: Remarks: An empty string cannot be specified. The CHR$ function performs the in- verse operation. CHR$ Function Purpose: Format: Example: Remarks: <i> must be from 0 to 255. ...

Page 72

BASIC Language Format: Example: Remarks: <i> must be an integer from 0 to 255. If <i> empty string is returned as the function value. If <i> is greater than the number of characters in <x$>, the entire ...

Page 73

BASIC Language Format: Example: Remarks: <i> must be an integer from 0 to 255. If <i> empty string is returned as the function value. If <i> is greater than the number of characters in <x$>, the entire ...

Page 74

BASIC Language Remarks: The “column position” must be from 1 to 255. If the current print position is already beyond <i>, the cursor moves to the <i>th position on the next line. TAB is only valid for the PRINT and ...

Page 75

BASIC Language EOF Function Purpose: Format: Example: Remarks: This function returns true (-1) if the specified port is empty. If not, it returns false (0). Note that the port specified by <port#> must already be open and in the input ...

Page 76

BASIC Language Example: Remarks: All characters except CTRL+X can be read, including CR and LF: CR and LF cannot be read with the LINE INPUT statement. The BASIC LED indicator on the ASCII Unit will blink indicating that the Unit ...

Page 77

BASIC Language Example: Remarks: In the form <y$> = TIME$, TIME$ returns an eight character string in the form: hh:mm:ss. If <x$> is not a valid string, an error message will be dis- played. USR Function Purpose: Format: Example: Remarks: ...

Page 78

BASIC Language Integer Type Higher 8 bits Lower 8 bits Single-Precision, Real Number Type Exponent Higher 8 bits of mantissa Middle 8 bits of mantissa Lower 8 bits of mantissa Sign (most significant bit) Double-Precision, Real Number Type Exponent Higher ...

Page 79

BASIC Language Program Remarks: When program execution branches to the assembly language routine, the TYPE of <argument> is stored in the accumulator A, and the memory ad- dress where the argument is stored is input to the index register X. ...

Page 80

BASIC Language Integer Type 0010 Variable name length -1 Variable name ≈ Higher 8 bits Lower 8 bits Single-Precision, Real Number Type 0100 Variable name length -1 Variable name ≈ Exponent Sign and higher 7 bits of mantissa Middle 8 ...

Page 81

This section explains how to create, edit, transfer, and use an assembly language program. Assembly programs are faster and use memory more efficiently than higher level programs such as BASIC. In certain situations it is advantageous to use assembly routines ...

Page 82

Assembly Language Programming 5-1 Assembly Language Programming Memory Area Special memory space for assembly language programs must be reserved with the MSET command. When programming in assembly language, you cannot use the BASIC program area to store the assembly program. ...

Page 83

Monitor Mode Commands Do not disable any interrupts in the assembly language program recommended that the assembly language program be saved on an ex- ternal storage device or in the EEPROM for safety. Monitor Mode To enter monitor ...

Page 84

Monitor Mode Commands DUMP Command Purpose: Format: Remarks: If the carriage return base address will be displayed. (refer to example address is entered ...

Page 85

Monitor Mode Commands • Displays all of the data from the base address to the specified address. 4. Enter: • If the “period” address format is used and the entered address is lower than 5. Enter: • Pokes data in ...

Page 86

Monitor Mode Commands Source start address Source end address Source start address Source end address Compare Command Purpose: Format: Remarks: Compares the data stored from (start address 2) to (end address block of data of the same ...

Page 87

Monitor Mode Commands Remarks entered by itself, all of the registers and their contents will be dis- played. Examples: 1. Enter: • The contents of all the registers are displayed. 2. Enter: • Break Point Command Purpose: ...

Page 88

Monitor Mode Commands Displayed: BP=0000 0000 Example Remarks: Clears all the breakpoints currently set. Disassembler Command Purpose: Format: Examples: 1. Enter: • Disassembles and displays 20 lines of code starting from the specified ad- 2. Enter: • Each time I,I ...

Page 89

Monitor Mode Commands The data stored from &H3000 to &H300F will be transferred to port peripheral device other than the input terminal needs to be connected for the data transfer, follow the peripheral data transfer procedure explained ...

Page 90

Monitor Mode Commands Example: Enter: Displayed: Enter: Displayed: C-C8 A-80 B-FF X-0000 S-2EFF P-3005 Remarks address is specified, the user program is executed starting from that address address is specified, execution will start from the address ...

Page 91

Monitor Mode Commands assembler will assemble and display it. To exit mini-assembler mode enter “x” followed by a carriage return. Example: Enter: Displayed: Enter: Displayed: Enter: Displayed: 3004- STD Enter: Displayed: Enter: Displayed: Enter: Arithmetic Using Hexadecimal Purpose: ...

Page 92

...

Page 93

This section presents examples of data transfer routines written for both the PC and the ASCII Unit. In some cases, both a PC and an ASCII Unit Program are necessary for data transfer. In other cases only an ASCII Unit ...

Page 94

Example Programs 6-1 Example Programs This section presents examples of data transfer routines written for both the PC and the ASCII Unit. The examples illustrate how the two programs work together to transfer data. Some of the examples have two ...

Page 95

Example Programs ASCII Unit Program PC READ “@D,0,5,5I4”; A,B,C,D,E Remarks: The above PC READ “@...” statement accesses the PC DM memory area when the user specifies “@D” as its first argument. When the ASCII Unit ex- ecutes the above PC ...

Page 96

Example Programs Remarks: When the ASCII Unit executes the PC WRITE “@...” statement, the variables P, Q, and R are converted into BCD and stored in DM words 0010, 0011, and 0012. During PC WRITE execution, the busy flag (word ...

Page 97

Example Programs PC words are used to store the data, which consists of four characters (two characters per word). When the execution statement flag is set, the data is stored in DM words 0020 and 0021. The ASCII Unit OPENs ...

Page 98

Example Programs Example 6 Purpose: Another way to externally control program execution is through polling. Poll- ing is the process of continuously checking the value of a specified bit or word. If the value of the bit or word matches ...

Page 99

Example Programs In the above program, the ASCII Unit accepts external input from a keyboard using the INPUT statement and transfers that data to the PC with the PC PUT statement. If the number “1” is input, bit 10308 of ...

Page 100

Example Programs PC Program Remarks: Product codes stored in DM memory are replaced by data input through a keyboard. The data is represented as 4-digit hexadecimal numbers. Example 9b Purpose: ASCII Unit Program Example 10 Purpose: 86 ...

Page 101

Example Programs PC Program Remarks: Two lot size areas, stored words 0000 and 0001, are retrieved and printed. Connect the printer to port 2 and set the baud rate to 4,800 bps. Example 11 Purpose: SW1 MOV ...

Page 102

Example Programs PC Program Start 1 Start 2 Start 3 Start 1 Start 2 Start 3 Start 1 Start 2 Start 3 Start 1 Start 2 Start 3 Start 1 Start 2 Start 3 Start 1 Start 2 Start 3 ...

Page 103

Example Programs DM0000 Example 12 Purpose: PC Program Start 10300 ASCII busy Remarks: PC data and the time of transfer are output to a printer connected to port 2 of the ASCII Unit. The PC read statement is used to ...

Page 104

Example Programs ASCII Unit Program: Remarks: The PC READ “@...” statement is used with “@R” as the first argument di- recting the read statement to obtain the data from the PC Relay memory area. Example 14 Purpose: Remarks: The following ...

Page 105

Example Programs 110 120 130 150 1000 1010 1020 2000 2010 2020 Example 16 Purpose: PC Program Remarks: Pressing the PC START switch will cause specified PC data to be transferred to the ASCII Unit and displayed on the monitor. ...

Page 106

Example Programs Example 17 Purpose: PC Program Start ASCII busy Remarks: In this example, a terminal is connected to port 1 and an RS-232C communi- cation device is connected to port 2. Initially, all the interrupts are disabled. The program ...

Page 107

Example Programs Example 18 Purpose: PC Program Using the READ Instruction Start 01000 04000 04002 04001 04001 14001 14308 14308 04002 04002 04004 04003 04003 14001 14308 14308 04005 04006 In this example, the PC initiates the transfer of ASCII ...

Page 108

Execution Sequence 6-2 Execution Sequence This section presents several additional programs with the emphasis on ex- plaining the actions of the PC and the ASCII Unit during execution of their respective programs. Example 1a Purpose: PC Program 10308 04000 04002 ...

Page 109

Execution Sequence 7. 8. Example 1b Purpose: • This example does not require a PC data transfer routine. ASCII Unit Program: 100 110 Execution Sequence 3... 1. 2. Example 2a Purpose: PC Program 10309 04000 04002 04001 04001 ...

Page 110

Execution Sequence 1, 2, 3... Remarks: If this program is executed repeatedly, and if the time required to set bit 10309 with PC PUT 2 after it has been cleared with PC PUT 0 is longer ...

Page 111

Execution Sequence Example 3a Purpose: PC Program Start 04000 04002 04001 04001 10001 10300 10300 04002 04002 04004 04003 04003 10001 10300 10300 04006 04005 To transfer data from the PC to the ASCII Unit with the PC main- taining ...

Page 112

Execution Sequence Execution Sequence 3... Example 3b Purpose: PC Program Start 04000 04002 04001 04001 10001 10300 10300 04002 98 PC: The self-holding circuit is set on the positive edge transition of bit ...

Page 113

Execution Sequence Execution Sequence 3... Example 4a Purpose: PC Program Start 04000 04002 04001 04001 10001 10300 10300 04002 Execution Sequence 3... 1. 2. PC: The self-holding circuit (04001) is set on the ...

Page 114

Execution Sequence 3. Example 4b Purpose: PC Program Start 04000 04002 10009 10009 10002 10300 10300 Execution Sequence 3... 100 PC: Changes the interrupt number disable further interrupts after the data has ...

Page 115

Execution Sequence Example 5 Purpose: PC Program 01000 04000 04002 04001 04001 10001 10300 10300 04002 Remarks: This program transfers 100 words of data from the PC to the ASCII Unit (starting from PC DM word 0100) each time bit ...

Page 116

Assembly Language Example 4. Example 6 Purpose: Remarks: In this example, data is entered through the ASCII Unit keyboard and trans- ferred to the PC. The PC performs some computations on the data and then sends it back to the ...

Page 117

Assembly Language Example 130 140 Procedure 3... The following memory areas are used as a program area, work area, and buffer area respectively: Program Area $2000 to $24FF $2500 to $2507 $2600 to ...

Page 118

Assembly Language Example Assembly language program operation: The numbers and characters are separated and stored in the number stor- age buffer and the character storage buffer, respectively. Then numeric strings and character strings are restored as the original character variables. ...

Page 119

Assembly Language Example PULB PULX PSHX LDX 1,X ABX STX $2506 LDD $2502 SUBD #$2700 JSR $2100 PULX PULB PULA RTS $2100 LDX $2504 LDAA 0,X INX STX $2504 LDX $2506 STAA 0,X INX STX $2506 DECB BNE $2100 RTS ...

Page 120

...

Page 121

Item ASCII Unit EEPROM Battery Set Backup battery for C200H only Appendix A Standard Models Description Model No. C200H-ASC02 C200H-BAT09 107 ...

Page 122

...

Page 123

Specifications Item Communication mode Synchronization Baud rate Transmission mode Transmission distance Interface Memory capacity Transfer capacity Timer function Diagnostic functions Battery life Internal current consumption Dimensions Weight Note Redundant output may occur at ports during initialization at startup. Take steps ...

Page 124

Specifications Rear Panel DIP switch, left Sets the start mode, screen size, etc. Left-Side DIP Switch Pin No. 1 Start mode 2 Automatic program transfer from EEPROM to RAM 3 Program No Data Section mode selector 6 Screen ...

Page 125

... Always set this pin to OFF Sets the baud rate for port 2. Always set this pin to OFF. Plug: XM2A-0901 (OMRON) or equivalent. Applicable Connector Hood: XM2S-0901 (OMRON) or equivalent. (Two plugs and two hoods are supplied with the ASCII Unit.) Cable Length Pin No. ...

Page 126

Specifications Connections to Peripheral Devices ASCII Unit CTS 5 DSR 7 ASCII Unit RTS 4 CTS 5 DSR 7 Connections to a Personal Computer ASCII Unit ...

Page 127

Specifications Transmission from the ASCII Unit to a Peripheral Device The RTS signal is activated by the OPEN command. (The DTR signal goes HIGH or LOW depending on the peripheral device which has been opened by the command.) When the ...

Page 128

Specifications ON DTR (output) OFF ON RTS (output) OFF Data Device Control Codes Peripheral Device Terminal Display At execution CLOSE LPRT At execution CLOSE COMU At execution CLOSE Dimensions Dimensions with ASCII Unit Mounted on PC The depth of the ...

Page 129

Specifications 130 35 100.5 Appendix B 115 ...

Page 130

...

Page 131

PC Statements and Refresh Timing Instructions and Refresh Timing Data transfer between the ASCII Unit and the PC is executed during PC I/O refresh. I/O Refresh C200H CPU Data Transfer ASCII Unit Processing in BASIC program BASIC Statements and PC ...

Page 132

PC Statements and Refresh Timing PC PUT The ASCII Unit transfers data during the first PC I/O refresh after execution of PC PUT. I/O Refresh C200H CPU Data Transfer ASCII Unit PC PUT Statement PC PUT Statement PC READ In ...

Page 133

PC Statements and Refresh Timing PC READ @... Data is read from the first I/O refresh after execution of PC READ @..., irrespective of the status of the Write flag. I/O refresh C200H CPU First word transfer READ Transfer words ...

Page 134

PC Statements and Refresh Timing PC WRITE @... Data is transferred to the PC during the first I/O refresh after execution of PC WRITE @..., irrespective of the status of the PC READ flag. I/O refresh C200H CPU WRITE ASCII ...

Page 135

PC Statements and Refresh Timing PC ON After the ON PC GOSUB statement is executed, the PC’s interrupt number is written in. When the Write flag is set, the GOSUB statement is executed. Only when the WRITE flag is set ...

Page 136

PC Statements and Refresh Timing PC STOP After the ON PC GOSUB statement is executed, the PC’s interrupt number is written in. When the Write flag is set, the ASCII Unit busy flag is set for one scan time, but ...

Page 137

PC Statements and Refresh Timing PC OFF After the ON PC GOSUB statement is executed, the PC’s interrupt number is written in. If the PC OFF state- ment is subsequently executed, then even if the Write flag is set, the ...

Page 138

...

Page 139

Formatting and Data Conversion Memory Area Designators for PC READ/PC WRITE Statements Memory Area Designator @ Formatting and Data Conversion Format nth byte of m decimal words nth byte ...

Page 140

Formatting and Data Conversion Example: 2I3 ... Indicates 2 decimal words of 3 digits each. H Format (mHn) This format is used for hexadecimal numbers ( number of words H : hexadecimal format designator n : ...

Page 141

Formatting and Data Conversion Digit – – – – 1 – – – – 2 – – – – 3 – – – – 4 – – – – 5 – – – – ...

Page 142

Formatting and Data Conversion Format SmIn SmHn SmOn SmBn Remarks: Each S Format designator corresponds to one variable from the variable list: the first designator corresponds to the first variable in the list, etc. The array variables must be one ...

Page 143

Formatting and Data Conversion Examples of PC READ Format Conversion I Format Integer variable Contents of PC word Character variable H Format Integer variable Contents of PC word Character variable O Format ...

Page 144

Formatting and Data Conversion S Format Contents of PC word Examples of PC Write Format Conversion I Format Contents of PC word 0 0 ...

Page 145

Formatting and Data Conversion H Format Contents of PC word ...

Page 146

Formatting and Data Conversion B Format Contents of PC word Note A Format Contents of PC word ...

Page 147

Formatting and Data Conversion Execution Times Command PC READ “ ” READ “ ” READ “ ” ...

Page 148

...

Page 149

Memory Structure The memory structure is shown below. The addresses go from &H0000 to &HFFFF (0 to 65535) and are divided into byte units. The 24 Kbytes (24,576 bytes) from &H2000 to &H7FFF make up the program area. The contents ...

Page 150

ASCII Unit Memory Map Port Address Assignments Address R/W $0010 Port 1 R/W $0011 ” R $0012 ” W $0013 ” R $9400 Port 2 W $9400 ” R $9401 ” W $9401 ” 136 R/W Contents Transfer rate/mode control ...

Page 151

ASCII Unit Memory Map Communication Flags Communication Input Flags ___ ___ ___ Address $0015 CTS1 DSR2 DSR1 Communication Output Flags Address $0003 BANK2 BANK1 WDREF ____ BAT ___ ___ ...

Page 152

ASCII Unit Memory Map Devices PTM HD63B40 Address R/W $9800 Control registers #1 and #3 $9801 R Status register W Control register #2 $9802 R Higher byte of timer #1 counter W Higher byte (MSB) of buffer ...

Page 153

ASCII Unit Memory Map Transmission and Reception Work Area Address $0145 $0146 $0147 $0148 $024B $024C $024D $024E $1440 $1540 Contents Port 1 Port storage pointer (reception) Data extraction pointer (reception) Data storage pointer (transfer) Reception buffer, 256 bytes Port ...

Page 154

...

Page 155

Error Message Format When an error occurs during BASIC program execution, the error messages shown in the following tables are output to the screen of the terminal device other than a terminal is connected to port 1, the ...

Page 156

Troubleshooting Error Message OUT OF STRING SPACE ERROR OVERFLOW ERROR PORT ALREADY OPEN ERROR PORT NOT OPEN ERROR PROM ERROR PROTECTED PROGRAM ERROR RESUME WITHOUT ERROR RETURN WITHOUT GOSUB ERROR STRING FORMULA TOO COMPLEX ERROR STRING TOO LONG ERROR SYNTAX ...

Page 157

Troubleshooting Abnormalities Item All indicators do not light. ERR indicator comes on. ERR 1 indicator comes on. Initial screen is <<PROGRAM MEMORY ERROR>>, and CTRL+X is ineffective. Inspection Items The following items should be periodically inspected. Item Environment Mounting condition ...

Page 158

... Reassemble the ASCII Unit in the reverse order of disassembly. Notes on Handling Replace the ASCII Unit after turning off the power to the PC. When returning a defective Unit to OMRON, inform us of the abnormal symptom much detail as possi- ble. 144 Back of Unit Battery holder Battery connector ...

Page 159

The following tables list the BASIC commands, statements, and functions alphabetically. A detailed explana- tion of each command, statement, and function may be found in Section 4-2 Basic Language . The characters in the Command, Statement, and Function columns denote ...

Page 160

Reference Tables Item Description EDIT Edits one line of the program END Terminates the execution of a program and closes all files EOF Verifies that the port buffer of the specified port is empty ERL/ERR Returns the error code and ...

Page 161

Reference Tables Item Description MON Sets the terminal to monitor mode MSET Sets the address boundary for an assembly program NEW Clears the program and all currently defined variables OCT$ Returns a string which represents the octal value of the ...

Page 162

Reference Tables Item Description RESTORE Specifies which DATA statement will be used by the next READ statement RESUME Specifies the line where execution will resume after error processing RIGHT$ Returns the number of characters in a string starting from the ...

Page 163

Reference Tables List of Program Examples Example No. Transfers data from the PC to the ASCII Unit using the PC Read statement 6-1-1 Writes data to the PC using the PC Write statement 6-1-2 Prints data at fixed time intervals ...

Page 164

...

Page 165

Programming with Windows 95 Overview Previously, an FIT10 Terminal Pack or N88-DISK-BASIC was required to program the ASCII Unit. Now, how- ever possible to program using HyperTerminal and other accessories that have been added to the stan- dard ...

Page 166

... Confirming Connection Key in Ctrl + X at the computer. The following message will be displayed indicating that connection is com- plete. C200H-ASC02 (CF-BASIC) V1.6 1994. 12. 28 (C) Copyright OMRON Corporation 1990 READY Operation Creating Programs Programs are created using text editors, such as Notepad, and are saved as text. ...

Page 167

Programming with Windows 95 HyperTerminal Transferring Programs to the Computer 1, 2, 3... 1. SAVE #1, “COMU: (43)” ↵ 3... Input the following. Select Capture Text from the Transfer menu, and specify the name of ...

Page 168

...

Page 169

Assembly Language Programming with a Details on assembly language programming for ASCII Units using a Windows terminal are given below. For details on setting up ASCII Units and programming in BASIC, refer to Appendix H Programming with Windows 95 HyperTerminal ...

Page 170

Assembly Language Programming with a Terminal Next, input the program. ! 2000: LDAA #$80 2000– LDAA #$80 ! LDAB #$7F 2002– LDAB #$7F ! STD $4000 2004– STD ! X ↵ : Format: ...

Page 171

Assembly Language Programming with a Terminal 2. 3. The operations required to go between BASIC mode, monitor mode, and mini-assembler mode are summa- rized in the diagram below. BASIC mode Start program transfer using the START/STOP switch on the front ...

Page 172

...

Page 173

Accumulator Register The arithmetic hardware register of the microprocessor. ASCII Unit Program The BASIC program that runs the ASCII Unit and communicates with the PC program. Backplane A rack of hardware slots sharing a common bus line to which the ...

Page 174

DIP switches There are two sets of DIP switches on the ...

Page 175

The mode or environment where assembly language programs are written, edited, and tested. monitor mode commands The commands used in monitor mode for writing, editing, and debugging an assembly language program. MSB/LSB MSB stands for Most Significant Byte ...

Page 176

A microprocessor index register used for assembly language programming. start address The starting address of a block of data. This term is used as a parameter in many of the assembly language monitor mode commands. start mode Indicates ...

Page 177

A applications, precautions, xiii ASCII Busy Flag, 13 ASCII Unit boot program, 4 start mode, 4 Assembly language Accumulator, 68 base address, 69 DEF USR statement, 68 format, 69 Index register, 68 LOAD command, 68 monitor commands Compare, 72 Disassembler, ...

Page 178

DIP switch settings baud rate, 6 boot mode, 5 data section mode, 5 screen size, 5 start mode, 5 DIP Switches, 4 DIP switches left side, 5, 110 left–side, 4 right side, 6, 111 E–I EEPROM, ...

Page 179

A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. W165-E1-04 The following table outlines the changes made to the manual during each revision. Page numbers refer to the ...

Page 180

...

Page 181

...

Page 182

W165-E1-04 ...

Related keywords