The text of a manual · part 17 of 18
SYSMAC Programmable Controllers C200H (CPU01-E/03-E/11-E) Installation Guide, pages 154 to 163
Pages 154 to 163 of 173
The original document is the PDF (1.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Omron C200H-CPU01-E
Page 154
Appendix E
Programming Instructions Name Mnemonic
Symbol
7-SEGMENT DECODER (@)SDEC(78)
Function
Operand Data Areas
Converts hexadecimal values from the source word (S) into 7-segment display data. Results are placed in consecutive half-words, starting at the first destination word (D). Di gives digit and destination details. (The rightmost digit gives the first digit to be converted. The next digit to the left gives the number of digits to be converted minus 1. If the next digit is 1, the first converted data is transferred to left half of the first destination word. If it is 0, the transfer is to the right half).
SDEC(78) S Di D
S: IR SR HR AR LR TC DM
Di: IR HR AR LR TC DM #
Dd/Dr: IR SR HR AR LR TC DM
R: IR HR AR LR DM
S: IR SR HR AR LR TC DM #
DBs: IR HR AR LR TC DM
D: IR HR AR LR DM
S
0 to F
D
FLOATING POINT DIVIDE (@)FDIV(79)
Divides one floating point value by another and outputs a floating point result. The rightmost seven digits of each set of two words (eight digits) are used for mantissa, and the leftmost digit is used for the exponent and its sign (Bits 12 to 14 give the exponent value, 0 to 7. If bit 15 is 0, the exponent is positive; if it’s 1, the exponent is negative).
FDIV(79) Dd Dr R
÷
SINGLE WORD DISTRIBUTE (@)DIST(80)
Dd + 1
Dd
Dr + 1
Dr
R+1
R
Moves one word of source data (S) to the destination word whose address is given by the destination base word (DBs) plus offset (Of).
DIST(80) S DBs Of
S
Base (DBs)
+ Offset (OF) (S)
Of: IR HR AR LR TC DM #
(DBs + Of)
Data Areas These footnote tables show the actual ranges of all data areas. Bit numbers are provided (except for DM and TC areas); remove the rightmost two digits for word numbers. IR 00000 to 23515
140
SR
HR
TR
AR
LR
TC
DM
#
23600 to 25507
HR 0000 to 9915
TR 0 to 7
AR 0000 to 2715
LR 0000 to 6315
TC 000 to 511
Read/Wr: DM 0000 to DM 0999 Rd only: DM 1000 to DM 1999
0000 to 9999 or 0000 to FFFF
Page 155
Appendix E
Programming Instructions Name Mnemonic
Symbol
DATA COLLECT (@)COLL(81)
Function
Operand Data Areas
Extracts data from the source word and writes it to the destination word (D). The source word is determined by adding the offset (Of) to the address of the source base word (SBs).
COLL(81) SBs Of D
SBs: IR SR HR AR LR TC DM
Of: IR HR AR LR TC DM #
D: IR HR AR LR TC DM
S: IR SR HR AR LR DM #
Bi: IR HR AR LR TC DM #
D: IR HR AR LR DM
S: IR SR HR AR LR TC DM #
Di: IR HR AR LR TC DM #
D: IR SR HR AR LR TC DM
Base (DBs)
+ Offset (OF) (SBs+Of)
MOVE BIT (@)MOVB(82)
(D)
Transfers the designated bit of the source word or constant (S) to the designated bit of the destination word (D). The rightmost two digits of the bit designator (Bi) specify the source bit. The two leftmost digits specify the destination bit.
MOVB(82) S Bi D
S
D
MOVE DIGIT (@)MOVD(83)
Moves hexadecimal content of up to four specified 4-bit source digit(s) from the source word to the specified destination digit(s) (S gives the source word address. D specifies the destination word). Specific digits within the source and destination words are defined by the Digit Designator (Di) digits. (The rightmost digit gives the first source digit. The next digit to the left gives the number of digits to be moved. The next digit specifies the first digit in the destination word.)
MOVD(83) S Di D
15
00
S
D
Data Areas These footnote tables show the actual ranges of all data areas. Bit numbers are provided (except for DM and TC areas); remove the rightmost two digits for word numbers. IR 00000 to 23515
SR
HR
TR
AR
LR
TC
DM
#
23600 to 25507
HR 0000 to 9915
TR 0 to 7
AR 0000 to 2715
LR 0000 to 6315
TC 000 to 511
Read/Wr: DM 0000 to DM 0999 Rd only: DM 1000 to DM 1999
0000 to 9999 or 0000 to FFFF
141
Page 156
Appendix E
Programming Instructions Name Mnemonic
Symbol
REVERSIBLE SHIFT REGISTER (@)SFTR(84)
Function
Operand Data Areas
Shifts bits in the specified word or series of words either left or right. Starting (St) and ending words (E) must be specified. Control word (C) contains shift direction, reset input, and data input. (Bit 12: 0 = shift right, 1 = shift left. Bit 13 is the value shifted into the source data, with the bit at the opposite end being moved to CY. Bit 14: 1 = shift enabled, 0 = shift disabled. If bit 15 is ON when SFTR(89) is executed with an ON condition, the entire shift register and CY will be set to zero.) St and E must be in the same data area and St must be less than or equal to E.
SFTR(84) C St E
15
14
13
12 11
C
St/E/C: IR HR AR TC LR DM
00 Not used
15
00
15
00
E
St
IN
CY 15
00
15
E
IN
00
St CY
TABLE COMPARE (@)TCMP(85)
Compares a 4-digit hexadecimal value (CD) with values in table consisting of 16 words (TB: is the first word of the comparison table). If the value of CD falls within any of the comparison ranges, corresponding bits in result word (R) are set (1 for agreement, and 0 for disagreement). The table must be entirely within the one data area.
TCMP(85) CD TB R
R
CD
Tb
0
Tb + 1
1 0
Tb + 13 Tb + 14 Tb + 15
1 0 1
CD: IR SR HR AR LR TC DM #
TB/R: IR HR AR LR TC DM
1: agreement 0: disagreement
Data Areas These footnote tables show the actual ranges of all data areas. Bit numbers are provided (except for DM and TC areas); remove the rightmost two digits for word numbers. IR 00000 to 23515
142
SR
HR
TR
AR
LR
TC
DM
#
23600 to 25507
HR 0000 to 9915
TR 0 to 7
AR 0000 to 2715
LR 0000 to 6315
TC 000 to 511
Read/Wr: DM 0000 to DM 0999 Rd only: DM 1000 to DM 1999
0000 to 9999 or 0000 to FFFF
Page 157
Appendix E
Programming Instructions Name Mnemonic
Symbol
ASCII CONVERT (@)ASC(86)
Function Converts hexadecimal digits from the source word (S) into 8-bit ASCII values, starting at leftmost or rightmost half of the starting destination word (D). The rightmost digit of Di designates the first source digit. The next digit to the left gives the number of digits to be converted. The next digit specifies the whether the data is to be transferred to the rightmost (0) or leftmost (1) half of the first destination word. The leftmost digit specifies parity: 0: none, 1: even, or 2: odd.
ASC(86) S Di D
S
0 to F
D
8-bit data 15
INTERRUPT CONTROL (@)INT(89)
Operand Data Areas
08 07
S: IR SR HR AR LR TC DM
D: IR HR LR DM
N:
D:
00
Controls programmed (scheduled) inter- CC: rupts and interrupts from Interrupt Input 000 to Units. Each PC can have up to 4 IIUs. N de- 002 fines the source of the interrupt: 000 to 003 designate the no. of the IIU; 004 designates a scheduled interrupt. In IIUs, bits 00 to 07 identify the interrupting subroutine, higher bits are not used. Bit 00 of Unit 0 corresponds to interrupt subroutine 00, through to bit 07 of Unit 3 which corresponds to subroutine 31. CC is the control code, the meaning of which depends on the value of N, as follows:
INT(89) CC N D
Di: IR HR LR TC DM #
CC
N = 000 to 003
N = 004
000
Masks and unmasks interrupt bits for the designated Unit (N) according to the data in D. Bits corresponding to ON bits in D are masked, those corresponding to OFF bits are unmasked. Masked bits are recorded and will be executed when they are unmasked (unless previously cleared).
The interrupt time interval is set according to the data in D (00.01 to 99.99 s) The decimal point is not entered. The interrupt is cancelled if D is 00.00.
001
Clears the masked interrupt bits of the designated Unit (N) according to the corresponding ON bits in D. The subroutines corresponding to bits cleared in this manner will not be executed when the bit is unmasked.
The time to the first interrupt is set according to the data in D (00.01 to 99.99 s) The decimal point is not entered. The interrupt is cancelled if D is 00.00.
002
Copies the mask status of Copies the time inthe designated IIU to D. terval data to D.
000 to IR 004 HR
AR LR TC DM #
Data Areas These footnote tables show the actual ranges of all data areas. Bit numbers are provided (except for DM and TC areas); remove the rightmost two digits for word numbers. IR 00000 to 23515
SR
HR
TR
AR
LR
TC
DM
#
23600 to 25507
HR 0000 to 9915
TR 0 to 7
AR 0000 to 2715
LR 0000 to 6315
TC 000 to 511
Read/Wr: DM 0000 to DM 0999 Rd only: DM 1000 to DM 1999
0000 to 9999 or 0000 to FFFF
143
Page 158
Appendix E
Programming Instructions Name Mnemonic
Symbol
NETWORK SEND (@)SEND(90) (CPU11)
Function
Operand Data Areas
Transfers data from n source words (S is the starting word) to the destination words (D is the first address) in node N of the specified network (in a SYSMAC LINK or NET Link System). The format of the control words varies depending on the type of system. In both types of systems, the first control word (C) gives the number of words to be transferred. For NET Link Systems, in word C+1, bit 14 specifies the system (0 for system 1, and 1 for system 0), and the rightmost 7 bits define the network number. The left half of word C+2 specifies the destination port (00: NSB, 01/02: NSU), and the right half specifies the destination node number. If the destination node number is set to 0, data is transmitted to all nodes. For SYSMAC LINK Systems, the right half of C+1 specifies the response monitoring time (default 00: 2 s, FF: monitoring disabled), the next digit to the left gives the maximum number of re-transmissions (0 to 15) that the PC will attempt if no response signal is received. Bit 13 specifies whether a response is needed (0) or not (1), and bit 14 specifies the system number (0 for system 1, and 1 for system 0). The right half of C+2 gives the destination node number. If this is set to 0, the data will be sent to all nodes.
SEND(90) S D C
S: IR SR HR AR LR TC DM
D/C: IR HR AR LR TC DM
NET Link C n: no. of words to be transmitted (0 to 1000)
C+1
0X00
C+2
0000
Network no. (0 to 127) Destination node no. (0 to 126)
Destination port no.
SYSMAC LINK C n: no. of words to be transmitted, 0 to 1000
C+1
0XX0
Re-transmissions
Response monitor time (0.1 to 25.4 s)
C+2
0000
0000
Destination node no. (0 to 62)
Source N
SUBROUTINE ENTER (@)SBS(91)
SBS(91) N
Destination node N
S
D
S+1
D+1
S+n–1
D+n–1
Calls subroutine N. Moves program opera- N: 00 to 99 tion to the specified subroutine.
Data Areas These footnote tables show the actual ranges of all data areas. Bit numbers are provided (except for DM and TC areas); remove the rightmost two digits for word numbers. IR 00000 to 23515
144
SR
HR
TR
AR
LR
TC
DM
#
23600 to 25507
HR 0000 to 9915
TR 0 to 7
AR 0000 to 2715
LR 0000 to 6315
TC 000 to 511
Read/Wr: DM 0000 to DM 0999 Rd only: DM 1000 to DM 1999
0000 to 9999 or 0000 to FFFF
Page 159
Appendix E
Programming Instructions Name Mnemonic
Symbol
SUBROUTINE START SBN(92)
Function
Operand Data Areas
Marks the start of subroutine N. SBN(92)
RETURN RET(93)
N
Marks the end of a subroutine and returns None control to the main program.
RET(93)
WATCHDOG TIMER REFRESH (@)WDT(94)
N: 00 to 99
WDT(94) T
Sets the maximum and minimum limits for T: the watchdog timer (normally 0 to 130 ms). 0 to 63 New limits: Maximum time = 130 + (100 x T) Minimum time = 130 + (100 x (T–1))
IORF(97) St E
Refreshes all I/O words between the start St/E: (St) and end (E) words. Only I/O words IR may be designated. Normally these words are refreshed only once per cycle, but refreshing words before use in an instruction can increase execution speed. St must be less than or equal to E.
I/O REFRESH (@)IORF(97)
Data Areas These footnote tables show the actual ranges of all data areas. Bit numbers are provided (except for DM and TC areas); remove the rightmost two digits for word numbers. IR 00000 to 23515
SR
HR
TR
AR
LR
TC
DM
#
23600 to 25507
HR 0000 to 9915
TR 0 to 7
AR 0000 to 2715
LR 0000 to 6315
TC 000 to 511
Read/Wr: DM 0000 to DM 0999 Rd only: DM 1000 to DM 1999
0000 to 9999 or 0000 to FFFF
145
Page 160
Appendix E
Programming Instructions Name Mnemonic
Symbol
NETWORK RECEIVE (@)RECV(98) (CPU11)
Function
Operand Data Areas
Transfers data from the source words (S is the first word) from node N of the specified network (in a SYSMAC LINK or NET Link System) to the destination words starting at D. The format of the control words varies depending on the type of system. In both types of systems, the first control word (C) gives the number of words to be transferred. For NET Link Systems, in the second word (C+1), bit 14 specifies the system (0 for system 1, and 1 for system 0), and the rightmost 7 bits define the network number. The left half of word C+2 specifies the source port (00: NSB, 01/02: NSU), and the right half specifies the source node number. For SYSMAC LINK Systems, the right half of C+1 specifies the response monitoring time (default 00: 2 s, FF: monitoring disabled), the next digit to the left gives the maximum number of re-transmissions (0 to 15) that the PC will attempt if no response signal is received. Bit 13 specifies whether a response is needed (0) or not (1), and bit 14 specifies the system number (0 for system 1, and 1 for system 0). The right half of C+2 gives the source node number.
RECV(98) S D C
S: IR SR HR AR LR TC DM
C/D: IR HR AR LR TC DM
NET Link C n: no. of words to be transmitted (0 to 1000)
C+1
0X00
C+2
Source port no. (NSB: 00, NSU: 01/02)
0000
Network no. (0 to 127) Source node no. (0 to 126)
SYSMAC LINK C n: no. of words to be transmitted, 0 to 1000
C+1
0XX0
Re-transmissions
Response monitor time (0.1 to 25.4 s)
C+2
0000
0000
Source node no. (0 to 62)
Source node N
Destination node
S
D
S+1
D+1
S+n–1
D+n–1
Data Areas These footnote tables show the actual ranges of all data areas. Bit numbers are provided (except for DM and TC areas); remove the rightmost two digits for word numbers. IR 00000 to 23515
146
SR
HR
TR
AR
LR
TC
DM
#
23600 to 25507
HR 0000 to 9915
TR 0 to 7
AR 0000 to 2715
LR 0000 to 6315
TC 000 to 511
Read/Wr: DM 0000 to DM 0999 Rd only: DM 1000 to DM 1999
0000 to 9999 or 0000 to FFFF
Page 161
Glossary ASCII code
[A(merican) S(tandard) C(ode for) I(nformation) I(nterchange)] A standard computer code used to facilitate the interchange of information among various types of data-processing equipment.
ASCII Unit
An Intelligent I/O Unit. The ASCII Unit has its own CPU and 16 kilobytes of memory. This Unit enables communication between the PC and any other device which uses ASCII code. The ASCII Unit can be programmed in BASIC.
Backplane
A base to which Units are mounted to form a Rack. Backplanes provide a series of connectors for these Units along with wiring to connect them to the CPU and Power Supply. Backplanes also provide connectors used to connect them to other Backplanes. In some Systems, different Backplanes are used for different Racks; in other Systems, Racks differ only by the Units mounted to them.
back-up
A copy of existing data which is valuable if data is accidentally erased.
baud rate
Transfer speed between two devices in a system measured in bits per second. For example, an optical sensor might be configured to send its information to the FIT at 9600 baud. It is important for both of the devices to be set to the same baud rate.
bit
The smallest piece of information that can be represented on a computer. A bit has the value of either zero or one, corresponding to the electrical signals ON and OFF. A bit is one binary digit.
central processing unit
A device that is capable of storing a program and data, and executing the set of instructions contained in the program. In a PC System, the central processing unit executes the program, processes I/O signals, communicates with external devices, etc.
communication cable
Cable used to transfer data between components of a control system and conforming to the RS-232C or RS-422 standards.
Control System
All of the hardware and software components used to control other devices. A Control System includes the PC System, the PC programs, and all I/O devices that are used to control or obtain feedback from the controlled system.
counter
A PC function that counts the number of occurrences of a certain event.
CPU
An acronym for central processing unit.
cycle time
The total time it takes the PC to perform internal operations, i.e., reset the watchdog timer, read the program, receive input data, send output data, and execute instructions. Cycle time is monitored by the watchdog timer within the PC, and if it takes longer than a certain specified amount of time, an error message may be generated, or the CPU may just stop. Cycle times will differ depending on the configuration of the system.
data area
An area in the PC’s memory that is designed to hold a specific type of data, e.g., the LR area is designed to hold common data in a PC Link System.
147
Page 162
Glossary data disk
Floppy disk used to store information such as programs or I/O tables. The data disk should be used in drive B of the FIT.
data link
Allows for the connection of up to 32 PCs in a Net Link System where each is contributing information to a common memory area. Data links may be established in the LR and/or DM memory areas.
debugging
The process of checking for errors in a program.
default condition
The original condition of a function or system. For example, the FIT’s default condition is to start from its hard drive, but this default condition can be changed so that it starts from a floppy disk drive.
distributed control
An automation concept in which control of each portion of an automated system is located near the devices actually being controlled, i.e., control is decentralized and “distributed” over the system. Distributed control is a concept basic to PC Systems.
EEPROM
[E(lectrically) E(rasable) P(rogrammable) R(ead) O(nly) M(emory)] A type of ROM in which stored data can be erased and reprogrammed. This is accomplished using a special control lead connected to the EEPROM chip and can be done without having to remove the EEPROM chip from the device in which it is mounted.
electrical noise
Electric ‘static’ that can disturb electronic communications. The ‘snow’ that can appear on a TV screen is an example of the effects of electrical noise.
EPROM
[E(rasable) P(rogrammable) R(ead) O(nly) M(emory)] A type of ROM in which stored data can be erased, by ultraviolet light or other means, and reprogrammed.
Expansion I/O Unit
An I/O Unit for a Package-type PC that provides more I/O points to the PC.
factory computer
A general-purpose computer, usually quite similar to a business computer, that is used in automated factory control.
flag
A bit that is turned ON and OFF automatically by the system in order to provide status information.
High-speed Counter
A Special I/O Unit. A High Speed Counter Unit counts independently of the PC’s cycle time. This allows counting of very short, fast signals.
host computer
A computer that is used to transfer data to or receive data from a PC in a Host Link system. The host computer is used for data management and overall system control. Host computers are generally small personal or business computers.
IBM PC/XT or AT, or compatibles
A computer that has similar architecture to, and is logically compatible with an IBM PC/XT computer; and that can run software designed for that computer.
instruction line
A succession of instructions which begins with a load instruction at the left bus bar and ends at a right bus bar.
148
Page 163
Glossary interface
An interface is the conceptual boundary between systems or devices and usually involves changes in the way the communicated data is represented. Interface devices such as NSBs perform operations such as changing the coding, format, or speed of data.
I/O devices
The devices which are connected to the terminals on I/O Units, Special I/O Units, or Intelligent I/O Units. I/O devices may be part of the Control System if they function to help control other devices, or they may be part of the controlled system if they interact directly with it.
I/O point
The place at which an input signal enters the PC System or an output signal leaves the PC System. In physical terms, an I/O point corresponds to terminals or connector pins on a Unit; in terms of programming, an I/O point corresponds to an I/O bit in the IR area.
I/O table
Diagram written to the IR memory area listing the type of I/O units controlled by a PC. It must be cleared before programming or when I/O units are changed. Tables can be read, verified, or transferred to a EPROM.
I/O Unit
The most basic type of Unit mounted to a Backplane. I/O Units include Input Units and Output Units, each of which is available in a range of specifications. I/O Units do not include Special I/O Units, Link Units, etc.
Limit Switch
A switch that detects when an object has reached the limit of its movement by actually making contact with the object. Limit Switches are fitted to electric elevators, traveling cranes, etc. to indicate when a certain part of the equipment has traveled to the specified limit.
Link Unit
Any of the Units used to connect a PC to a Link System. These are Remote I/O Units, I/O Link Units, PC Link Units, Host Link Units, and Net Link Units.
operating mode
The Display Terminal Unit can operate in five different modes: Page Read, Terminal, Dynamic Scan, Read/Write, and Self-Diagnosis.
page
One complete Display Terminal Unit screen. Two hundred screens can be stored on one RAM card.
parallel interface
The parallel interface uses the RS-232 connector, but is not serial communication. When parallel mode is selected as the communication mode, up to 16 Display Terminal Units can be connected to a PC in parallel.
PC
An acronym for Programmable Controller.
PCB
An acronym for printed circuit board.
PC Link Unit
A Unit used to connect two or more PCs together so that they can exchange data through their LR areas.
Photoelectric Switch
A switch that uses light to detect the presence of an object.
Power Supply
A Unit that mounts to a Backplane in a Rack PC. It provides power at the voltage required by the other Units on the Rack.
printed circuit board
A board onto which electrical circuits are printed for mounting into a computer or electrical device.
149