The H8GN supports serial communications specifications, CompoWay/F and Sysway.
This User's Manual describes the communications functions of the H8GN.
Before using your H8GN thoroughly read and understand this manual in order to
ensure correct use.
Also, store this manual in a safe place so that it can be retrieved whenever necessary.
E OMRON, 2000
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted,
in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior
written permission of OMRON.
No patent liability is assumed with respect to the use of the information contained herein.
OMRON is constantly striving to improve its high-quality products, the information contained in this manual is
subject to change without notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages
resulting from the use of the information contained in this publication.
Moreover, because
I
PRECAUTIONS
When the product is used under the circumstances or environments described in this
manual always adhere to the limitations of the rating and functions. Also, for safety,
take countermeasures such as fitting failĆsafe installations.
DO NOT USE:
• In circumstances or environments that have not been described in this manual.
• For control in nuclear power, railway, aircraft, vehicle, incinerator, medical, enterĆ
tainment, or safety applications
• Where death or serious property damage may occur, or where extensive safety preĆ
cautions are required.
II
SAFETY PRECAUTIONS
JSafety Signal Words
This manual uses the following signal words to mark safety precautions for the H8GN.
These precautions provide important information for the safe application of the product. You
must be sure to follow the instructions provided in all safety precautions.
Indicates information that, if not heeded, could result in relatively serious or
CAUTION
minor injury, damage to the product, or faulty operation.
JSafety Precautions
CAUTION
F Electric Shock Warning
Tighten the terminal screws properly. Loose screws may cause ignition and malfunction.
Tightening torque :0.5 Nm max.
Do not operate this product in flammable and explosive gas atmospheres.
The life expectancy of the output relays varies greatly with the switching capacity and other switching
conditions. Always use the output relays within their rated load and electrical life expectancy. If an outĆ
put relay is used beyond its life expectancy, its contacts may become fused or burned.
Never disassemble, repair or modify the product.
Doing so may cause electric shock, fire or malfunction.
Do not allow metal fragments or lead wire scraps to fall inside this products.
These may cause leak of electricity, fire or malfunction.
III
NOTICE
Be sure to observe these precautions to ensure safe use.
(1) When storing the H8GN, make sure that the ambient temperature and humidity are within the
rated values. Leave the H8GN at room temperature for at least three hours before using the H8GN
if it has been stored at an ambient temperature of Ć10_C or below.
(2) Do not use the H8GN in the following locations.
Ă• Locations with excessive vibration or shock.
Ă• Locations where the H8GN is exposed to sprayed water or oil.
(3) Do not use the H8GN in dusty environments or expose it to corrosive gases or direct sunlight.
(4) Be sure to use the H8GN according to its rated ambient operating temperature and humidity
ranges.
(5) Make sure that the voltage is applied within the specified range. Otherwise the internal elements
of the H8GN may be damaged.
(6) When using the H8GN in an area with excess electronic noise, separate the H8GN, wiring, and the
equipment which generates the input signals as far as possible from the noise sources. It is also
recommended to shield the input signal wiring to prevent electronic interference.
(7) If the H8GN is used in locations with high static electricity, such as sites with pipes transporting
molding materials, powders, or liquids, be sure to separate the H8GN from all sources generating
static electricity.
(8) Organic solvents (such as paint thinner), as well as very acidic or basic solutions can damage the
outer casing of the H8GN.
IV
NOTICE
(1) Do not use the H8GN in the following locations:
Ă• Locations with high humidity that may result in condensation
Ă• Locations with radical temperature changes
(2) Pay the utmost attention not to make mistakes in polarity when wiring the Timer.
(3) Always maintain the power supply voltage within the specifications.
(4) Connect the power supply voltage through a relay or switch in such a way that the voltage reaches
a fixed value at once. Otherwise, the H8GN may not be reset or outputs may turn ON.
(5) Be sure that the capacity of the power supply is large enough, otherwise the H8GN may not start
due to inrush current (Approx. 15A) that may flow for an instant when the H8GN is turned on.
(6) For the power supply of an input device for the H8GN, use an isolating transformer with the primaĆ
ry and secondary windings mutually isolated and the secondary winding not grounded.
(7) Leaving the H8GN with outputs ON at a high temperature for a long time may hasten the degradaĆ
tion of internal parts (such as electrolytic capacitors). For this reason, by using in combination
with relays, avoid situations where outputs are left ON for a long time (e.g. one month or more).
(8) If the watertight rubber packing is not compressed sufficiently, water may penetrate the panel. For
this reason, be sure to tighten the reinforcement screws of the Mounting Adapter (Y92FĆ34).
(9) The output contacts are SPSTĆNO and SPSTĆNC. For this reason, be sure not to use these contacts
in circuits that will result in 3Ćpoint shortĆcircuits (power supply shortĆcircuiting due to arcing).
(10) In counter operation:
Ă• Changing the set value
When changing the set value during operation, the output will turn ON if the set value equals
the present value.
Ă• Operation with set value and present value of 0
The output will turn ON if the set value of 0 equals the present value. The output will be OFF
while the Reset Key is pressed or the reset input is ON.
(11) In timer operation:
Ă• Changing the set value
When changing the set value during operation, the H8GN operates in the same way as when the
present value reached the set value because a constant readĆin system is in use. And output may
turn ON depending on the output mode if the set value is changed as follows:
Input mode UP:Present value y Set value
Input mode DOWN:Elapsed time y Set value (Present value=0)
Note: When in DOWN mode, the amount set value is changed is added to or subtracted from
the present value.
Ă• Operation with set value of 0
a)When the output mode is set to A, B (oneĆshot output), D, or F, output will turn ON when
the start signal is input.
b)When the output mode is set to B (hold output), E, or Z, output will remain OFF even when
the start signal is input.
V
(12) To allow for the startup time of peripheral devices (sensors, etc.), the H8GN starts timing operaĆ
tion between 210 to 260 ms after power is turned ON. For this reason, in operations where timing
starts from power ON, the time display will actually start from 258 ms. If the set value is 258 ms
or less, the time until output turns ON will be a fixed value between 210 and 260. (Normal operaĆ
tion is possible for set value of 259 ms or more.) In applications where a set value of 258 ms or less
CHAPTER 1 ABOUT COMMUNICATIONS METHODS1-1. . . . . .
This chapter briefly describes the supported communications methods and how
to wire equipment. First-time users should read this chapter without fail to ensure
proper installation of the equipment.
This chapter briefly describes the supported communications methods
and how to wire equipment. FirstĆtime users should read this chapter
without fail to ensure proper installation of the equipment.
*1 Baud rate, data bits, stop bits and vertical parity can each be set indeĆ
pendently in the communications setting level. Highlighted characters
in the table above indicate defaults.
*1
*1
*1
1200, 2400, 4800, 9600 (bit /s)
7 or 8 bits
1 or 2 bits
BCC (block check character)
1–2
JTransmission
procedure
When the host computer transmits a command frame, the H8GN transĆ
mits a response frame that corresponds to the command frame. A single
response frame is returned for each command frame. The following diaĆ
gram shows the operation of the command and response frames.
JInterface
JWiring
Host computer
Host computer
H8GN
RS-485
Abbr
FG
–
+
SG
Command frame
Response frame
Command frame
Allow a wait time of at least 2 ms until the next command is sent after the
host computer receives a response from the H8GN.
Communications with the host computer are carried out through a stanĆ
dard RSĆ485 interface.
Ă• RSĆ485 connections can be 1 : 1 or 1 : N. A maximum of 32 Units (including
the host computer) can be connected in oneĆtoĆN systems.
Ă• The total cable length is 500 m max.
Ă• Use a shielded, twistedĆpair cable AWG28 or larger for wiring the H8GN.
Communications transceiver
H8GN
RS-485
Pin No. Abbr
8
A(–)
7
B(+)
TX
RX
Shielded cable
A<B: [1] mark
A>B: [0] space
Both ends of the transmission line
(including the host computer) must be
specified (by setting terminator ON) as
the end node. The total resistance of
the terminators must be at least 54Ω.
Match the communications specifications of the H8GN and the host comĆ
puter. If a oneĆtoĆN system is being used, be sure that the communications
specifications of all devices in the system (except individual unit numbers)
are the same.
Terminator
Shielded cable
6.8V
120Ω
(1/2W)
H8GN
end node
RS-485
Pin No. Abbr
8
A(–)
7
B(+)
Use a terminator of resistance
120Ω = (1/2W).
1–3
JCommunications
parameters
The H8GNs communications specifications are set in the communications
setting level. These parameters are set on the H8GNs front panel.
The following table shows the communications parameters and their setĆ
ting ranges.
Parameter
Communications unit No.0 to 99
Baud rate1.2 / 2.4 / 4.8 / 9.6 (k bit/s)
Communications data length7 / 8 (bit)
Communications stop bit1/2
Communications parityNone / even / odd
Displayed
Characters
Setting RangeSet Value
Highlighted characters indicate defaults.
F Communications
parameter setup
Before you carry out communications with the H8GN, set up communicaĆ
tions unit No., Communication rate and other parameters by carrying out
the following procedure.
(1) Hold down the key for at least three seconds to move from the
operation level" to the initial setting level."
(2) Press the key for less than one second to move from the initial
setting level" to the communications setting level."
(3) Select the parameters as shown below by pressing the key.
(4) Use the or keys to change the parameter set values.
0, 1 to 99
1.2 / 2.4 / 4.8 / 9.6 (k bit/s)
7 / 8 (bit)
1/2
//
Communications unit No.
Baud rate
Communications data length
Communications stop bit
Communications parity
H8GN
1–4
F Communications
parameter setup
Note that communications parameters are enabled after they have been
changed by resetting the controller.
Ă• Communications unit No. ()
This parameter is for setting the unit No. to each of the H8GN. This unit
No. is set so that the host computer can identify the H8GN when commuĆ
nications are carried out with the host computer. Set a unit No. within
the range 0 to 99 for each H8GN connected to the host computer on the
network. Default is 1". When two or more H8GN are used, do not set
the same unit No. Doing so will prevent normal operation.
Ă• Baud rate ()
This parameter is for setting the baud rate when communicating with
the host computer. Set one of 1.2 (1200 bit/s)", 2.4 (2400 bit/s)", 4.8
(4800 bit/s)" and 9.6 (9600 bit/s)".
Ă• Communications data length ()
This parameter is for setting the communications data length. Set either
of 7 bits" or 8 bits".
Ă• Communications stop bit ()
This parameter is for setting the communications stop bit. Set either of
1" or 2".
Ă• Communications parity ()
This parameter is for setting the communications parity. Set one of
none", even" or odd".
1–5
1–6
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
CHAPTER2
CHAPTER 2
CompoWay/F
COMMUNICATIONS
PROCEDURES
Read this chapter if you are to communicate using the CompoWay/F
format.
Unless otherwise indicated, numbers in this manual are expressed in hexĆ
adecimal. Values in double quotation marks, such as 00", are ASCII.
The number underneath each delimiter in a frame indicates the number
of bytes.
JCommand frame
Text
Node No.Sub-addressCommand text
STX00ETX
122111
0
BCC calculation range
BCCSID
STX
Node number• This number specifies the transmission’s destination.
Sub-addressThis is not used on the H8GN. Be sure to set the sub-address to “00”.
SID (service ID)This is not used on the H8GN. Be sure to set the sub-address to “00”.
Command textCommand text area. For details, see “2.2 Structure of Command Text.”
ETXThis code (03) indicates the end of the text.
BCCBlock Check Character
This code (02) indicates the beginning of the communications frame (text).
Always set this character in the first byte.
When STX is received again during reception, reception is carried out again from
the point where STX was received.
• Specify the H8GN’s “Communications unit No.”.
• BCD range “00” to “99” and “XX” can be set.
• Specify “XX” for a broadcast transmission. No response will be returned for broad-
cast transmissions.
• No responses will be returned from node Nos. set otherwise from the above.
The BCC result is found by calculating the exclusive OR of the bytes from the node
No. up to ETX.
2–2
2.1Data Format
F BCC calculation
example
The BCC is formed by converting the 8Ćbit value obtained by converting
the exclusive OR of the node No. up to ETX into two ASCII characters, and
setting this to the BCC area.
STXSIDETXBCC
Node No.Sub-addressCommand text
BCC=30H30H30H30H30H30H35H30H33H03H=35H
Calculation result 35H is set to the BCC area.
The symbol indicates exclusive OR operation and the H indicates hexadecimal code.
JResponse frame
STXETX
122211
End
code
00Normal completionThe command ended normally without error.None
0FFINS command errorThe specified FINS command could not be executed.
10Parity errorThe sum total of bits whose received data is “1” does not
11Framing errorStop bit is “0”.1
12Overrun errorAn attempt was made to transfer new data when the recep-
13BCC errorThe calculated BCC value is different from the received BCC
14Format error• The command text contains characters other than 0 to 9,
Ă• The end code is returned to received command frames addresses to the
self node.
Ă• No response will be returned if all the items in the response frame are
incomplete up to the ETX and BCC.
Ă• Error Detection Priority" indicates the priority when two or more
errors occur simultaneously.
2–3
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
JCommunications data
Set (monitor) ValueMinus ValueDecimal point
8 digits (Hex)2’s complementDecimal point is removed and the result is converted to hexadecimal.
Example) 105.0 ! 1050 ! 000041A
JExample of end
code
The following examples show an end code when a command did not end
normally.
Example 1) Illegal subĆaddress, and no SID and command text
Command Format
Node No.Sub-address
STX0ETX
A
BCC
Response Format
Node No.Sub-addressEnd code
STX0ETX
A16
BCC
End code is 16" (subĆaddress error).
This is because a subĆaddress was received and the subĆaddress
error has a higher error detection priority than the format error.
Example 2) No command text
Command Format
Node No.Sub-address
STX0ETX
SID
0
0
BCC
Response Format
Node No.Sub-addressEnd code
STX0ETX
014
BCC
End code is 14" (format error).
Example 3) All node Nos. not provided
Command Format
BCC
STXETX
The node No. is lacking one character.
Response Format
No response
Example 4) No subĆaddress, and illegal BCC
Command Format
Node No.
STXETX
BCC
Err
Response Format
Node No.Sub-addressEnd code
STX0ETX
013
SubĆaddress is 00" and end code is 13" (BCC error).
BCC
2–4
2.2Structure of Command Text
2.2Structure of Command Text
JPDU structure
An MRC (Main Request Code) and SRC (SubĆRequest Code) followed by
the various required data is transferred to the command text.
Service request PDU
MRCSRC
MRES (Main Response Code) and SRES (SubĆResponse Code) are
transferred following the above MRC/SRC. Data is then transferred
following these MRES and SRES.
Service response PDU (during normal operation)
MRCSRCMRESSRES
If the specified command text could not be executed, only the MRC/
SRC and MRES/SRES become the target response PDUs.
Service respons e PDU (at non-ex ec ut ion of specified command text )
MRCSRCMRESSRES
MRES/SRES becomes the response code except when processing
ends in normal completion."
Data
Data
JArea definitions
JType code
(variable type)
JAddresses
JNumber of
elements
Areas comprise only variable area.
The following defines variable area type codes.
Variable
type
C0R/O (read only) parameter.
C1Protect level parameter.
C2Operation and adjustment level parameter.
C3Initial setting, communications setting and advanced function set-
ting level parameter.
Each of the variable types is appended with an address. Express addresses
in 2Ćbyte hexadecimal code.
The number of elements is expressed in 2Ćbyte hexadecimal code. Specify
the number of elements within the range 0 to 2".
For example, when the number of elements is 0002", specify data for two
items from the address.
Description
2–5
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
JList of services
MRCSRCName of serviceProcess
0101Read from variable
area
0102Write to variable area This service writes to variable areas.
0503Read controller
attributes
0601Read controller
status
0801Echoback testThis service carries out the echoback test.
3005Operation
instructions
* In a memory error (RAM error) or initial state (until the control starts normaly after the
power is turned ON), all commands will not be accepted, and no response will be returned.
This service reads from variable areas.
This service reads the model No. and communications buffer size.
This service reads the run status of the
controller.
This service carries out reset, communications writing, multi-SP, move to protect
level, move to setup area 1 and software
reset.
The following table summarizes setup areas 0 and 1.
AreaDescription
Setup area 0This area groups together the protect, operation and adjustment
levels.
Setup area 1This area groups together the initial setting, communications set-
ting and advanced function setting levels.
2–6
2.3Details of Services
2.3Details of Services
JRead from
variable area
This service reads from variable areas.
Service request PDU
MRCSRC
010100
222424
Variable
type
Read start
address
Bit
position
Number of
elements
Service response PDU
MRCSRCResponse
code
0101
2240 or 8 or 16
Read data
(for number of elements)
(1) Variable type and read start address
For details on variable types and read start addresses, see Chapter 3
Communications Data."
(2) Bit position
Bit accessing is not supported on the H8GN. Fixed to 00".
(3) Number of elements
Number of
elements
0000Read is not carried out (the service response PDU is not
appended with read data), and processing ends in “normal
completion.”
0001 to 0002Read is carried out, and processing ends in “normal completion.”
Process
(4) Response code
At normal completion
Response codeNameDescription
0000Normal completionNo errors were found.
At occurrence of error
Response codeError nameCause
1001Command too longThe command is too long.
1002Command too shortThe command is too short.
1101Area type errorThe variable type is wrong.
1103Start address out-of-
range error
110BResponse too longThe number of elements is
1100Parameter errorThe bit position is other than
2203Operation errorCPU or EEPROM error
The read start address is
out of range.
larger than “0002”.
“00”.
2–7
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
JWrite to variable
area
This service writes to variable areas.
Service request PDU
MRC SRC
010200
222424
Vari-
able
type
Read start
address
Bit
posi-
tion
Number of
elements
Write data
(for number of elements)
0 or 8 or 16
Service response PDU
MRC SRCResponse
code
0102
224
(1) Variable type and write start address
For details on variable types and write start addresses, see Chapter
3ăCommunications Data."
(2) Bit position
Bit accessing is not supported on the H8GN. Fixed to 00".
(3) Number of elements
Number of
elements
0000Write is not carried out (the service response PDU is not
appended with write data), and processing ends in “normal
completion.”
0001 to 0002W rite is carried out, and processing ends in “normal completion.”
Process
2–8
2.3Details of Services
(4) Response code
At normal completion
Response codeNameDescription
0000Normal completionNo errors were found.
At occurrence of error
Response codeError nameCause
1002Command too shortThe command is too short.
1101Area type errorWrong variable type
1103Start address out-of-
range error
1104End address out-of-
range error
1003Number of elements/
data mismatch
1100Parameter error• Bit position is other than “00”.
3003Read-only dataVariable type “C0” was written to.
2203Operation error• The “communications writing”
Write start address is out of range.
The write end address (write start
address + number of elements)
exceeds the final address of the variable area.
The number of data does not match
the number of elements.
• Write data is out of setting range.
parameter is set to “OFF” (disabled).
• Writing was carried out on the
parameters from setup areas 0 to 1.
• Writing was carried out on a protected parameter other than in the
protect level.
• CPU or EEPROM error
2–9
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
JRead controller
attributes
This service reads the model No. and communications buffer size.
Service request PDU
MRC SRC
0503
22
Service response PDU
MRC SRCResponse
code
0503
2244
Model No.
10
Communica-
tions buffer size
0028
(1) Model No.
The model No. is expressed in 10Ćbyte ASCII code. Empty bytes are
space codes.
Example:
The model number for the H8GN is expressed as follows:
H 8GN– AD
(2) Communications buffer size
The communications buffer size is expressed in 2Ćbyte hexadecimal
code, and read after being converted to 4Ćbyte ASCII code.
Buffer size: 40 bytes (= H'0028)
(3) Response code
At normal completion
Response codeNameDescription
0000Normal completionNo errors were found.
At occurrence of error
Response codeNameDescription
1001Command too longThe command is too long.
2203Operation errorCPU or EEPROM error
2–10
2.3Details of Services
JRead controller
status
This service reads the run status of the controller.
Service request PDU
MRC SRC
0601
22
Service response PDU
Related
MRC SRCResponse
code
0601
224
Run
informa-
status
tion
22
(1) Run status
Run statusDescription
00Status in which the count (timer) input can be accepted (error not
generated when setup area is 0)
01Status in which the count (timer) input cannot be accepted (other
than above)
(2) Related information
70654312Bit position
00000
00
PV underflow
(3) Response code
At normal completion
Response codeNameDescription
0000Normal completionNo errors were found.
At occurrence of error
Response codeNameDescription
1001Command too longThe command is too long.
2203Operation errorCPU or EEPROM error
2–11
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
JEchoback test
This service carries out the echoback test.
Service request PDU
MRC SRC
0801
22
Test data
0 to 23
Service response PDU
MRC SRCResponse
code
0801
22
Test data
0 to 23
(1) Test data
Set any test data within the range 0" to 23".
Set a value for the test data within the ranges shown below according
to the communications data length.
Communications
data length
8 bits20 to 7E, A1 to FE converted to ASCII code
7 bits20 to 7E converted to ASCII code
T est data
(2) Response code
At normal completion
Response codeNameDescription
0000Normal completionNo errors were found.
At occurrence of error
Response codeNameDescription
1001Command too longThe command is too long.
2203Operation errorCPU or EEPROM error
2–12
2.3Details of Services
JOperation
instructions
This service carries out reset, communications writing, multiĆSP, move to
protect level, move to setup area 1 and software reset.
Service request PDU
Related
MRC SRC
3005
22
Instruc-
code
in-
tion
forma-
tion
22
Service response PDU
MRC SRCResponse
code
3005
224
(1) Instruction code and related information
Instruction
code
00Communications writing00: OFF (disabled)
01Reset00: Reset PV
02SV-bank00: Set value 0
06Software reset *00
07Move to setup area 100
08Move to protect level00
* No response will be returned when a software reset is carried out.
DescriptionRelated information
01: ON (enabled)
01: Reset totalizing count value
02: Reset PV/totalizing count value
01: Set value 1
02: Set value 2
03: Set value 3
(2) Response code
At normal completion
Response codeNameDescription
0000Normal completionNo errors were found.
At occurrence of error
Response codeError nameCause
1001Command too longThe command is too long.
1002Command too shortThe command is too short.
1100Parameter errorInstruction code and related informa-
tion are wrong.
2203Operation error• The “communications writing”
parameter is set to “OFF” (disabled). However , note that the error
is accepted regardless of the “com-
munications writing” parameter setting (ON/OFF).
• The command cannot be processed. For details, see “(3)
Description of operating instructions and precautions” below.
• CPU or EEPROM error
2–13
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
(3) Description of operation instructions and precautions
FĂCommunications writing
Set the communications writing" parameter to ON: enabled" or
OFF: disabled" according to related information. This instruction can
be accepted at both setup areas 0 and 1.
FĂReset
The PV and/or total count value is reset according to the related value.
[Reset PV]
Resets the PV." This can be accepted only in setup area 0. The operaĆ
tion error" occurs in the following instance:
Ă• When the reset is issued in setup area 1"
[Reset totalizing count value]
Resets the totalizing count value." This can be accepted only in setup
area 0. The operation error" occurs in the following instances:
Ă• When the reset is issued in setup area 1"
Ă• When select function" is set to timer"
Ă• When use total counter" is set to OFF"
[Reset PV/totalizing count value]
Resets the PV" and the totalizing count value." This can be accepted
only in setup area 0. The operation error" occurs in the following
instances:
Ă• When the reset is issued in setup area 1"
Ă• When select function" is set to timer"
Ă• When use total counter" is set to OFF"
FĂSVĆbank
Set four set value beforehand in the adjustment level so that you switch to
a desired set value. SVĆbank can be accepted at both setup areas 0 and 1.
The operation error" occurs in the following instance:
Ă• When use SVĆbank " is set to OFF"
FĂSoftware reset
This instruction resumes processing after the power is turned OFF.
This instruction can be accepted at both setup areas 0 and 1. No
response will be returned for this operation instruction.
FĂMove to setup area 1
This instruction moves to setup area 1" and can be accepted at both
setup areas 0 and 1. However, note that when initial setup/communicaĆ
tions protection" is set to 2", an operation error" is generated, and
move to setup area 1 is forbidden.
When this move is carried out from setup area 0, the display indicates
the select function" in the initial setting level." When this operation
instruction is issued in setup area 1, the display will not change.
FĂMove to protect level
This instruction moves to the protect level" and can be accepted only
in setup area 0. When this instruction command is issued in setup area
1, an operation error" is generated, and move to setup area 1 is forbidĆ
den.
2–14
2.4Response Code List
At normal completion
2.4Response Code List
Response
code
0000Normal
NameDescription
No errors were found.None
completion
At occurrence of error
Response
code
0401Unsupported
1001Command too
1002Command too
1101Area type errorThe variable type is wrong.4
1103Start address
1104End address
1003Number of ele-
110BResponse too
1100Parameter error• The bit position is other than “00”.
3003Read-only errorVariable type “C0” was written to.10
2203Operation error• The “communications writing”
NameDescription
The service function for the relevant
command
long
short
out-of-range
error
out-of-range
error
ments/data mismatch
long
command is not supported.
The command is too long.2
The command is too short.3
The read/write start address is out of
range.
The write end address (write start
address + number of elements)
exceeds the final address of the variable area.
The number of data does not match
the number of elements.
The response exceeds the communications buffer size (when larger than
number of elements 0002).
• The write data is out of the setting
range.
• The instruction code and related
information in the operating instruction is wrong.
parameter is set to “OFF” (disabled).
• Writing was carried out on the
parameters from setup areas 0 to 1.
• Writing was carried out on a protected parameter other than in the
protect level.
• Processing is not possible by operating instruction.
• CPU or EEPROM error
Error
detection
priority
Error
detection
priority
1
5
6
7
8
9
11
2–15
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
2–16
CHAPTER3
CHAPTER 3
COMMUNICATIONS
DATA
This chapter lists the details of each of the communications data in the
CompoWay/F communications procedures.
The following table lists the variable areas. Items expressed in hexadeciĆ
mal in the Set (monitor) Value" column are the setting range. Values in
parentheses ()" are the actual setting range.
For details of variable areas that are described not in numerical values but
by text, refer to the relevant parameter descriptions.
Variable
type
C00000Version * Note 1H’00000100
C00001PVH’FFFFFC19 to H’0000270F (–999 to 9999)
C00002Status * Note 1See “3.2. Status.”
C00003Totalizing count valueH’00000000 to H’05F5E0FF (0 to 99999999)Operation
C10000Operation/adjustment
C10001Initial setting/commu-
C10002Setting change protec-
C10003Reset key protectionH’00000000 (0): OFF (reset key enabled)
AddressItemSet (monitor) V alueLevel
Operation
* Counter
* At PV underflow,
lower limit value=H’FFFFFC19 (–999)
H’00000000 to H’0000270F (0 to 9999)
* Time range at timer=other than - -m- -s, - -h- -m
H’00000000 to H’000026E7 (0:00 to 99:59)
* Time range at timer=- -m- -s, - -h- -m
protection
nications protection
tion
H’00000000 (0): No restrictions in operation and ad -
justment levels
H’00000001 (1): Move to adjustment level restricted
H’00000002 (2): Display and change of only PV/SV
parameters enabled
H’00000003 (3): Display of only PV/SV parameters
enabled
H’00000000 (0): Move to initial setting/communica-
tions setting level enabled (move t o
advanced function setting level dis-
played)
H’00000001 (1): Move to initial setting/communica-
tions setting level enabled (move t o
advanced function setting level not
displayed)
H’00000002 (2): Move to initial setting/communica-
tions setting level restricted
H’00000000 (0): OFF (changing of setup on control-
ler display enabled)
H’00000001 (1): ON (changing of setup on controller
display disabled)
H’00000001 (1): ON (reset key disabled)
Protect
3–2
Variable
type
AddressItemSet (monitor) ValueLevel
C20000Set valueH’00000000 to H’0000270F (0 to 9999)
* Input mode at counter=incremental or decre-
mental
H’FFFFFC19 to H’0000270F (–999 to 9999)
* Input mode at counter=individual or phase dif-
ferent input
H’00000000 to H’0000270F (0 to 9999)
* Time range at timer=other than - -m- -s,
- -h- -m and output mode=A,B,D,E,F
H’00000000 to H’000026E7 (0:00 to 99:59)
* Time range at timer=- -m- -s, - -h- -m and
output mode=A,B,D,E,F * Note 2
H’00000000 to H’00000064 (0 to 100)
* Output mode at timer=Z
C20001Set value 0H’00000000 to H’0000270F (0 to 9999)
* Input mode at counter=incremental or decre-
mental
H’FFFFFC19 to H’0000270F (–999 to 9999)
* Input mode at counter=individual or phase dif-
ferent input
H’00000000 to H’0000270F (0 to 9999)
* Time range at timer=other than - -m- -s,
- -h- -m and output mode=A,B,D,E,F
H’00000000 to H’000026E7 (0:00 to 99:59)
* Time range at timer=- -m- -s, - -h- -m and
output mode=A,B,D,E,F * Note 2
H’00000000 to H’00000064 (0 to 100)
* Output mode at timer=Z
C20002Set value 1Same as set value 0
C20003Set value 2Same as set value 0
C20004Set value 3Same as set value 0
C20005Cycle timeH’00000000 to H’0000270F (0 to 9999)
* Time range at timer=other than - -m- -s,
- -h- -m
H’00000000 to H’000026E7 (0:00 to 99:59)
* Time range at timer=- -m- -s, - -h- -m * Note 2
Operation
Adjustment
Operation
* Note 1: This item is not displayed on the controller display.
* Note 2: Even if the set value is within the setting range, the outĆofĆrange error occurs when the 2nd digit (sextal number) is six
or above such as 5:60 (H*00000230).
3–3
CHAPTER 3 COMMUNICATIONS DATA
Variable
type
C30000Select functionH’00000000(0): Counter
C30001Input modeH’00000000(0): Incremental
C30002Time rangeH’00000000(0): 0.000s to 9.999s
C30003Timer modeH’00000000(0): Elapsed time
C30004Output mode (counter) H’00000000(0): N
C30005Output mode (timer)H’00000000(0): A
C30006Output timeH’00000001 to H’0000270F (0.01 to 99.99) * counter
H’00000001(1): 0.00s to 99.99s
H’00000002(2): 0.0s to 999.9s
H’00000003(3): 0s to 9999s
H’00000004(4): 0m0s to 99m59s
H’00000005(5): 0.0m to 999.9m
H’00000006(6): 0h0m to 99h59m
H’00000007(7): 0.0h to 999.9h
H’00000008(8): 0h to 9999h
H’00000001(1): Remainning time
H’00000001(1): F
H’00000002(2): C
H’00000003(3): K
H’00000001(1): B
H’00000002(2): D
H’00000003(3): E
H’00000004(4): F
H’00000005(5): Z
H’00000000 to H’0000270F (0.00 to 99.99) * timer
H’00000001(1): 5kHz
H’00000001(1): 1ms
Initial setting
3–4
3.1Variable Area (setup range) List
Variable
type
C30009Decimal pointH’00000000(0): - - - -
C3000APre-scale valueH’00000001 to H’0000270F (0.001 to 9.999)
C3000BInput signal edgeH’00000000(0): Rise edge
C3000CCommunications unit
C3000DBaud rate *1H’00000000(0): 1.2
C3000ECommunications data
C3000FCommunications stop
C30010Communications parity H’00000000(0): None
C30011Use SV-bankH’00000000(0): OFF
C30012Use totalizing counterH’00000000(0): OFF
C30013Display auto-return
C30014Move-to-protect-level
* 1: Communications parameters are enabled after they have been changed by turning the power OFF then back ON again.
*Spare" bits are OFF at all times.
*1: The status is as follows when reading is carried out in setup area 1:
@ PV underflow: Previous value is held until reset is generated.
@ CP1 (signal) input, CP2 (gate) input, reset input: OFF (0)
@ Output: OFF (0)
3.3Sample Program
3.3Sample Program
JN88Basic
The following sample program displays responses returned from the
H8GN on screen when command data is entered from the keyboard.
Enter starting with the unit up to the number of elements as the command
data.
This sample program was created using N88BASIC
1000’------------------------------------------------------1010’PROGRAM: H8GN Communication Sample Program (Compo Way/F)
1020’VERSION: 1.00
1030’(c) Copyright OMRON Corporation 2000
1040’All Right Reserved
1050’------------------------------------------------------1060’
1070’= Communications port setting (PARITY=EVEN, DATA=7, STOP=2)=”
1080’
1090OPEN ”COM: E73” AS #1
1100’
1110*REPEAT
1120’
1130’=====Transmission processing==========
1140’
1150’---------- Entry of send data ---------1160INPUT ”SEND DATA:”, SEND$
1170’
1180’---------- To exit processing if there is no entry ----------
1190IF SEND$=”” THEN * EXIT
1200’
1210’---------- Calculation of BCC ---------1220BCC=0
1230SEND$=SEND$+CHR$ (3)
1240FOR I=1 TO LEN (SEND$)
1250BCC=BCC XOR ASC (MID$ (SEND$, I, 1))
1260NEXT I
1270BCC$=CHR$ (BCC)
1280’
1290’---------- Transmission ---------1300SDATA$=CHR$ (2)+SEND$+BCC$
1310PRINT #1, SDATA$;
1320’
1330’=====Reception processing==========
1340’
1350*LOOP0
1360RDATA$=””
1370TIMEOUT=0
1380*LOOP
1390’---------- Detection of time–out ---------1400TIMEOUT=TIMEOUT+1
1410IF TIMEOUT>2000 THEN RESP$=”No Response”: GOTO * REND
1420IF LOC (1)=0 THEN * LOOP
1430’
3–9
CHAPTER 3 COMMUNICATIONS DATA
1440’----- Identification of end character
1450RDATA$=RDATA$+INPUT$ (LOC (1), #1)
1460IF LEN (RDATA$)<2 THEN * LOOP
1470IF MID$ (RDATA$, LEN (RDATA$) –1, 1)<>CHR$ (3) THEN * LOOP
1480RESP$=MID$ (RDATA$, 2, LEN (RDATA$) –2)
1490IF RDATA$=SDATA$ THEN * LOOP0
1500* REND
1510’
1520’---------- Display receive data ---------1530PRINT ”RESPONSE:”; RESP$
1540GOTO * REPEAT
1550’
1560* EXIT
1570’=====End processing==========
1580CLOSE #1
1590END
FĂSample operation
Read the PV of unit No.00. (In this example, PV=335.)
(reading is continued if character is not end character)
RUN
SEND DATA: 000000101C00001000001
RESPONSE: 000000010100000000014F