Preset Counter/ Timer Communications Functions OMRON Corporation

Preset Counter/ Timer Communications Functions OMRON Corporation
Preset Counter/ Timer
Communications
Functions
OMRON Corporation
Industrial Automation Company
Measuring and Supervisory Controls Department
Shiokoji Horikawa, Shimogyo-ku,
Kyoto 600-8530 Japan
Tel: (81)75-344-7108/Fax: (81)75-344-7189
Regional Headquarters
OMRON EUROPE B.V.
Wegalaan 67-69, NL-2132 JD Hoofddorp
The Netherlands
Tel: (31)2356-81-300/Fax: (31)2356-81-388
OMRON ELECTRONICS, LLC
1 East Commerce Drive, Schaumburg, IL 60173
U.S.A.
Tel: (1)847-843-7900/Fax: (1)847-843-8568
OMRON ASIA PACIFIC PTE. LTD.
83 Clemenceau Avenue, #11-01, UE Square,
Singapore 239920
Tel: (65)835-3011/Fax: (65)835-2711
OMRON CHINA CO. LTD.
BEIJING OFFICE
Room 1028, Office Building,
Beijing Capital Times Square,
No.88 West Chang'an Road,
Beijing 100031 China
Tel: (86)10-8391-3005/Fax: (86)10-8391-3688
User's Manual
Authorized Distributor:
Cat. No. M066-E1-1
Cat. No. M066-E1-1
Note: Specifications subject to change without notice.
Printed in Japan
0301-2M (0600) (B)
H8GN
Preface
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. Moreover, because
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. NevertheĆ
less, 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.
I
H8GN
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
H8GN
SAFETY PRECAUTIONS
J Safety 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.
CAUTION
Indicates information that, if not heeded, could result in relatively serious or
minor injury, damage to the product, or faulty operation.
J Safety Precautions
F Electric Shock Warning
CAUTION
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 * /",!"& ,!
*, .$-+ . ,! , *''% ,%(*,-* '* , $+, ,!* !'-*+ '* -+"& ,! " ", !+ & +,'* , & %"&, ,%(*,-* ' 3 _ '* $'/
' &', -+ ,! "& ,! '$$'/"&
$',"'&+
•
',"'&+ /",! 0++". ."*,"'& '* +!'#
•
',"'&+ /!* ,! "+ 0('+ ,' +(*1 /,* '* '"$
' &', -+ ,! "& -+,1 &."*'&%&,+ '* 0('+ ", ,' '**'+".
+-* ,' -+ ,! '*"&
,' ",+ *, %"&, '(*,"&
++ '* "*, +-&$" !,
,%(*,-* & !-%"",1
*& +
# +-* ,!, ,! .'$, "+ (($" /",!"& ,! +("" *& ,!*/"+ ,! "&,*&$ $%&,+
' ,! %1 % !& -+"&
,! "& & * /",! 0++ $,*'&" &'"+ +(*, ,! /"*"& & ,!
)-"(%&, /!"!
&*,+ ,! "&(-, +" &$+ + * + ('++"$ *'% ,! &'"+ +'-*+ , "+ $+'
*'%%& ,' +!"$ ,! "&(-, +" &$ /"*"&
,' (*.&, $,*'&" "&,**&
,! "+ -+ "& $',"'&+ /",! !" ! +,," $,*"",1 +-! + +",+ /",! ("(+ ,*&+('*,"&
%'$"&
%,*"$+ ('/*+ '* $")-"+ +-* ,' +(*, ,! *'% $$ +'-*+
&*,"&
+,," $,*"",1
* &" +'$.&,+ +-! + ("&, ,!"&&* + /$$ + .*1 "" '* +" +'$-,"'&+ & % ,!
'-,* +"&
IV
' ,! NOTICE
5 45: ;9, :/, 04 :/, -5225=04. 25*(:0549
•
•
5*(:0549 =0:/ /0./ /;30+0:? :/(: 3(? 8,9;2: 04 *54+,49(:054
5*(:0549 =0:/ 8(+0*(2 :,36,8(:;8, */(4.,9
(? :/, ;:359: (::,4:054 45: :5 3(1, 309:(1,9 04 652(80:? =/,4 =0804. :/, #03,8
2=(?9 3(04:(04 :/, 65=,8 9;662? <52:(., =0:/04 :/, 96,*0-0*(:0549
544,*: :/, 65=,8 9;662? <52:(., :/85;./ ( 8,2(? 58 9=0:*/ 04 9;*/ ( =(? :/(: :/, <52:(., 8,(*/,9
( -0>,+ <(2;, (: 54*, :/,8=09, :/, 3(? 45: ), 8,9,: 58 5;:6;:9 3(? :;84 , 9;8, :/(: :/, *(6(*0:? 5- :/, 65=,8 9;662? 09 2(8., ,45;./ 5:/,8=09, :/, 3(? 45: 9:(8:
+;, :5 048;9/ *;88,4: 6685> :/(: 3(? -25= -58 (4 049:(4: =/,4 :/, 09 :;84,+ 54
58 :/, 65=,8 9;662? 5- (4 046;: +,<0*, -58 :/, ;9, (4 0952(:04. :8(49-583,8 =0:/ :/, 6803(A
8? (4+ 9,*54+(8? =04+04.9 3;:;(22? 0952(:,+ (4+ :/, 9,*54+(8? =04+04. 45: .85;4+,+
,(<04. :/, =0:/ 5;:6;:9 (: ( /0./ :,36,8(:;8, -58 ( 254. :03, 3(? /(9:,4 :/, +,.8(+(A
:054 5- 04:,84(2 6(8:9 9;*/ (9 ,2,*:852?:0* *(6(*0:589 58 :/09 8,(954 )? ;904. 04 *53)04(:054
=0:/ 8,2(?9 (<50+ 90:;(:0549 =/,8, 5;:6;:9 (8, 2,-: -58 ( 254. :03, ,. 54, 354:/ 58 358,
- :/, =(:,8:0./: 8;)),8 6(*104. 09 45: *5368,99,+ 9;--0*0,4:2? =(:,8 3(? 6,4,:8(:, :/, 6(4,2 58
:/09 8,(954 ), 9;8, :5 :0./:,4 :/, 8,04-58*,3,4: 9*8,=9 5- :/, 5;4:04. +(6:,8 &A
#/, 5;:6;: *54:(*:9 (8, " "#A (4+ " "#A 58 :/09 8,(954 ), 9;8, 45: :5 ;9, :/,9, *54:(*:9
04 *08*;0:9 :/(: =022 8,9;2: 04 A6504: 9/58:A*08*;0:9 65=,8 9;662? 9/58:A*08*;0:04. +;, :5 (8*04.
4 *5;4:,8 56,8(:054
•
/(4.04. :/, 9,: <(2;,
%/,4 */(4.04. :/, 9,: <(2;, +;804. 56,8(:054 :/, 5;:6;: =022 :;84 0- :/, 9,: <(2;, ,7;(29
:/, 68,9,4: <(2;,
•
6,8(:054 =0:/ 9,: <(2;, (4+ 68,9,4: <(2;, 5- #/, 5;:6;: =022 :;84 0- :/, 9,: <(2;, 5- ,7;(29 :/, 68,9,4: <(2;, #/, 5;:6;: =022 ), =/02, :/, !,9,: ,? 09 68,99,+ 58 :/, 8,9,: 046;: 09 4 :03,8 56,8(:054
•
/(4.04. :/, 9,: <(2;,
%/,4 */(4.04. :/, 9,: <(2;, +;804. 56,8(:054 :/, 56,8(:,9 04 :/, 9(3, =(? (9 =/,4 :/,
68,9,4: <(2;, 8,(*/,+ :/, 9,: <(2;, ),*(;9, ( *549:(4: 8,(+A04 9?9:,3 09 04 ;9, 4+ 5;:6;: 3(?
:;84 +,6,4+04. 54 :/, 5;:6;: 35+, 0- :/, 9,: <(2;, 09 */(4.,+ (9 -5225=9
46;: 35+, $ 46;: 35+, %
Note:
y
y
8,9,4: <(2;,
2(69,+ :03,
",: <(2;,
",: <(2;, 8,9,4: <(2;,
%/,4 04 % 35+, :/, (35;4: 9,: <(2;, 09 */(4.,+ 09 (++,+ :5 58 9;):8(*:,+ -853
:/, 68,9,4: <(2;,
•
6,8(:054 =0:/ 9,: <(2;, 5- (
%/,4 :/, 5;:6;: 35+, 09 9,: :5 54,A9/5: 5;:6;: 58 5;:6;: =022 :;84 =/,4
:/, 9:(8: 90.4(2 09 046;:
)
%/,4 :/, 5;:6;: 35+, 09 9,: :5 /52+ 5;:6;: 58 ' 5;:6;: =022 8,3(04 ,<,4 =/,4
:/, 9:(8: 90.4(2 09 046;:
V
H8GN
(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
is required, use start timing with signal input.
VI
H8GN
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Precautions
I
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II
Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . III
Notice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV
Notice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
CHAPTER 1 ABOUT COMMUNICATIONS METHODS . . . . . .
1Ć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.
1.1
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction
1Ć2
........................................................
1Ć2
Communications specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć2
Transmission procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć3
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć3
Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć3
Communications parameters
1Ć4
.........................................
CHAPTER 2 COMPOWAY/F COMMUNICATIONS
PROCEDURES . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć1
Read this chapter if you are to communicate using the CompoWay/F format.
2.1
Data Format
............................................
Command frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
2Ć3
Communications data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć4
Example of end code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć4
Structure of Command Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć5
PDU structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć5
Area definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć5
Type code (variable type)
2Ć5
............................................
.........................................................
2Ć5
Number of elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć5
List of services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć6
Details of Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć7
Read from variable area
.............................................
2Ć7
Write to variable area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć8
Read controller attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć10
Read controller status
2.4
2Ć2
Response frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addresses
2.3
2Ć2
...............................................
2Ć11
Echoback test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć12
Operation instructions
2Ć13
...............................................
Response Code List
.....................................
2Ć15
H8GN
CHAPTER 3 COMMUNICATIONS DATA
..................
3Ć1
This chapter lists the details of each of the communications data in the CompoĆ
Way/F communications procedures.
3.1
Variable Area (setup range) List
...........................
3Ć2
3.2
Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3Ć6
3.3
Sample Program
........................................
3Ć9
APPENDIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AĆ1
ASCII List
INDEX
...................................................
AĆ2
CHAPTER 1 ABOUT COMMUNICATIONS METHODS
1
CHAPTER 1
ABOUT
COMMUNICATIONS
METHODS
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.1
Outline
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć2
Communications specifications
. . . . . . . . . .
1Ć2
. . . . . . . . . . . . . . . .
1Ć3
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć3
Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1Ć3
Communications parameters . . . . . . . . . . . .
1Ć4
Transmission procedure
1-1
CHAPTER 1
1.1
J
ABOUT COMMUNICATIONS METHODS
Outline
Introduction
$! ,-+#-) "+- /$! +))0*%/%+*. "0*/%+*. -! -!/! +* /$! $+./
+),0/!- * /$! . ,-)!/!-. -! )+*%/+-! +- .!/ "-+) /$! $+./
+),0/!- $!-!"+-! /$! !.-%,/%+* ,-+1% ! $!-! %. "-+) /$! 1%!2,+%*/
+" /$! $+./ +),0/!-
+),+3 %. . ./* - +))0*%/%+*. "+-)/ "+- #!*!-(
.!-%( +))0*%/%+*. $%. "+-)/ 0.!. ./* - "-)! "+-)/ . 2!((
. /$! +))* . 2$%$ $1! ,-+1!* .0!.."0( %* . .
$!-!"+-! %/ * .%),(%"3 +))0*%/%+*. !/2!!* +),+*!*/. * /$!
$+./ +),0/!-
*
/+-3 */!-"! !/2+-' !-1%!
$! ,-+/++( ,-+1% !. )!..#! +))0*%/%+*. !/2!!* +*/-+(6
(!-. %* *!/2+-'.
$! $1! /$! "+((+2%*# +))0*%/%+*. "0*/%+*.
• ! %*#2-%/%*# +" ,-)!/!-.
• ,!-/%+* %*./-0/%+*.
• !(!/%+* +" .!/0, (!1!(.
+))0*%/%+*. -! .0&!/ /+ /$! "+((+2%*# +* %/%+*
• -)!/!-. * ! 2-%//!* +*(3 2$!* /$! 4+))0*%/%+*. 2-%/%*#
,-)!/!- %. .!/ /+ !*(! J
Communications specifications
Transmission line connection
Multiple point
Communications method
RSĆ485 (2Ćwire, halfĆduplex)
Synchronization method
StartĆstop synchronization
Baud rate
*1
Communication code
Data bits
*1
Stop bits
*1
Error detection
1200, 2400, 4800, 9600 (bit /s)
ASCII
7 or 8 bits
1 or 2 bits
Vertical parity (non, even, or odd)
BCC (block check character)
Flow control
None
Interface
RSĆ485
Retry function
None
Communications buffer
40 byte
*
1-2
0 -/! / %/. ./+, %/. * 1!-/%( ,-%/3 * !$ ! .!/ %* !6
,!* !*/(3 %* /$! +))0*%/%+*. .!//%*# (!1!( %#$(%#$/! $-/!-.
%* /$! /(! +1! %* %/! !"0(/.
1.1 Outline
J
Transmission
!% *! !&)* &$'+*( *(%)$"*) &$$% ($ *! *(%)1
$"*) ()'&%) ($ *!* &(()'&%) *& *! &$$% ($ )"% #
procedure
()'&%) ($ ") (*+(% &( ! &$$% ($ ! &##&-"%
"1
($ )!&-) *! &'(*"&% & *! &$$% % ()'&%) ($)
Command frame
Command frame
Host computer
H8GN
Response frame
##&- -"* *"$ & * #)* $) +%*"# *! %.* &$$% ") )%* *( *!
!&)* &$'+*( (",) ()'&%) (&$ *! J
J
&$$+%"*"&%) -"*! *! !&)* &$'+*( ( ((" &+* *!(&+ ! )*%1
Interface
( 1
"%*(
•
Wiring
1
&%%*"&%) % &( $."$+$ & %"*) "%#+"%
*! !&)* &$'+*( % &%%* "% &%1*&1 )/)*$)
•
! *&*# # #% *! ") $ $.
•
) )!"# *-")*1'"( # &( #( ( &( -"("% *! Communications transceiver
Host computer
RSĆ485
H8GN
TX
Abbr
RSĆ485
FG
-
Pin No.
Abbr
8
A(-)
+
7
B(+)
RX
SG
6.8V
Shielded cable
Terminator
A<B: [1] mark
120Ω
(1/2W)
A>B: [0] space
H8GN
end node
RSĆ485
Pin No.
Abbr
Both ends of the transmission line
8
A(-)
(including the host computer) must be
7
B(+)
specified (by setting terminator ON) as
the end node. The total resistance of
the terminators must be at least 54Ω.
Use a terminator of resistance
Shielded cable
120Ω = (1/2W).
*! *! &$$+%"*"&%) )'""*"&%) & *! % *! !&)* &$1
'+*( &%1*&1 )/)*$ ") "%
+) )+( *!* *! &$$+%"*"&%)
)'""*"&%) & ## ,") "% *! )/)*$ .'* "%","+# +%"* %+$()
( *! )$
1-3
H8GN
CHAPTER 1
J
ABOUT COMMUNICATIONS METHODS
Communications
parameters
Parameter
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.
Displayed
Setting Range
Characters
Set Value
Communications unit No.
0 to 99
Baud rate
1.2 / 2.4 / 4.8 /
Communications data length
7 / 8 (bit)
7 / 8 (bit)
Communications stop bit
1 / 2
1 /2
Communications parity
None / even / odd
0, 1 to 99
9.6 (k bit/s)
1.2 / 2.4 / 4.8 / 9.6 (k bit/s)
/
/
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.
Communications unit No.
Baud rate
Communications data length
Communications stop bit
Communications parity
H8GN
1-4
1.1 Outline
F Communications
parameter setup
&* * * &$$+%!*!&%) '($*() ( %# *( * . , %
% . ()**!% * &%*(&##(
• &$$+%!*!&%) +%!* & !) '($*( !) &( )**!% * +%!* & *& & * !) +%!*
& !) )* )& * * * &)* &$'+*( % !%*!. * - % &$$+1
%!*!&%) ( ((! &+* -!* * &)* &$'+*( * +%!* & -!* !%
* (% *& &( &%%* *& * &)* &$'+*( &% * %*-&(" +#* !) / % *-& &( $&( ( +) & %&* )*
* )$ +%!* & &!% )& -!## '(,%* %&($# &'(*!&%
• + (* !) '($*( !) &( )**!% * + (* - % &$$+%!*!% -!*
* &)* &$'+*( * &% & /
!*) /
!*) /
!*) % / !*)
• &$$+%!*!&%) * #%* !) '($*( !) &( )**!% * &$$+%!*!&%) * #%* * !* (
& / !*) &( / !*)
• &$$+%!*!&%) )*&' !* !) '($*( !) &( )**!% * &$$+%!*!&%) )*&' !* * !* ( &
/ &( /
• &$$+%!*!&%) '(!*. !) '($*( !) &( )**!% * &$$+%!*!&%) '(!*. * &% &
/%&% /,% &( /&
1-5
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
2
CHAPTER
CHAPTER 2
CompoWay/F
COMMUNICATIONS
PROCEDURES
Read this chapter if you are to communicate using the CompoWay/F
format.
2.1
2.2
2.3
2.4
Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć2
Command frame . . . . . . . . . . . . . . . . . . . . . . .
2Ć2
Response frame . . . . . . . . . . . . . . . . . . . . . . . .
2Ć3
Communications data . . . . . . . . . . . . . . . . . .
2Ć4
Example of end code . . . . . . . . . . . . . . . . . . . .
2Ć4
Structure of Command Text . . . . . . . . . . . . .
2Ć5
PDU structure . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć5
Area definitions . . . . . . . . . . . . . . . . . . . . . . . .
2Ć5
Type code (variable type)
...............
2Ć5
Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć5
Number of elements . . . . . . . . . . . . . . . . . . . .
2Ć5
List of services . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć6
Details of Services . . . . . . . . . . . . . . . . . . . . . .
2Ć7
Read from variable area . . . . . . . . . . . . . . . .
2Ć7
Write to variable area . . . . . . . . . . . . . . . . . . .
2Ć8
Read controller attributes . . . . . . . . . . . . . . .
2Ć10
Read controller status . . . . . . . . . . . . . . . . . .
2Ć11
Echoback test . . . . . . . . . . . . . . . . . . . . . . . . . .
2Ć12
Operation instructions . . . . . . . . . . . . . . . . . .
2Ć13
Response Code List
2Ć15
....................
2-1
H8GN
CHAPTER 2
2.1
CompoWay/F COMMUNICATIONS PROCEDURES
Data 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.
J
Command frame
Text
Node No.
STX
1
SubĆaddress
0
2
0
2
SID
Command text
BCC
0
ETX
1
1
1
BCC calculation range
STX
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.
Node number
•
•
•
•
This number specifies the transmission's destination.
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.
SubĆaddress
This 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 text
Command text area. For details, see 2.2 Structure of Command Text."
ETX
This code (03) indicates the end of the text.
BCC
Block Check Character
The BCC result is found by calculating the exclusive OR of the bytes from the node
No. up to ETX.
2-2
2.1 Data Format
F BCC calculation
$ !# * ! '#% % -% '& !% * ! '#% % )&$' ! % ! ! &" %! %! %(! #%#$ $%% %$ %! % #
example
STX
Node No.
02H
SubĆaddress
SID
Command text
0(30H) 0(30H) 0(30H) 0(30H) 0(30H) 0(30H) 5(35H) 0(30H) 3(33H)
BCC=30H
30H
30H
30H
30H
30H
35H
30H
33H
ETX
BCC
03H
35H
03H=35H
Calculation result 35H is set to the BCC area.
The
symbol indicates exclusive OR operation and the H indicates hexadecimal code.
J Response frame
Node No.
SubĆaddress
End code
Command text
STX
1
End
code
BCC
ETX
2
2
2
Name
1
Description
00
Normal completion
The command ended normally without error.
0F
FINS command error
The specified FINS command could not be executed.
1
Error
Detection
Priority
None
8
The FINS response code should indicate why the command
could not be executed.
10
Parity error
The sum total of bits whose received data is 1" does not
2
match the set value of communications parity."
11
Framing error
Stop bit is 0".
1
12
Overrun error
An attempt was made to transfer new data when the recepĆ
3
tion data was already full.
13
BCC error
The calculated BCC value is different from the received BCC
5
value.
14
Format error
•
The command text contains characters other than 0 to 9,
7
and A to F. This error is not applicable to the echoback test.
(For details, see chapters 2.3 Echoback test.")
•
•
16
SubĆaddress error
•
•
•
No SID and command text. Or, no command text
MRC/SRC" not included in command text
Illegal (unsupported) subĆaddress
6
No subĆaddress, SID and command text
SubĆaddress less than two characters, and no SID and
command text
18
Frame length error
The received frame exceeds the fixed (supported) number of
4
bytes.
• ! $ #%&# %! #' ! #$ #$$$ %! %
$ !
• ! #$"! $ ( #%&# % %$ % #$"! $ # #
!"% &" %! % • +
##!# %%! #!#%* %$ % "#!#%* (
##!#$ !&# $&% !&$*
%(! !# !#
2-3
H8GN
CHAPTER 2
J
CompoWay/F COMMUNICATIONS PROCEDURES
Communications data
Set (monitor) Value
Minus Value
Decimal point
8 digits (Hex)
2's complement
Example) 105.0
J
Example of end
code
!
!
Decimal point is removed and the result is converted to hexadecimal.
1050
000041A
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.
STX
BCC
SubĆaddress
0
A
ETX
Response Format
Node No.
STX
SubĆaddress
0
A
BCC
End code
1
6
ETX
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.
STX
SubĆaddress
0
0
SID
0
BCC
ETX
Response Format
Node No.
STX
SubĆaddress
0
0
BCC
End code
1
4
ETX
End code is 14" (format error).
Example 3) All node Nos. not provided
Command Format
BCC
STX
ETX
The node No. is lacking one character.
Response Format
No response
Example 4) No subĆaddress, and illegal BCC
Command Format
BCC
Node No.
STX
ETX
Err
Response Format
Node No.
STX
SubĆaddress
0
0
BCC
End code
1
3
ETX
SubĆaddress is 00" and end code is 13" (BCC error).
2-4
H8GN
2.2 Structure of Command Text
2.2
J
Structure of Command Text
PDU 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
MRC
SRC
Data
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)
MRC
SRC
MRES
SRES
Data
If the specified command text could not be executed, only the MRC/
SRC and MRES/SRES become the target response PDUs.
Service response PDU (at nonĆexecution of specified command text)
MRC
SRC
MRES
SRES
MRES/SRES becomes the response code except when processing
ends in normal completion."
J
J
Area definitions
Areas comprise only variable area.
Type code
The following defines variable area type codes.
(variable type)
Variable
Description
type
C0
R/O (read only) parameter.
C1
Protect level parameter.
C2
Operation and adjustment level parameter.
C3
Initial setting, communications setting and advanced function setĆ
ting level parameter.
J
J
Addresses
Each of the variable types is appended with an address. Express addresses
in 2Ćbyte hexadecimal code.
Number of
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.
elements
2-5
H8GN
CHAPTER 2
CompoWay/F COMMUNICATIONS PROCEDURES
J List of services
MRC SRC
Name of service
Process
01
01
Read from variable
area
This service reads from variable areas.
01
02
Write to variable area
This service writes to variable areas.
05
03
Read controller
attributes
This service reads the model No. and comĆ
munications buffer size.
06
01
Read controller
status
This service reads the run status of the
controller.
08
01
Echoback test
This service carries out the echoback test.
30
05
Operation
instructions
This service carries out reset, communicaĆ
tions writing, multiĆSP, move to protect
level, move to setup area 1 and software
reset.
* 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.
The following table summarizes setup areas 0 and 1.
2-6
Area
Description
Setup area 0
This area groups together the protect, operation and adjustment
levels.
Setup area 1
This area groups together the initial setting, communications setĆ
ting and advanced function setting levels.
H8GN
2.3 Details of Services
2.3
J
Details of Services
Read from
variable area
This service reads from variable areas.
Service request PDU
MRC
0
1
SRC
0
2
Variable
Read start
type
address
Bit
position
1
0
2
2
4
Number of
elements
0
2
4
Service response PDU
MRC
0
1
SRC
0
2
Response
Read data
code
(for number of elements)
4
0 or 8 or 16
1
2
(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
Process
elements
0000
Read is not carried out (the service response PDU is not
appended with read data), and processing ends in normal
completion."
0001 to 0002
Read is carried out, and processing ends in normal completion."
(4) Response code
At normal completion
Response code
Name
Description
0000
Normal completion
No errors were found.
At occurrence of error
Response code
Error name
Cause
1001
Command too long
The command is too long.
1002
Command too short
The command is too short.
1101
Area type error
The variable type is wrong.
1103
Start address outĆofĆ
The read start address is
range error
out of range.
Response too long
The number of elements is
110B
larger than 0002".
1100
Parameter error
The bit position is other than
00".
2203
Operation error
CPU or EEPROM error
2-7
H8GN
CHAPTER 2
CompoWay/F COMMUNICATIONS PROCEDURES
J Write to variable
area
This service writes to variable areas.
Service request PDU
MRC
0
1
SRC
0
2
Variable
type
Read start
2
4
address
2
2
Bit
position
0
Number of
Write data
elements
(for number of elements)
4
0 or 8 or 16
0
2
Service response PDU
MRC
SRC
Response
code
0
1
2
0
2
2
4
(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
Process
0000
Write is not carried out (the service response PDU is not
appended with write data), and processing ends in normal
completion."
0001 to 0002
2-8
Write is carried out, and processing ends in normal completion."
H8GN
2.3 Details of Services
(4) Response code
At normal completion
Response code
Name
Description
0000
Normal completion
No errors were found.
At occurrence of error
Response code
Error name
Cause
1002
Command too short
The command is too short.
1101
Area type error
Wrong variable type
1103
Start address outĆofĆ
Write start address is out of range.
range error
1104
End address outĆofĆ
The write end address (write start
range error
address
+
number
of
elements)
exceeds the final address of the variĆ
able area.
1003
1100
Number of elements/
The number of data does not match
data mismatch
the number of elements.
Parameter error
•
•
Bit position is other than 00".
Write data is out of setting range.
3003
ReadĆonly data
Variable type C0" was written to.
2203
Operation error
•
The
communications
writing"
parameter is set to OFF" (disĆ
abled).
•
Writing was
carried
out
on
the
parameters from setup areas 0 to 1.
•
Writing was carried out on a proĆ
tected parameter other than in the
protect level.
•
CPU or EEPROM error
2-9
H8GN
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
J
Read controller
This service reads the model No. and communications buffer size.
Service request PDU
attributes
MRC SRC
0 5 0 3
2
2
Service response PDU
MRC SRC
Response
code
Model No.
4
10
0 5 0 3
2
2
(1)
CommunicaĆ
tions buffer size
0 0 2 8
4
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 8 G N - A D
(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 code
Name
Description
0000
Normal completion
No errors were found.
At occurrence of error
Response code
2-10
Name
Description
1001
Command too long
The command is too long.
2203
Operation error
CPU or EEPROM error
H8GN
2.3 Details of Services
J Read controller
status
This service reads the run status of the controller.
Service request PDU
MRC
SRC
0
0
6
2
1
2
Service response PDU
MRC
0
6
SRC
0
2
Response
Run
code
status
4
2
Related
informaĆ
tion
1
2
2
(1) Run status
Run status
Description
00
Status in which the count (timer) input can be accepted (error not
generated when setup area is 0)
01
Status in which the count (timer) input cannot be accepted (other
than above)
(2) Related information
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
Bit position
PV underflow
(3) Response code
At normal completion
Response code
Name
Description
0000
Normal completion
No errors were found.
At occurrence of error
Response code
Name
Description
1001
Command too long
The command is too long.
2203
Operation error
CPU or EEPROM error
2-11
H8GN
CHAPTER 2
CompoWay/F COMMUNICATIONS PROCEDURES
J Echoback test
This service carries out the echoback test.
Service request PDU
MRC
SRC
0
0
8
2
Test data
1
2
0 to 23
Service response PDU
MRC
SRC
Response
Test data
code
0
8
0
2
1
0 to 23
2
(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
Test data
8 bits
20 to 7E, A1 to FE converted to ASCII code
7 bits
20 to 7E converted to ASCII code
(2) Response code
At normal completion
Response code
Name
Description
0000
Normal completion
No errors were found.
At occurrence of error
Response code
2-12
Name
Description
1001
Command too long
The command is too long.
2203
Operation error
CPU or EEPROM error
H8GN
2.3 Details of Services
J Operation
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
MRC
SRC
InstrucĆ
Related
tion code
informaĆ
tion
3
0
0
2
5
2
2
2
Service response PDU
MRC
SRC
Response
code
3
0
0
2
5
2
4
(1) Instruction code and related information
Instruction
code
00
Description
Related information
Communications writing
00: OFF (disabled)
01: ON (enabled)
01
Reset
00: Reset PV
01: Reset totalizing count value
02: Reset PV/totalizing count value
02
SVĆbank
00: Set value 0
01: Set value 1
02: Set value 2
03: Set value 3
06
Software reset *
00
07
Move to setup area 1
00
08
Move to protect level
00
* No response will be returned when a software reset is carried out.
(2) Response code
At normal completion
Response code
Name
Description
0000
Normal completion
No errors were found.
At occurrence of error
Response code
Error name
Cause
1001
Command too long
The command is too long.
1002
Command too short
The command is too short.
1100
Parameter error
Instruction code and related informaĆ
tion are wrong.
2203
Operation error
•
The
communications
writing"
parameter is set to OFF" (disĆ
abled). However, note that the error
is accepted regardless of the comĆ
munications writing" parameter setĆ
ting (ON/OFF).
•
The
command
cessed.
For
cannot
details,
be
proĆ
see
(3)
Description of operating instrucĆ
tions and precautions" below.
•
CPU or EEPROM error
2-13
CHAPTER 2 CompoWay/F COMMUNICATIONS PROCEDURES
"/ .&-0&,+ ,# ,-".0&,+ &+/0.1 0&,+/ +! -." 10&,+/
F ,**1+& 0&,+/ 3.&0&+$
"0 0%" 6 ,**1+& 0&,+/ 3.&0&+$ -.*"0". 0, 6 "+)"! ,.
6 !&/)"! ,.!&+$ 0, .")0"! &+#,.*0&,+ %&/ &+/0.1 0&,+ +
" "-0"! 0 ,0% /"01- ."/ +! F "/"0
%" +!,. 0,0) ,1+0 2)1" &/ ."/"0 ,.!&+$ 0, 0%" .")0"! 2)1"
"/"0 "/"0/ 0%" 6 %&/ + " "-0"! ,+)4 &+ /"01- ." %" 6,-".8
0&,+ "..,. , 1./ &+ 0%" #,)),3&+$ &+/0+ "
• %"+ 0%" ."/"0 &/ &//1"! &+ 6/"01- ." "/"0 0,0)&5&+$ ,1+0 2)1"
"/"0/ 0%" 60,0)&5&+$ ,1+0 2)1" %&/ + " "-0"! ,+)4 &+ /"01." %" 6,-".0&,+ "..,. , 1./ &+ 0%" #,)),3&+$ &+/0+ "/
• %"+ 0%" ."/"0 &/ &//1"! &+ 6/"01- ." • %"+ 6/")" 0 #1+ 0&,+ &/ /"0 0, 60&*".
• %"+ 61/" 0,0) ,1+0". &/ /"0 0, 6
"/"0 0,0)&5&+$ ,1+0 2)1"
"/"0/ 0%" 6 +! 0%" 60,0)&5&+$ ,1+0 2)1" %&/ + " "-0"!
,+)4 &+ /"01- ." %" 6,-".0&,+ "..,. , 1./ &+ 0%" #,)),3&+$
&+/0+ "/
• %"+ 0%" ."/"0 &/ &//1"! &+ 6/"01- ." • %"+ 6/")" 0 #1+ 0&,+ &/ /"0 0, 60&*".
• %"+ 61/" 0,0) ,1+0". &/ /"0 0, 6
F 8+(
"0 #,1. /"0 2)1" "#,."%+! &+ 0%" !'1/0*"+0 )"2") /, 0%0 4,1 /3&0 % 0,
!"/&."! /"0 2)1" 8+( + " "-0"! 0 ,0% /"01- ."/ +! %" 6,-".0&,+ "..,. , 1./ &+ 0%" #,)),3&+$ &+/0+ "
• %"+ 61/" 8+( &/ /"0 0, 6
F ,#03." ."/"0
%&/ &+/0.1 0&,+ ."/1*"/ -., "//&+$ #0". 0%" -,3". &/ 01.+"! %&/ &+/0.1 0&,+ + " "-0"! 0 ,0% /"01- ."/ +! ,
."/-,+/" 3&)) " ."01.+"! #,. 0%&/ ,-".0&,+ &+/0.1 0&,+
F ,2" 0, /"01- ." %&/ &+/0.1 0&,+ *,2"/ 0, 6/"01- ." +! + " "-0"! 0 ,0%
/"01- ."/ +! ,3"2". +,0" 0%0 3%"+ 6&+&0&) /"01- ,**1+& 8
0&,+/ -.,0" 0&,+ &/ /"0 0, 6
+ 6,-".0&,+ "..,. &/ $"+".0"! +!
*,2" 0, /"01- ." &/ #,.&!!"+
%"+ 0%&/ *,2" &/ ..&"! ,10 #.,* /"01- ." 0%" !&/-)4 &+!& 0"/
0%" 6/")" 0 #1+ 0&,+ &+ 0%" 6&+&0&) /"00&+$ )"2") %"+ 0%&/ ,-".0&,+
&+/0.1 0&,+ &/ &//1"! &+ /"01- ." 0%" !&/-)4 3&)) +,0 %+$"
F ,2" 0, -.,0" 0 )"2")
%&/ &+/0.1 0&,+ *,2"/ 0, 0%" 6-.,0" 0 )"2") +! + " "-0"! ,+)4
&+ /"01- ." %"+ 0%&/ &+/0.1 0&,+ ,**+! &/ &//1"! &+ /"01- ."
+ 6,-".0&,+ "..,. &/ $"+".0"! +! *,2" 0, /"01- ." &/ #,.&!8
!"+
2-14
H8GN
2.4 Response Code List
2.4
Response Code List
At normal completion
Error
Response
Name
code
detection
Description
priority
0000
Normal
No errors were found.
None
Description
detection
completion
At occurrence of error
Error
Response
Name
code
0401
1001
priority
Unsupported
The service function for the relevant
command
command is not supported.
1
Command too
The command is too long.
2
The command is too short.
3
long
1002
Command too
short
1101
Area type error
The variable type is wrong.
4
1103
Start address
The read/write start address is out of
5
outĆofĆrange
range.
error
1104
End address
The write end address (write start
outĆofĆrange
address
error
exceeds the final address of the variĆ
+
number
of
6
elements)
able area.
1003
Number of eleĆ
The number of data does not match
ments/data misĆ
the number of elements.
7
match
110B
Response too
The response exceeds the commuĆ
long
nications buffer size (when larger than
8
number of elements 0002).
1100
Parameter error
•
•
The bit position is other than 00".
9
The write data is out of the setting
range.
•
The instruction code and related
information in the operating instrucĆ
tion is wrong.
3003
ReadĆonly error
Variable type C0" was written to.
10
2203
Operation error
•
11
•
•
The
communications
writing"
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 proĆ
tected parameter other than in the
protect level.
•
Processing is not possible by operĆ
ating instruction.
•
CPU or EEPROM error
2-15
CHAPTER 3 COMMUNICATIONS DATA
3
CHAPTER 3
COMMUNICATIONS
DATA
This chapter lists the details of each of the communications data in the
CompoWay/F communications procedures.
3.1
Variable Area (setup range) List . . . . . . . . .
3Ć2
3.2
Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3Ć8
3.3
Sample Program . . . . . . . . . . . . . . . . . . . . . . .
3Ć9
N88Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3Ć9
Protocol macro
........................
3Ć11
3-1
H8GN
CHAPTER 3
3.1
COMMUNICATIONS DATA
Variable Area (setup range) List
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
Address
Item
Set (monitor) Value
C0
0000
Version * Note 1
H'00000100
C0
0001
PV
H'FFFFFC19 to H'0000270F (-999 to 9999)
*
Counter
*
At PV underflow,
Level
Operation
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
C0
0002
Status * Note 1
See 3.2. Status."
C0
0003
Totalizing count value
H'00000000 to H'05F5E0FF (0 to 99999999)
C1
0000
Operation/adjustment
H'00000000 (0): No restrictions in operation and adĆ
protection
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
C1
0001
Initial setting/commuĆ
nications protection
H'00000000 (0): Move to initial setting/communicaĆ
tions setting level enabled (move to
advanced function setting level disĆ
played)
H'00000001 (1): Move to initial setting/communicaĆ
tions setting level enabled (move to
advanced function setting level not
displayed)
H'00000002 (2): Move to initial setting/communicaĆ
tions setting level restricted
C1
0002
Setting change protecĆ
tion
H'00000000 (0): OFF (changing of setup on controlĆ
ler display enabled)
H'00000001 (1): ON (changing of setup on controller
display disabled)
C1
0003
Reset key protection
H'00000000 (0): OFF (reset key enabled)
H'00000001 (1): ON (reset key disabled)
3-2
Operation
Protect
H8GN
3.1 Variable Area (setup range) List
Variable
type
C2
Address
0000
Item
Set value
Set (monitor) Value
Level
H'00000000 to H'0000270F (0 to 9999)
*
Input
mode
at
counter=incremental
Operation
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)
*
C2
0001
Set value 0
Output mode at timer=Z
H'00000000 to H'0000270F (0 to 9999)
*
Adjustment
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
C2
0002
Set value 1
Same as set value 0
C2
0003
Set value 2
Same as set value 0
C2
0004
Set value 3
Same as set value 0
C2
0005
Cycle time
H'00000000 to H'0000270F (0 to 9999)
*
Operation
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
*
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
H8GN
CHAPTER 3
Variable
type
C3
C3
C3
C3
C3
C3
C3
COMMUNICATIONS DATA
Address
0000
0001
0002
0003
0004
0005
0006
Item
Select function
Input mode
Time range
Timer mode
Output mode (counter)
Output mode (timer)
Output time
Set (monitor) Value
H'00000000(0):
Counter
H'00000001(1):
Timer
H'00000000(0):
Incremental
H'00000001(1):
Decremental
H'00000002(2):
Individual
H'00000003(3):
Phase difference
H'00000000(0):
0.000s to 9.999s
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'00000000(0):
Elapsed time
H'00000001(1):
Remainning time
H'00000000(0):
N
H'00000001(1):
F
H'00000002(2):
C
H'00000003(3):
K
H'00000000(0):
A
H'00000001(1):
B
H'00000002(2):
D
H'00000003(3):
E
H'00000004(4):
F
H'00000005(5):
Z
H'00000001 to H'0000270F (0.01 to 99.99) * counter
H'00000000 to H'0000270F (0.00 to 99.99) * timer
C3
C3
3-4
0007
0008
Counting speed
Input signal width
H'00000000(0):
30Hz
H'00000001(1):
5kHz
H'00000000(0):
20ms
H'00000001(1):
1ms
Level
Initial setting
H8GN
3.1 Variable Area (setup range) List
Variable
type
C3
Address
0009
Item
Decimal point
Set (monitor) Value
H'00000000(0):
Ć Ć Ć Ć
H'00000001(1):
Ć Ć Ć.Ć
H'00000002(2):
Ć Ć.Ć Ć
H'00000003(3):
Ć.Ć Ć Ć
C3
000A
PreĆscale value
H'00000001 to H'0000270F (0.001 to 9.999)
C3
000B
Input signal edge
H'00000000(0):
Rise edge
H'00000001(1):
Fall edge
C3
000C
Communications unit
H'00000000 to H'00000063 (0 to 99)
C3
000D
000E
Baud rate *1
Communications data
length *1
C3
000F
Communications stop
bit *1
C3
C3
C3
C3
0010
0011
0012
0013
Communications parity
Use SVĆbank
Use totalizing counter
Display autoĆreturn
time
C3
0014
MoveĆtoĆprotectĆlevel
Initial setting
CommunicaĆ
tions setting
No. *1
C3
Level
H'00000000(0):
1.2
H'00000001(1):
2.4
H'00000002(2):
4.8
H'00000003(3):
9.6
H'00000007(7):
7
H'00000008(8):
8
H'00000001(1):
1
H'00000002(2):
2
H'00000000(0):
None
H'00000001(1):
Even
H'00000002(2):
Odd
H'00000000(0):
OFF
H'00000001(1):
ON
H'00000000(0):
OFF
H'00000001(1):
ON
H'00000000(0):
OFF
Advanced
function setting
H'00000001 to H'00000063 (1 to 99)
H'00000003 to H'0000001E (3 to 30)
time
*
1:
Communications parameters are enabled after they have been changed by turning the power OFF then back ON again.
3-5
H8GN
CHAPTER 3
3.2
COMMUNICATIONS DATA
Status
The figure below shows the structure of the status data:
15
14
13
0
0
0
12
11
10
9
8
7
0
0
0
0
0
6
5
4
3
2
1
0
0
0
0
Bit position
Spare
Spare
Spare
CP2 (gate) input
Reset input
Spare
Input status
CP1 (signal) input
Error info
PV underflow
Spare
Spare
Spare
Spare
Spare
Spare
Spare
3-6
Output status
Output
H8GN
3.2 Status
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0
0
0
0
0
0
0
0
0
0
0
0
0
Bit position
0
Operating status
Setup area
Communications writing
Spare
Spare
Spare
Spare
Spare
Spare
Spare
Spare
Spare
Spare
Spare
Spare
Spare
Spare
3-7
H8GN
CHAPTER 3
COMMUNICATIONS DATA
The following shows the status contents.
Bit position
3-8
Status
Bit Description
0
1
Not generated
Generated
0
PV underflow *1
1
Spare
2
Spare
3
Spare
4
CP1 (signal) input *1
OFF
ON
5
CP2 (gate) input *1
OFF
ON
6
Reset input *1
OFF
ON
7
Spare
8
Spare
9
Spare
10
Spare
11
Spare
12
Output *1
OFF
ON
13
Spare
14
Spare
15
Spare
16
Setup area
Setup area 0
Setup area 1
17
Communications writing
OFF (disabled)
ON (enabled)
18
Spare
19
Spare
20
Spare
21
Spare
22
Spare
23
Spare
24
Spare
25
Spare
26
Spare
27
Spare
28
Spare
29
Spare
30
Spare
31
Spare
*
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)
H8GN
3.3 Sample Program
3.3
J
Sample Program
N88Basic
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
'
1090
OPEN "COM: E73" AS #1
1100
'
1110
*REPEAT
1120
'
1130
'=====Transmission processing==========
1140
'
1150
'ĆĆĆĆĆĆĆĆĆĆ Entry of send data ĆĆĆĆĆĆĆĆĆĆ
1160
INPUT "SEND DATA:", SEND$
1170
'
1180
'ĆĆĆĆĆĆĆĆĆĆ To exit processing if there is no entry ĆĆĆĆĆĆĆĆĆĆ
1190
IF SEND$="" THEN
1200
'
1210
'ĆĆĆĆĆĆĆĆĆĆ Calculation of BCC ĆĆĆĆĆĆĆĆĆĆ
1220
BCC=0
1230
SEND$=SEND$+CHR$ (3)
1240
FOR I=1 TO LEN (SEND$)
1250
BCC=BCC XOR ASC (MID$ (SEND$, I, 1))
1260
NEXT I
1270
BCC$=CHR$ (BCC)
1280
'
1290
'ĆĆĆĆĆĆĆĆĆĆ Transmission ĆĆĆĆĆĆĆĆĆĆ
1300
SDATA$=CHR$ (2)+SEND$+BCC$
1310
PRINT #1, SDATA$;
1320
'
1330
'=====Reception processing==========
1340
'
1350
*LOOP0
1360
RDATA$=""
1370
TIMEOUT=0
1380
*LOOP
1390
'ĆĆĆĆĆĆĆĆĆĆ Detection of time-out ĆĆĆĆĆĆĆĆĆĆ
1400
TIMEOUT=TIMEOUT+1
1410
IF TIMEOUT>2000 THEN RESP$="No Response": GOTO
1420
IF LOC (1)=0 THEN
1430
'
* EXIT
* LOOP
* REND
3-9
H8GN
#),
* (&&-'$,$('+ ,
HHHHH $56=B:7:42B:>= >7 6=5 [email protected]@
*,*,$')-, %( $! %
$! &$ *, %
*
$! *,+, ,#
* * '
HHHHHHHHHH :A?;2E @646:D6 52B2 HHHHHHHHHH
)*$', *
"(,( * *
*
=5 [email protected]>46AA:=8
%(+
'
@625:=8 :A 4>=B:=C65 :7 [email protected]@ :A =>B 6=5 [email protected]@
F
' *, ,#
' * %(()
' *, #* ,#
+)&$ *, %
+)('+
)
*
' * %(()
' *, ' * %(()
+)
,
/$,
Sample operation
Read the PV of unit No.00. (In this example, PV=335.)
*-'
+
+
' , *
+)('+
!
' , 0+,/1 0
,/1 01
'C<[email protected] >7 6;6<6=BA
:B ?>A:B:>=
*625 [email protected] [email protected]
[email protected]:23;6 BE?6
&*+*
+$
+C3
[email protected]
'>56 '>
*
+)('+
0+,/1 ! 0
,/1 01
*625 52B2
*6A?>=A6 4>56
&*+*
!:=2; 4>56
+C3
[email protected]
'>56 '>
H8GN
3.3 Sample Program
J Protocol macro
F What is a protoĆ
col macro?"
Connection
The protocol macro function uses the PMCR command in a ladder proĆ
gram to execute a data send/receive sequence (protocol) with various comĆ
munications devices such as generalĆpurpose components connected to
the RSĆ232C or RSĆ422A/RSĆ485 interface to control the device.
Standard system protocol is preĆinstalled on Serial Communications
Board/Unit for enabling control of OMRON components (e.g. controllers
and temperature control units).
For details on protocol macros, refer to the CS1WĆSCB21/41/ĆSCU21
User's Manual" (Cat. No. W336).
Use port 2 on the Serial Communications Board (CS1WĆSCB41) for direct
connection to the RSĆ485.
CPU unit
Serial Communications Board
CS1H
CS1WĆSCB41
Port 2
RSĆ485
Set the TERM switch on the Serial Communications Board to ON and the
WIRE switch to 2". Attach a terminator to H8GN.
Sample ladder
program
Read the PV of H8GN using sequence No. 600 send/receive with ASCII
conversion (response ON)" of the standard system protocol CompoWay
/F Host" built into the Serial Communications Board.
Network
communication
Input
command
Protocol macro
condition
executable" flag
in progress" flag
000000
A20200
191915
Communication port 0
Serial port 2
Destination address E1
(serial communication board)
PMCR
#02E1
#0258
Network
Sequence No. 0258H (=600)
D01000
First word address for transmission data
D01500
First word address for reception data
communication
error" flag
A21900
FAL(06)
01
The PV is stored to D01502 and D01503 if the read PV command is set to
D01000 onwards.
If a communications error occurs, execute the FAL command (continue
operation and analyze trouble command).
3-11
H8GN
CHAPTER 3
COMMUNICATIONS DATA
F Data transmission word assignment
Node
SubĆ
STX
No.
address
SID
MRC
SRC
Variable
type
Address
position
Bit
02H
"01"
"00"
"0"
"01"
"01"
"C0"
"0001"
"00"
Number of elements EXT BCC
"0001"
03H
D01000
0007
No. of transmission words (D01000 to D01006)
D01001
0001
Node No. of H8GN: 1
D01002
0101
CompoWay/F command: Variable area read
D01003
000C
D01004
C000
D01005
0100
D01006
0001
No. of bytes transmitted: 12
Variable type, read start address, bit position,
Number of elements
F Data reception word assignment
Node
SubĆ
End
STX
No.
address
code
02H
"01"
"00"
MRC
SRC
"01"
"01"
D01500
D01501
Response code
Data
Process value
0004
Response code
Current process value
3-12
03H
Number of reception words (D01500 to D01503)
D01502
D01503
EXT BCC
H8GN
APPENDIX
APPENDIX
ASCII List
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AĆ2
A-1
H8GN
//$-#(7
@
@
@
@
@
#
@
@
@
/
"
@
@
@
@
-4+
#$+
SPACE
2.'
#"
237
#"
”
$37
#"
$.3
#"
$-0
-
1
$TCL N?PGRW
N
0
?
O
!
1
@
P
"
2
A
Q
#
3
B
R
*
$
4
C
S
"*
28-
%
5
D
T
!$+
$3!
’
&
6
E
U
!2
"
'
7
F
V
'3
$-
(
8
G
W
+%
24!
)
9
H
X
!
53
$2"
*
:
I
Y
"
%%
%2
+
;
J
Z
#
"1
&2
]
,
<
K
-
$
2.
12
-
=
L
%
2(
42
.
>
M
[
X
#$+
H8GN
I
A
Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Ć5
Area definitions . . . . . . . . . . . . . . . . . . . . . . . 2Ć5
B
C
ASCII list . . . . . . . . . . . . . . . . . . . . . . . . . . .
AĆ2
BCC . . . . . . . . . . . . . . . . . . . . . 1Ć2, 2Ć2, 2Ć3, 2Ć4
Command frame . . . . . . . . . . . . . . . . . . 1Ć3, 2Ć2
Command text . . . . . . . . . . . . . . . . . . . . 2Ć2, 2Ć5
Communications data . . . . . . . . . . . . . 2Ć4, 3Ć1
Communications data length . . . . . . . 1Ć4, 1Ć5
L
N
O
P
R
Communications methods . . . . . . . . . . 1Ć1, 1Ć2
E
I
S
CompoWay/F . . . . . . . . . . . . . . . . . 1Ć2, 2Ć1, 3Ć1
Operation instructions . . . . . . . . . . . 2Ć6, 2Ć14
PDU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Ć5, 2Ć10
Read controller attributes . . . . . . . . . 2Ć6, 2Ć10
Response frame . . . . . . . . . . . . . . . . . . . . . . . 2Ć3
Sample program . . . . . . . . . . . . . . . . . . . . . . 3Ć9
SID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Ć2, 2Ć4
Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Ć6
Data format . . . . . . . . . . . . . . . . . . . . . . . . . . 2Ć2
Details of services . . . . . . . . . . . . . . . . . . . . . 2Ć7
Echoback test . . . . . . . . . . . . . . . . . . . . 2Ć6, 2Ć12
T
ETX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Ć2, 2Ć3
V
FINS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Ć2, 2Ć3
W
End code . . . . . . . . . . . . . . . . . . . . . . . . . 2Ć3, 2Ć4
F
Number of elements . . . . . . . . . . . . . . . . . . . 2Ć5
Response code list . . . . . . . . . . . . . . . . . . . . 2Ć15
Communications specifications . . . . . . . . . 1Ć2
D
List of services . . . . . . . . . . . . . . . . . . . . . . . . 2Ć6
Read from variable area . . . . . . . . . . . 2Ć6, 2Ć7
Communications parity . . . . . . . . . . . . 1Ć4, 1Ć5
Communications unit No. . . . . . . . . . . 1Ć4, 1Ć5
Interface . . . . . . . . . . . . . . . . . . . . . . . . . 1Ć2, 1Ć3
Read controller status . . . . . . . . . . . . 2Ć6, 2Ć11
Communications parameters . . . . . . . . . . . 1Ć4
Communications stop bit . . . . . . . . . . 1Ć4, 1Ć5
NDEX
STX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Ć2
Transmission procedure . . . . . . . . . . . . . . . 1Ć3
Type code (variable type) . . . . . . . . . . . . . . 2Ć5
Variable area (setup range) list . . . . . . . . . 3Ć2
Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Ć3
Write to variable area
. . . . . . . . . . . . . 2Ć6, 2Ć8
H8GN
Revision History
A manual revision code appears as a suffix to the catalog number on the front cover of the manual.
Cat. No. M066ĆE1Ć1
Revision code
The following table outlines the change made to the manual during each revision. Page numbers refer
to previous version
Revision code
Data
1
June 2000
Revised content
Original production
Preset Counter/ Timer
Communications
Functions
OMRON Corporation
Industrial Automation Company
Measuring and Supervisory Controls Department
Shiokoji Horikawa, Shimogyo-ku,
Kyoto 600-8530 Japan
Tel: (81)75-344-7108/Fax: (81)75-344-7189
Regional Headquarters
OMRON EUROPE B.V.
Wegalaan 67-69, NL-2132 JD Hoofddorp
The Netherlands
Tel: (31)2356-81-300/Fax: (31)2356-81-388
OMRON ELECTRONICS, LLC
1 East Commerce Drive, Schaumburg, IL 60173
U.S.A.
Tel: (1)847-843-7900/Fax: (1)847-843-8568
OMRON ASIA PACIFIC PTE. LTD.
83 Clemenceau Avenue, #11-01, UE Square,
Singapore 239920
Tel: (65)835-3011/Fax: (65)835-2711
OMRON CHINA CO. LTD.
BEIJING OFFICE
Room 1028, Office Building,
Beijing Capital Times Square,
No.88 West Chang'an Road,
Beijing 100031 China
Tel: (86)10-8391-3005/Fax: (86)10-8391-3688
User's Manual
Authorized Distributor:
Cat. No. M066-E1-1
Cat. No. M066-E1-1
Note: Specifications subject to change without notice.
Printed in Japan
0301-2M (0600) (B)
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement