Sie sind auf Seite 1von 295

H Series

Users MANUAL

Authored By:

Programming
Software
creator for
Hitachi PLC
products

Produced by:

Authorized Distributor for Hitachi and Actron products

Copyright Actron AB 1994-2009 1


How to read this manual.

THIS PAGE INTENTIONALLY LEFT BLANK

2 Copyright Actron AB 1994, 2009


TABLE OF CONTENTS:

AUTHORED BY: ................................................................................................................................ 1


1 HOW TO READ THIS MANUAL: ........................................................................................... 1

2 HISTORY, BACKGROUND: ................................................................................................... 3


2.1 SHORT HISTORY ABOUT LIGHTHOUSE PLCS, INC.: .................................................................. 3
2.2 SHORT HISTORY ABOUT HITACHI:........................................................................................ 3
2.3 SHORT HISTORY ABOUT PLC: ................................................................................................... 4
3.1 SYMBOLIC PICTURE OF AN H SERIES PLC:............................................................................... 6
3.2 ABBREVIATIONS:........................................................................................................................ 7
3.3 PROGRAM SYMBOLS:................................................................................................................. 8
3.4 ADDRESSING: ............................................................................................................................ 9
3.4.1 In-/ and Outputs: ................................................................................................................ 9
3.4.2 Internal memories: ........................................................................................................... 12
3.4.3 Link memories: ................................................................................................................. 12
3.4.4 Edge memories:................................................................................................................ 14
3.4.5 Timers and Counters:....................................................................................................... 14
3.4.6 Master Control:................................................................................................................ 15
3.4.7 Constant values: ............................................................................................................... 15
3.4.8 Battery backup (retentive areas) of memories: ............................................................... 15
3.5 SPECIAL MEMORIES:................................................................................................................ 16
3.5.1 Special memories, Words: ................................................................................................ 16
3.5.2 Special memories Bits: .................................................................................................. 17
4.1 BASIC LADDER PROGRAMMING:............................................................................................... 20
4.2 SYMBOLS: ................................................................................................................................ 20
4.2.1 Block................................................................................................................................. 20
4.2.2 Branch .............................................................................................................................. 21
4.2.3 Contact symbols ............................................................................................................... 22
4.2.4 Inverting: .......................................................................................................................... 24
4.2.5 Set, Reset .......................................................................................................................... 26
4.2.6 Master Control Set (MCS) and Reset (MCR) ................................................................... 26
4.2.7 Master Control Set. .......................................................................................................... 27
4.2.8 Master Control Reset........................................................................................................ 27
4.2.9 Edge detection (DIF and DFN-Contacts) ........................................................................ 29
4.2.10 Comparison contacts...................................................................................................... 31
4.2.11 Arithmetic box: ............................................................................................................... 31
4.2.12 Timer programming: ...................................................................................................... 32
4.2.13 Counter programming:................................................................................................... 32
4.2.14 Complex logic................................................................................................................. 32
4.2.15 Self hold: ........................................................................................................................ 33
4.2.16 Sequence programming with self hold: .......................................................................... 33
4.2.17 Output control in sequence programming: .................................................................... 33
4.2.18 Timers : .......................................................................................................................... 34
4.2.19 Counters: ........................................................................................................................ 40
4.2.20 Set value (The preset value) of Timers /Counters........................................................... 43
4.2.21 Variable preset value of timers/counters........................................................................ 43
4.2.22 Timer/Counter read of current value: ............................................................................ 43
4.2.23 Comparison instructions: ............................................................................................... 44
4.3 ARITHMETIC INSTRUCTIONS REFERENCE:............................................................................... 46
4.3.1 Array variables and indexed addressing.......................................................................... 46
4.3.2 Summary of arithmetic instructions,................................................................................. 48
4.3.3 Arithmetics......................................................................................................................... 48
4.3.4 Logic expressions ............................................................................................................. 49

Copyright Actron AB 1994-2009 i


Table of contents

4.3.5 Comparison expressions ...................................................................................................50


4.3.6 Bit operations ....................................................................................................................50
4.3.7 Shift and rotation expressions...........................................................................................51
4.3.8 Moving data ......................................................................................................................52
4.3.9 Negations, absolute value etc............................................................................................52
4.3.10 Conversions.....................................................................................................................52
4.3.11 Application commands ....................................................................................................54
4.3.12 Control commands (jump etc.)........................................................................................54
4.3.13 FUN-instructions for series HB: .....................................................................................54
4.3.14 FUN-instructions for H252, H302-H2002:.....................................................................55
4.4 DETAILED DESCRIPTION OF ARITHMETIC INSTRUCTIONS:........................................................57
4.4.1 Copy ..................................................................................................................................57
4.4.2 Indexed (relative) addressing............................................................................................57
4.4.3 Arithmetics ........................................................................................................................59
4.4.4 Logic expressions ..............................................................................................................69
4.5 COMPARISON EXPRESSIONS:...................................................................................................70
4.6 BIT OPERATIONS: .....................................................................................................................73
4.6.1 Shift and rotation expressions...........................................................................................76
4.7 MOVING DATA:..........................................................................................................................83
4.7.1 Negations, absolute value etc............................................................................................89
4.7.2 Converting.........................................................................................................................91
4.8 APPLICATION COMMANDS: .......................................................................................................96
4.9 FIFO (QUEUE REGISTER): .......................................................................................................97
4.10 CONTROL COMMANDS (JUMP ETC.): ....................................................................................101
4.11 LOGIC INSTRUCTION PROGRAMMING: ..................................................................................109
Start Contact symbol .................................................................................................................109
5.1 TO RUN THROUGH A COMPLETE PROJECT: ............................................................................114
5.1.1 Choice of PLC ..................................................................................................................114
5.2 COMPUTER PROGRAMMING.: .................................................................................................116
5.2.1 Actsip-H ..........................................................................................................................116
5.2.2 Change of an existing block:..........................................................................................123
5.2.3 Comparison contacts: .....................................................................................................124
5.2.4 Arithmetic expressions: ...................................................................................................125
5.2.5 Syntax check:...................................................................................................................127
5.2.6 ON-Line programming....................................................................................................129
5.2.7 Store the program: ..........................................................................................................130
5.2.8 Documentation:...............................................................................................................130
5.2.9 Printout: ..........................................................................................................................131
5.2.10 End of project: ..............................................................................................................131
5.3 PROGRAMMING WITH ACTGRAPH:.........................................................................................132
5.3.1 Programming:.................................................................................................................132
5.3.2 Start step: ........................................................................................................................134
5.3.3 Actions: ...........................................................................................................................134
5.3.4 Transitions: .....................................................................................................................135
5.3.5 Detailed Actions:.............................................................................................................136
5.3.6 Alternative branch: .........................................................................................................137
5.3.7 Parallel branch: ..............................................................................................................137
5.3.8 Return branch: ................................................................................................................138
5.3.9 Super conditions: ...........................................................................................................138
5.3.10 Logic boxes: ..................................................................................................................140
5.3.11 Macro boxes:.................................................................................................................140
5.3.12 Action boxes:.................................................................................................................141
5.3.13 Mathematical expressions:............................................................................................143
5.3.14 Comparison expressions: ..............................................................................................143
5.3.15 Zoom: ............................................................................................................................144
6 HAND PROGRAMMING UNITS: ........................................................................................146
7.1 GENERAL SPECIFICATION:......................................................................................................149
7.2 BASIC SPECIFICATION: ...........................................................................................................149

ii Copyright Actron AB 1994, 2009


Table of contents

7.3 PROCESS SYSTEM: ................................................................................................................ 150


7.3.1 In- and output update. .................................................................................................... 150
7.4 INTERRUPT :........................................................................................................................... 151
7.5 INSTALLATION: ....................................................................................................................... 154
7.5.1 Mounting in general:...................................................................................................... 154
7.5.2 Power connection:.......................................................................................................... 156
7.5.3 24V DC........................................................................................................................... 156
7.5.4 Cable connection:........................................................................................................... 156
7.5.5 Input connections: .......................................................................................................... 156
7.5.6 Output connections: ....................................................................................................... 157
7.5.7 The CPU-port:................................................................................................................ 157
7.6 ERROR CODES, COUNTERMEASURES AND MAINTENANCE:................................................... 158
7.6.1 Error messages: ............................................................................................................. 158
7.6.2 Error messages for syntax errors (program errors): ..................................................... 159
7.6.3 Error during program execution:................................................................................... 159
8.1 TYPES OF COMPONENTS: ...................................................................................................... 161
8.1.1 HB, link model (HL) ....................................................................................................... 162
8.1.2 Series HB in remote version (HR- expansion racks) ...................................................... 162
8.2 COMPONENT LIST: ................................................................................................................. 164
8.2.1 Base units and expansion modules:................................................................................ 164
8.2.2 H200 expansion units ..................................................................................................... 165
8.3 ADDRESSING: ........................................................................................................................ 167
8.4 EXPLANATIONS OF THE COMPONENTS: ................................................................................ 170
8.5 SETTING OF JUMPERS AND SWITCHES OF HB: ..................................................................... 171
8.5.1 The function of the RUN/ERROR contact: ..................................................................... 171
8.5.2 Mounting of series HB.................................................................................................... 171
8.6 INPUT SPECIFICATIONS:......................................................................................................... 172
8.7 HIGH SPEED COUNTER SPECIFICATION: ................................................................................ 174
8.8 OUTPUT SPECIFICATIONS - RELAY OUTPUT: ........................................................................ 176
8.9 OUTPUT SPECIFICATIONS - TRANSISTOR: ............................................................................ 177
8.10 SPECIFICATION OF EXPANSION MODULES:.......................................................................... 178
8.11 WIRING: ............................................................................................................................... 178
8.11.1 Power wiring:............................................................................................................... 178
8.11.2 Input connection:.......................................................................................................... 179
8.12 FUN-INSTRUCTIONS FOR SERIES HB: ............................................................................ 182
9.1 DESCRIPTION OF EXTERNAL PARTS: ..................................................................................... 188
9.2 START ADDRESSES IN SLOTS: ............................................................................................... 190
9.3 CONFIGURATION:................................................................................................................... 190
9.4 MOUNTING OF H200: ............................................................................................................ 191
9.5 MODULE SPECIFICATION H200-H252: ................................................................................. 193
9.6 SPECIFICATION OF THE MODULES: ........................................................................................ 194
9.6.1 Voltage supply:............................................................................................................... 194
9.6.2 Input modules:................................................................................................................ 194
9.6.3 Output modules: ............................................................................................................. 196
9.6.4 Analog modules Current: ............................................................................................... 197
9.6.5 Analog modules Voltage: ............................................................................................... 197
9.6.6 Isolated mixed Analog modules: .................................................................................... 199
9.6.6.1 ACTANA-S modules mixed voltage and current.................................................................... 199
9.6.6.1.1 Digital inputs /outputs using mode 1............................................................................... 201
9.6.6.1.2 Programming and addresses:........................................................................................... 203
9.6.6.1.4 Filter time:....................................................................................................................... 203
9.6.6.1.4 Conversion factor: ........................................................................................................... 203
9.6.6.1.5 Error information: ........................................................................................................... 203
9.6.6.2 ACTANA-F module................................................................................................................ 206
9.6.6.2.1 Quick update logic. ......................................................................................................... 206
9.6.6.2.2 Analog inputs sample and hold: ...................................................................................... 219
9.6.6.2.3 Repeated sampling control with high precision: (Mode 3).............................................. 219
9.6.6.2.4 Repeated sampling control without stopping other functions: (Mode 3)........................ 221
9.6.6.2.5 Filter time: (Mode 2 and 3) ............................................................................................. 224
9.6.6.2.6 Sampling interval: (mode 3)............................................................................................ 224
9.6.6.2.7 Conversion factor: (mode 2 and 3).................................................................................. 224
Copyright Actron AB 1994 iii
Table of contents

9.7 OPERATOR TERMINALS:.........................................................................................................226


9.7.1 Actterm-H........................................................................................................................226
9.7.1.1 Start up.....................................................................................................................................228
9.7.1.1.1 Start the program..............................................................................................................228
9.7.1.1.2 Connecting (adding) Actterm-H to an existing project. ...................................................228
9.7.1.1.3 How to configure the System...........................................................................................229
9.7.3.3 Programming ...........................................................................................................................230
9.7.3.3.1 How to use the function keys...........................................................................................230
9.7.3.3.2 How to use the LEDs ......................................................................................................232
9.7.3.3.3 How to use the Buzzer ....................................................................................................232
9.7.3.3.4 How to use the DISPLAY................................................................................................232
9.7.3.3.5 How to type the texts and transfer the texts to the terminal .............................................232
9.7.3.3.6 Transfer the texts.............................................................................................................234
9.7.3.3.7 Documentation:...............................................................................................................234
9.7.3.3.8 Display with only Text.....................................................................................................234
9.7.3.3.9 Text typing......................................................................................................................234
9.7.3.3.10 How to program a pure text Display .............................................................................234
9.7.3.4 Display with text and values...................................................................................................235
9.7.3.4.1 How to make a display with text and values...................................................................236
9.7.3.4.2 How to program a display with text and values ..............................................................236
9.7.3.4.3 How to show values with separation characters..............................................................238
9.7.3.4.4 Rolling text: (Scroll) .......................................................................................................239
9.7.3.5 How to preset a value .............................................................................................................241
9.7.3.5.1 Texts that move and change............................................................................................241
9.7.3.5.2 How to write in the expansion memory ...........................................................................244
9.7.3.5.3 How to read in the expansion memory.............................................................................244
9.7.4 ActTerm-H with printer port ..........................................................................................246
9.7.4.1 Start the program ....................................................................................................................246
9.7.4.1.1 Typing printer text ..........................................................................................................246
9.7.4.1.2 Text print out ..................................................................................................................246
9.7.4.1.3 Programming of a text printout .......................................................................................248
9.7.4.1.4 Programming of mixed text and value ............................................................................248
9.7.4.1.5 Connection of a printer ...................................................................................................249
9.7.4.2 Mounting ................................................................................................................................250
9.7.4.2.1 Typical mounting of the PLC in a housing .....................................................................250
9.7.4.2.2 Power supply of ActTerm-H..........................................................................................250
9.7.4.2.3 Measurements .................................................................................................................251
9.7.4.2.4 Hints when using ACTTERM-H.....................................................................................252
9.8 COMMUNICATION MODULES: ................................................................................................253
9.8.1 Remote communication (Remote modules): ...................................................................253
9.8.2 Current consumption RIOH and IOLH-T ......................................................................253
9.8.3 General specification RIOH and IOLH-T.....................................................................253
9.8.4 Link communication ......................................................................................................255
9.8.5 CTH High speed counter module:.................................................................................257
10.1.1 Differences between H300-H2000 and H302-H2002 ..................................................264
10.1.2 Expansion of I/O-modules............................................................................................265
10.2 COMMUNICATION: ...............................................................................................................265
10.2.1 Link modules:...............................................................................................................265
10.2.2 COMM2-H ...................................................................................................................265
10.2.3 Modules to H300-H2002..............................................................................................267
10.2.4 H300-H2002 Circuit diagram input modules: .............................................................269
10.2.5 Circuit diagram output modules ..................................................................................269
11.1 PID-INSTRUCTIONS:............................................................................................................271
11.2 TRIGONOMETRIC FUNCTIONS:.............................................................................................272
11.3 SEARCH INSTRUCTIONS: ....................................................................................................274
11.4 ASCII-CONVERSION INSTRUCTIONS: .................................................................................274
11.5 DIVERSE INSTRUCTIONS: ...................................................................................................274
11.6 SAMPLING (TROUBLE SHOOTING) INSTRUCTIONS:.............................................................274
11.7 OTHER INSTRUCTIONS: ......................................................................................................274
11.8 SERIAL COMMUNICATION INSTRUCTIONS:..........................................................................274
12.1 SPECIAL MEMORIES (DETAILED):......................................................................................277
12.2 INSTRUCTION TIME: ...............................................................................................................279

iv Copyright Actron AB 1994, 2009


Table of contents

INDEX:......................................................................................................................................... 282

Copyright Actron AB 1994 v


Table of contents

THIS PAGE INTENTIONALLY LEFT BLANK

vi Copyright Actron AB 1994, 2009


1 How to read this manual:

L serie H
MANUA

This manual contains information which is common for all PLC types in the H family.

- History, Background (page 3)


A short history and presentation of Actron, Lighthouse PLCs, and Hitachi PLCs in
general is described here.

- Symbols, abbreviations, etc. (page 6)


The basic contents of a PLC, the common abbreviations and principles of addressing
and the memory areas (e.g. Special memories) are described here.
X002 TD15
3.5 S

TD15 Y102 - Programming (page 20)


The basic ladder programming is described first. Thereafter Timers, Counters and
comparing is described. The arithmetic instructions are first given in a comprehensive
way together with page references to the more detailed description. Thereafter the
instructions are described , which are in common for the different system types. This is
followed by logic instruction programming. This is needed if the small hand held
programming unit is used. The chapter ends with mixed program examples.

- Handling in practice (page 114)


Here is a description of how to plan a project, choice of PLC type, configuration,
installation, computer programming, start up and documentation

Copyright Actron AB 1994-2009 1


Table of contents

- Common hardware description (page 149)


Here are common specifications, the common installation principles,
common error codes and trouble shooting principles are described The
processing system is also described.

The differences between the different PLC types are described in separate parts.
- Addition to H20-H64 (page 161)
The different hardware units that belong to H20-H64 are described here as
INPUT 0 1 2 3 4 5 6 7 8 9 10 11 8 9 10 11 8 9 10 11 8 9 10 11

POW
RUN
ERR INPUT 0 1 2 3 4 5 6 7 8 9 10 11 8 9 10 11 8 9 10 11 8 9 10 11

R.CL POW
RUN
ERR INPUT 0 1 2 3 4 5 6 7 8 9 10 11

well as the specific programming instructions for H20-H64 and the addressing
R.CL POW
RUN
ERR INPUT 0 1 2 3 4 5 6 7 8 9 10 11
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111 106 107 108 109 110 111

R.CL
POW
RUN
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111 106 107 108 109 110 111 ERR

R.CL

in detail.
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111

OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111

- Addition to H200-H252 (page 188)


The different hardware units that belong to H200-H252 are described here
as well as the specific programming instructions for H200-H252.

- Addition to H300-H2002 (page 264)


The different hardware units that belong to H300-H2002 are described
here as well as the specific programming instructions for H300-H2002 and the
addressing in detail.

- Extra programming instructions for H252, H302-H2002: (page 271)


FUN1 PID control
. The special programming instructions, which are implemented in the most
FUN15 ARC TAN function powerful PLCs are described here, e.g. PID-instructions and trigonometric
.
function.

- Appendix (page 276)


The basic definitions such as Hexadecimal, binary etc. are described here.
Complete tables of the special memories, error codes etc. are also given
here.

General:
For programming procedure, start with the common parts of the manual and refer to the additional part
when references are given. For description of the special modules (hardware, connection, addressing and
programming) go directly to the special additional chapter.
References to the different PLC types are often made, e.g. H302-H2002. (which refers to the CPUs H302,
H702, H1002 and H2002) or e.g. HB-H250 (which refers to the CPU:s H20, H28, H40, H64, H200 and
H250) as the following order is valid:
H20, H28, H40, H64, H200, H250, H252, H300, H700, H2000, H302, H702, H1002, H2002.
H20-H64 are also called HB (for H Board type)

Example The grey field in the bottom of the table says that it is only valid for some CPUs, while the
instructions in the white field are common for all PLC-types in the H-family and it is described on page 20
in the common part of the manual.
d=S1 == S2 Comparison If S1 = S2 then d=1 66
equal else d=0
d=S1 S == S2 -"- with If S1 = S2 then d=1 Not valid for 66
+/- sign else d=0 HB-H200

2 Copyright Actron AB 1994, 2009


2 History, background:

2.1 Short history about Lighthouse PLCs, Inc.:


Lighthouse PLCs, Inc. was formalized and incorporated in January 2000 in
Eugene, Oregon.
The President/Owner has 40 years in the electrical business. His experience
began first with an electrical apprenticeship and then an apprenticeship in
instrumentation. He was able to utilize his experience becoming the Chief
Electrical and Instrumentation Inspector for Exxon USA (Midland, TX ) in
1985. He has been a Senior member of the International Society of Automation (ISA) for over 25
years, and likewise an Active member of the International Association of Electrical Inspectors for
over 25 years. Currently, he holds Master Electrican Licenses in two states, and a General
Journeymans License in a third. In addition to qualifying as a Senior Instrumentation Tech, he
also passed certification as an Inspector by the American Society for Testing and
Inspection (ASTI, Tulsa, OK). In 1988 he was granted a Diploma in Business Management from
Trend College (Salem, OR).

A dynamic leader is important, but a company is only as good as the people it employs (and
empowers). Lighthouse PLCs, Inc. is fortunate to be able to draw on the resoures of some very
talented people, essential to meeting customer needs.

One important thing has always remained a constant; the company's committment to people and
conviction to provide extraordinary service and quality products through knowledge and
teamwork.

Lighthouse PLCs, Inc. is proud to be the sole authorized distributor for Hitachi programmable logic
controllers and Actron programming software for North America.

2.2 Short history about Hitachi:


Hitachi Ltd was started in 1910. The original business was based on electro-mechanical
products. Today Hitachi is the largest company in Japan manufacturing electronic and
electro-mechanical products. It also belongs to the largest companies world wide, all
categories.
Today Hitachi is known for a number of products (all the way from manufacture of
integrated circuits, consumer electronics to nuclear power generators).
In common for all product ranges is the quality approach, which been Hitachis priority for
many years. The PLC product range from Hitachi is a good example of this.
Thanks to the availability of Hitachis own integrated circuit development Hitachi is in the
front line of PLC development.

Copyright Actron AB 1994-2009 3


Table of contents

2.3 Short history about PLCs:

PLC stands for Programmable Logic Controller. The


PLCs have today almost completely replaced the older
generations of control systems. The relay systems belong to
this group. The relays were connected in order to form a logic
combination between inputs and outputs. When the micro
processor was invented this technique was used in products to replace the relays. These
products were different from other micro processor solutions as the user programming
structure was designed to be similar to the logic relay combinations and the way of running
through the program was made such that all logic circuits seem to run simultaneously. To
replace the relays in hard physical environment these product also had to be better prepared
to withstand noise, vibrations etc.

In the beginning these products only took care of logic combinations, as the relay technique.
Therefore the word Logic was placed in-between "Programmable" and "Controller".
As the micro processor technique itself offered more possibilities than to handle pure logic it
was natural to introduce arithmetic instructions. Many countries decided therefore to delete
the word Logic in the name. (this happened in the beginning of the 1980s). The
abbreviation PC very soon came into a conflict with another abbreviation. That was PC
for personal computer. Therefore most countries returned to PLC even if this abbreviation
is not perfect.

The PLC systems are built around standardised modules. These are manufactured in very
large quantities. Often it is an advantage economically to use this technique instead of
special designed products even if it is possible to optimise the amount of components in the
special solution.
The units are well tested and the failure frequency is low. The documentation is standardised
and it can be understood by many people. There are also spare parts available in most
countries.

4 Copyright Actron AB 1994, 2009


Symbols, abbreviations, etc.

Copyright Actron AB 1994-2009 5


Symbols, Abbreviations, Etc.

3 Symbols, abbreviations, etc.:

3.1 Symbolic picture of an H series PLC:


Inputs/ Outputs memories etc.

PROGRAM
X002 X013 R034 Y102

Y102 M002

16 outputs
in a row
16 inputs
e.g. an
in a row
analog
M-memories/ output
e.g. an
WM-memories WR-memories R-memories
analog
input

INPUTS
OUTPUTS

Mixed Bit- and Word Separate Word Separate Bit


memories memories memories

L-memories/ DIF- DFN-


memories MCS/MCR-memories
WL-memories memories

Link-memories (common for


othere linked units)
Memories for Memories for Memories Memories
positive edge negative edge for master for master
TC-memories control start control stop

Bit memories for


counters and timers

Timer/Counter current values

Copyright Actron AB 1994, 2009


Symbols, Abbreviations, Etc.

3.2 Abbreviations:
b bit In-/Output or memory ("1" or "0")
X Input (The inputs can be treated as WX- Words, see below)
Y Output (The outputs can be treated as WY- Words, see below)
W Word (16 bits in a row) *1
D Double words (32 bits in a row). Not valid for HB-H200 *2
M Bit memory, which is inside the area shared between Bits and Words
(M-memories and WM-memories are in the same memory area.)
R Memory bit in an area with only bit memories.
WR Memory word in an area with only word memories
L Memory area, which are shared between two or more Link connected
CPUs.
(L-memories and WL-memories are in the same memory area.)
TC Timers and Counters current values.
TD,CU etc Different types of Timers and Counters
*1 16 bits in a row gives a decimal value 0-65,535. The value in Hexadecimal is 0-FFFF
*2 32 bits in a row gives a decimal value 0-4,294,967,295. The value in Hexadecimal is 0-FFFFFFFF

Copyright Actron, A.B. 1994 7


Symbols, Abbreviations, Etc.

3.3 Program symbols:


(for more information, see under Programming page 20)
Type in function out function Note
(contact) ( coil)
Input not possible Input, which is physically connected
to the system, e.g. a Photo switch
Output Output, which is physically
connected to the system, e.g. a.
Contactor. The status of the output
can be detected.
Internal memory Memories, which keep the status
On/Off or "1/0".

Special internal Memories with decided functions,


memory e.g. time periods.
some
Timer

timer output timer activation


Counter

counter out counter activation


Comparison not possible Box in which a comparison between
two values is done.
The comparison gives a contact
function with "On/Off"-status.
Arithmetic box not possible Box in which calculations etc. is
done, which can not done by logic.
Other definitions (like hexadecimal, binary etc., see appendix page 276)

Copyright Actron AB 1994, 2009


Symbols, Abbreviations, Etc.

3.4 Addressing:

3.4.1 In-/ and Outputs:


Type of address HB/H20 H250--
0 H2002
External Bit X0USbb X= input U=Unit no. 0-1 H250: 0-1
input H252: 0-2
H300: 0
H700 : 0-1
H2000: 0-5
Word WX0USW Y=output S=Slot no. 0-7 0-A (hex)
Double DX0USW b b=bit nr. 0-15 0-95 (dec)
word
External Bit Y0USbb W=Word (16 bits) W=Word no. 0-7 0-9
output
Word WY0USW WX=Word input
Double DY0USW WY=Word output
word
External Bit X R St S b b R=remote 1-4 1-4
input host station no
remote Word W X R St S W D=Double Word
control (32 bits)
Double D X R St S W (valid for St=Sub Station no 0-7 0-9
word H250-H2002)
External Bit Y R St S b b
output
remote Word W Y R St S W b b=bit no 0-15 0-95
control Double D Y R St S W W=Word no 0-1 0-9
word

Principal overview of the addressing of in-/outputs:


U Unit no. 0 U Unit no. 1
S 0 1 2 etc. S 0 1 2 etc. U Unit no. 2
S 0 1 2 etc.

Copyright Actron, A.B. 1994 9


Symbols, Abbreviations, Etc.

etc.
CPU

R Remote Unit no. 1 R Remote Unit no. 2


St Station no. 0
etc.
St Station no. 0
S slot 0 1 2 etc. S 0 1 2 etc.
bb bit no. W word no.

R Remote Unit no. 1


St Station no. 1
S 0 1 2 etc.

etc. etc.

Copyright Actron AB 1994, 2009


Symbols, Abbreviations, Etc.

Example: The start addresses on a HB type with expansion are described below.
The inputs on the base unit corresponds to slot 0 (X0 - X39) and the outputs correspond to slot 1
(Y100 -Y123).
An expansion unit corresponds to Unit no. 1.
The inputs on the expansion unit get the slot no. 0 on unit 1 and become therefore number X1000 -X1039.
The outputs on the expansion unit get the slot no. 1 on unit 1 and become therefore number Y1100 -Y1123.

X0- correspond to slot no. 0 X1000- correspond to slot no. 0 on unit 1

Y100- correspond to slot no. 1 Y1100- correspond to slot no. 1 on unit 1

When expansion units are used these X300- or Y300- X400- or Y400-
correspond to correspond to
slots get no. 3 and upwards. X0- correspond to slot no. 0 slot no 4
slot no 3
(Slot no. 2 is reserved on the basic unit
for usage on the Link version of the
HB called HL)

Y100- correspond to slot no. 1

Example: The start addresses on a H200 are shown below. The bit addresses give the connection on the board. The
third digit from the end gives the slot no. and the forth from the end gives the unit no. (0 for the base unit, 1 for the
first expansion etc.). For a word address, e.g. an analog input the word no. is given as the last digit and the slot no. as
number two from the end etc.

Input Output
Unit no. Unit no.
Slot no. Slot no.
Input no. Output no.

Copyright Actron, A.B. 1994 11


Symbols, Abbreviations, Etc.

3.4.2 Internal memories:

Memory address
HB/H200 H250-H252, H300-H2000
Bits /Words Bit M 0-FFF 0-3FFF
common Word WM 0-FF 0-3FF Hexa-
memory Double- DM - 0-3FE deci-
word
Bits /Words Bit R 0-7BF 0-7BF mal
Separate Word WR 0-3FF 0-3FF (1024 ) RAM-04H, RAM-08H
memory 0-43FF (17408 ) RAM-16H, ROM-16H
0-C3FF (50176 ) RAM-48H, ROM-48H
Double- DR - 0-3FE (512 ) RAM-04H, RAM-08H
word 0-43FE (8704 ) RAM-16H, ROM-16H
0-C3FE (25088 ) RAM-48H, ROM-48H
Special Bit R 7C0-7FF 7C0-7FF (64 )
memory Word WR F000-F1FF F000-F1FF (512 )
DR0-DR3FE and DR400-DR43FE are different areas. Therefor DR3FF is not possible.

3.4.3 Link memories:


Bit/ Memory address
Word HB/H200 H250-H2002
Link memory Link area Bit L 0-7F 0-3FFF (16384) Hexa-
(shared by no. 1 Word WL 0-7 0-3FF (1024) deci-
other CPUs) Double word DL - 0-3FE (512) mal
Bits /Words Link area Bit L 10000-1007F 0-13FFF (16384)
common no. 2 Word WL 1000-1007 0-13FF (1024)
memory Double word DL - 0-3FE (512)

Memory areas
where the CPU Link
reads memory
information, area:
which can be
overwritten Bit (L)
other CPUs
or

Word (WL)
Memory areas
where the CPU
writes
information,
which can be
read by other
CPUs Link connected
CPUs

CPU 0 CPU 1 CPU 2 CPU 3

Copyright Actron AB 1994, 2009


Symbols, Abbreviations, Etc.

Start and end addresses for the write area of the PLCs are defined during the programming. You will do
this definition under <Setup-PLC>, see page 94 ,. See also under the additional part for HB page 161,
H200 page 188, H300-H2002 page 264.

Copyright Actron, A.B. 1994 13


Symbols, Abbreviations, Etc.

3.4.4 Edge memories:

Memory address Page


HB/H200 H250-H2002
Edge Positive edge DIF 0-127 0-511 29 Decimal

memories Negative edge DFN 0-127 0-511 29 addressing

3.4.5 Timers and Counters:


Word/ Memory address Page
/bit HB/H200 H250-H2002
On Delay Timers Bit TD 0-255 0-255 34 Timers

Off Delay Timers, 36 can be


Single Shot timer Bit SS 0-255 0-255 36 addressed
up to

Monostable timer Bit MS - 0-255 36 255

Integrating timer Bit TMR - 0-255 38

Watch Dog timer Bit WTD - 0-255 38 Counters can


be
Up Counters Bit CU 0-511 0-511 40 addressed
up to
511

Up-/Down Counters (Up) Bit CTU 0-511 0-511 41

Up-/Down Counters (Down) Bit CTD 0-511 0-511 41

Up-/Down Counters (Output) Bit CT 0-511 0-511 41 Decimal

Ring Counter Bit RCU - 0-511 42 addressing

Reset of Counter Bit CL 0-511 0-511 38


and integrating timer
Current value timers/counters Word TC 0-511 0-511 43

Copyright Actron AB 1994, 2009


Symbols, Abbreviations, Etc.

3.4.6 Master Control:

HB/H200 H250-H2002 Page


Master Start MCS 0-49 0-49 27 decimal

Control End MCR 0-49 0-49 27 addressing

3.4.7 Constant values:


Word/b HB/H200 H250-H2002
it
Constant Decimal Word 0-65,535 0-4,294,967,295
values Hexadecimal Word H0-HFFFF H0-HFFFFFFFF
Bit Bit 0, 1 0, 1

3.4.8 Battery backup (retentive areas) of memories:


When the system is started or when it starts after power down, all memories are reset if they are not defined
as retentive memories. During the programming you can specify any area of R-,WR-,WM-,TD-,DIF-
,DFN-memories. These areas will then keep the old status when the PLC is turned On. This is defined
under the menu "Setup-PLC" in Actsip or ActGraph. (See Short description of Actsip-H page 116 or
ActGraph page 132)

Copyright Actron, A.B. 1994 15


Symbols, Abbreviations, Etc.

3.5 Special memories:

3.5.1 Special memories, Words:


The most important special words (Complete list of special memory words, see page 277)
WRF00B
Year Real time Clock
WRF00C Valid for HB, H200-H252, H302-
Month, Day Real time Clock H2002
WRF00D (not H300,H700,H2000)
Weekday Real time Clock
WRF00E
Hour, Minute Real time Clock
WRF00F
Second Real time Clock
WRF010 Max.

Maximum measured cycle time


WRF011 Time

Current cycle time


WRF012 Min.

Minimum measured cycle time


WRF013 CPU

CPU Status
WRF015

Calculation error code


WRF016 Remainder
Calculation expansion register (remainder )
WRF017 Remainder
-"- during 32-bit calculations
WRF01B

Year Real time Clock , Preset


WRF01C Valid for HB, H200, H302-H2002

Month, Day Real time Clock, Preset


WRF01D (not H300, H700, H2000)

Weekday Real time Clock, Preset


WRF01E To activate the preset, use the flag
R7F9, see next page.
Hour, Minute Real time Clock, Preset
WRF01F see also separate program example

Second Real time Clock, Preset

Copyright Actron AB 1994, 2009


Symbols, Abbreviations, Etc.

3.5.2 Special memories Bits:

The most important special memories (Complete list, see appendix page 278)

Normal scan R7C0 Stop of RUN when maximum "1" Stop if the maximum time is exceeded
time is exceeded in a normal "0" No stop if the maximum time is exceeded
program scan
Periodic scan R7C1 Stop of RUN when maximum "1" Stop if the maximum time is exceeded
time is exceeded in a periodic "0" No stop if the maximum time is exceeded
program scan
Interrupt scan R7C2 Stop of RUN when maximum "1" Stop if the maximum time is exceeded
time is exceeded in an interrupt "0" No stop if the maximum time is exceeded
program scan

!!
R7C8 Severe error on the processor

R7CA Memory error

Normal scan R7D1 Normal program scan exceeded


the maximum time.
Periodic scan R7D2 Periodic program scan exceeded
the maximum time.
Interrupt scan R7D3 Interrupt program scan exceeded
the maximum time.
R7D9 Battery error
- +
R7DA Power supply error Valid H300-H2002

R7E3 ON during the first program scan


after start
R7E4 =1 Always ON

R7E5 0.02 sec clock pulse 0.01 s ON and 0.01 s OFF


R7E6 0.1 sec clock pulse
R7E7 1.0 sec clock pulse
R7E8 CPU occupied CPU is occupied e.g. of communication with
another equipment

R7E9 STOP or RUN "1" stops the CPU, "0" makes RUN possible

R7F0 Carry Used in arithmetic instructions


C
R7F1 Overflow -"-
Oflw
C
R7F2 0 Shift data Used in shift instructions

Copyright Actron, A.B. 1994 17


Symbols, Abbreviations, Etc.

R7F3 Error in calculation during RUN See detailed information in the word WRF015

R7F4 100110101 Data Error Register (DER) Discovered during execution of arithmetic
100011101 instructions.
R7F8 Transfer of the clock to the preset When the flag goes high, the clock values are
registers transferred to WRF01B-WRF01F

R7F9 Flag, which presets the real time When the flag goes high, the values in WRF01B-
clock WRF01F are transferred to the real time clock.

R7FA 30 s adjustment of the real time When the flag goes high the clock is adjusted
clock. forward 30 s

R7FB Error during preset of the


Real time clock

Copyright Actron AB 1994, 2009


Programming

Copyright Actron AB 1994-2009 19


Programming

4 Programming :

X002 R034 Y102


4.1 Basic ladder programming:
Series H is internally built to interpret the ladder symbols in an optimal way. The most
X002 R034

X002 X013 R034 Y102

Y102 M002

natural way of programming therefore is to draw ladder diagram in Actsip-H (or on the
graphic hand programmer).
The other main alternative is Grafcet programming with ActGraph. This generates
ladder diagram automatically, which is interpreted by the PLC.
It is also possible to symbolise the logic with instruction code. But as the internal storage in the PLC is
ladder code the instruction code causes limitations as in other PLC brands, which utilise instruction code as
the internal program storage.
Therefore ladder- or grafcet programming is recommended.

When programming in ladder it is enough to draw closing or breaking contacts and to connect these with
lines.

4.2 Symbols:

4.2.1 Block
With "block" is meant a Ladder Block, which is a complete unit and ended by one or more output
functions or an arithmetic box.
The program consists of a number of such blocks. Normally you can regard these blocks as they are
working in parallel with each other. There are of course exceptions to this rule.
There are two examples of blocks below.

Block 1

Block 2

Inverted Closing Output


contact contact (coil)

Copyright Actron AB 1994, 2009


Programming

4.2.2 Branch
A block can consist of one or more branches.

Branch 1 Branch 3

Branch 2 Branch 4

Serial connection: Parallel connection:

Contacts or branches connected after each Contacts or branches connected in parallel


other. It can also be symbolised by AND or with each other. It can also be symbolised by
as below. OR or as below.

AND OR

For further comparisons with Logic boxes and Boolean algebra, see appendix.

Copyright Actron, A.B. 1994 21


Programming

4.2.3 Contact symbols

Closing contact. Logic active X,Y,R,L.M


when the contact is ON TD,SS,CU

Inverted contact. Logic active WTD,MS,TMR,RCU (Valid for H250-H2002)


when the contact is OFF

Output (coil) Y,R,L,M


TD,SS,CU,CT
CTU,CTD,CL

WDT,MS,TMR,RCU (Valid for H250-H2002)

Example: (Highlighted contacts symbolise "logic flow" ON.)


X002 X013 R034 Y102

Y102 M002

Contact Logic Memories Function: Status: Logic Output Status


flow status (Inverted/ (ON/ flow
before Closing) OFF) after
X002 ON ON Closing ON ON Y102 OFF
X013 ON ON Closing ON ON
R034 ON ON Inverted OFF OFF
Y102 ON ON Closing ON ON
M002 OFF OFF Closing OFF OFF

Example: (Marked contacts symbolise a logic flow, which is TRUE)

X002 X013 R034 Y102

Y102 M002

Copyright Actron AB 1994, 2009


Programming

Contact Logic Memories Function: Status: Logic Output Status


flow status (Inverted/ (ON/ flow
before Closing) OFF) after
X002 ON ON Closing ON ON Y102 ON
X013 ON OFF Closing OFF OFF
R034 ON OFF Inverted ON ON
Y102 ON ON Closing ON ON
M002 ON OFF Closing OFF OFF

Copyright Actron, A.B. 1994 23


Programming

4.2.4 Inverting:

Inverting.
Changes the logic condition. NOT
ON becomes OFF /
OFF becomes ON

Contact Logic Memories Function: Status: Logic Output Status


flow status (Inverted/ (ON/ flow
before Closing) OFF) after
X002 ON ON Closing ON ON Y102 ON
X013 ON OFF Closing OFF OFF
R034 OFF ON Inverted OFF OFF
Y102 ON ON Closing ON ON
ON OFF
After Y102
M002 OFF OFF Closing OFF OFF
OFF ON
After R034

X002 X013 R034 Y102

Y102 M002

Copyright Actron AB 1994, 2009


Programming

Contact Logic flow Memories Function: Status: Logic Output Status


before status (Inverted/ (ON/ flow
Closing) OFF) after
X002 ON ON Closing ON ON Y102 OFF
X013 ON OFF Closing OFF OFF
R034 ON OFF Inverted ON ON
Y102 ON OFF Closing OFF OFF
OFF OFF ON
After Y102
M002 ON OFF Closing OFF OFF
ON OFF
After R034

Copyright Actron, A.B. 1994 25


Programming

4.2.5 Set, Reset

Sets Output/Memory ON when the Y,R,L,M


logic in the block is TRUE.
Keeps the ON-status also when the
logic in the block is OFF.

Resets Output/Memory to OFF when Y,R,L,M


the logic in the block is TRUE

The memory, which is addressed as the SET output is OFF as long as the condition is
OFF. When the condition is TRUE the memory is set ON and remains ON until the
corresponding RST- output is active.

A B C
M066 is OFF and the condition The SET-input (X002) goes ON The SET- input (X002) goes OFF
(or SET-input) X002 is OFF. and M066 is set ON. but M066 remains ON.
X002 M066

SET

A B C
M066 is ON and the condition (or The RESET-input (X002) goes The RESET-input (X002) goes
RESET-input) X003 is OFF. ON and M066 is reset to OFF. OFF but M066 remains OFF.
X003 X003 M066 X003 M066

RST RST

If both SET and RESET are active, then the last executed instruction decides the status.

4.2.6 Master Control Set (MCS) and Reset (MCR)

MCS Master Control Set Start of Common control of


the following ladder blocks.

MCR Master Control Reset End of Common control of


the following ladder blocks.

Instead of repeating the same condition, which is in common for several blocks you can create the common
condition and let it end with a MCS-output. the condition will be valid as a super condition for all
following blocks until a MCR-output is found.

Copyright Actron AB 1994, 2009


Programming

4.2.7 Master Control Set.

X002 X003 MCS4

4.2.8 Master Control Reset.


MCR4

The common logic condition for a part of a program is written before the MCS-output. Every MCR has to
correspond to a MCS with the same number.
The MCR-output shall be given without logic condition.

A part of a program with a super condition This is transformed as described below,


where MCS2 corresponds to MCR2.

MCS and MCR are identified:

MCS and MCR can be programmed in up to 8 levels (a MCS-MCR pair within another MCS-MCR pair).
Copyright Actron, A.B. 1994 27
Programming

The same number of MCS-MCR can be used again later in the program (when the previous usage is ended
with a MCR)

Copyright Actron AB 1994, 2009


Programming

4.2.9 Edge detection (DIF and DFN-Contacts)

Positive edge makes the condition ON during one program


scan
Negative edge makes the condition ON during one program
scan

Positive Negative
edge edge

DIF contact
ON
DFN contact
ON

Example

X002 DIF10 X013 Y102 X002 DIF10 X013 Y102


1 4
Y102 Y102

X002 DIF10 X013 Y102 X002 DIF10 X013 Y102

Y102 2 Y102 5

X002 DIF10 X013 Y102 X002 DIF10 X013 Y102

Y102 3 Y102 6

Copyright Actron, A.B. 1994 29


Programming

X002
X013
DIF10
Y102
1 23 4 5 6
The address on the DIF- (DFN-) function is unique and it must not be used more than once.

Copyright Actron AB 1994, 2009


Programming

4.2.10 Comparison contacts

Comparisons can be a part of the block in the same way as contact symbols. The result of a comparison
will always be true (ON) or false (OFF).
(see also Comparison instructions page 44.)

X002 R034 Y102


S1
=
S2

Contact Logic The memory Inverted/ ON/ Logic flow Output


flow before status Closing OFF
X002 ON ON Closing ON ON Y102 OFF
S1=S2 ON OFF (Closing) OFF OFF
R034 OFF OFF Inverted ON OFF

X002 R034 Y102


S1
=
S2

Contact Logic The memory Inverted/ ON/ Logic flow Output


flow before status Closing OFF
X002 ON ON Closing ON ON Y102 ON
S1=S2 ON OFF (Closing) ON ON
R034 ON OFF Inverted OFF ON

4.2.11 Arithmetic box:


The instructions in the box are executed when the logic flow is ON. Otherwise the instructions are not
executed. (see also under arithmetic instructions below)

X002 R034
S1 WR010 = WM000 + 45
= WM000 = WR100 (WM001)
S2 SHL ( WM20 , 4 )

Contact Logic The memory Inverted/ ON/ Logic flow Output


flow before status Closing OFF
X002 ON ON Closing ON ON Arithmeti Executed
c box
S1=S2 ON ON (Closing) ON ON
R034 ON OFF Inverted ON ON

Copyright Actron, A.B. 1994 31


Programming

4.2.12 Timer programming:


Example of usage of a timer (ON Delay timer)
Output Y102 goes ON 3.5 s after input X002 goes ON.

See also under "Timers" page 34.

X002 TD15
3.5 S

TD15 Y102

4.2.13 Counter programming:


Example of usage of a counter (up counter).
Output Y102 goes ON when input X002 has counted 25 pulses and the counter is reset by input X014.
See also under "Counter" page 40.
X002 CU16
25

X014 CL16

CU16 Y102

4.2.14 Complex logic

Series H allows logic,


which can not be
symbolised with
instruction code. e.g.

Copyright Actron AB 1994, 2009


Programming

4.2.15 Self hold:


Self hold of memories can be created in different ways:
Partly through "traditional self hold", which consists of a block with a Set condition and a Breaking
condition as described below.

Set Condition Breaking


Condition
X002 X003 R014

R014
Self hold memory

Self hold contact

The self hold can also be generated with a SET and a RESET function, see page 26.

4.2.16 Sequence programming with self hold:

4.2.17 Output control in sequence programming:

Graphic sequence Sequence part in ladder Output control in ladder


continuing

Copyright Actron, A.B. 1994 33


Programming

4.2.18 Timers :
page
TD ON Delay Timer 0-255 34
(Off Delay timer, see page 36)

SS Single Shot timer 0-255 36

MS Monostable timer Not valid 0-255 36


for

TMR Integrating timer HB/ 0-255 38


H200

WTD Watch Dog timer - 0-255 38

When you are programming a timer you have to decide the preset time. You type this as a decimal number.
If you type 1.23 it is shown as 123 x 0.01,
(12.3 is shown as 123 x 0.1) etc.

For H300-H2000 (not for HB-H252 and H302-H2002) the time base 0.01 can only be used on timer 0-
63.

ON Delay Timer TD

When the input of the timer is activated the timer begins to run. When the timer has reached its preset
value the timer output goes High. This output can be used as a contact function by other circuits. When the
timer input goes off the timer returns to its original status.

Copyright Actron AB 1994, 2009


Programming

Above, time chart.


On the right, the actions according to the time
chart.

(The time continues to run in the timer after the


timer has reached its preset value and the value
is reset to zero when the timer input goes low.)

Copyright Actron, A.B. 1994 35


Programming

Off delay timer:

To generate an Off Delay


timer you can use an On
Delay timer in the following
way::

Single Shot Timer SS

When the timer input is X002 SS12


activated the preset time 3.5 S
starts to run. If the timer
already runs in this moment SS12 Y102
it starts from the beginning.
The activation occurs only in
a short moment when the
timer input goes high. It does
not matter if the timer input
goes low directly after. X002
The timer output goes ON
directly and goes Off when Y102
the preset time is reached. 3.5 s

0 s 0 s 0 s

Monostable timer MS

Copyright Actron AB 1994, 2009


Programming

Not When the timer input is


valid
for:
activated the preset time starts X002 MS15
to run.
HB/ If the time already has run
H200 out in this moment the timer
continues to run as nothing
MS15 Y102
happened.
Activation comes only in the
moment when the timer input
goes high. Therefore it does not
X002
matter if the timer goes low
directly after.
Y102
The timer output goes high 3.5 s 3.5 s
directly and goes Off when the
timer has reached the preset 0 s 0 s
value.

Copyright Actron, A.B. 1994 37


Programming

Not valid This timer runs when the


for: input is activated and X002 TMR16
HB/ freezes the timer value 45753 S
H200 when it is not activated.
When the accumulated TMR16 Y102
time has reached its preset
value the output is
activated. X004 CL16
The timer is reset and
returns to zero when the
CLEAR (CL with the
same number as the timer
itself) input of the timer is X002
activated.
Y102
X004
65535 S
45753 S

0 S

Integrating Timer TMR

Watch Dog Timer (WTD)

Copyright Actron AB 1994, 2009


Programming

Not valid The purpose of a


for: 20,000 s (Min value)
Watch Dog timer is to
HB/ watch that actions, X002 40,000 s (Max value) WDT12
H200 which shall come in a
certain time interval.
The time is measured
from the timer input is WDT12 Y102
activated and the CL
pulse (with the
corresponding
number) is activated. X004 CL12
The timer has two
preset values.
If the CL pulse comes
before the lower preset
time is out the output X002
of the timer is
activated. X004
(CL12)
This is also activated
when the CL pulse WTD12
comes after the higher (Y102)
preset is out or if it
does not come at all.

Copyright Actron, A.B. 1994 39


Programming

4.2.19 Counters:
Page

CU Up counters 0-511 40

CTU Up-/Down counters 0-511 41


(Up)

CTD Up-/Down counters -0-511 41


(Down)

CT Up-/Down counters -0-511 41


(Output)

RCU Ring counter Not valid for 0-511 42


HB/H200

CL Reset of Counter -0-511 38

Up Counter CU
The up counter counts up on X002 CU11
the positive edge of the input
pulse and it is reset with a CL
4
pulse with the corresponding X005 CL11
number. As long as the CL
pulse is ON the counter
remains on zero. When it has
reached its preset value the CU11 Y102
counter output goes high.

(The counter continues to count


X002
after the activation and it is
reset when the CL input goes X005
(CL11)
high.)
CU11
(Y102)
6
5
4
3
2
1
0

The counter is The counter is equal The counter is reset and


reset and stopped to its preset and the stopped and the counter
output goes high output goes low.

Copyright Actron AB 1994, 2009


Programming

Up-/Down Counter
An Up-/Down Counter
consists of a up counting
input, a down counting
input and a reset input.
When the counter
reaches its preset value
the output goes high.
The output is called CT
with the same number as
the counter.
As long as the reset
input is high the counter
remains reset.

Up counting and
down counting at the
same time . This
means no counting

Preset value=4

The counter has been


reset and stopped and
the counter output is
The counter has reset.
reached its preset
value and goes high

Copyright Actron, A.B. 1994 41


Programming

Not valid
for
A Ring counter counts up to X002 RCU9
its preset value. But instead
of becoming this value it 4
HB/
H200 returns to zero. In the same
moment it gives a short X005 CL9
pulse on the output. This
pulse stays only one
program scan. RCU9 Y102
As long as the reset input is
high the counter stays on
zero.
X002
X005
(CL11)
RCU9
4 (Y102)
3
2
1
0
The counter The counter is
reaches its preset reset and stopped
value and returns and the counter
to zero. output goes low.
The counter
output goes high
during one
program scan
Ring counter

Copyright Actron AB 1994, 2009


Programming

4.2.20 Set value (The preset value) of Timers /Counters


When the timer or the counter is programmed the programming software asks for the preset value ( the
value it will run to before the time or counting has expired) of the timer or counter.
The preset of a timer is from 0.01 s to 65535 s and for a counter from 0 to 65535 pulses.
This can be written as a constant value, e.g. 123.5 s for a timer or 12312 for a counter.

When a timer is written with decimals it is shown in the following way: 1235 x 0.1 s in stead of 123.5 s or
1235 x 0.01 s in stead of 12.35 s
If a higher preset value is wanted. use cascade connection. See program example

4.2.21 Variable preset value of timers/counters.


To vary the preset value during run you must write a word instead of a constant as the preset value. Here
you can use WX, WY, WR, WM or WL.

The input word WX001


(16 inputs ) is connected to
a binary coded thumb wheel
or similar

When the counting starts the


preset is 4, but it is
changed during run to 2,
which causes the counter
output to be active earlier.

The preset value is changed


from 4 to 2 because the input
word WX1 is changed.

4.2.22 Timer/Counter read of current value:


TC Current value of Timers/Counters

The current value (the running value) of a timer or a counter can always be detected and used in a
comparison box or in an arithmetic box during run if you are using a type of word, called TC. The number
of the TC corresponds to the number of the timer or counter. (See also under separate program examples.)

Copyright Actron, A.B. 1994 43


Programming

4.2.23 Comparison instructions:


Create the "comparison contact" in ladder diagram and type the comparison expression
The comparison contact can be inserted and used in a ladder
diagram in the same way as contact symbols.
The comparison box compares integers. In H250-H2002 there
is also a possibility to compare "Signed" integers, which
means that the comparison can be done with signs (+ or -).
("Signed" is only possible on double words)

Result of Comparison Word/Bit

= S1=S2 ON if S1=S2 16-bit words:


OFF if S1 not = S2 WX,WY,WR,WM,T
C and constants
<> S1<>S2 ON if S1 not =S2 0-65535
OFF if S1 = S2 H0-HFFFF
< S1<S2 ON if S1 < S2 32-bit words:
OFF if S1 >or = S2 DX,DY,DR,DM,
TC and constants
<= S1<=S2 ON if S1< or =S2 0-429496729565535
OFF if S1 >S2 H0-HFFFFFFFF
S= S1 S=S2 ON if S1=S2 Not valid 32-bit words:
OFF if S1 not = S2 for DX,DY,DR,DM,
HB/H200 TC and constants
S<> S1 S<>S2 ON if S1=S2 0-429496729565535
OFF if S1 not = S2 H0-HFFFFFFFF
S< S1 S<S2 ON if S1=S2
OFF if S1 not = S2
S<= S1 S<=S2 ON if S1=S2
OFF if S1 not = S2

Example: (Status when e.g. WX11=1702, WM200=1234, WR22=1235, WR223=2000)


X013 Y102
WX11 2000
= <=
1802 WR223
X002
WM200
<
WR22

Copyright Actron AB 1994, 2009


Programming

Contact Logic Memory Inverted/ Value of the ON/ Logic Output


flow ON/ Closing words OFF flow
before OFF after
X013 ON ON Closing ON ON Y102 ON
WX11=1802 ON OFF (Closing) WX11 1702 OFF OFF
X002 ON ON Closing ON ON
WM200<WR22 ON ON (Closing) WM200: 1234 ON ON
WR22: 1235
2000<=WR223 ON ON (Closing) WR223: 2000 ON ON

Copyright Actron, A.B. 1994 45


Programming

4.3 Arithmetic instructions reference:


application instructions, control instructions (instructions in the arithmetic boxes.)

"d" means destination or where the result is stored.


"S" means "source" or where the calculation is made from. (S1 and S2 are
Source value 1 and Source value 2)
"P" stands for pointer.

4.3.1 Array variables and indexed addressing


Instruction Name Explanation Bit/Word Possible type Page

d=S Copy the content of S is Bit d: Y,R,L,M *1 57


copied to d S: X,Y,R,L,
M, Constant
d=S(P) Indexed The content of Word d: WY,WR,WL, 57
addressing S + P is copied WM,TC *1
to d S,P: WX,WY,WR,
WL,WM,TC,
d(P)=S The content of S Constants
is copied to the
address d + P

d(P1)=S(P2) The content of S+ Double Word d: DY,DR,DL,


P2 is copied to the Not valid for DM *1
address d + P1 HB/H200 S: DX,DY,DR,DL,
DM, Constant.
*1 External I/O are not valid for HB-H252

Copyright Actron AB 1994, 2009


Programming

Indexed addressing is used to address


relative in an address area of words WR1FF
or bits. WR1FE

BASE ADDRESS(INDEX WR107


ADDRESS)
WR106 WR100(WX10)
WR105
WR104
If the addressing is outside the WR103
allowed area the error bit DER WR102
(address R7E4) 1 and the operation WX10=6
will not occur. WR101
WR100 WX10

Copyright Actron, A.B. 1994 47


Programming

4.3.2 Summary of arithmetic instructions,


and application instructions, control instructions (instructions in the arithmetic boxes.)
(See also under the detailed explanation of these instructions)

4.3.3 Arithmetics
Symbol Instruction Explanation Bit/ Page
name Word * 1
d=S1 + S2 Binary d is the binary sum of S1 and W d: 60
addition S2 WY,WR,WL
,WM
d=S1 B + S2 BCD addition d is the BCD sum of the 62
BCD values S1 and S2
d=S1 - S2 Binary d is the binary difference S1, S2: 63
subtraction between S1 and S2 WX,WY,W
R,
d=S1 B - S2 BCD d is the BCD difference WL,WM,TC 64
subtraction between the BCD values S1 ,
and S2 Constant
d=S1 * S2 Binary d is the binary product of S1 64
multiplication and S2
d=S1 S* S2 -"- with +/- -"- with +/- signs not HB D : 66
signs S = "Sign" /H200
d=S1 B * S2 BCD d is the BCD product of the Not valid d: 65
multiplication BCD values S1 and S2 for DY,DR,DL,
DM
d=S1 / S2 Binary d is the binary quotation HB/ S1, S2: 66
division between S1 and S2 H200 DX,DY,DR,
d=S1 S/ S2 -"- with +/- -"- with +/- signs Not DL,DM, 68
signs S = "Sign" valid for Constant
HB/
H200
d=S1 B / S2 BCD division d is the BCD quotation 67
between the BCD values S1
and S2

Copyright Actron AB 1994, 2009


Programming

4.3.4 Logic expressions


Instruction Instruction name Explanation Bit/ Page
Word
d= S1 OR S2 OR d =S1 + S2 b 69
d=S1 AND S2 AND d = S1 * S2 W 69
d=S1 R S2 EXCLUSIVE d = S1 exclusive or S2 D 69
OR not valid
for HB/
H200

*1 b = bit
W=Word (16 bits)
D=Double Word (32 bits)

Copyright Actron, A.B. 1994 49


Programming

4.3.5 Comparison expressions

Instruction Instruction name Explanation Bit/ Page


Word
d=S1 == S2 Comparison If S1 = S2 then d=1 70
equal else d=0
d=S1 S == S2 -"- with +/- signs If S1 = S2 then d=1 Not valid for 72
else d=0 HB/H200
d=S1 <> S2 Comparison If S1 < > S2 then d=1 70
not equal else d=0
d=S1 S <> S2 -"- with +/- signs If S1 < > S2 then d=1 W Not valid for 72
else d=0 HB/H200
d=S1 < S2 Comparison If S1 < S2 then d=1 D 70
less than else d=0
d=S1 S < S2 -"- with +/- signs If S1 < S2 then d=1 Not valid for 72
else d=0 HB/H200
d=S1 <= S2 Comparison If S1 < = S2 then d=1 not for 70
less than or equal else d=0
d=S1 S <= S2 -"- with +/- signs If S1 < = S2 then d=1 HB/ Not valid for 72
else d=0 H200 HB/H200

4.3.6 Bit operations

Instruction Instruction name Explanation Bit/Word Page

BSET (d,n) Bit set "1" is set in bit no "n" in the word "d" W 73

BRES (d,n) Bit Reset "0" is set in bit no "n" in the word "d" D 74

BTS (d,n) Bit test The value ("1" or "0" in bit no "n" in not for HB 75
the word "d" is copied to C (Carry bit) H200/

Copyright Actron AB 1994, 2009


Programming

4.3.7 Shift and rotation expressions

Instruction Instruction name Explanation Bit/Word Page


SHR (d,n) Shift Right The word d is shifted n bits to the right 76
SHL (d,n) Shift Left The word d is shifted n bits to the Left 77
ROR (d,n) Rotate Left d rotates n bits right with C-flag W 78
ROL (d,n) Rotate Right d rotates n bits left with C-flag 78
LSR (d,n) Logic Right shift d is shifted n bits right "0" is shifted in D- 80
LSL (d,n) Logic Left shift d is shifted n bits left "0" is shifted in 80
BSR (d,n) BCD shift Right Shifts d n times 4 bits to the right not HB/ 81
BSL (d,n) BCD shift Left Shifts d n times 4 bits to the left H200 81

Copyright Actron, A.B. 1994 51


Programming

4.3.8 Moving data

Instruction Instruction name Explanation Bit/ Page


Word
WSHR (d,n) Block shift right Shifts n words or bits one position Not 83
valid
WSHL (d,n) Block shift left Shifts n words or bits one position b for HB/ 84
WBSR (d,n) BCD shift right Shifts n BCD-digits one position H200 85
WBSL (d,n) BCD shift left Shifts n BCD-digits one position W 85
MOV (d,S,n) Move data n words or bits from S to d 86
COPY (d,S,n) Copy data The content in S to n words or bits 87
from d and upwards
XCG (d1,d2,n) Exchange The content in n bits or words from 88
d1 is exchanged to d2 and n bits up

4.3.9 Negations, absolute value etc.


Instruction Instruction name Explanation Bit/ Page
Word
NOT (d) Inverting of words every bit in the word d is inverted b/W/D 89 4.3.10
Conve
NEG (d) make negative d becomes negative (+ to -, - to +) W/D 89
rsions
ABS (d,S) Absolute value Absolute value of S is put in d 90
SGET (d,S) "Sign Get" Make negative if C=1 Not valid 90
for
EXT (d,S) "Extent" Extend the sign to double word D HB/H200 91

Copyright Actron AB 1994, 2009


Programming

Instruction Instruction name Explanation Bit/ Page


Word
BCD (d,S) BIN BCD Coverts a binary word to BCD 91
BIN (d,S) BCD BIN Coverts a BCD word to binary 93
DECO (d,S,n) Decode Decoding of S (with n bits) W 93
ENCO (d,S,n) Encode Coding of n bits to word 94
SEG (d,S) 7-Segment Decoding to a 7-segment display Not valid for 95
HB/H200

Copyright Actron, A.B. 1994 53


Programming

4.3.11 Application commands

Instruction Instruction Explanation Bit/ Page


name Word
SQR (d,S) Square root The square root of d to S W not 96
HB/
H200
BCU (d,S) Bit count The amount of "1"-bits in S to d W/D 96
SWAP (d) Exchange 8 highest and lowest bits exchange place. 96
bytes
FIFIT (P,n) FIFO Init. Defines the size n of the FIFO from start P not 97
FIFWR (P,S) FIFO Write S is written in the FIFO with start on P W HB/ 97
FIFRD (P,d) FIFO Read d is read from the FIFO with start on P H200 98
UNIT (d,S,n) Unit 4-bit data from n words starting from S to d 100
DIST (d,S,n) Distribute n 4-bit data to words starting from d from S 100

4.3.12 Control commands (jump etc.)


Instruction Instruction name Explanation Page
END End End of normal program cycle 101
4.3.13
CEND (S) Condition END Conditional program end with condition S 101
FUN-
JMP n Jump Unconditional jump to Label 102 instru
CJMP n(S) Condition Jump Conditional jump to Label 102 ctions
LBL(n) Label End address of jump 102 for
series
RSRV n Reserve Command to the BASICH-module Not valid 104
HB:
FREE Command to the BASICH-module for 104
START n Command to the BASICH-module HB-H252 104
FOR n (S) For-loop Repeating of program loop n times. Start Not 104
NEXT n Repeating of program loop n times. Stop HB/H200 104
CAL n CALL Subroutine call to routine no. n 106
SB n Subroutine Subroutine no. n Start 106
RTS Return Subroutine no. n End 106
INT n Interrupt Interrupt routine type n Start 107
RTI Return Interrupt routine End 107

Copyright Actron AB 1994, 2009


Programming

Instruction Instruction Explanation Page


name
FUN 70 (S) Mode set Specifies the function on the inputs Only 182
FUN 71 (d) Reads the current value of the High speed counter for 184
FUN 72 (S) Sets the current value of the High speed counter HB 184
FUN 73 (d) Reads the preset value of the High speed counter 184
FUN 74 (S) Sets the preset value of the High speed counter 185

4.3.14 FUN-instructions for H252, H302-H2002:

Instruction Instruction name Explanation Page


FUN 0 PID-init Decides the addresses of the PID-functions 271
FUN 1 PID Check Checks the execution of the PID-functions 271
FUN 2 PID calculation Executes the PID function 271
FUN 10 Sin function 271
FUN 11 Cos function 271
FUN 12 Tan Function 271
FUN 13 Arc Sin function 271
FUN 14 Arc Cos function 271
FUN 15 Arc Tan function 271
FUN 20 Data search Search number and address for specified data 274
FUN 21 Table search Search the value of block data from specified table. 274
FUN 30 ASCII conversion 16 bit binary data to decimal ASCII data 274
FUN 31 ASCII conversion 32 bit binary data to decimal ASCII data 274
FUN 32 ASCII conversion 16 bit binary data to hexadecimal ASCII data 274
FUN 33 ASCII conversion 32 bit binary data to hexadecimal ASCII data 274
FUN 34 ASCII conversion 16 bit BCD data to decimal ASCII data 274
FUN 35 ASCII conversion 32 bit BCD data to decimal ASCII data 274
FUN 36 ASCII conversion Decimal ASCII data to 16 bit binary data 274
FUN 37 ASCII conversion Decimal ASCII data to N 32 bit binary data 274
FUN 38 ASCII conversion Hexadecimal ASCII data to 16 bit binary data 274
FUN 39 ASCII conversion Hexadecimal ASCII data to 32 bit binary data 274
FUN 40 ASCII conversion Decimal ASCII data to 16 bit BCD data 274
FUN 41 ASCII conversion Decimal ASCII data to 32 bit BCD data 274
FUN 42 ASCII conversion Specifies 16 bit binary data to decimal ASCII data 274
FUN 43 ASCII conversion Specifies ASCII data to 16 bit binary data 274
FUN 44 Combine characters 274
FUN 45 Compare characters 274
FUN 46 Convert Word -Byte 274
FUN 47 Convert Byte-Word 274
FUN 48 Shift one byte right 274
FUN 49 Shift one byte left 274
FUN 50 Sets the sampling Enables trace with sampling 274
FUN 51 Sampling Execution of sampling 274
FUN 52 Resets sampling Disables trace with sampling 274
FUN 60 Binary square root 274
FUN 61 Pulse generating 274

Copyright Actron, A.B. 1994 55


Programming

TRNS Transmit and receive data 10 ms . (Is used for ASCII, SIO, POSIT,CLOCK) 274
RECV Receive data 10 ms . (Is used for ASCII, SIO, POSIT,CLOCK) 274
QTRNS Transmit and receive data 1 scan . (Is used for ASCII, SIO, POSIT,CLOCK) 274
QRECV Receive data 1 scan . (Is used for ASCII, SIO, POSIT,CLOCK) 274
ADRPR Address program 274
ADRIO Address I/O 274

Copyright Actron AB 1994, 2009


Programming

4.4 Detailed description of arithmetic instructions:

4.4.1 Copy

d=S Copy The content of S is copied to d


d and S can be Bits, Word or for H250-H2002 double words.

Example:
When X100 goes high the X100 DIF10
WR010 = WX000
value of WX000 is copied M10 = X101
to WR010 and the status
of input X101 is copied to
the bit M10

4.4.2 Indexed (relative) addressing

d=S(P) Indexed The content of the address S+P is copied to d

d(P)=S addressing The content of the address S is copied to d+P

d(P1)=S(P2) The content of S+P2 is copied to d+P1

(not valid for H200 CPUs manufactured before May 1992)


Indexed addressing is used to perform relative addressing in an area of Words or Bits.
Indexed addressing can only be used in Copy instructions.

BASE ADDRESS(INDEX ADDRESS)


If the addressing is outside the allowed address area DER (Data Error Register address R7F4) goes High
and the operation is not performed.
.
Example:
when input X200 goes WR1FF
high the content of input WR1FE
word WX000 shall be 6 WX10
WX0F
copied to the WR address WR107
100 + the content of input WR106 54132
word WX10. WR105 WX05
WR104 WX04
If the content of WX10 is WR103 WX03
6 the value of WX00 is WR102 WX02
copied to WR106. WR101 WX01
WR100 54132 WX00
X200 DIF10
WR100(WX10) = WX000

HB-H252 can not use external I/O as base address.

Copyright Actron, A.B. 1994 57


Programming

Example:
When input X200 WR1FF
goes high the input WR1FE
word WX address 0 WX10
+ the content of WX0F
WR101 is copied to WR107
WR100. WR106
WR105 WX05
If WR101 is 4 WR104 54132 WX04
WR103 WX03
then the content of
WR102 WX02
WX04 is copied to
WR101 4 WX01
WR100. WR100 54132 WX00
X200 DIF10
WR100 = WX000(WR101)

Example:
When input X200 WR1FF 3
goes high the input WR1FE 5
word WX address 0 + WX10
the content of WR1FF WX0F
is copied to the WR WR107
address 100 + the WR106
content of WR1FE. WR105 54132 WX05
WR104 WX04
If WR1FF is 3 and
WR103 54132 WX03
WR102 WX02
WR1FE is 5
WR101 WX01
then the content of WR100 WX00
WX03 is copied to
WR105. X200 DIF10
WR100(WR1FE) = WX000(WR1FF)

Copyright Actron AB 1994, 2009


Programming

4.4.3 Arithmetics
Series H works normally binary. This means that a normal Word gets a value 0-65535. decimal, (0-FFFF
hexadecimal or 0-1111 1111 1111 1111 binary). This is more effective than BCD arithmetics as it is only
possible to represent the BCD values as
0-9999 and the instruction time will be longer.
If e.g. you are reading from a BCD coded thumb wheel or if you are connecting BCD coded display
segments on the outputs, it is practical to use BCD arithmetics to avoid two conversions.

There are three flags, which give information about how the operations went:
"C" (address R7F0) Carry flag gives information about an extra bit in the calculation
which e.g. can be used to count up or down a significant digit.
"Of" (address R7F1) Overflow gives information about that the operation is wrong.
"DER"(address R7F4) Data Error Register
.

Signed (or arithmetics with +/-sign) means that instead of interpreting 0000 - FFFF as 0-
65535, 0000-7FFF means 0- +32767 and 8000-FFFF means -32768- -1
Not In this way it is possible to count with both
valid positive and negative values. In double word FFFFFFFE -2 (-2 dec)
for HB / handling this means that: + 0 0 0 0 0 0 1 0 +10 (16 dec)
H200 0000 0000 -7FFF FFFF corresponds to = F0000000E + E (14 dec)
0 - +2147483647 and 8000 0000- FFFF FFFF
corresponds to - 2147483648 - -1.

Example
of binary X200
arithmetics: WX000

The addition is 0 0 0 F X200 DIF10


WR100 = WX000 +WX001
internally made WR100
binary and the WX001
001E
result will be a c 15 00000000000001111 WX001

0 0 0 F 0 1 5 + 00000000000001111 WX000
binary number.
3 0 = 00000000000011110 WR100

Example
of BCD X200
arithmetics: WX000
X200 DIF10
The addition is 0 0 1 5 WR100 = WX000 B +WX001
WR100
internally made
0030
as BCD and the WX001
c 15 WX001
00000000000010101
result will be a 0 1 5 + 00000000000010101 WX000
BCD number. 0 0 1 5
3 0 = 00000000000110000 WR100

Copyright Actron, A.B. 1994 59


Programming

d=S1 + S2 Binary addition d is the binary sum of S1 and S2


If the sum S1 +S2 >FFFF hexadecimal or S1+S2 > 65535 decimal, the carry flag "C" is set. This bit is
on address R7F0. This can later on be used in the program to indicate if the addition went well or not.
Example of binary addition:

If the sum of WX000 and WR100 = WX000 +WX001


WX001 > 65535 the carry
flag (R7F0) goes High. Y201 = R7F0
Then output Y201 also goes
High and indicates that the
addition went wrong.
WX001
C=R7F0 + WX000
WX0=0999 and WX1=2345
WR100 becomes 2CDE ,
C becomes 0
C = WR100
WX000 WX000
WX0=FFFF and WX1=0002
WR100 becomes 0001 , 0 9 9 9 F F F F
WR100 WR100
C becomes 1 2CDE 0001
WX001 WX001
c c
2 3 4 5 0 0 0 0 2 1

Not valid
For double word addition, "C" goes High if S1+S2 >FFFFFFFF or decimal S1+S2>
for HB / 4294967295.
H200 If Signed addition is used and S1+S2 gives a significant result another flag called "Of"
(Overflow, on the address R7F1 ), goes High.
If double word addition is made without using the +/-, the Of flag is insignificant.If
S1m is the most significant bit in S1, S2m is the most significant bit in S2 and dm is
the most significant bit in d, following Boolean expression is valid:

C (R7F0) =S1m*S2m+S1m*dm+S2m*dm

Of (R7F1) =S1m*S2m*dm+S1m*S2m*dm

Copyright Actron AB 1994, 2009


Programming

DR100 = DX000 + DX002


Example of binary double word addition: Y201 = R7F0
Y202 = R7F1
If the sum of DX000 and DX002 >
FFFFFFFF hexadecimal the carry flag Of=R7F1
(R7F0) goes High. C=R7F0
WX001
Then output Y201 goes High and + WX000
Of
indicates that the sum is > the maximum
capacity of DR100. If DX0 and DX2 are C = WR100
positive values and DR100 becomes
DX000
negative or if DX0 and DX2 are negative
numbers and DR100 becomes positive 7 F F F F F F F
the Of-flag will indicate. Then the output DR100
80000000
Y202 goes High. DX002
c Of
7FFF FFF is the highest positive value. 0 1
0 0 0 0 0 0 0 1
When this is added to 1 the result is
80000000, which is the lowest negative
value. The Overflow flag indicates that
the addition when wrong.

Copyright Actron, A.B. 1994 61


Programming

d=S1 B + S2 BCD addition d is the BCD sum of S1 and S2


If the sum S1 +S2 >9999 decimal the carry flag "C" is set. This bit is on address R7F0. This can later
on be used in the program to indicate if the addition went well or not.
If the content in S1 or S2 is outside the BCD area the DER flag (R7E4) goes High and the operation is not
executed. This happens e.g. if S1 is 9A55 hexadecimal. A or 1010 binary is not allowed as BCD
value.

Example of BCD addition:

If the sum of WX000 and WR100 = WX000 B + WX001


WX001 > 9999 the carry flag
(R7F0) goes High. Y201 = R7F0
Then output Y201 also goes
High and indicates that the
addition went wrong.
WX001
WX0=1111 and WX1=2345 C=R7F0 + WX000
WR100 becomes 3456 ,
C becomes 0
C = WR100
WX0=9999 and WX1=0001
WR100 becomes 0000 , WX000 WX000

C becomes 1 1 1 1 1 9 9 9 9
WR100 WR100
WX001
3456 WX001
0000
c c
2 3 4 5 0 0 0 0 1 1

Copyright Actron AB 1994, 2009


Programming

d=S1 - S2 Binary subtraction d is the binary difference between S1 and S2

When the difference S1 - S2 < 0 the carry flag C is set. This is found on address R7F0. This can be
used later in program to decide if the subtraction went well.

Example of a binary
subtraction:
WR100 = WX000 - WX001
If the difference
between WX001 and Y201 = R7F0
WX000 difference >0
( WX000 is greater than
WX001) the carry flag WX001
(R7F0) goes High.
Then output Y201 goes C=R7F0 - WX000
High and indicates that
the subtraction has gone
wrong.
C = WR100
WX000 WX000

9 9 9 A 0 0 0 1
WR100 WR100
WX001
4444 FFFF
WX001
c c
5 5 5 6 0 0 0 0 2 1

Not valid for


If Signed subtraction is executed and S1-S2 gives a non significant result another flag called
HB / H200 "Of" (Overflow, on the address R7F1) is goes High.
(If S1m is the most significant bit in S1, S2m is the most significant bit in S2 and dm is the
most significant bit in d, following Boolean expression is valid:
C (R7F0) =S1m*S2m+S1m*dm+S2m*dm

Of (R7F1) =S1m*S2m*dm+S1m*S2m*dm

Copyright Actron, A.B. 1994 63


Programming

d=S1 B - S2 BCD subtraction d is the BCD difference between S1 and S2


If the difference S1 - S2 < 0 decimal the carry flag "C" is set. This bit is on address R7F0. This can later
on be used in the program to indicate if the subtraction went well.
If the content in S1 or S2 is outside the BCD area the DER flag (R7E4) goes High and the operation is not
executed. This happens e.g. if S1 is 9A55 hexadecimal. A or 1010 binary is not allowed as BCD
value.

E.g. if S1 is WX000
"999A"
hexadecimal. "A" 9 9 9 A
or "1010" is not WR100
allowed as a BCD
value. WX001
xxxx
C will be high if c DF
the sum is greater
5 5 5 6 0 1
than 9999

d=S1 * S2 Binary multiplication d is the binary product of S1 and S2


S1 and S2 are multiplied binary and the result will go to two words , where d1 (the least significant part of
the result) is identical to the word, which is specified and d2, which is the next higher word (d+1).
Therefore d cannot be the highest word in any memory area. It can not e.g. be WM3FF as d2 then will be
outside the memory area. If so DER (address R7FE) will indicate error.

S1
WR100 = WX000 * WX001
S2

= d2 d1 DER = R7F4

The product of DER


999A and 5556 in
binary
multiplication will
be 3333BBBC.
When the result
will be placed in WX000 WX000
the highest word
WR101 9 9 9 A
the DER flag goes 9 9 9 A
High. 3333
WR100 WM3FF
WX001 BBBC WX001 BBBC
DF DF
5 5 5 6 0 5 5 5 6 1

Copyright Actron AB 1994, 2009


Programming

No valid
If double words are used, the result will be disposed in the following way:
DX0
for
HB / WX1 WX0
H200 DX2
WX3 WX2
DR12 DR10
DR10 = DX000 * DX002 = WR13 WR12 WR11 WR10

d=S1 B* S2 BCD multiplication d is BCD product of S1 and S2


S1 and S2 are BCD multiplied and the result will go to two words , where d1 (the least significant part of
the result) is identical to the word, which is specified and d2, which is the next higher word (d+1).
Therefore d cannot be the highest word in any memory area. It can not e.g. be WM3FF as d2 then will be
outside the memory area. If so DER (address R7FE) will indicate error unless d2 is not equal to 0.
If the content in S1 or S2 is outside the BCD area the DER flag (R7E4) goes High and the operation is not
executed.

S1
WR100 = WX000 B * WX001
S2

= d2 d1 DER = R7F4 WX001


If S1 is "999A"
DER
X WX000
hexadecimal.
"A" or "1010" is
not allowed as a
= WR101 WR100
BCD value or WX000 WX000
when the result is
placed in the WR101
9 9 9 A xxxx 0 9 9 9
highest word, the
DER flag goes WR100 WM3FF
High. WX001 xxxx WX001 6666
DF DF
5 5 5 6 1 5 5 5 6 1

Not valid
If double words are used, the result will be disposed in the following way:
DX0
for HB /
WX1 WX0
H200
DX2
WX3 WX2
DR12 DR10
DR10 = DX000 B * DX002 = WR13 WR12 WR11 WR10

Copyright Actron, A.B. 1994 65


Programming

Not HB / d=S1 S * S2 Binary multiplication d is the binary product of S1


H200 with +/- signs and S2
This is only valid for double words.
Two words where the content is interpreted as Signed (+/- sign) are multiplied and the result is written as a
Signed value. See also binary multiplication.

d=S1 / S2 Binary division d is the binary quotient between S1 and S2


S1 is divided binary with S2 and the quotient is written to d. The remainder is written to WRF016.
If the divisor S2 is 0, the DER (address R7FE) is set to "1" and no operation is performed.

S1
=d WRF016 WR100 = WX000 / WX001
S2
DER=R7F4

The quotient of 9999 DER


and 2222 in binary
division will be 0004
and the remainder will
be 1111.
When the division is WX000
done by zero the WRF016 WX000
WRF016
operation is not 9 9 9 9 1111 xxxx
9 9 9 9
performed and the DER WR100 WR100
flag is set High. WX001 0004 xxxx
WX001

2 2 2 2 0 0 0 0 0 1
DER DER

Not valid
If double words are used, the result will be disposed in the following way:
DER DER=R7F4 DRF016
for
HB / DX000 WRF017 WRF016
H200 WX001 WX000
= WR101 WR100
WX003 WX002 DR100
DR100 = DX000 / DX002 DX002

Copyright Actron AB 1994, 2009


Programming

d=S1 B / S2 BCD division d is the BCD quotient between S1 and S2

S1 is BCD divided BCD with S2 and the quotient is written to d. The remainder is written to the address
WRF016.
If the divisor S2 is 0 the DER flag (address R7FE) is set to "1" and no operation is performed.
If the content in S1 or S2 is outside the BCD area the DER flag (R7E4) goes High and the operation is not
executed. This happens e.g. if S1 is 9A55 hexadecimal. A or 1010 binary is not allowed as BCD
value.

Copyright Actron, A.B. 1994 67


Programming

S1
=d WRF016
WR100 = WX000 B / WX001
S2 Quotient
DER= R7F4 WRF016
If S1 is "9999" and S2
is 32 the quotient will
DER WX000 Remainder
be 312 and the = WR100
remainder will be 15.
If S2 is 0 or if a digit
WX001
in the operation is no WX 000 WX000
real BCD digit, the WRF016 WRF016
WX000
W RF016
9 9 9 9 0015 xxxx xxxx
DER flag goes High WR100
9 9 9 9 9 A 9 E
WR100 W R100
and the operation is WX 001 0312 WX001 xxxx WX001 xxxx
not performed. 0 0 3 2 0 1 1
0 0 0 0 0 0 1 0
DER DER DER

Not HB/ d=S1 S / S2 Binary division d is the binary quotient between


H200 with +/- sign S1 and S2
This is only valid for double words.
Two words, where the content is interpreted as Signed (+/- sign) are divided and the result is written as a
Signed value. See also Binary division.

Copyright Actron AB 1994, 2009


Programming

4.4.4 Logic expressions


S1, S2 and d can either be bits or words.

Not valid for


S1, S2 and d can also
HB / H200 be double words

d=S1 OR S2 Logic OR on Word d is the logic sum of S1 and S2


A logic "or" is done between S1 and S2 on each bit in the words. This means that
"1" and "1", "1" and "0" , "0" and "1" gives "1" while "0" and "0" gives "0"

S1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
OR
S2 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

d 111 10000 1111111 1


.

d=S1 AND S2 Logic AND on Word d is the logic product of S1 and S2


A logic "and" is done between S1 and S2 on each bit in the words. This means that
"1" and "1" gives 1 while "1" and "0" , "0" and "1" , "0" and "0" gives "0"

S1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
AND
S2 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

d 000000000000111 1

d=S1 R S2 Logic R on Word d is Exclusive Or on S1 and S2

A logic "exclusive or" is done between S1 and S2 on each bit in the words. This means
"1" and "1", "0" and "0" gives 0 while "0" and "1" , "1" and "0" gives "1"

S1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
XOR
S2 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

d 111 1000011 1100 00

Copyright Actron, A.B. 1994 69


Programming

4.5 Comparison expressions:


d is a bit S1 and S2 are words
Not S1 and S2 can be double words.
valid In comparisons with +/-signs S1 and
for HB / S2 are always double words.
H200

d=S1 == S2 Compare equal If S1 = S2 then d=1


else d=0

d=S1 <> S2 Compare not equal If S1 < > S2 then d=1


else d=0

d=S1 < S2 Compare less than If S1 < S2 then d=1


else d=0

d=S1 <= S2 Compare less than If S1 < = S2 then d=1


or equal else d=0

Copyright Actron AB 1994, 2009


Programming

Example: WX200
A counter value
is compared with X002 CU11
a preset value on 0 6 5 9
a thumb wheel X005 CL11
When the value
is < the preset
value, the flag X002 R100
R101
=
=
TC11
TC11
<
<=
WX200
WX200
R102 = TC11 <> WX200
R100 is High. R103 = TC11 == WX200

When the value RESET

is <= the preset


value, the flag
X005
R101 is High.
X002
When the value 661
660
is < > the preset TC11 659
value, the flag 658
R102 is High. 657
656
655
When the value 654
653
is equal to the 652
preset value, the 651
650
flag R103 is R100
High.
R101
R102
R103

Copyright Actron, A.B. 1994 71


Programming

Not d=S1 S == S2 Compare equal to If S1 = S2 then d=1


HB / 200 with +/- sign else d=0

Not d=S1 S <> S2 Compare not equal If S1 < > S2 then d=1
HB / 200 to with +/- sign else d=0

Not d=S1 S < S2 Compare less than If S1 < S2 then d=1


HB / 200 with +/- sign else d=0

Not d=S1 S <= S2 Compare less than or If S1 < = S2 then d=1


HB / 200 equal to with +/- sign else d=0

Example. DX200
A 32 bit up -
and down
counter is 0 0 0 0 X002 DIF10
DR100 = DR100 + 1
created in an
arithmetic box. 0 0 0 2 X003 DIF11
Not for This will count DR100 = DR100 - 1
HB / 200 with + and - X005
signs and X003 DR100 = 0
compares its
position to the X002 R100
R101
=
=
DR100
DR100
S
S
<
<=
DX200
DX200
preset of the R102
R103
=
=
DR100
DR100
S
S
<>
==
DX200
DX200
thumb wheel on
the inputs RESET

DX200. X005

DR100 X003
Hexadec. Dec.
00000005 5 X002
00000004 4
00000003 3
00000002 2
00000001 1
00000000 0
FFFFFFFF -1
FFFFFFFE -2
FFFFFFFD -3
FFFFFFFC -4

R100
R101
R102
R103

Copyright Actron AB 1994, 2009


Programming

4.6 Bit operations:

d is a word (WY, WR, WL, WM, TC)


n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

S is a word (WY,WR,WL, WM, TC)

BSET (d,n) Bit set "1" is set in bit no. "n" in the word "d"
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

1
Not valid d can be a double word (DY, DR, DL, DM)
for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Example:
The four least
significant bits in BSET(WY100,WM000)
WM000 is 9.
With other words,
bit no. 9 in the 0000001 000000111 WY100
word WY100 is
set. (Output 1 9 (1001)
Y1009 is set 0000000011111001 WM000
High).

Copyright Actron, A.B. 1994 73


Programming

BRES (d,n) Bit Reset "0" is set in bit no. "n" in the word "d"
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

0
Not valid d can be a double word (DY, DR, DL, DM)
for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Copyright Actron AB 1994, 2009


Programming

BTS (s,n) Bit test The value ("1" or "0") in bit no "n"
in the word "d" is copied to C (R7F0)
S is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

Example:
Input no n on
the input word BTS(WX200,WM000)
WX200 is tested
and the result Y100 = R7F0
copied to the
output Y100
(n =13, so Y100 000 0001000000111 WX200
=X2013.
C 0 13 (1101)
0000000011111101 WM000

Not valid S can be a double word (DY, DR, DL, DM)


for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Copyright Actron, A.B. 1994 75


Programming

4.6.1 Shift and rotation expressions

SHR (d,n) Shift Right The word d is shifted n bits to the right
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

The C-flag (R7F0) becomes the content of the shifted bit.


The content of the SD-flag "Shift Data" (R7F2) is copied to all bits, which are shifted in.

SD C
SD XXXXXXXXXXYZZZZZ Z

SD C
SD SD SD SDSDSDSD XXXXXXXXXX Y

Example:
The output word WY10
is shifted the amount of SHR(WY10,WM000)
bits to the right as the
content of register SD WY10 C
WM000 specifies. 1 0101101000011111 0
WM 000 specifies 1
position. The content of
WY10 before the shift 1 1010110100001111 1
then is 5A1F and after n = 1 position (0001)
AD0F (hexadecimal)
0000000011110001 WM000

Not valid d can be a double word (DY, DR, DL, DM)


for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Copyright Actron AB 1994, 2009


Programming

SHL (d,n) Shift Left The word d is shifted n bits to the left
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

The C-flag (R7F0) becomes the content of the shifted bit.


The content of the SD-flag "Shift Data" (R7F2) is copied to all bits, which are shifted in.

C SD
X X XX X YZ ZZ ZZ ZZ Z ZZ Z SD

C SD
Y Z ZZ Z ZZ ZZ ZZ Z SDSDSDSDSD SD

Example:
The output word WY10
is shifted the amount of SHL(WY10,WM000)
bits to the left as the
content of register C WY10 SD
WM000 specifies. 1 0101101000011111 0
WM000 specifies 6
positions. The content
of WY10 before the 0 1000011111000000 0
shift then is 5A1F and
after 87C0
(hexadecimal) 0000000011110110 WM000

Not valid d can be a double word (DY, DR, DL, DM)


for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Copyright Actron, A.B. 1994 77


Programming

ROR (d,n) Rotate Right d rotates n bits to the right together


with the C flag
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

The C-flag (R7F0) is a part of the rotation. It becomes the status of the last bit shifted out and delivers this
bit in the next shift to the most significant bit.

C
Z Z Z Z Z Z Z Z Z Z Z Y X1X2X3X4 C
C
X1X2X3X4 CZZZZZZZZZZZ Y

Not valid d can be a double word (DY, DR, DL, DM)


for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

ROL (d,n) Rotate Left d rotates n bits to the left


together with the C flag
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

The C-flag (R7F0) is a part of the rotation. It becomes the status of the last bit shifted out and delivers this
bit in the next shift to the least significant bit.

C
C X1X2X3X4 YZ ZZZ Z ZZZ ZZ Z
C
Y Z ZZZ ZZ ZZZ Z Z C X1X2X3X4

Copyright Actron AB 1994, 2009


Programming

Not valid d can be a double word (DY, DR, DL, DM)


for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Copyright Actron, A.B. 1994 79


Programming

LSR (d,n) Logic shift Right d is shifted n bits to the right. "0" is
shifted in
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

The C-flag (R7F0) becomes the status of the last bit shifted out. 0 is shifted in to the most significant bit.
C
0 XXXX XXXXXX Y ZZZZZ Z
C
0 000000XXXXXXXXXX Y
Not valid d can be a double word (DY, DR, DL, DM)
for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

LSL (d,n) Logic shift left d is shifted n bits left. "0" is shifted in
d is a word (WY, WR, WL, WM, TC)
n is specified by the 4 least significant bits (0-15)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

The C-flag (R7F0) becomes the status of the last bit shifted out. 0 is shifted in to the least significant bit.

C
X XXXXYZZZZZZZZZZZ 0
C
Y ZZZZZZZZZZZ 0 0 0 0 0 0
Not valid d can be a double word (DY, DR, DL, DM)
for n is specified by the 5 least significant bits (0-31)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Copyright Actron AB 1994, 2009


Programming

BSR (d,n) BCD shift right Shifts d n times 4 bits


d is a word (WY, WR, WL, WM, TC)
n is specified by the 2 least significant bits (0-3)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

0 X1X2 X3 X4

0 0 0 X1 X2
Example:
WR110 is BCD-
shifted to the right. BSR(WR110,WM000)
WM000 specifies the
amount of positions
to ON 2.
Before the shift the
WR110 7 3 8 2
content of the
register WR110
=7382 and after 0 0 7 3
=0073.

WM000 0 0 0 0 0 0 0 0 1 1 11
10 0 1 0

Not valid d can be a double word (DY, DR, DL, DM)


for n is specified by the 3 least significant bits (0-7)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

BSL (d,n) BCD shift left Shift d n times 4 bits


d is a word (WY, WR, WL, WM, TC)
n is specified by the 2 least significant bits (0-3)
in a word (WY,WX,WR,WL, WM, TC) or a constant.

X1X2 X3X4 0
X3X4 0 0 0

Copyright Actron, A.B. 1994 81


Programming

Not valid d can be a double word (DY, DR, DL, DM)


for n is specified by the 3 least significant bits (0-7)
HB/H200 in a word (WY,WX,WR,WL, WM, TC) or a constant.

Copyright Actron AB 1994, 2009


Programming

4.7 Moving data:

Not WSHR (d,n) Block shift right Shifts n words or bits one position
HB/H200
d can be a word (WR, WL, WM). Then the words d+1 to d+n-1 are shifted to the right.
"0000" is written into the word d+n-1 and the content of d is overwritten.

d can also be a bit (R, L, M). Then the bits d+1 to d+n-1 are shifted to the right.
"0" is written into the bit d+n-1 and the content of d is overwritten.

n is specified by the 8 least significant bits (0-255) in a word (WY, WX, WR, WL, WM, TC) or a constant.
d+n-1 d

If d+n-1 points at a word outside the area, the flag DER (R7F4) is set to 1. Otherwise it is 0 after the
operation.

Example::
The word WM3F0 to
WM3F7 is shifted to WSHR(WM3F0,WR000)
the right.
0 is written into
WM3F7 and the WM3F7 WM3F5 WM3F0
content in WM3F0
disappears. 12AFEEF36721 2AD3456A10EF17F0
0
000012AFEEF3 xxxx2AD3456A10EF
The word d+n-1 is d+n-1 d
inside the memory
area. DER remains
therefore 0. WR000 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
DER
0
Otherwise DER goes WM3FF WM3F0
High.
16F012AFEEF36721 2AD3456A10EF17F0
Here d+n-1 will be 0
WM400, which is
outside the memory 000016F012AFEEF3 xxxx2AD3456A10EF
area. DER goes high. d+n-2 d

WR000 0 0 0 0 0 0 0 0 000 1 0 00 1
DER 1

Copyright Actron, A.B. 1994 83


Programming

Not WSHL (d,n) Block shift Left Shifts n words or bits one position
HB/H200
d can be a word (WR, WL, WM). Then the words d+1 to d+n-1 are shifted to the left.
"0000" is written into the word d and the content of d+n-1 is overwritten.

d can also be a bit (R, L, M). Then the bits d+1 to d+n-1 are shifted to the left.
"0" is written into the bit d and the content of d+n-1 is overwritten.

n is specified by the 8 least significant bits (0-255) in a word (WY, WX, WR, WL, WM, TC) or a constant.

d+n-1 d

If d+n-1 points at a word outside the area, the flag DER (R7F4) is set to 1. Otherwise it is 0 after the
operation.

Example::
The word WM3F0 to
WM3F7 are shifted to
the left.
WSHL(WM3F0,WR000)
0 is written into
WM3F0 and the
content in WM3F7 WM3F7 WM3F5 WM3F0
disappears.
12AFEEF36721 2AD3456A10EF17F0
The word d+n-1 is
inside the memory
0
area. DER remains
therefore 0. EEF36721xxxx 456A10EF17F00000
Otherwise DER goes d+n-1 d
High.

WR000 0 0 0 0 0 0 0 0 0 0 0 0 1 00 0
DER 0

Copyright Actron AB 1994, 2009


Programming

Not WBSR (d,n) BCD shift right Shifts n BCD-digits one position
HB/H200
d can be a word (WR, WL, WM). Then the words d+1 to d+n-1 are shifted to the right 4 bits. (one BCD
position) "0" is written into the most significant BCD position d+n-1 and the content of the least significant
BCD position d is overwritten.

n is specified by the 8 least significant bits (0-255) in a word (WY, WX, WR, WL, WM, TC) or a constant.

d+n-1 d+1 d

If d+n-1 points at a word outside the area, the flag DER (R7F4) is set to 1. Otherwise it is 0 after the
operation.

Not WBSL (d,n) BCD shift left Shifts n BCD-digits one position
HB/H200

d can be a word (WR, WL, WM). Then the words d+1 to d+n-1 are shifted to the left 4 bits. (one BCD
position) "0" is written into the least significant BCD position d+n-1 and the content of the most significant
BCD position d is overwritten.

n is specified by the 8 least significant bits (0-255) in a word (WY, WX, WR, WL, WM,
TC) or a constant.
d+n-1 d+1 d

If d+n-1 points at a word outside the area, the flag DER (R7F4) is set to 1. Otherwise it is 0 after the
operation.

Copyright Actron, A.B. 1994 85


Programming

Not MOV (d,s,n) Move data n words or bits from s to d


HB/H200
d can be a word (WR, WL, WM)
d can also be a bit (R, L, M).
n is specified by the 8 least significant bits (0-255) in a word (WY, WX, WR, WL, WM,
TC) or a constant.
s+n-1 s

d+n-1 d

If d+n-1 or if s+n-1 points at a word outside the area, the flag DER (R7F4) is set to 1. Otherwise it is 0
after the operation.

Example:
A memory area (the
size is specified by MOV(WR100,WM010,WR000)
WR000) from
WM010 and upwards WM17 WM11 WM10

is copied to WR100
and upwards.
WM FDD62AD3456A10EF17F09999
s+n-1
222244445555
s
WR000 specifies that
8 words shall be
copied. d+n-1 d

WR FAD3FAD39999 22224444FAD3FAD3FAD3FAD3
WR107 WR10 WR100
1

WR000 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

DF 0

Copyright Actron AB 1994, 2009


Programming

Not COPY (d,s,n) Copy data The content of S to n words or


HB/H200 bit from d and upwards
d can be a word (WR, WL, WM)
d can also be a bit (R, L, M).
n is specified by the 8 least significant bits (0-255) in a word (WY, WX, WR, WL, WM,
TC) or a constant.
s

d+n-1 d

If d+n-1 points at a word outside the area, the flag DER (R7F4) is set to 1. Otherwise it is 0 after the
operation.

Example::
The content of
WM10 is copied to COPY(WR100,WM010,7)
the 7 words WR100
to WR106.
0000 s
Here 0000 is WM10
written into the
words.
d+n-1 d

WR FAD3FAD3 0000 00000000FAD3FAD3FAD3FAD3


WR106 WR10 WR100
1

DER 0

Copyright Actron, A.B. 1994 87


Programming

XCG (d1,d2,n) Exchange of n words or bits from d1 changes


words place with n words from d2
d1 and d2 can be words. (WR, WL, WM).
d1 and d2 can also be bits(R, L, M).
n is specified by the 8 lowest bits (0-255) in a word (WY, WX, WR, WL, WM, TC) or a constant.
d1+n-1 d1

d2+n-1 d2

If d1+n-1 or d2+n-1 points at a word outside the area, the flag DER (R7F4) is set to 1. Otherwise it is
0 after the operation. The exchange will only take place on the words within the allowed area.

If the areas d1 to d1+n-1 and d2 to d2+n-1 are overlapping, only the part of the area, which is not
overlapping will change place and the flag DER (R7F4) is set to 1.

Example:
The word WM201
to WM204 change
XCG(WM201,WM207,WR000)
place with the words
WM207 to WM20A

WR000 specifies
that 4 word shall be 000C000B000A0009000800070006000500040003000200010000
involved in the
exchange.

000C000B000400030002000100060005000A0009000800070000

WR000 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
DER 0

Copyright Actron AB 1994, 2009


Programming

4.7.1 Negations, absolute value etc.

NOT (d) Inverting of words The word d is inverted bit by bit


Inverting of all bits in a word ("1" becomes "0" and "0" becomes "1").

d can be a bit, word (or double word)

d 1 0 1 0 1 0 0 0 0 1 11
10 0 1 0

01 0 10 111 1 0 0 0 1 1 0 1

NEG (d) Make negative Two complement of d (+ to -,- to +)


The two complement of the word d is calculated and returned to the word d
This mean that H10000 (the hexadecimal value 10000) minus the content of d is returned to d.

NEG(d)

0002 +2 FFFE -2

FFFE -2 0 0 0 2 +2

(for double words H100000000 - the content of d is returned to d)

Copyright Actron, A.B. 1994 89


Programming

ABS (d,S) Absolute value The absolute value of S to d


If S is negative it will be converted to a positive value and written to d.
If S is positive it will be written to d without conversion.
The sign of S will go to C (R7F0). If S is negative C will be "1", otherwise "0".

ABS(WY10,WM000)

WM000 F F F E -2 WM000 0 0 0 2 +2

WY10 0 0 0 2 +2 WY10 0 0 0 2 +2

C 1 C 0

Not valid for SGET (d,s) Sign Get Make negative if C =1


HB/H200

If C (R7F0) =1 the two complement of the word S is calculated and written to d. (see NEG(d))
Otherwise S is copied to d.

SGET(d,s)

0002 2 F F F E -2
C 1
F F F E -2 0002 2

00022 F F F E -2
C 0
00022 F F F E -2

Copyright Actron AB 1994, 2009


Programming

Not EXT (d,s) Extend Extend sign to double word


HB/H200

S is copied to d and the most significant bit (bit 15) in S is copied to all bits in the word d+1
This is done if you want to convert a word to a double word and keep the sign.
s

0 1 1 00 1 1 1 0 1 0 11 10 1

0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 1 1 00 1 1 1 0 1 0 11 10 1
d+1 d
s

1 1 1 00 1 1 1 0 1 0 11 10 1

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 00 1 1 1 0 1 0 11 10 1
d+1 d

4.7.2 Converting.

BCD (d,S) BIN BCD Converts a binary word to BCD


If S and d are words. the binary value in S is converted to BCD and written to d.

If S > the hexadecimal value H270F the BCD value will be >9999. Then the DER (R7F4) flag goes high
and d is left unchanged.

s 1 7 5 9
DER

0 d 5 4 9 7

s 7 9 E 5
DER

1 d 5 4 9 7

Copyright Actron, A.B. 1994 91


Programming

Not valid If S and d are double words. the binary value in S is converted to BCD and written to
for d.
HB/H200
If S > the hexadecimal value H5F5E0FF the BCD value will be >99999999. Then the
DER flag goes high and d is left unchanged.

Copyright Actron AB 1994, 2009


Programming

BIN (d,S) BCD BIN Converts a BCD word to binary.


If S and d are words. the BCD value in S is converted to binary and written to d.

If any digits in S are outside the correct BCD area (0-9 the DER (R7F4) flag goes high and d is left
unchanged.

s 5 4 9 7 BCD
DER
0 d 1 7 5 9 binary

only 0 - 9
allowed
s 9 5 5 E
DER
1 d 1 7 5 9 binary

s and d can also be double words.

DECO(d,s,n) Decode Decoding of s (with n bits)

The content of the least significant part of the word s (with the width of n bits) defines which bit shall be
set to 1. This is calculated from the bit d. Other bits counted from the bit d and up to the bit 2n -1 are set
to "0".

s B

0 0 0 00 000 0 0 0 10 0 0 000 0 0 0 000 0 0


S= WX 10 B=17
DECO(M100,WX10,6)
1 0 1 00 1 1 1 0 1 0 1 00 0 1

0 0 0 00 000 0 0 1 0 0 0 00 0 000 0 0 0 000 0 0


01

If d+ 2n -1 is > than the highest bit in the memory area the flag DER is set high but the operation will be
executed. If d+B in this case is outside the memory area all bits from d and upwards are set to 0.

Copyright Actron, A.B. 1994 93


Programming

ENCO (d,S,n) Encode Coding of n bits to words.

n bits counted from the bit S are coded to a value.


The order in the area of S to S+2n -1 of the most significant bit with the 1 status is coded to a binary
value and written to the word d.

ENCO(WY100,M100,5)
s+2 -1
n

s+B
B=2 WY100=2 s
0 0 0 00 000 0 0 1 0 0 0 0 00 0 000 0 0 0 00 1 0 0
0
18 16 14 12 10 8 6 4 2 0

s+B
B=14 WY100=14 s
0 0 0 00 000 0 0 1 0 0 0 1 00 0 0 1 0 0 0 0 00 1 0 0
0
18 16 14 12 10 8 6 4 2 0

If all bits within the area S to S+ 2n -1 are "0" the C-flag (R7F0) is set high and d becomes the value
"0000"

If S+ 2n -1 is > the highest bit in the memory area the DER flag is set high but the operation is executed on
the bits within the memory area.

Copyright Actron AB 1994, 2009


Programming

Not SEG (d,S) 7-Segment Decoding to 7-segment display.


HB/H200

The content in the word S is decoded and written to double word d. Each digit in S is decoded to seven
bits, (which represent a segment in a seven segment display) according to the following:

a 0 1 7 F
f b
g 0 0 1 1 1 1 1 1 0 0 0 0 0 1 10 0 0 1 0 0 1 1 1 0 11 1 0 00 1

e c
d

0 1 2 3 4 5 6 7 8 9 A B C D E F

Outputs
In data g f e d c b a
0 0 0 1 1 1 1 1 1
1 0 0 0 0 0 1 1 0
2 0 1 0 1 1 0 1 1
3 0 1 0 0 1 1 1 1
4 0 1 1 0 0 1 1 0
5 0 1 1 0 1 1 0 1
6 0 1 1 1 1 1 0 1
7 0 0 1 0 0 1 1 1
8 0 1 1 1 1 1 1 1
9 0 1 1 0 1 1 1 1
A 0 1 1 1 0 1 1 1
B 0 1 1 1 1 1 0 0
C 0 0 1 1 1 0 0 1
D 0 1 0 1 1 1 1 0
E 0 1 1 1 1 0 0 1
F 0 1 1 1 1 0 0 1

Copyright Actron, A.B. 1994 95


Programming

4.8 Application commands:

Not SQR (d,S) Square root Square root of d to S.


HB / H200
d is the square root of S.
S must be BCD data. If S is not BCD data e.g. 74A6 the flag DER (R7F4) goes high.

s SQR(WM020,DR030)

BCU (d,S) Bit Count Counting "1"-bits in S to d


The number of bits in the word S, which are "1" are counted
and the result is written to d.
0 - 16 (hexadecimal 0000 - 0010) is written to d

11 1s (hexadecimal 000B)
0111101000011111
000B
s can also be a double word (not for HB/H200) Then 0 - 32
(hexadecimal 00000000 - 00000020) is written to d.

SWAP (d) Swap bytes The 8 most and the 8 least significant
bits exchange place in a word
The 8 most and the 8 least significant bits exchange place in a word.

Example:
the 8 most the 8 least SWAP(WY20)
significant bits significant bits
before after

d=WY20 0B17 170B

Copyright Actron AB 1994, 2009


Programming

4.9 FIFO (Queue register):


The FIFO-instructions are divided into three instructions.
- FIFIT defines the size of the FIFO register.
- FIFWR reads data into the queue.
- FIFRD reads data from the queue.
FIFO is a short form for First In First Out.
Not FIFIT (P,n) Defines the size of the FIFO in P
HB/H200
n is written into P and defines the size of the FIFO the maximum length of the queue.
n has a maximum of 256. If n is > 256 the value 256 will be written into P anyway.
The address above P (P+1) contains the counter, which keeps the information about how many data words
the FIFO contains for the moment. This is reset to zero when the instruction FIFIT is executed.
The FIFO itself starts at address P+2.
If P+n+1 points outside the memory area, the DER flag (R7F4) goes high and the highest address, which is
not outside the area will be stored instead.

P Size of the FIFO n


P+1 A Counter queue 0
P+2 Position 1
Position 2
Maximun size
of the FIFO

P+n+1 Position n

Not FIFWR (P,S) FIFO Write S is written into FIFO with start
HB/H200
on P
Writes data from the word S into the FIFO on the address, which the counter queue keeps track of..
S is written to the address P +2+A, where A is the temporary amount of data words in the FIFO. A is
automatically increased by 1.
If A>= n (the queue is full) S is not stored and the DER flag (R7F4) goes high.
If A=0 (the queue is empty) S is not stored and the DER flag (R7F4) goes high.

p
ASize of the FIFO
Counter queue
Position 1
A
Position 2 S
p+A+2

p+n+1
Position n

Copyright Actron, A.B. 1994 97


Programming

Not HB/ FIFRD (P,d) FIFO Read d is read from the FIFO starting on P
H200

Reads the queue register, which starts on the address P.


The content of the address P+2 is written to d. A is automatically decreased by 1.
The contents of the addresses P+3 to the last address in the shift register are shifted one position.
(P+3 P+2, P+4 P+3 etc.)
If A>= n (the queue is full) S is not stored and the DER flag (R7F4) goes high.
If A=0 (the queue is empty) S is not stored and the DER flag (R7F4) goes high.

Example: Using the FIFO-instructions.


p Size of the FIFO R7E3
A Counter queue FIFIT(WR100,5)

Position 1 X200 DIF1


A d FIFWR(WR100,WX010)
Position 2
X201 DIF2
FIFRD(WR100,WY100)

p+n+1

Phase 1 Phase 2 Phase 3

R7E3 X200 X200


WR100 WX010 WX010
5 5 5556 7EA3
0 0 WR100 WR100
WR102
Not defined 5 5
Not defined 1 2
WR102 WR102
Not defined 5556 5556
Not defined Not defined 7EA3
WR106
Not defined Not defined Not defined
Not defined Not defined
WR106 Not defined WR106 Not defined

Phase 4 (data shifted 2 times Phase 5 Phase 6


between phase 3 and 4)

Copyright Actron AB 1994, 2009


Programming

R7F4=0 R7F4=1 R7F4=0


X200 X200 X201
WX010 WY030
1111 WX010
6666 5556
WR100 WR100
5 WR100
5 5
5 5 4
WR102 WR102
5556 WR102
5556 7EA3
7EA3 7EA3 7777
7777 7777 2222
2222 2222 1111
WR106 WR106
1111 WR106
1111 Not defined

Copyright Actron, A.B. 1994 99


Programming

UNIT (d,S,n) Unit 4 bit data 4-bit data from n words from S to d
The last 4 bits in n words with start from the word S are copied into the word d according to the picture.
n is 0-4.
If n < 4 the rest of the word d is filled with "0".
If S+n+1 points outside the memory area, the DER flag (R7F4) goes high and the operation is not executed
on the words, which are outside the address area, while the other positions are filled with "0".
LSD MSD LSD

B4 B3 B2 B1 d

S B1
B2
B3
S+n-1 B4

Example: The last digit in the word s from WR100 and upwards are written to the output word WY20.

UNIT(WY20,WR100,4) UNIT(WY20,WR100,2)

B5F4 WY20 00F4 WY20


WR100 1234 WR100 1234
A67F A67F
78D5 78D5 00
WR103 998B WR103 998B

DIST (d,S,n) Distribute 4-bit data to d from n words starting from S


The last 4 bits in n words with start from the word d are copied from the word S according to the picture.
n is 0-4.
If d+n+1 points outside the memory area, the DER flag (R7F4) goes high and the operation is not executed
on the words, which are outside the address area, while the other positions are not copied.
LSD MSD LSD
B4 B3 B2 B1 s
d
000 B1
000 B2
000 B3
d+n-1
000 B4 .
Example: An input word shall be read and divided so every digit is stored in a separate word in the
memory.
DIST(WM100,WX10,4) DIST(WM100,WX10,3)

B 5 F 4 WX10 0 5 F 4 WX10
WM100 0004 WM100 0004
000F 000F
0005 0005
WM103 000B WM103 998B

Copyright Actron AB 1994, 2009


Programming

4.10 Control commands (jump etc.):

END End End of a normal program cycle.


Ends a normal program cycle (or scan) and causes restart from the beginning of the program.
It is only necessary to use this instruction if sub routines or interrupt routines are written after the main
program. It should not be used more than once in a program.

END
If alternative Ends of the program is wanted, see the instruction CEND.

CEND (S) Condition END Conditional program End, on condition S


Ends a normal program cycle (or scan) and causes restart from the beginning of the program if the
condition S is true.
It is used to create alternative program Ends and therefore shorten down the scan time of the program.
CEND must not be used outside the main program (not in sub routines or interrupt routines)

Example: The second part of the main program


Begining of program could e.g. be a debug part of the program, which
only shall be executed when X100 is High.
Normal program
CEND(X100)

Normal program
END

Copyright Actron, A.B. 1994 101


Programming

JMP n Jump Unconditional jump to label

CJMP n(S) Cond. Jump Conditional jump to label

LBL n Label End address of jump

Performs a jump in the program to the condition unconditional


corresponding Label. Every JMP n or JMP n
CJMP n has to correspond to a LBL n
where n is identical.
n is a number between 0 and 255. Program

JMP n performs an unconditional jump. LBL n


That means if the condition for the
arithmetic box is true. condition condition
CJMP n performs a conditional jump.
CJMP n (s)
That mean that the jump take place if the
condition S is true (and if the condition
for the arithmetic box is true) Program

LBL n

X201 Several jumps to the same label is


JMP 10
allowed.
Program
Jumps with different labels are
X202
CJMP 10 (X204) independent from each other and they are
allowed to nest
Program
X203 A jump is done directly to the label
JMP 11 address and it will shorten the scan time.

Program Jump backwards are allowed but you must


LBL 10
be careful so you will not stop in endless
loops.
LBL 11
If a jump passes a timer it will run
anyway. But the timer can not effect
X203 anything before the program part is
JMP 10 executed.

Copyright Actron AB 1994, 2009


Programming

Jumps are not allowed outside its own program area.


It is not allowed to jump between main program and sub Main program
OK
routines or interrupt routines or between sub routines and
interrupt routines.
Sub routin Not
OK

Interupt routin

Copyright Actron, A.B. 1994 103


Programming

RSRV n Reserve Command for the BASICH-module see


FREE Command for the BASICH-module separate
STAR n Command for the BASICH-module description

Not FOR n Repeated program part start


HB/H2
00 (S)
NEXT n Repeated program part end

Repeated program part between FOR n and NEXT n FOR n (s)


(where n is identical) S times.
When S becomes 0 the loop is interrupted. n -1
n
S must be a word (WM, WR or WL). It will decrease Program times times
by 1 every loop. (it is possible to change the content
of n during the execution of the loop.) NEXT n

n is a number between 0 and 49.


Every FOR must correspond to a NEXT with the same
number
FOR must come before NEXT.
FOR or NEXT can only be used once with the same
number (n).
FOR 1 (WR100)
FOR and NEXT can be used up to 5 levels. (see drawing)
This is also valid if one or more subroutines are in a sub FOR 2 (WR101)
routine.
FOR 3 (WR102)

This kind of programming easily causes very long program FOR 4 (WR103)
scan times, which must not exceed the maximum time in the
setup. FOR 5 (WR104)

NEXT 5
E.g. WR100-WR104 all are 10 the program part between
NEXT 4
FOR 5 and NEXT 5 will be repeated 10 x 10 x 10 x 10 x 10
=100000 times. If this part of the program is 1 ms, the total NEXT 3
program scan time will be > 100 s, which is not possible..
NEXT 2

NEXT 1

FOR 5 (WR104)
It is not allowed to nestle FOR-
FOR 4 (WR103) loops.
Not
allowed

NEXT 5

NEXT 4

Copyright Actron AB 1994, 2009


Programming

It is allowed to jump from a FOR loop without completing


the loop. FOR 5 (WR104)
When the loop is entered again it will start from the
beginning. JMP 12
It is possible to have a condition for the execution of FOR
NEXT 5
and NEXT. This condition must be identical as FOR and
NEXT otherwise do not correspond to each other.
Do e.g. not use an input which can be changes during the
scan.

Copyright Actron, A.B. 1994 105


Programming

CAL n CALL Subroutine call to routine no. n

SB n Subroutine Subroutine no. n start

RTS Return Subroutine no. n end and return

CALL n calls a subroutine. Program


SB n defines the start of a subroutine. X203
RTS means that return to the instruction after the CAL n

CALL n shall take place.


Program
A sub routine is used because it will not be
END
necessary to repeat this program part in the
program.
SB n

n is a value between 0 and 99 and specifies the


number of the sub routine.
Sub routine
The sub routines are placed directly after the main
program. (after the END-instruction) They can be RTS
written before or after the interrupt routines.

Copyright Actron AB 1994, 2009


Programming

The sub routines can be called in 5 levels.


(for HB/H200 only 1 level) This means that the
routines can call each other and the system
remembers the order of the return jumps.
a
It is possible to have different start addresses of
a sub routine. (the same RTS instruction
corresponds to more than one SB n instruction) b
In this case you have to use JMP to pass the SB
instructions, which are not used. a
a
a

a
a
a
a
a
a
b

INT n Interrupt Interrupt type n start

RTI Return Return from Interrupt routine

INT n specifies the start of an interrupt Program


routine.
RTI specifies that return to the place where
END
the jump to interrupt occurred, shall take
place..
INT n
n is a number between 0 and 31 and
specifies the type of interrupt (see page
153) Interup routine

INT and RTI have to be unconditional. (No


logics before the arithmetic box.)

RTI

Copyright Actron, A.B. 1994 107


Programming

If one of the possible Main


Main Main Main Main
interrupt reasons occur and program
program program program program
an interrupt routine is
programmed to take care of Interupt
this, the normal program type 2
scan will be interrupted and
the interrupt routine will Interupt
be executed. type 1

INT 1 INT 1 INT 1 INT 1 INT 1


RTI RTI RTI RTI RTI
INT 2 INT 2 INT 2 INT 2 INT 2
RTI RTI RTI RTI RTI

Copyright Actron AB 1994, 2009


Programming

4.11 Logic instruction programming:


(not necessary to use if ladder or grafcet programming is used with Actsip/Actgraph)
It is also possible to symbolise the logic with instruction code.
But as the internal storage in the PLC is ladder code, it means that there are limitations when using
instruction code (like in other PLC types).
Therefore ladder- and Actgraph programming is recommended.

Start Contact symbol


Defines start of block or a branch in a ladder block.
Symbol Instruction Short from Description Address type

LD LoaD Start of a block or a X,Y,R,L,M


branch , closing contact

LDI LoaD Start of a block or a TD,SS,CU,CT


branch , inverted contact
Invert

LD X002
X002 X013 R034 Y102 AND X013
OR Y102
LDI R034
Y102 M002 OR M002
ANB
OUT Y102

As the two parallel connected contacts (R034 and M002) are alone on the branch it is not necessary to
create a new branch. You can instead describe the parallel connection with an OR contact, see below.
Symbol Instruction Short from Description Address type

AND AND Serial connection, WDT,MS


closing
TMR (not all
CPUs)

ANI ANd Serial connection,


inverted
Invert

OR OR Parallel connection, DIF, DFN


Closing

ORI OR Parallel connection,


Inverted
Invert

LD X002
X002 X013 R034 R01A Y102 AND X013
OR Y102
LDI R034
Y102 M002 OR
ANB
M002

ANI R01A
OUT Y102

Copyright Actron, A.B. 1994 109


Programming

As the last contact (R01A) is alone on the branch it is not necessary to create a new branch. You can
instead describe the serial connection with an ANI contact.

Serial connection and parallel connection of blocks:

Symbol Instruction Short from Description Address type

ANB AND Serial connection of -


BLOCK logic blocks

ORB OR Parallel connection of -


logic blocks
BLOCK

Combine the branches one by one with ANB (Serial connection) or


ORB (Parallel connection) so they will form larger and larger units..

C E
LD X002 Branch A
F AND X013
A X002 X013 R034 R01A Y102 LD Y102 Branch B
ANI M012
ORB Parallel connection
Y102 M012 M002 of A and B to C.
LDI R034 Branch D
B
D OR M002
ANB Serial connection
of C and D to E.

ANI R01A F is serial connected


to E

OUT Y102 Output control

Symbol Instruction Short from Description Address type

NOT NOT Inverting of the logic -


in the block

Symbol Instruction Short from Description Address type

OUT OUT Output (coil) Y,R,L,M

TD,SS,CU,CT
CTU,CTD,CL

WDT,MS
TMR,RCU
(not all CPUs)
Copyright Actron AB 1994, 2009
Programming

Symbol Instruction Short from Description Address type

SET Sets an output or a Y,R,L,M


memory High

RST Sets an output or a Y,R,L,M


memory Low
(Reset)

MCS Master Master Control of the MCS


Control Set coming program
blocks Start.

MCR Master Master Control of the MCR


Control coming program
Reset blocks End.

Symbol Instruction Short from Description Address type

AND DIF Serial connected DIF


positive edge.

OR DIF Parallel connected


positive edge.

AND DFN Serial connected DFN


negative edge.

OR DFN Parallel connected


negative edge.

Symbol Instruction Short from Description Address type

MPS Push Stores the current --


logic result

Reads back the logic


MRD Read result stored by MPS

MPP Pull Reads back the logic


result stored by MPS
and restores the level

Copyright Actron, A.B. 1994 111


Programming

Symbol Instruction Short from Description Address type

OUT TD Time Delay On delay timer -


Time base, Time
OUT SS Single Shot Timer, which starts when -
Time base, Time it is activated and
continues.
OUT CU Count Up Up counter -
Preset
OUT CTU CounT Up Up- and Down Counter -
Preset Up count input
OUT CTD CounT Down Up- and Down Counter -
Down count input
OUT CL CLear Clear of Counter/Timers -

Symbol Instruction Short from Description Address type

( ) Compare The result of the comparison WR, WY, WX,


box gives On/Off function as a TC, WL, WM,
Start/ End ladder contact constant
Create the "compare contact" through pressing [AND], [ANI], [OR] or [ORI] and thereafter [ ( ] and
[comparison expression].
e.g. AND (S1=S2), ORI (S1<S2) or LD (S1<>S2)

Symbol Instruction Name Description Address type

[ ] Box start/end In the box there are WR, WY, WX,


programmed arithmetic TC, WL, WM,
instruction etc. constant

Create the arithmetic box through pressing "[" and thereafter the arithmetic instructions in the box and
finally "]" to end the box.

E.g.
[
WR00=WX00
SHL (WM101 , 5)
]

Copyright Actron AB 1994, 2009


Practical Handling

Copyright Actron AB 1994-2009 113


Practical handling

5 Practical Handling :
5.1 To run through a complete project:

5.1.1 Choice of PLC


-Start to estimate the distances in the installation.
-If they are long:
-If the units are going to work more or less independent from
each other:
-It can be wise to divide the installation into two or more
CPUs. In this way you can save installation cost and get units
working if something happens to another unit..

-If the units are going to communicate with lots of information:


-then it is recommend to use a link connection.

-If the distances are long and the units are going to work
like one unit:
-Then it is recommendable to plan one central CPU with
remote units, which are distributing the In/Outputs.

It is now time to choose the PLC type. Here is given some leading information (see also the list of modules
in the additional parts)
Suitable for size Suitable Module Link- and Best advantage (cost effective) for different types of
of installation interval/ range remote installations.
/Max. communi-
amount I/O cation
Small 0-120/208 Limited No Small with majority digital I/O
Small 0-120/208 Limited Yes Small with majority digital I/O and link
0 Small to medium 0-230/512 Large Yes Small/medium with mix of modules
0 Small to medium 0-230/512 Large Yes several Small/medium with mix of modules and more power
2 Small to medium 0-450/928 Large Yes several Small/medium with mix of modules and more power
0 Medium 0-250/576 Large Yes several Small/medium with mix of modules and module system
H300-H2002 is preferred
2 Medium 0-250/576 Large Yes several Small/medium with mix of modules and module system
H300-H2002 is preferred and more power
2 Medium 0-600/1280 Large Yes several Medium with mix of modules and module system H300-
H2002 is preferred and more power
02 Large 0-2000/2688 Large Yes several Medium/large with mix of modules and module system
H300-H2002 is preferred and more power
02 Large 0-4000/4096 Large Yes several Large with mix of modules and module system H300-
H2002 is preferred and more power

Estimate the memory size:


When you have chosen the type of PLC, you should estimate the memory size. A practical rule is that each
digital I/O causes 10 program steps when it is basically a logic program. Above this you should add the
program amount caused by calculations etc. (see steps/instruction page 279)
Reserve a good spare capacity. If you are close to the maximum memory it is recommendable to select a
larger size if available. If it is not available select next PLC size.

Select modules:
Search in the module list in the additional part of PLC type or in the price list.

Copyright Actron AB 1994, 2009


Practical handling

Configuration of rack system


Go to the additional part for each PLC and decide how to connect the base unit (and expansion units) Add
the total current consumption per unit (see additional part for the. PLC-type) and select a suitable power
supply. If the power supply is not enough, rearrange the modules.

Order:
Place the order as early as possible. That is the best guarantee that we can meet the delivery time you want.
(Even if you order normal stock equipment it could be temporarily out of stock.)

Receiving the delivery:


Check that all units are delivered according to the order and no transport damage has occurred.
If that is the case, inform the supplier immediately so the problem can be corrected. Save the package for a
time, (at least until the machine is tested and delivered.)
Assemble the system as planned and mount the system according to the installation directions on page 154.

Installation, Power and I/O-connection:


Install the PLC according to the description in the Common hardware description page 154. Install power
supply, expansion cables and I/O cables according to the description in the additional part for the PLC type.

Check that the signals from every sensor reaches the inputs through checking the LEDs on the front of the
PLC.

Install your computer software:


Unpack the diskettes, turn on the computer and place the first diskette in drive A: (or B:)
Type: A: <Enter> and thereafter Install <Enter> and answer the questions, which follow. The system will
suggest that you install the software in a sub-directory, which is called "ACTSIP". Normally you should
press <Enter> (Which means Yes).
Continue with the second diskette and so on.

Connection for computer programming:


For Off-line programming you do not need anything more than the loaded software. (We recommend that
you bring the special software manual, masks for the key board.
When you are going to communicate with the PLC (ON Line programming) you have to use the cable which
was designed for the software. Connect this between the computer serial port and the serial port on the PLC
CPU.

Copyright Actron, A.B. 1994 115


Practical handling

5.2 Computer programming.:


(Short description, You can find a more detailed description in the Actsip-H or ActGraph manual):

5.2.1 Actsip-H
Start with the command < H >. (or for Actgraph <GPLUS>)
Remember the information in the Welcome window. Press F1 for Help wherever you are in the program
and <Alt>+F1 for Help in ON-LINE programming. Press thereafter <Enter> and you will see following
window.:

System Program Allocation Printout Files Communication Setup





No project was specified
Load project from file
Load project from PLC
Start

New project, go to setup menu


















DRAW mode (0000) OFFLINE H-200 Intern 7.5 Ks

Choose between the alternatives "New project", "Load project from file" and " Load project from PLC".

If the alternative new project" is chosen you will get a setup menu for the PLC system.
Here you can select CPU-type, Memory type, In- Output configuration etc.

If the PLC-system is connected via the serial port, you will press <Enter> when you get the alternative
Read PLC- Setup and these setups will be performed automatically.

Copyright Actron AB 1994, 2009


Practical handling

System Program Allocation Printout Files Communication Setup



PLC setup
Read PLC configuration
CPU type H-250
Memory type Intern 7.5 Ks
Capacity HIFLOW (steps) 00000 HILADDER 07552
I/O assignment
Link parameters 1 Top=* End=*
Link parameters 2 Top=* End=*
Retentive area
Project name
Run conditions
PLC-

Run control input
Password
*
*




Max scan time [ms] 100
Setup Communication setup
Press <F1> for HELP






DRAW mode (0000) OFFLINE H-200 Intern 7.5 Ks

For manual setup the setup of in- /output configuration will look like:
E.g. LINK module
System Program Allocation Printout Files Communication Setup

Base/exp I/O Assignment PgDn=More
Points: 208 0 = W IO 4/4W
Slot: 0 1 2 3 4 5 6 7 8 9 A 1 = INTERRUPT
2 = REMOTE
Unit 0 X16 X16 Y16 Y16 X8W X16LINK 3 = CPU LINK
1 4 = COMM
2 5 = BASIC
3 6 = GPIB
4 7 = I/O 16/16
5 8 = I/O 16/32
6 9 = I/O 32/16
7 Q = I/O 32/32
In-/ 8 W = FUN0 5/3W
9 E = FUN1 3/5W
Output- R = FUN2 6/2W
SPACE = Toggle Standard/Remote T = FUN3 2/6W
configura Arrows = Move Y = FUN4 7/1W
Numbers = Select module U = FUN5 1/7W
tion INS = Copy real assignment
ESCAPE = Leave
I = FUN6 2/2W


Press <F1> for HELP
DRAW mode (0000) OFFLINE H-200 Intern 7.5 Ks

Here you can choose modules for each slot from the list on the right: (Press F1 for Help
and you will get information about how all modules will be addressed.)
In this example 32-input modules have been chosen on slot 0 and 1, 32-output modules
on slot 2 and 3, a 8-word input module (e.g. an analog input module) on slot no. 5 and a
link module on slot 6 and 7.

Press F1 for Help.


A list over available modules will appear also telling how to define these.

Copyright Actron, A.B. 1994 117


Practical handling

System Program Allocation Printout Files Communication Setup



PLC setup
Read PLC configuration
CPU type H-250
Memory type Intern 7.5 Ks
Capacity HIFLOW (steps) 00000 HILADDER 07552
I/O assignment
Link parameters 1 Top=* End=*
Li Retentive area nd=*
ReR Top=0200 End=0300
PrWR Top=0100 End=0200
RuWM Top=* End=*
RuT/C Top=0100 End=0511
PaDIF Top=* End=*
MaDFN Top=* End=*
Co
Setup of Press <F1> for HELP

retentive

memories


DRAW mode (0000) OFFLINE H-200 Intern 7.5 Ks

You can define the link areas (the memory areas, where the CPUs in a network talk to
each other.)
The setup of retentive memories is also done here. Top stands for Lowest address
and End stands for Highest address.

When the setup is ready, press <Esc> and you are ready to program.

The status row at the bottom of the screen gives information about the current setup.

DRAW mode (0000) OFFLINE H-250 Intern 7.5 Ks


Edit mode ( line draw) Amount of ON-Line/ CPU- Memory type
Can be Draw and Erase program OFF-Line- type
(and possibly. Move) blocks status

You are now in the drawing screen, where the program will be created. From the screen you can always
enter the menu bar (pull down menus) at the top of the screen by pressing <Esc>

System Program Allocation Printout Files Communication Setup

You can also get some options, e.g. Search, as extra choices at the bottom of the screen through pressing
<F2>.

Mark Search Hor-exp Ver-exp Goto + comm - comm Erase comm


ACTTERM

Copyright Actron AB 1994, 2009


Practical handling

System Program Allocation Printout Files Communication Setup



PC (Computer)
PLC
Printout
Communication
Ladder programming


Other

setups














DRAW mode (0000) OFFLINE H-250 Intern 7.5 Ks

If this is the first time Actsip/ActGraph is started it could be necessary to setup the PC and the
communication. (In such case, press <Esc> and go with the arrow keys to Setup. Go down to
the choice PC (Computer) or Communication.

System Program Allocation Printout Files Communication Setup



Enter/Change
Allocation pointers
Move
Exchange
Print
Print packed



Allocatio

n of



memories










DRAW mode (0000) OFFLINE H-250 Intern 7.5 Ks

If some addresses already from the beginning are known (e.g. Inputs and Outputs, which
already are connected) you should go to the Allocation menu and under Enter/Change type
these on the decided address. In the Allocation menu you can also move and exchange
addresses (e.g. if a I/O slot is moved.

System Program Allocation Printout Files Communication Setup



Allocation
X00000 PHOTO SW1 Photo switch before conveyor 1
X00001 IND SENS2 Metal sensor at input feeder
X00002 START BUT Panel start button
X00003 STOP BUT Panel stop button
Enter X00004
X00005
X00006
comments X00007
X00008
(symbols) X00009
X00010
X00011
X00012
X00013
X00014
X00015





DRAW mode (0000) OFFLINE H-250 Intern 7.5 Ks

Copyright Actron, A.B. 1994 119


Practical handling

Enter the Short comments or Symbols, maximum 10 characters. These can be


used afterwards instead of physical addresses in the programming as it is easier to
remember these.
A long comment of max. 30 characters can be added to make the final documentation
better.

Address Short com. Long comment


X00000 PHOTO SW 1 Photo switch in front of feeder 1

It is now ready for programming:


The function keys have the following meaning, For Actsip-H:

Word Debug Monitor Monitor Start Stop ON- OFF- +<Alt>


monitor ON OFF PLC PLC LINE LINE
Help Show RES
+<Shift> SET
ACT Redraw Draw/ ShortCom

Draw a Ladder block, e.g..:


Use the Function keys and the arrow keys. You can use the arrow keys for moving, drawing lines (together
with <Shift> or <Alt>) You can also use the arrow keys for erasing if you change to Erase mode with the
<Spacebar> (See the left part of the bottom line)
Our first example will be to create a start circuit with self hold, where a photo switch is a condition for start.

System Program Allocation Printout Files Communication Setup


START PHOTO
BUT SW1

X00002 X00000
X00002 X00000







r

am











DRAW mode (0000) OFFLINE H-250 Intern 7.5 Ks

Start from the left line, Press the symbol for the first contact and type the address
(X2) or the Symbol START BUT. Make a serial connection through repeating the
procedure.

Copyright Actron AB 1994, 2009


Practical handling

System Program Allocation Printout Files Communication Setup


START PHOTO

BUT SW1



X00002 X00000



START

MEM



Short Comment/Addr.
START MEM
Automatic allocation
Automatic START MEM
M0000 DX DY DL DM DR
allocation WX WY WL WM WR TC
X Y L MM R DIF DFN MCS MCR TD SS WDT MS TMR CU RCU CTU CTD CT CL

<F2> Allocation pointer: M0000 Data area, Bit






DRAW mode (0000) OFFLINE H-250 Intern 7.5 Ks

Draw a line down through pressing <Shift>+<down arrow> (or <Alt>+<down arrow>).
Go to the left line and start the parallel connection.
If we have not already allocation START MEM to an address, we can write START
MEM anyway instead of the address.
The system will show the automatic allocation window and ask you what START
MEM is. In this window you can choose between the different kinds of memories. The
system will always suggest a free address. In this way the double use of addresses can
be avoided, which otherwise is one of the most common programming errors.

Let us accept that "START MEM becomes the address M0, as the system suggests.
Press <Enter>
System Program Allocation Printout Files Communication Setup

START PHOTO STOP START
BUT SW1 BUT MEM
/( )
X00002 X00000

START
MEM

Completing M0000


the block












DRAW mode (0000) OFFLINE H-250 Intern 7.5 Ks

Draw thereafter the rest of the block with the same method as we started.

Copyright Actron, A.B. 1994 121


Practical handling

System Program Allocation Printout Files Communication Setup


START PHOTO STOP START
BUT SW1 BUT MEM
/( )
X00002 X00000X00003 M0000
t block
START




MEM

M0000














DRAW mode 0001 (0001) OFFLINE H-250 Intern 7.5 Ks

During the drawing the block is inverted to show that it is not yet a part of the
program.
When the block looks like what you want, press <Ins>. The block will now be a part
of the program. It will be redrawn and it is not inverted anymore.
You can also see that the status row shows one more block in the program.

Copyright Actron AB 1994, 2009


Practical handling

5.2.2 Change of an existing block:


E.g. an inductive sensor shall be added as a condition in series with the photo switch to activate the start
memory.
.
System Program Allocation Printout Files Communication Setup
START PHOTO STOP START
BUT SW1 BUT MEM
/( )
X00002 X00000X00003 M0000

START
MEM

M0000



Horizontal


expansion







Mark Search Hor-exp Ver-exp Goto + comm - comm Erase comm ACTTERM

Place the cursor where the expansion shall start.. Press <F2> and the status line shows
a number of extra alternatives.

System Program Allocation Printout Files Communication Setup


START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003 M0000

START
MEM

Modify M0000


block











DRAW mode 0001 (0001) OFFLINE H-250 Intern 7.5 Ks

Go to "Hor-Exp" (Horizontal Expansion) using the arrow keys or press only "H", as
the first character in the choice.
Now there will be a space where the new contact can be written.

Observe that when the block is modified the change is still not a part of the program code. You have to press
<Ins> or <*> to update the program.

Copyright Actron, A.B. 1994 123


Practical handling

5.2.3 Comparison contacts:

System Program Allocation Printout Files Communication Setup


START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003 M0000

START
MEM

M0000

START
pariso MEM TEMPERATURE

M0000













DRAW mode (0001) OFFLINE H-250 Intern 7.5 Ks

Continue with the next block. When the machine is started and the temperature is less
than 30 Centigrade, the output HEAT shall go High.
Start to connect START MEM in series with a Compare box. Create this through
pressing the symbol on F7
Write TEMPERATURE and allocate this to the first word input on the analog
module (address WX40)

System Program Allocation Printout Files Communication Setup


START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003 M0000

START
MEM

M0000

START HEAT
pare MEM TEMPERATURE WX0040
< ( )
k M0000 30 Y00200









DRAW mode 0002 (0002) OFFLINE H-250 Intern 7.5 Ks

A box will appear with the comparison alternatives. Choose < (less than) and then
type the constant 30 as a comparison reference. Connect the output HEAT
(Y200) in the same way as above.

Copyright Actron AB 1994, 2009


Practical handling

5.2.4 Arithmetic expressions:


Let us program a last block, which contains an arithmetic box and an edge condition.
When PHOTO SW 1 goes high, a register shall be increased by 7 and the result shall be shown on display
segments, which are connected to the first 16 outputs on the first output module. At the same time another
register shall be shifted to the right.
System Program Allocation Printout Files Communication Setup
START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003 M0000

START
MEM

M0000

START HEAT
MEM TEMPERATURE WX0040
< ( )
Arithmetics M0000 30 Y00200

PHOTO EDGE1
SW1

X00000 DIF0




DRAW mode (0002) OFFLINE H-250 Intern 7.5 Ks

The photo switch is serial connected to the edge memory (DIF memory). Press the
symbol for arithmetic box ( <Shift>+F7 ) and an empty box appears.

System Program Allocation Printout Files Communication Setup


START
== S* S/ MEM
+ - * / ( )
B+ B- B* B/ 3
AND OR R
== <> < <=
S== S<> S< S<=
SHR SHL ROR ROL
LSR LSL BSR BSL
WSHR WSHL WBSR WBSL
MOV COPY XCG
Choice of BCD BIN DECO ENCO
SEG SQR BCU SWAP
instruction FIFIT FIFWR FIFRD FUN
BSET BRES BTS NOT
ABS SGET EXT NEG
JMP CJMP LBL
END CEND FOR NEXT
CAL SB RTS START
INT RTI RSRV FREE
UNIT DIST ADRIO ADRPR
TRNS RECV QTRNS QRECV

DRAW mode (00 <Space> toggles window

The most common instructions( =, +, -, etc.) can written directly only through typing
the variable name. But if you need a full list of the instructions, press <Spacebar> and
the complete list will appear on the left side.
From this box you can choose the instructions.
Choose "+" through moving the cursor to the instruction and pressing <Enter> or just
through typing "+".

Copyright Actron, A.B. 1994 125


Practical handling

System Program Allocation Printout Files Communication Setup


START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003
d = s + s
START
MEM

M0000

START
metic MEM TEMPERATURE WX0040
<
M0000 30

PHOTO EDGE1
SW1

X00000 DIF0




DRAW mode (00 <Space> toggles window

Type the address for the sum (d in the box). The address shall be the first output
word (WY20). Lets call this word DISPLAY. Thereafter the address of the first
term. Let us call this REGISTER1 and place it on address WR0. The second term is the
constant 7.
Then return to the box with the list of instructions through pressing <Spacebar>.
Choose the instruction SHR. Type POSITION as d and let n be 1 (to shift 1
position right every time)
Press <Ins>
The box gets its normal shape. But the circuit itself is still not inserted in the program.
Therefore press <Ins> once more.

System Program Allocation Printout Files Communication Setup


START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003 M0000

START
MEM

M0000
wing
START HEAT
ress MEM TEMPERATURE WX0040
< ( )
M0000 30 Y00200

t PHOTO EDGE1
SW1

DISPLAY = REGISTER1 + 7
ment SHR (POSITION , 1
X00000 DIF0
)





DRAW mode 0003 (0003) OFFLINE H-250 Intern 7.5 Ks

We have now made a small program.


In normal mode you can not see the addresses in the arithmetic box. Press <F5> and
toggle between Show address and Show Comment. For the arithmetic box the
Show Comment mode will look as below.

PHOTO EDGE1
SW1 WR0000 = WR0001 + 7
SHR (WR0002 , 1 )
X00000 DIF0

Copyright Actron AB 1994, 2009


Practical handling

5.2.5 Syntax check:

System Program Allocation Printout Files Communication Setup


START START
BUT Ladder MEM
Instruction ( )
X00002 ACTTERM-H text M0000
Other module/program
START Syntax check
MEM Info about project
Delete block(s)
M0000 Undo
New project
START HEAT
Program MEM TEMPERATURE WX0040
< ( )
menu M0000 30 Y00200

PHOTO EDGE1
SW1 DISPLAY = REGISTER1 + 7
SHR (POSITION , 1 )
X00000 DIF0




DRAW mode 0003 (0003) OFFLINE H-250 Intern 7.5 Ks

The program syntax check can be done under the menu "Program"
You should also write here the information about the project which shall be included
in the final documentation printout.
You can also toggle between ladder- and instruction programming or change to
another programming method, like grafcet according to ActGraph. You can also
delete a larger program area or start a new project.
We have so far been working OFF-Line. Let us go ON-Line, transfer and test the
program in the control system. You can now go through following procedure:
Start to connect the PLC to the serial port of the computer and check inside the menu
Setup-Communication that the setup is correct. (The right serial port, right baud
rate etc.) Normally select Standard values.

System Program Allocation Printout Files Communication Setup


START IND S PHOTO STOP START
BUT ENS2 SW1 BUT To PLC MEM
/From PLC ( )
X00002 X00001 X00000X00003 Verify against PLC M0000
ACTTERM-H text to PLC
START Monitor PLC
MEM Trace/Trigg
PLC status
M0000 Set PLC clock
Data memory transfer
START Force free occupation HEAT
Comm MEM TEMPERATURE WX0040 Clear PLC
< Clean-up Communications( )
unication M0000 30 (Terminal) Y00200
Setup
menu PHOTO EDGE1
SW1

DISPLAY = REGISTER1 + 7
SHR (POSITION , 1 )
X00000 DIF0




DRAW mode 0003 (0003) OFFLINE H-250 Intern 7.5 Ks

Copyright Actron, A.B. 1994 127


Practical handling

Go to the communication menu.


(You can here, beside transferring the program to or from the PLC system, create a
monitor box, where free choice of memories and registers etc. can be shown and
controlled during run.
You can also get a status window, showing all information from the PLC to simplify
trouble shooting etc.
You can also adjust the real time clock. You can also copy the memory content of the
PLC (for recipe handling, logging etc.)
Transfer the program to the PLC system.
The program and all PLC parameters are now transferred.

Copyright Actron AB 1994, 2009


Practical handling

5.2.6 ON-Line programming


Go ON-Line through pressing <Alt>+F9

Start the PLC through pressing <Alt>+F7

Turn on monitor (show status) through pressing <Alt>+F5

(There is a short way through. Press only <Alt>+F5, which takes us through the
complete chain (as this choice is highest up in the hierarchy)

It is now possible to program ON-Line. The changes are done in the same way as in
OFF-Line When a block is changed or inserted, the PLC stops for a very short
moment. But it will keep the status of memories and outputs.

System Program Allocation Printout Files Communication Setup


START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM

/( )
/( )
X00002 X00001 X00000X00003 M0000

START
MEM

M0000

START HEAT
Monitor MEM TEMPERATURE WX0040
< ( )
M0000 30 Y00200

PHOTO EDGE1
SW1 DISPLAY = REGISTER1 + 7
SHR (POSITION , 1 )
X00000 DIF0




DRAW mode 0003 (0003) ON LINE RUN H-250 Intern 7.5 Ks

Now the program can be checked through the function and through showing status
on the screen. (the inverted fields are active or true).

Monitor:
The main monitor function is to show status in the ladder diagram on the screen.
Here the true contacts (active lines) are shown through inverted colour. This makes
it easy to detect errors etc.
Monitor in arithmetic boxes:
Monitor of values on the addresses in the arithmetic boxes is shown if you press
<Alt>+<F3>. You will first see decimal monitor. Next time you will see
hexadecimal monitor and finally Short Comment/address again.
PHOTO EDGE1
SW1 332 = 325 + 7
SHR ( 10 , 1 ) Decimal
X00000 DIF0

PHOTO EDGE1
SW1 H014C = H0145 + H0007
SHR ( H000A , H0001 ) Hexa
X00000 DIF0 decimal

You can also effect status on each contact through pressing <1> or <0> on a contact
or typing a new value of a register.
Through pressing <Alt>+F5 once more a larger monitor box will show on the
screen. Here you can define what addresses and bit memories you want to monitor
and control. (You can move the box on the screen with the arrow keys.)
Copyright Actron, A.B. 1994 129
Practical handling

5.2.7 Store the program:


System Program Allocation Printout Files Communication Setup
START IND S PHOTO STOP START
BUT ENS2 SW1 BUT List projects MEM
/Load a project from file( )
X00002 X00001 X00000X00003 Store a project in file M0000
Insert macro from file
START Save macro in file
MEM Delete file
Rename file
M0000 Generate EPROM files

START HEAT
MEM TEMPERATURE WX0040
< ( )
e, M0000 30 Y00200

PHOTO EDGE1
SW1 DISPLAY = REGISTER1 + 7
SHR (POSITION , 1 )
X00000 DIF0




DRAW mode 0003 (0003) OFFLINE H-250 Intern 7.5 Ks

It is recommended to save the project repeatedly during the development. Use a


project name or a series of names so you can go back to the latest version.

You can do this under the menu Files.


You can load and save projects. You can also load and save Macros, which is a
program part, which can be used multiple times as it is stored under a unique name.

Choose Save project in file and specify project name.


If you have several projects on your computer you should create a user library and
choose this in the menu Setup-PC. It will then be easier to keep track of the projects.

5.2.8 Documentation:
System Program Allocation Printout Files Communication Setup
* Start cirquit with self hold
*
* Condition for start: Photo Switch 1 and Inductive sensor 2
*

START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003 M0000

START
t MEM

ments M0000

* Check of heating
* Analog input 1 senses that the temperature goes on when
* the temperature is below 30 Centigardes


START HEAT
MEM TEMPERATURE WX0040
< ( )
DRAW mode 0002 (0003) OFFLINE H-250 Intern 7.5 Ks

To make the program even more easy to read, you can write a comment belonging to
every ladder block.
Place the cursor on each block and press <Enter>. A window will open, where you can
write text. The first five lines of this text will always be visible in the program. Press
<Esc> when you are ready.

Copyright Actron AB 1994, 2009


Practical handling

5.2.9 Printout:

System Program Allocation Printout Files Communication Setup


* Start cirquit with self ho
* Ladder
* Condition for start: PhotoInstruction sensor 2
* Ladder and Instruction
Ladder and Allocation
START IND S PHOTO STOP Allocation START
BUT ENS2 SW1 BUT Allocation packed MEM
/PLC Setup ( )
X00002 X00001 X00000X00003 Cross reference M0000
Block comments
START ACTTERM-H texts
Print out MEM Setup

M0000

* Check of heating
* Analog input 1 senses that the temperature goes on when
* the temperature is below 30 Centigardes


START HEAT
MEM TEMPERATURE WX0040
< ( )
DRAW mode 0002 (0003) OFFLINE H-250 Intern 7.5 Ks

When the program is ready you ought to make documentation. This is done under the
choice Printout
Start to check so the printout setup is correct in Setup-Printout. Thereafter choose
the printout types you want.

5.2.10 End of project:


When the program works, you have saved the project, you have made documentation and printout, you can
leave the programming.
System Program Allocation Printout Files Communication Setup
h self hold
DOS command
Exit from Actsip-Hrt: Photo Switch 1 and Inductive sensor 2
About Actsip-H

START IND S PHOTO STOP START
BUT ENS2 SW1 BUT MEM
/( )
X00002 X00001 X00000X00003 M0000
Exit
START
MEM

M0000

* Check of heating
* Analog input 1 senses that the temperature goes on when
* the temperature is below 30 Centigardes


START HEAT
MEM TEMPERATURE WX0040
< ( )
DRAW mode 0002 (0003) OFFLINE H-250 Intern 7.5 Ks

You can here also get information about version number etc. and make a temporary exit
to DOS (if you want to make DOS commands).

Copyright Actron, A.B. 1994 131


Practical handling

5.3 Programming with ActGraph:


For a detailed description of grafcet, see separate description.

Start the programming with <G>.

You will get a welcome window.

ActGraph

Welcome to the Actron ActGraph development software for
Hitachi series J/E/EM/EB/HB/H200/H300+ PLC systems.

<F1> is the HELP key.

<Alt> + <F1> is the HELP key for ON-LINE and monitor.

Press <ENTER>

Press <Esc> and you will come into a drawing screen.


(You can start programming without deciding what type of PLC to connect and decide
when the project is ready and the information about size is available. You can also change
PLC afterwards and code the project for the new type.)
As we in this case know that we are going to use an H series PLC (a H250 CPU) we can
decide from the beginning.
.
Go to "Setup-PLC".
The setup menu is identical to the one we saw in Actsip-H (see the previous chapter).
Choose "Series H250", 8 k memory and in the I/O configuration we choose two 16 input
modules, and two 16 output modules.
All other setups are also identical to the setups in Actsip-H.

5.3.1 Programming:
Word Debug Monitor Monitor Start Stop ON- OFF-
+<Alt> monitor ON OFF PLC PLC LINE LINE
Branch Start Activity Reset- Parallel Return Boxes +<Shift>
Help ACT Redraw down step cond. cond.

(Extra) screen up Step Transi- Altern.


tion branch branch jump

Copyright Actron AB 1994, 2009


Practical handling

You can also get a number of new choices, e.g. Search, in the bottom of the screen through pressing <F2>.

Mark Search Hor-exp Ver-exp Goto + comm - comm Erase comm


ACTTERM

Copyright Actron, A.B. 1994 133


Practical handling

5.3.2 Start step:

000

+. Off-line Series H $

Press <Shift>+F5 and create a start step.

5.3.3 Actions:



000

Actions
GREEN LAMP







+. Off-line Series H $

Press <Enter> and open an action box.

Copyright Actron AB 1994, 2009


Practical handling

Insert the first action.

000

Actions
GREEN LAMP






Allocation
GREEN LAMP
[ Y00200 ]

Word
Bit
Bit Output Marker Timer Counter U/D-Cnt ShiftRg Macro

+. Off-line Series H $

If the address is not defined before, the automatic allocation will appear.
Choose type of address and address.
Press <Enter> , The allocation window will disappear and the Cursor will go to the left of
GREEN LAMP. Here you can write a detailed action (see below).

5.3.4 Transitions:

000 GREEN LAMP

START BUT

+. Off-line Series H $

If you do not want a detailed action, press <Enter> and the action box will close.

Create a transition through pressing <F6>.


Press <Enter> and write the transition condition.

The transition can be a Boolean expression where "+" stands for a parallel connection and
"*" stands for serial connection. E.g. START BUT * PHOTO SW * IND SENS2"
See more detailed grafcet description. It can also be a comparison, see below.

Copyright Actron, A.B. 1994 135


Practical handling

5.3.5 Detailed Actions:

000 GREEN LAMP

STA Actions
FEEDER 1
001 D CYLINDER 2 D=2.5s
S RUN LAMP =1





+. Off-line Series H $

Write the new actions in this step.

After each completed action, the cursor will go to the left of the action.
Here you can define a detailed action.
"D" stands for Time delay of the action.
"L" stands for limited duration of the action .
"C" stands for an extra condition to activate the action
"S" stands for SET and RESET.
"P" stands for a very short pulse (impulse)

Type D and set the time delay to 2.5 s.

000 GREEN LAMP

START BUT

001 FEEDER 1
D CYLINDER 2 [D=2.5s]
+ RUN LAMP

CYL 2 OUT

002 LIFT DOWN

LIFT LOW

003 FEEDER 1

PHOTO SW 2

+. Off-line Series H $

Continue in the same way and build the graph with one step, one transition, one step
etc. In this way you can build a straight sequence of any length on the screen.

Copyright Actron AB 1994, 2009


Practical handling

5.3.6 Alternative branch:


Normally the sequences are not completely straight. Therefore we have to use branches.. Let us start with an
alternative branch, which is an alternative way to pass step 2 and 3 in the graph.

A B C
Place the Cursor on step 1 Place the Cursor on the lower Place the Cursor on the new branch start
(after which the branch shall horizontal part of the branch and create the new steps and transitions as
start). Press F7. and pull down with the F4 before.
key.


000 GREEN LAMP 000 GREEN LAMP 000 GREEN LAMP

START BUT START BUT START BUT

001 FEEDER 1 001 FEEDER 1 001 FEEDER 1
D CYLINDER 2 [D=2.5s] D CYLINDER 2 [D=2.5s] D CYLINDER 2 [D=2.5s]
+ RUN LAMP + RUN LAMP + RUN LAMP


CYL 2 OUT CYL 2 OUT PHOTO SW 2

002 LIFT DOWN
CYL 2 OUT 002 LIFT DOWN 004 CYL 3 OUT
LIFT LOW
002 LIFT DOWN
003 FEEDER 1
LIFT LOW LIFT LOW CYL 3 END
PHOTO SW 2
003 FEEDER 1
003 FEEDER 1 005 LIFT DOWN
PHOTO SW 2


PHOTO SW 2 LIFT LOW

5.3.7 Parallel branch:


We will now create a parallel branch., which shall work in parallel to step 1.

A B
Place the cursor on the transition between step 0 Pull the lower part of the branch down passed step
and step 1, where the branch shall begin. Press F8 1 with F4. Create thereafter the parallel steps in the
and an embryo of a branch will occur. normal way.


000 GREEN LAMP 000 GREEN LAMP

START BUT START BUT


001 FEEDER 1 006 LIFT UP
001 FEEDER 1 D CYLINDER 2 [D=2.5s]
D CYLINDER 2 [D=2.5s] + RUN LAMP LIFT HIGH
+ RUN LAMP
007

CYL 2 OUT PHOTO SW 2

002 LIFT DOWN 004 CYL 3 OUT CYL 2 OUT PHOTO SW 2

LIFT LOW CYL 3 END 002 LIFT DOWN 004 CYL 3 OUT

003 FEEDER 1 005 LIFT DOWN LIFT LOW CYL 3 END

PHOTO SW 2 LIFT LOW 003 FEEDER 1 005 LIFT DOWN

PHOTO SW 2 LIFT LOW

Copyright Actron, A.B. 1994 137


Practical handling

5.3.8 Return branch:


Finally we will create a return branch. When the inductive sensor "IND SENS 2" is effected before PHOTO
SW 2, after step 3, a new sequence shall be activated and thereafter step 2 and step 3 shall be repeated.

B
e Cursor on step 3 and press F9. Pull up the upper part of the branch with <Shift>+F4 above
step 2. Create the return steps in the normal way.


0 GREEN LAMP 000 GREEN LAMP

START BUT START BUT


1 FEEDER 1 006 LIFT UP 001 FEEDER 1 006 LIFT UP
D CYLINDER 2 [D=2.5s] D CYLINDER 2 [D=2.5s]
+ RUN LAMP LIFT HIGH + RUN LAMP LIFT HIGH

007 007



CYL 2 OUT PHOTO SW 2 CYL 2 OUT PHOTO SW 2

2 LIFT DOWN 004 CYL 3 OUT
OUT 4 004 CYL 3 OUT
LIFT LOW CYL 3 END
002 LIFT DOWN
3 FEEDER 1 005 LIFT DOWN
008 FEEDER 4 CYL 3 END
LIFT LOW LIFT LOW

PHOTO SW 2 LIFT HIGH 005 LIFT DOWN

003 FEEDER 1

009 LIFT UP LIFT LOW

IND SENS 2

PHOTO SW 2

5.3.9 Super conditions:


We are now going to create a super condition for the graph.. There are two types:
-"Activity condition", which is a logic condition for the graph to be activated.
-"Reset condition", which is a logic condition, which resets the graph and makes the graph return to the start
step.

B
<Shift>+F6 and the window for activity condition will appear. The condition is now shown above the
he condition and press <Enter>. graph (after "A:") Press <Shift>+F7 to
choose the panel switch AUTO as an activity condition, write the Reset condition. This will also
enables Auto/manual control of the graph. stay above the graph.

Copyright Actron AB 1994, 2009


Practical handling

R:RESTART
A:AUTO
000 GREEN LAMP

START BUT 000 GREEN LAMP

START BUT
001 FEEDER 1 006 LIFT UP
D CYLINDER 2 [D=2.5s]
+ RUN LAMP LIFT HIGH 001 FEEDER 1
Boolean expression D CYLINDER 2 [D=2
+ RUN LAMP
ActivCond: AUTO




CYL 2 OUT
CYL 2 OUT PHOTO SW 2
OUT 4
OUT 4 004 CYL 3 OUT 002 LIFT DOWN
002 LIFT DOWN 008 FEEDER 4
008 FEEDER 4 CYL 3 END LIFT LOW
LIFT LOW LIFT HIGH
LIFT HIGH 005 LIFT DOWN 003 FEEDER 1
003 FEEDER 1 009 LIFT UP
009 LIFT UP LIFT LOW
IND SENS 2
IND SENS 2
PHOTO SW 2
PHOTO SW 2

Copyright Actron, A.B. 1994 139


Practical handling

5.3.10 Logic boxes:


It is not natural everywhere to describe all the application with graphs. Specially where it is a question of a
pure logic problem it is more natural to place the logic in a Logic box.
A logic box is general. Therefore it is described in Boolean expressions.

B C
F10 and choose Here the output side of the expressions When all expressions are written, press
Box. Press are written on the left side. Thereafter <Enter> once more and the box will be
>. the cursor goes to the right and a closed with the inputs on the left side
Boolean expression can be written. and the outputs to the right side of the
Thereafter a new expression can be box. Press <Shift>+F6 and define the
written and so on. activity condition /AUTO. (which
means NOT AUTO (which is the same
as manual.
A:/AUTO

GREEN LAMP PUSHB 1 LIFT DOWN
LIFT LOW LIFT UP
TART BUT PUSHB 2
LIFT HIGH

FEEDER 1
D CYLINDER 2 [D=2.5s] Logical box
+ RUN LAMP LIFT DOWN =PUSHB 1*/LIFT LOW 006 LIFT UP
=2.5sLIFT UP =PUSHB 2*/LIFT HIGH ]
LIFT HIGH

007

YL 2 OUT

PHOTO SW 2
LIFT DOWN
004 CYL 3 OUT 004 CYL 3 OUT
IFT LOW
CYL 3 END CYL 3 END
FEEDERGraph
Logical box 005 LIFT DOWN 005 LIFT DOWN
Action box
Macro box LIFT LOW LIFT LOW

HOTO SW 2


5.3.11 Macro boxes:


In some cases it is necessary to use specific PLC instructions. These can be programmed in another type of
box called Macro Box. In this box you can use the special instructions of the H series and the
programming is done exactly as in Actsip-H.
You can store a macro under a special name and you can use this macro in other projects.

Copyright Actron AB 1994, 2009


Practical handling

A B
Press F10 and choose Macro box. An Now a drawing screen will open, which looks like in
empty box will occur. Write a name and Actsip-H. Make the programming as in Actsip-H.
press <Enter> The addresses which are programmed here are
different from the addresses in the graph programming.
(The programming of the macro boxes is isolated)
A:/AUTO ======================== CALC2
============================
PUSHB 1 LIFT
DOWN
LIFT LOW LIFT UP PROD = FACT1 * FACT2
PUSHB 2
LIFT HIGH WSHR (PROD , 2 )

SGET (RESULT , PROD )

006 LIFT UP CALC1
=2.5s]
LIFT HIGH

007



PHOTO SW 2

004 CYL 3 OUT

CYL 3 END

005 LIFT DOWN

LIFT LOW





























DRAW mode 0001 (0001) OFFLINE
A:/AUTO
C
PUSHB 1 LIFT DOWN
When the Macro is ready, LIFT LOW LIFT UP
PUSHB 2
press <Esc> Approve (or LIFT HIGH

change) the new addresses,

which are suggested. 006 LIFT UP
=2.5s]
FACT1CALC2PROD
FACT2RESULT
Thereafter the new macro is LIFT HIGH

PROD

shown. 007


5.3.12 Action boxes:


In some cases there is a need to make calculations and control, which is completely independent from a
graph. There is a third type of box for this purpose. This is called Action box. It is treated in the same way
as the action window inside a graph.
Press F10 and choose Action box. An empty box will occur. Here you can write mathematical expressions
together with logic and comparisons.
A:/AUTO

PUSHB 1 LIFT DOWN

Copyright Actron, A.B. 1994 141


Practical handling

LIFT LOW LIFT UP


Actions
VALUE1 = COUNTER1*18
ANALOGOUT3 =ANALOGIN2/RESULT+34
G = F*H/(I+J)-K*15

0
=2.5s]


0



PHOTO SW 2

004 CYL 3 OUT

CYL 3 END

005 LIFT DOWN

LIFT LOW



+. Off-line Series H $

Copyright Actron AB 1994, 2009


Practical handling

When this is ready, press <Enter> and the box will close.

You can see the difference between a logic box and an action box as an action box has a vertical line on the
top and on the bottom. (It can also have double lines on the side. These will symbolise values.)
A:/AUTO

PUSHB 1 LIFT DOWN
LIFT LOW LIFT UP
PUSHB 2
LIFT HIGH



006 LIFT UP FACT1CALC2PROD
=2.5s] FACT2RESULT
LIFT HIGH PROD

007

VALUE1
ANALOGOUT3
PHOTO SW 2 G

004 CYL 3 OUT

CYL 3 END

005 LIFT DOWN

LIFT LOW




+. Off-line Series H $

5.3.13 Mathematical expressions:


Mathematical expressions (calculations etc.), which are not connected directly to the specific PLC
instructions can be written either in action boxes or actions connected to the graph.
If the action, written on the left side in the box, e.g. VALUE1 is defined as a word the expression will be
treated as a mathematical expression instead of a normal logic action.
The following symbols can be used:
E.g. C A = B*C/D+E*(F-G)+100 C=TEMP>100*PROG1

It is possible to write a detailed action also in front of a mathematical action.

5.3.14 Comparison expressions:


In all logical expressions comparisons and logics can be freely mixed. (See above, where the condition C,
to let the mathematical expression be executed, is that TEMP is > 100 (Centigrade) and PROG1 is chosen.
These comparison can also be written as transitions between steps in graphs.

The condition for a transition from one step to


E.g. LEVEL < 100 * TIMER1 another is that the level is below 100 and that the
timer TIMER1 is out.

Copyright Actron, A.B. 1994 143


Practical handling

5.3.15 Zoom:
To achieve maximum overview of during the work, you can both amplify and minimise the objects on the
screen during the programming.
Press < + > to increase.
Press < - > to decrease.
ELEMENT
You will get the question: BRANCH
GRAPH

This means that you can choose different zooming for different parts of a project and different for different
parts of a graph.
If you choose ELEMENT the step where the cursor is will decrease or increase.
If you choose BRANCH the branch where the cursor is will decrease or increase.
The same thing happens if you choose GRAPH.

Size 1 You will here see all significant information simultaneously in action
boxes and transitions. This size is default.

(Size 2 All boxes will have the same width. )

Size 3 This size will give a rough structure of the project. If is still possible to
show the flow in a project during monitoring.
This is practical when you want as much of the project as possible on the
screen simultaneously.
Example:
A:/AUTO

PUSHB 1 LIFT DOWN
LIFT LOW LIFT UP
PUSHB 2
LIFT HIGH



FACT1CALC2PROD
FACT2RESULT
PROD



VALUE1
ANALOGOUT3
G

+. Off-line Series H $

The different sizes can be used freely together.


The printouts you order will show the same size as you have chosen on the screen.

Copyright Actron AB 1994, 2009


Copyright Actron AB 1994-2009 145
6 Hand programming units:
There are two types of hand programmers:
- PGM-GPH Portable graphic programmer.
- PGM-CHH Instruction word programmer.

For more information, see Hitachi manuals.

Copyright Actron AB 1994-2009 146


THIS PAGE INTENTIONALLY LEFT BLANK

Copyright Actron AB 1994-2009 147


Common description of the hardware

Common description of the


hardware

Copyright Actron AB 1994, 2009


Common description of the hardware

7 Common description of the hardware:


7.1 General specification:
Operation temperature 0 to 55 C
Storage temperature -10 to 75 C
Operation humidity 20% to 90% (non condensing)
Storage humidity 10% to 90% (non condensing)
Allowable instantaneous power failure time 20 ms
Vibration resistance Frequency 16.7 Hz, multi amplitude 3 mm in X, Y and Z directions.
Noise resistance 1500 V p-p in 100 ns with a pulse width of 1 s.
Based on NEMA ICS2-230-42 to 45 (except for inputs)
Static noise 3000 V applied to exposed metal.
Insulation resistance 20 M or more between external AC terminals and FG (ground) terminal.
Dielectric strength 1500 VAC in 1 minute between AC terminals and FG (ground) terminal.
Grounding 100
Atmosphere Must be free from corrosive gases such as ammonium, hydrogen sulphide etc.
Cooling Natural air cooling

7.2 Basic specification:


HB H200 H250 H252 H300-H2002
Max. amount - 16 (with BSM-9) max. 29 64 (for H2000/2)
modules (with BSH)
Amount of I/O up to 128
exclusive 8-I/O modules up to 128 up to 128 up to 232
remote I/O 16-I/O modules up to 256 up to 256 up to 464 up to 1024
32-I/O modules up to 512 up to 512 up to 928 up to 2048
64-I/O modules up to 4096
Process system Cyclic program scan procedure.
Cycle time Logic 1.5 s/ 1.5 s/ 0.6 s/ 0.25 s/ min 0.4 s/
instructions instruction instruction instruction instruction instruction
Arithmetic >10 s/ >10 s/ >5 s/ >3 s/ >5 s/
instructions instruction instruction instruction instruction instruction
Program memory 7.6 k steps 7.6 k steps 15.7 k steps 15.7 k steps up to 48 k steps
Instructions Logic 17 17 17 17 17
Arithmetic 54 49 73 124 up to 124
I/O updating direct direct, direct, I/O-copying direct
I/O-copying I/O-copying
Bit memories (R) 1984
Word memories 1 k words 1 k words 1 k / 17 k 1 k / 17 k 1 k / 17 k / 50 k
(WR) (WR0-3FF) (WR0-3FF) words words words
Special memories bits 64
words 64
CPU-Link 128 x 2 (256) 128 x 2 (256) 1024 words /16384 bits
bits bits
Remote 128 x 4 (512) bits 512 bits/
/32 words x 4
Bit/Word (M/WM) 4092/256 16384/1024
Timers/Counters 512 (TD+CU etc.) 0-255 for timers
Timer Preset 0 to 65535 s with time base 0.01, 0.1 and 1 s
Counter Preset 0 to 65535
Edge detection 128 positive/128 negative 512 positive/512 negative
Real time clock Year, month,day, week day, hour, minute and second (not H300-H2000)

Copyright Actron, A.B. 1994 149


Common description of the hardware

7.3 Process system:

7.3.1 In- and output update.


All H CPUs can work with direct update. The H200 CPU *1 can also work with I/O copying.
I/O-copying (or Refresh):
The input status is read before the program scan and the outputs are written directly after the program scan.
During the program scan the status of the inputs and outputs are only available in a memory area, which
reflects the I/O status.
Direct update:
This means that the physical status of the inputs are read every time the address is used in the program.
Every time an output is effected by the logic in the program it will also be updated physically.

I/O copying (refresh) Direct I/O update

Program Y200
scan Logic
Program Program
scan
Y202

Scan Scan Scan


Program Program Program
scan 1 scan 2 scan 3

Max 2 program scans Max 1 program scan


X115 X115
Y202 Y202
Min 1 program scan Min filter time and time for logic

Practical differences:
with direct update you will get a faster response time between in- and outputs. (Max. 1 program cycle,
while I/O copying can cause max. 2 program cycles, see drawing above)

*1 To change between I/O copying (refresh) and direct updating on the H200 CPU,
change dip switch 3 on the component side of the CPU board.

Direct update = OFF (factory setting)


I/O copying (refresh) = ON

Copyright Actron AB 1994, 2009


Common description of the hardware

To be sure that the contact has the same


status during all the scan, do as follows:

WARNING!
It can be different status of
the contact during the same
program scan.

7.4 Interrupt :
There are different types of interrupts
in a normal scan program.
- Periodic interrupt. Occurs every 10
ms and updates timer values etc.
- 10 ms interrupt. Program part Periodic update
executed 10 ms interrupt
every 10 ms. 20 ms interrupt
- 20 ms interrupt. Program part External 40 ms interrupt
executed Normal
interrupt
every 20 ms. program
- 40 ms interrupt. Program part
executed
every 40 ms.
- External interrupts. interrupt from
input signals.

Copyright Actron, A.B. 1994 151


Common description of the hardware

The periodic interrupt has the highest priority. It will interrupt an


external interrupt. After a completed interrupt routine the program
END returns to the program line where it was interrupted.
The periodic interrupt comes without any action from the user.
INT 1
If the rest of the interrupt routines shall be executed you have to specify
20 ms interrupt this with the instructions INT n" and RTI and write a program in-
RTI between, which shall be executed when it is an interrupt.

INT 17
External interrupt
RTI

For more information about the INT- and RTI-instructions, see page 107.

Copyright Actron AB 1994, 2009


Common description of the hardware

Types of interrupts:

Interrupt no. HB H200 H250-


H2002
INT0 Interrupt with 10 ms interval Yes Yes Yes
INT1 Interrupt with 20 ms interval Yes Yes Yes
INT2 Interrupt with 40 ms interval Yes Yes Yes

INT16 Interrupt input no. 0 X0+base address Yes Yes


for module
(X0 for HB)
INT17 Interrupt input no. 1 X1+ " Yes Yes
INT18 Interrupt input no. 2 X2+ " Yes Yes
INT19 Interrupt input no. 3 X3+ " Yes Yes
INT20 Interrupt input no. 4 X4+ " Yes Yes
INT21 Interrupt input no. 5 X5+ " Yes Yes
INT22 Interrupt input no. 6 X6+ " Yes Yes
INT23 Interrupt input no. 7 X7+ " Yes Yes
INT24 HB: High speed counter = Preset Yes
INT24 Interrupt input no. 8 X8+ " Yes
INT25 Interrupt input no. 9 X9+ " Yes
INT26 Interrupt input no. 10 X10+ " Yes
INT27 Interrupt input no. 11 X11+ " Yes
INT28 Interrupt input no. 12 X12+ " Yes
INT29 Interrupt input no. 13 X13+ " Yes
INT30 Interrupt input no. 14 X14+ " Yes
INT31 Interrupt input no. 15 X15+ " Yes

Interrupt with a lower number has a higher priority. This means e.g. that a 10 ms update will interrupt a
routine, which takes care of a interrupt input..

Periodic interrupt
10 ms interrupt
20 ms interrupt
40 ms interrupt

Input interrupt, high priority


- - , low priority
Normal scan

Observe that each interrupt takes time from the normal program scan. You can use a Watch Dog
timer to check if the program execution takes too long time.
(The Watch dog timer is 100 ms if nothing else is defined)
The preset of this timer is defined under Setup- PLC in the programming software. You can define a
value between 10 ms and 2550 ms.

Copyright Actron, A.B. 1994 153


Common description of the hardware

7.5 Installation:

7.5.1 Mounting in general:


(All PLC types)
The control system has to be mounted vertically because of the ventilation. It is also possible to mount the
system upside down if there is a reason for this.
Correct mounting Correct mounting

Incorrect mounting !
Incorrect mounting !

Copyright Actron AB 1994, 2009


Common description of the hardware

-Reserve a distance of 50 mm from top and


bottom of the PLC-

-Be careful, so no dirt, metal from hole drilling min


etc. falls into the PLC. 10
mm
-Avoid installing the PLC directly above a heat Cable
producing object, e.g. a transformer or power channels
resistor.
min 50 mm

- Keep a good distance from high voltage wiring


etc. min 50 mm

min
- Avoid installation directly in sun shine and 10
where condensation, dust, oil smoke, corrosive mm
gas can occur.

- Avoid installation of the PLC where there is a


risk of too much vibrations or shaking .

Copyright Actron, A.B. 1994 155


Common description of the hardware

7.5.2 Power connection:


220 VAC /110 VAC
The system can work either with 220 VAC or 110 VAC as a standard
HB H200-H252 H300-H2002
Flexible power supply Jumper on the power Jumper on the front
supply board

7.5.3 24V DC
Series H200-H252 has a 24 V DC power supply module, which is called PSM-D.
Series H300-H2002 has a 24 V DC power supply module, which is called AVR-04DH or AVR-08DH.

7.5.4 Cable connection:


Use if possible a wire with the area 2 mm2 for the power supply an ground.
The ground can be shared with a relay panel etc. But it should not be shared with equipment, which
produces noise (e.g. tyristor equipment, electric welding machines). It should be a maximum of 100 to
ground .
220/110 VAC
If there is much noise on the power connection, noice
you should connect a noise filter. filter

7.5.5 Input connections:


DC Inputs:
HB and H200-H252 have external 24 V terminal connections.

Copyright Actron AB 1994, 2009


Common description of the hardware

7.5.6 Output connections:

RELAY Output TRANSISTOR Output TRIAC Output

PLC PLC PLC


Outputs Outputs Outputs

AC or DC
supply AC supply
DC supply

Relay output:
If the load is inductive and increases 10 VA, connect a RC circuit of 0.1 F + 100 in parallel to the load.
If the load is fed by direct current, connect a diode in parallel to the load.
Transistor outputs:
Connect a diode in parallel to the load.
Triac output:
If the load is inductive or the load is very small, connect a RC- circuit of 0.1 F + 100 in parallel to the
load.

7.5.7 The CPU-port:


The CPU-port has a protocol, which can be used to
communicate between the computer and the PLC.
This can e.g. be used to connect SCADA system
like Turbolink, Wizcon, etc.
It is also used by Actsip and ActGraph.
The protocol is also used for special
communications.
There are two products for this purpose:

H-COMM: Software routines written in Microsoft C, containing the task code handling and
communication routines. It is using the Green leaf library.
This can be implemented by the user in the special project.

ActServ: DDE server for the H family PLCs


This means that Microsoft Windows programs, which support DDE, can communicate directly with the
PLC. (DDE means Dynamic Data Exchange and is supported e.g. by Excel and Visual Basic.
Some very interesting applications are possible together with Excel, where the data can be collected
automatically into Excel, calculated and presented in graphics. It is also possible to set values and control
the PLC from Excel.
For more detailed information, see separate description of ActServ.

Copyright Actron, A.B. 1994 157


Common description of the hardware

7.6 Error codes, countermeasures and maintenance:

7.6.1 Error messages:


On the front of the CPU is an error indicating LED.
On H300-H2002 there is a display, which shows the error code.
Using Actsip-H, Actgraph+ (or the hand programmers) you can read the error code. In Actsip you can get
the reason for the error in clear text. (Go to the menu "Communication-Show status"). Otherwise you can
go to the table below and read out the reason for the error.

The error code is presented in the word WRF000

Following error codes are valid for HB/H200. For error code 14, 15, 21, 22, 24, 25, 26, 28, 29, 2A, 2C, 41,
43, 47, 51-59, 72, 88, - -, Ff and All lamps, see separate description.

Error Error type Priority Reason for the error Counter measure etc.. Error RUN/ Memory
code lamp Stop indication
1 System High Check sum showed error. The The CPU hardware is wrong. If light Stop -
ROM error CPU can not read correct. this is discovered again, you
must change the CPU.
2 System RAM High Check sum showed error. The light Stop -
error CPU can not read correct.
3 Micro High Tried to read an undefined Check if there is a bad noise in light Stop R7C8
processor error instruction the surrounding.
23 Undefined Medium Tried to read an undefined light Stop R7C9
instruction instruction
27 Data memory Medium Error detection discovered at light Stop -
error memory check
31 Program Medium Discovered at check sum control. Try to transfer the program light Stop R7CA
memory error again. The battery can be bad.
If it is a ROM , check the
mounting. It could be bad ROM
programming.
33 Memory size Medium Memory is of a smaller size than Initiate the system with correct light Stop R7CC
error told in the setup. information. If this is not
enough , change CPU.
34 Syntax error Medium User program contains an error. See table of user program light Stop R7D4 and
(Detailed information is in memory errors. WRF001
word WRF001)
44 Time error Low The execution time in the normal Change the program so it will light Stop R7D1
during normal program > max. time in setup. take shorter time or prolong the
scan max. time.
45 Time error, Low The periodic interrupt routine is Change the program in the light Stop R7D2
periodic scan called during its own execution periodical interrupt routine so
the time decreases
46 Time error, Low The interrupt routine is called It must be longer intervals light Stop R7D3
interrupt scan during its own execution between the interrupts.
61 Communication Warning Error during communication with -Check cables. no RUN
error PC (parity error) -Check communication light
parameters
62 Communication Warning Error during communication with -Shield possible external noise no RUN
error PC (handshake error) light
63 Communication Warning Error during communication with no RUN
error PC (time out) light
64 Communication Warning Error during communication with no RUN
error PC (protocol error) light
65 Communication Warning Error during communication with no RUN
error PC (data receive error) light
71 Battery error Warning The charge of the Battery is below Change battery flashes RUN R7D9
specified level.

Copyright Actron AB 1994, 2009


Common description of the hardware

7.6.2 Error messages for syntax errors (program errors):


There is an error indicator LED on the front of the CPU:
Using Actsip-H, ActGraph (or the hand programming unit) you can read out the error code. In Actsip you
will get the error code in clear text (Go to the menu Communication- Show Status )
Otherwise you can go to the table below and read the reason for the error.

The error code is presented in the memory word WRF001


Error Error Description Action
code
01 Double Label (LBL) LBL- instruction with the same number Remove an LBL- instruction or change the number
definition is used more than once.
Double FOR definition FOR- instruction with the same number Remove a FOR- instruction or change the number
is used more than once
Double NEXT definition NEXT- instruction with the same Remove a NEXT- instruction or change the number
number is used more than once
04 Double Subroutine (SB) SB- instruction with the same number is Remove an SB- instruction or change the number
definition used more than once
05 Double Interrupt routine INT- instruction with the same number Remove an INT- instruction or change the number
(INT) definition is used more than once
0F Undefined instruction An Undefined instruction is used Remove it.
10 END Undefined An END instruction has not been Write an END instruction before all SB and INT
preceding a SB or INT instruction. instructions but after the main program.
11 RTS Undefined An RTS instruction is missing after a Write a RTS-instruction after the SB-instruction
SB-instruction
12 RTI Undefined An RTI instruction is missing after a Write a RTI-instruction after the INT-instruction
INT-instruction
13 SB Undefined An SB instruction is missing before a Write a SB-instruction before the RTS-instruction
RTS instruction
14 INT Undefined An INT instruction is missing before a Write a INT-instruction before the RTI-instruction
RTI instruction
16 I/O number error There is a block in the program Correct the I/O address or remove it.
containing an address outside the area.
20 RTS area error The RTS-instruction is used in the main Move the RTS-instruction to a sub routine or remove
program or in an interrupt routine it.
21 RTI area error The RTI-instruction is used in the main Move the RTI-instruction to an interrupt routine or
program or in an interrupt routine remove it.
22 END area error The END-instruction is used in a sub Move the END-instruction to the main program or
routine or in a interrupt routine remove it.
23 CEND area error The CEND-instruction is used in a sub Move the CEND-instruction to the main program or
routine or in an interrupt routine remove it.
30 RTS logic condition error A logic condition is written before the Remove the logic before the instruction.
arithmetic box with the RTS instruction.
31 RTI logic condition error A logic condition is written before the Remove the logic before the instruction.
arithmetic box with the RTI instruction.
32 END logic condition error A logic condition is written before the Remove the logic before the instruction.
arithmetic box with the END instruction.

7.6.3 Error during program execution:


If a error occurs during program execution because an instruction is wrong, it is indicated in the following
way:
The Flag ERR (R7F3) =1. The error code is presented in the word (WRF015).
R7F3 and WR015 must be reset by instructions in the program.

Error Error Description Error instruction


code
H0013 SB undefined Subroutine which is referred to by CAL n is missing CAL
H0015 LBL undefined Label n, which is referred to by JMP or CJMP is missing JMP or CJMP
H0040 LBL nest Label n, which is referred to by JMP or CJMP in wrong area JMP or CJMP
H0041 SB nest Subroutine which is nested in 2 or more levels CAL
H0042 CAL undefined The RTS-instructions executed without corresponding CAL- RTS
instruction has been executed
Copyright Actron, A.B. 1994 159
Additional part H20 to H64
(HL40-HL64)

160
Additional part H200 -H252

8 Additional part for H20 to H64 (HL40-HL64):


8.1 Types of components:
Series HB consists of 4 different sizes of basic units.

INPUT 0 1 2 3 4 5 6 7 8 9 10 11 8 9 10 11 8 9 10 11 8 9 10 11
H20 with 12 inputs and 8 outputs
POW
RUN
H28 with 16 inputs and 12 outputs
ERR INPUT 0 1 2 3 4 5 6 7 8 9 10 11 8 9 10 11 8 9 10 11 8 9 10 11

R.CL POW
H40 with 24 inputs and 16 outputs
RUN
ERR INPUT 0 1 2 3 4 5 6 7 8 9 10 11
H64 with 40 inputs and 24 outputs
R.CL POW
RUN
ERR INPUT 0 1 2 3 4 5 6 7 8 9 10 11
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111 106 107 108 109 110 111

R.CL POW
RUN
It can also be delivered with a two wire
OUTPUT ERR
100 101 102 103 104 105 106 107 108 109 110 111 106 107 108 109 110 111

R.CL
link function:
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111
HL40
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111
HL64

The HB can be expanded in three different ways:

INPUT
Through the expansion units:
0 1 2 3 4 5 6 7 8 9 10 11 8 9 10 11 8 9 10 11 8 9 10 11

INPUT 0 1 2 3 4 5 6 7 8 9 10 1 1 8 9 10 11 8 9 10 11 8 9 10 11
H-20Z with 12 inputs and 8 outputs
POW
RUN
ERR
INPUT 0 1 2 3 4 5 6 7 8 9 10 11 8 9 10 11 8 9 10 1 1 8 9 10 11
OUTPUT 10 0 1 01 10 2 1 03 10 4 105 106 10 7 1 08 109 110 111 106 107 108 109 11 0 11 1
H-40Z with 24 inputs and 16 outputs
R.CL POW
RUN
ERR

R.CL
INPUT

POW
RUN
ERR
0 1 2 3 4

INPUT
5 6 7 8 9 10 11

0 1 2 3 4 5 6 7 8 9 10 1 1
H-64Z with 40 inputs and 24 outputs.
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111 106 107 108 109 110 111

R.CL
POW
RUN
OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111 106 107 108 109 110 111
ERR

R.CL

OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111

Expansion blocks (H-16)


OUTPUT 100 101 102 103 104 105 106 107 108 109 110 111

POW
0

1
5

5
8 12

9 13
0

1
5

5
0

1
5

5
8 12

9 13
0

1
5

5
or
RUN 2 6 10 14 2 6 2 6 10 14 2 6

ERR 3 7 11 15 3 7 3 7 11 15 3 7

RC L
0 0 0 0
STOP 8 8
1 1 1 1
9 9

through using the expansion system of


RUN
2 2 2 2
10 10
3 3 3 3
11 11
4 4 4 4
12 12
5 5 5 5

the H200 units.


13 13
6 6 6 6
14 14
7 7 7 7
15 15
C1 C C1 C
C2 C2

Name of the products:

Series H (H Board)
HL stands for H Link

40 I/O addresses
D is basic unit
Z is expansion unit
R is relay outputs
T is transistor outputs
P is PNP version (Source type)
can also be used for NPN (Sink type)

The basic units and the expansion units are available with relay outputs. These have the extension "DRP".
(E.g. H-64DRP is a basic unit with 40 inputs and 24 relay outputs)
Units are also available with transistor outputs. These have the extension "DTP". (E.g. H-64DTP is a basic
unit with 40 inputs and 24 transistor outputs)

Copyright Actron AB 1994, 2009 161


Additional part H200 -H252

8.1.1 HB, link model (HL)


HL is available in the sizes HL40 (24 in / 16 out) and HL64 (40 in / 24 out). It can be used in three
different ways, which is decided with one dip switch and two rotary switches. (see page)

Host Link connected


with H300-H2002

Dip switch 3 ON
twisted pair (max 300 m) max. 8 stations
Rotary switches = channel no.

CPU link Dip switch 3 OFF + station no.


twisted pair (max 300 m) max. 8 stations
Dip switch 3 OFF
Rotary switch 4 = station no.
Rotary switch 5 = No. of
stations

Master in a remote
connection.
twisted pair (max 300 m) max. 8 stations
Dip switch 3: Data hold=ON
Rotary switches = FF

8.1.2 Series HB in remote version (HR- expansion racks)


HR are available in the sizes HR20 (12 in / 8 out) , HR40 (24 in / 16 out) and HR64 (40 in / 24 out). It can
be used together with all other H series types.
It can also be connected to a Link module from the H200 series.

Copyright Actron AB 1994, 2009


Additional part H200 -H252

twisted pair
(max 300 m) twisted pair
max. 12 (max 300 m)
stations max. 4
stations if
only HR is
used

Copyright Actron AB 1994, 2009 163


Additional part H200 -H252

8.2 Component list:

8.2.1 Base units and expansion modules:

Type of module Name Description


H-20DR(P) 12 in, 24 V DC, 8 out, Relay
H-20DT(P) 12 in, 24 V DC, 8 out, Transistor
Base units H-28DR(P) 16 in, 24 V DC, 12 out, Relay
H-28DT(P) 16 in, 24 V DC, 12 out, Transistor
(P) stands for PNP H-40DR(P) 24 in, 24 V DC, 16 out, Relay
H-40DT(P) 24 in, 24 V DC, 16 out, Transistor
H-64DR(P) 40 in, 24 V DC, 24 out, Relay
H-64DT(P) 40 in, 24 V DC, 24 out, Transistor
Base units with link HL-40DR(P) 24 in, 24 V DC, 16 out, Relay
HL-40DT(P) 24 in, 24 V DC, 16 out, Transistor
HL-64DR(P) 40 in, 24 V DC, 24 out, Relay
HL-64DT(P) 40 in, 24 V DC, 24 out, Transistor
HR-20DR(P) 12 in, 24 V DC, 8 out, Relay
HR-20DT(P) 12 in, 24 V DC, 8 out, Transistor
Remote unit HR-40DR(P) 24 in, 24 V DC, 16 out, Relay
HR-40DT(P) 24 in, 24 V DC, 16 out, Transistor
HR-64DR(P) 40 in, 24 V DC, 24 out, Relay
HR-64DT(P) 40 in, 24 V DC, 24 out, Transistor
H-20ZR 12 in, 24 V DC, 8 out, Relay
H-20ZT 12 in, 24 V DC, 8 out, Transistor
Expansion units H-40ZR 24 in, 24 V DC, 16 out, Relay
H-40ZT 24 in, 24 V DC, 16 out, Transistor
H-64ZR 40 in, 24 V DC, 24 out, Relay
H-64ZT 40 in, 24 V DC, 24 out, Transistor
H-16BD 16 in 24 V DC
Expansion block H-16BR 16 out, Relay
H-16BT 16 out, Transistor
CNM-01 0.1 m
Expansion cables CNEB-06 0.6 m
CMN-10 1.0 m
MPBH-4E EEPROM 3.5 k steps
Memory cassette MPBH-8E EEPROM 7.6 k steps
MPBH-8R EPROM 7.6 k steps
Others LIBAT-H Battery
CAPBH Load capacitor for the memory
Operator terminals ACTTERM-H Bus connected, the PLC is the master
Different types serial connected, commercially available

Copyright Actron AB 1994, 2009


Additional part H200 -H252

8.2.2 H200 expansion units

Type of module Name Description

BSM-3A Rack for 3 slots inclusive CPU


Racks for module BSM-4A Rack for 4 slots inclusive CPU
mounting BSM-5A Rack for 5 slots inclusive CPU
(Base or BSM-6A Rack for 6 slots inclusive CPU
expansion units) BSM-7A Rack for 7 slots inclusive CPU
BSM-9B Rack for 9 slots inclusive CPU
Power supply PSM-A2 220/110 V AC Power supply
modules PSM-B -"- with more power
PSM-D 24 V DC Voltage supply
PIM-A 8 inputs 220/110 V AC
Input modules PIM-AH 16 inputs 220/110 V AC
PIM-AW -"- with removable screw terminal
PIM-D 8 inputs 24 V DC, NPN
PIM-DH 16 inputs 24 V DC, NPN
PIM-DW -"- with removable screw terminal
PIM-DP 8 inputs 24 V DC, PNP
PIM-DPH 16 inputs 24 V DC, PNP
PIM-DPW -"- with removable screw terminal
PIH-DM 32 inputs 24 V DC
POM-R 8 relay outputs, 2 A
POM-RC 8 relay outputs, 2 A, separate outputs
Output modules POM-RH 16 relay outputs, 2 A
POM-RW -"- with removable screw terminal
POM-S 8 triac outputs
POM-SH 16 triac outputs
POM-SW -"- with removable screw terminal
POM-T 8 transistor outputs, NPN
POM-TH 16 transistor outputs, NPN
POM-TW -"- with removable screw terminal
POM-TP 8 transistor outputs, PNP
POM-TPH 16 transistor outputs, PNP
POM-TPW -"- with removable screw terminal
POH-TM 32 outputs
Mixed PHH-DT 8 in, 8 out transistor
modules PHM-TT 16 in, 16 out TTL level
RIOM Link to large H-series (H300-H2002)
IOLH-T Link to H200 or HL
Communication RIOH-TM Remote master
RIOH-TL Remote slave
RIOH-DT Remote sub station 32 I/O
REM-LH2 Remote module, Com. with H300-H2002
Special modules ACTANA-F Quick logic, Analog sampling/ 4 analog inputs/
2 analog outputs (12 bit)
Counter module CTH High speed counter module, 10 k Hz
Analog AGH-I 8 channels in, 4-20 mA, 8 bit resolution
in modules AGH-IV 8 channels in, 0-10 V, 8 bit resolution
AGH-IV2 8 channels , 12 bits in Current/ voltage
ACTANA-S1 4 isolated channels, 12 bits in Current/ voltage
Analog AGH-O 4 channels out, 4-20 mA, 8 bit resolution
out modules AGH-OD 2 channels out, 4-20 mA, 8 bit resolution

Copyright Actron AB 1994, 2009 165


Additional part H200 -H252

AGH-OV 4 channels out, 0-10 V, 8 bit resolution


AGH-ODV 2 channels out, 0-10 V, 8 bit resolution
ACTANA-S2 4 analog channels 12 bits in Current/ voltage
2 analog channels 12 bits out Current/ voltage

Copyright Actron AB 1994, 2009


Additional part H200 -H252

8.3 Addressing:
Addressing of base units and expansion units:

UNIT 0 UNIT 1
Slot 0 (X000 - X039) Slot 0 (X1000 - X1039

Slot 2
Dummy 16
Slot 2
Dummy 16
Slot 1 (Y100 - X123 Slot 1 (Y1100 - X1123
Unit 0 Unit 1
Slot Corresponds Slot Corresponds
to board type to board type
0 X48 0 X48
1 Y32 1 Y32
2 Dummy16 2 Dummy16

Base unit and expansion modules:


UNIT 0
Slot 0 (X000 - X039)

Slot 3 Slot 4
(X300-) (X400-)
Slot 2 alternative alternative
Dummy 16
(Y300-) (Y400-)

Slot 1 (Y100 - X123


The base unit is addressed according as above, while the expansion modules are addressed as a further
connection to unit 0.
(the first slot no for an expansion module is 3, the second is 4 and so on.)

Copyright Actron AB 1994, 2009 167


Additional part H200 -H252

Base unit and H200 expansion system:


UNIT 0 UNIT 1
Slot 0 (X000 - X039)

Slot 2
Dummy 16

Slot 1 (Y100 - X123 0 1 2 3 4 = slot no.

The base module is addressed to above while the H200 expansion is addressed either as unit 1 in the table
above or as further connection to unit 0.
(the first slot no. for the first expansion module is 3, the second is 4 and so on.)

Addressing of Remote modules:


Slot 2 is reserved for this addressing. Therefore remote inputs and outputs are addressed as X200- and
Y200-.

Copyright Actron AB 1994, 2009


Additional part H200 -H252

THIS PAGE INTENTIALLY LEFT BLANK

Copyright Actron AB 1994, 2009 169


Additional part H200 -H252

8.4 Explanations of the components:


Protection cover for
Voltage indication Error indication the screw terminals
UN Protection
ication cover for the
expansion
port
tion
for the
mming Series HB
CPU unit
seen from
rnal the front side
t of with cover
tive mounted:
mories

switch
RUN/
P

Protection cover for


the screw terminals

Jumper for 24 V / 12 V DC supply Screw terminal for inputs


Series HB CPU of X0 - X3
seen from the
front side with
covers removed Switch for
and a view baud rate
through the For HL also
front cover. Serial port for switch no. 3
programming
Contact for
The covers on expansion
the sides and the
screw terminal Contact for
covers can be extra memory
turned up.
RUN / Error
indication on
The front cover contact output
can be removed.
Front cover Contact for
battery and
connection of
Power supply RUN contact Screw terminal for outputs capacitor

Copyright Actron AB 1994, 2009


Additional part H200 -H252

8.5 Setting of jumpers and switches of HB:


Baud rate: lift the cover. Below this you can find a dip switch. See drawing

Is valid if the On-


Line cable is
connected

The function of
the RUN/ERR
Error

RUN
If the On-Line cable is
wired for 19200 bps, then
19200 is only available.
(see Actsip/ActGraph
manuals)
The RUN/ERR contact

Dip sw3 (For HL): For HL:


OFF= CPU LINK (rotary switches)
Remote master: set FF
CPU Link: Station no.
ON= Host Link or Host link: Channel no.
Remote master

8.5.1 The function of the RUN/ERROR contact:


(the function is decided by the jumper shown above.)
This closing relay contact can be used as an indication that the PLC is in RUN or as error indication
(closed when the ERR lamp indicates)
If it is battery error the contact goes On and Off in high frequency

8.5.2 Mounting of series HB

Type L1 L2 Weight
DIN mounting mm
mm kg

Hole H-20 155 145 1.2


distance Depth 105 mm H-28 155 145 1.2
130 mm
H-40 190 180 1.4
H-64 270 260 1.8
Hole distance L2 mm

Width L1 mm

Copyright Actron AB 1994, 2009 171


Additional part H200 -H252

8.6 Input specifications:


On series HB you can program some extra functions on the first 8 inputs. On the four first inputs you can
also use flexible input voltage. (see table below)

Input X4 and upwards Input X0 - X3


Input type DC input
Nominal voltage 24 V DC 5 - 24 V DC
Input voltage 21.6 to 26 V DC 4 to 27 V DC
Input current ca 10 mA ( 24 V DC) at an impedance 6 mA (at 5 V DC)
of about 2.4 k 12 mA (at 24 V DC)
Voltage range ON at 19 V DC or more 1/2 x Vs
OFF at 7 V DC or less (Vs = Input voltage from S terminal)
Max. input delay ON to OFF 5 ms +/- 2.5 ms 0.02 ms /5 ms/ 16 ms for X0 - X7
OFF to ON 5 ms +/- 2.5 ms
Polarity on X4 - PNP (Positive logic): If COM on the terminal is connected to 0V
(X0-X3 always PNP) NPN (Negative logic): If COM on the terminal is connected to 24V
Voltage supply for 24 V DC: 450 mA - (10 mA) x amount of inputs activated simultaneously.
external usage 12 V DC: 50 mA - (9 mA) x amount of inputs (X0-X3) activated simultaneously.
Circuit diagram inputs

Copyright Actron AB 1994, 2009


Additional part H200 -H252

External connection Feeding external units


inputs X4 - PNP
transistor

continues

Copyright Actron AB 1994, 2009 173


Additional part H200 -H252

Continued input specification:


External External voltage supply Internal voltage supply
connection of 4- 27 V DC
input
X0-X3
PLC PLC

8.7 High speed counter specification:

1 Phase input pulse 2 Phase input pulse


Input number X0 to X2
Counter frequency 10 k Hz
Function on terminal X0 Up counting Phase A
Function on terminal X1 Down counting Phase B
Function on terminal X2 Reset
Counting range 0-65535 (16 bits binary)
Usage method Depending on how the FUN-instructions are used

Copyright Actron AB 1994, 2009


Additional part H200 -H252

External connection Reset from pulse encoder:

2 phase pulse encoder


Power supply (red)
with open collector output
Phase B (green)
Phase A (white)
Reset (black)

PLC

External reset:
2 phase pulse encoder Power supply (red)
with open collector output
Phase B (green)
Phase A (white)

PLC

Copyright Actron AB 1994, 2009 175


Additional part H200 -H252

8.8 Output specifications - Relay output:


Type Model Basic units Expansion units
H20DRP H28 DRP H40 DRP H64 DRP H20ZRP H40ZRP H64ZRP
utput type Relay contact
ominal voltage 100/220 V AC, 24 V DC
utput voltage 85 to 250 V AC, 21 to 27 V DC
1 circuit 2 A (COS = 1), 1 A ( COS = 0.4)
ax. load current 2 circuit - 2A 2A 2A - 2A 2A
4 circuit - 4A - 4A - - 4A
6 circuit - 4A 4A 4A - 4A 4A
8 circuit - - 4A 4A - 4A 4A
in leakage current 10 mA ( 5V DC)
ax. leakage current -
ax. top current 6 A, 0.1 s or less
ax. delay OFF ON 10 ms
ON OFF 10 ms
mount of output- Independent 8 - - - 8 - -
oups with 2 out - 1 1 1 - 1 1
ommon 4 out - 1 - 2 - - 2
pply 6 out - 1 1 1 - 1 1
8 out - - 1 1 - 1 1
larity Free choice
sulation method Relay
ft time Electric More than 200 k times at 120 V AC and 2 A resistive load
Mechanical More than 20 million times
rcuit diagram

ternal connection

Power supply
Power supply

Power supply

Copyright Actron AB 1994, 2009


Additional part H200 -H252

8.9 Output specifications - Transistor:


Type Model Basic units Expansion units
H20DTP H28DTP H40DTP H64DTP H20ZTP H40ZTP H64ZTP
Output type Transistor output
Nominal voltage 24 V DC
Output voltage 3 to 26 V DC
1 circuit 0.5 A
Max. load current 2 circuit - 1.0 A 1.0 A 1.0 A - 1.0 A 1.0 A
4 circuit - 1.25 A - 1.25 A - - 1.25 A
6 circuit - 1.9 A 1.9 A 1.9 A - 1.9 A 1.9 A
8 circuit - - 2.5 A 2.5 A - 2.5 A 2.5 A
Min leakage 10 mA
current
Max. leakage 100 A at 24 V DC
current
Max. top current 3 A, 10 ms or less
Max. delay OFF ON 1 ms
ON OFF 1 ms
Amount of output- Independent 8 - - - 8 - -
groups with 2 out - 1 1 1 - 1 1
Common 4 out - 1 - 2 - - 2
supply 6 out - 1 1 1 - 1 1
8 out - - 1 1 - 1 1
Polarity Common +
Insulation method Opto coupler
External 20 I/O 28, 40, 64 I/O
connection

Connect a diode to
inductive load

Copyright Actron AB 1994, 2009 177


Additional part H200 -H252

8.10 Specification of expansion modules:


See description of H200-H252 page 194.

8.11 Wiring:

8.11.1 Power wiring:


see page 156.

Copyright Actron AB 1994, 2009


Additional part H200 -H252

8.11.2 Input connection:


It is possible to choose between PNP (source) and NPN (sink) logic on all inputs without input X0-X3,
which only are available for PNP. Input X0-X3 on the expansion units works as standard inputs ( NPN or
PNP possible.)

Input X0-X3 Input X4 -


Internal Feeding of sensors on inputs X0-X3
supply

24 V DC
Feeding of sensors on inputs X0-X3

12 V DC

Feeding of sensors on inputs X4 -


External
supply Feeding of sensors
on inputs X0-X3

Example Internal supply with 24 V DC on all inputs. PNP (positive logic).


PNP

PNP (positive logic)

PLC
basic unit

Copyright Actron AB 1994, 2009 179


Additional part H200 -H252

Internally connected
(can e.g. be used to feed inputs in groups)

Copyright Actron AB 1994, 2009


Additional part H200 -H252

THIS PAGE INTENTIONALLY LEFT BLANK

Copyright Actron AB 1994, 2009 181


Additional part H200 -H252

8.12 FUN-instructions for series HB:


FUN 70 (S) Mode set Specifies the function of the inputs
The instruction specifies:
- Time constant of the input filter.
- The edge (positive/negative) of the interrupt inputs.
- Two phase high speed counter.
The instruction is executed when the PLC is turned on and the inputs keep thereafter these specifications.
Place these instructions at the beginning of the program.
S is in this instruction a word address. The value in the word is not essential and it is not effected when the
instruction is executed;
Only the word address is used in the instruction!
More than one FUN 70 (S) instruction can be mixed in the same arithmetic box to achieve different
functions on the different inputs, see program example

Copyright Actron AB 1994, 2009


Additional part H200 -H252

Type of spec. S Function


Filter time for WR0 Changes the time constant on the inputs X0-X7
standard Filter from 5 ms to 0.02 ms.
inputs
WR1 Changes the time constant on the inputs X0-X7
Filter from 5 ms to 16 ms.

Filter time for WR2 Changes the time constant on the inputs X0-X7
special Filter from 5 ms to 0.02 ms when they are used as
inputs interrupt or counter inputs.
WR3 Changes the time constant on the inputs X0-X7
Filter from 5 ms to 16 ms when they are used as
interrupt or counter inputs
WR4 Removes the filter function on input X0-X7.

No filter

WR10 INT16 for input X0


WR11 INT17 for input X1
Changing of WR12 INT18 for input X2
edge condition
for interrupt WR13 INT19 for input X3
from positive to Interrupt
negative edge.
WR14 INT20 for input X4
WR15 INT21 for input X5
WR16 INT22 for input X6
WR17 INT23 for input X7
WR20 Specifies that X0-X2 shall be used as a one phase
Up
High speed Down
counter where X0 counts up. X1 counts down
counter Reset and X2 resets
Interrupt INT24 WR21 Specifies that X0-X2 shall be used as a two phase
is activated when the Chan A
Chan B counter where X0 is channel A, X1 is channel B
High speed Counter Reset and X2 resets.
Preset=
=Current value
Error others the flag R7F4 (error indication) is set.

Copyright Actron AB 1994, 2009 183


Additional part H200 -H252

Example: FUN70 (WR1) changes the time constant on the inputs


X0-X7 from 5 ms to 16 ms when they are used as
standard inputs.
FUN70 (WR2) Changes the time constant on the inputs
X0-X7 from 5 ms to 0.02 ms when they are used as
interrupt or counter inputs.
FUN70 (WR14) changes the edge condition on X4 to
negative edge (interrupt routine INT20 is executed
X006 CU10 when X4 goes from High to Low)

Normal counter input.

Reads the current value of the High speed Counter to


WR8

Y102

Output Y102 goes High when the


counter value (WR8) is > 345.

End of the normal program.

Interrupt is called when X4 goes from High to Low.


Interrupt routine
(gives a faster response)

End of interrupt routine. (Returns to normal program)

FUN 71 (d) Reads the current value of the High Speed Counter
The current value of the High speed counter is stored in d, which is a 16 bit word.
The content is a 16 bit binary value..
See example under FUN70.

FUN 72 (S) Sets the current value of the High Speed Counter
The content in S is stored in (ie sets) the current value of the High speed counter.
S is a 16 bit word.

FUN 73 (d) Reads the preset value of the High Speed Counter
Reads the preset value (compare value) of the High speed counter to d.

Copyright Actron AB 1994, 2009


Additional part H200 -H252

FUN 74 (S) Sets the preset value of the High Speed Counter
Sets the preset value (compare value) of the High speed counter with the value of S.

Copyright Actron AB 1994, 2009 185


Additional part H200 -H252

Symbolic picture of how the high speed counter is set or read.

The fastest response from the counter will be obtained if an interrupt routine is used.
You should then write the program which shall be executed when the counter reaches its preset value in an
interrupt routine after the normal main program.
This interrupt routine starts with the instruction INT24.

FUN70 (WR21) creates the High speed counter.

Preset value

Current value

Interrupt routine,
PLC which starts with INT24.
progra It is run when the
m
Preset value= Current value
means a jump to the interrupt routine

The program, which will be


executed then is written in
the routine.

When the interrupt routine is ready


then return back again

Copyright Actron AB 1994, 2009


Additional part H200 -H252

Additional part Series H200 -


H 252

Copyright Actron AB 1994, 2009 187


Additional part H200 -H252
Slo
9 Additional part Series H200 - H 252:
9.1 Description of external parts: Slo

Slo

LED for RUN LED for power LED for status Handle to remove
Slo
indication indication indication the module

Exp
Bit addresses for inputs have the type:
X[r][u][s][b]
Bit addresses for outputs have the type:
Slo
Y[r][u][s][b]
Word addresses for inputs have the type:
X0, Y0, WX0 or WY0 Slo
WX[r][u][s][w]
Word addresses for outputs have the type
X100, Y100, WX10 or WY10 Slo
WY[r][u][s][w]
X200, Y200, WX20 or WY20 Slo
Where
X stands for input
X300, Y300, WX30 or WY30 Slo
Y stands for output
Slo
W stands for Word address (16 bits)

r stands for remote (base has address 0)


X1000, Y1000, WX100 or WY100
u stands for unit (base has address 0)
X1100, Y1100, WX110 or WY110
s stands for slot ( starts on 0)
X1200, Y1200, WX120 or WY120
b stands for bit no. ( decimal)
X1300, Y1300, WX130 or WY130

w stands for word no (0-7)


X1400, Y1400, WX140 or WY140

e.g. word 1 corresponds to bit 16-31.


X1500, Y1500, WX150 or WY150

Copyright Actron AB 1994, 2009


Additional part H200 -H252

LED for error Side view of


indication expansion rack

External reset of
retentive
memories

Start / Stop Key

External 24 V
DC supply

Connection of
240 V AC
supply

Connection
to ground Connection of
Base rack expansion rack
Serial port
(computer I/O modules I/O modules Srew
Power supply
module connection CPU for 8 or 16 for 8 or 16 terminals for
etc. ) module in/outputs in/outputs connection of
I/O.

Copyright Actron AB 1994, 2009 189


Additional part H200 -H252

9.2 Start addresses in slots:

9.3 Configuration:
There are two different types of racks:
- BSM-x . This can be used by all CPUs up to maximum 256 Inputs Outputs.
- BSH-x. With this rack system the H250 and H252 can use the High function modules.
e.g. the T-LINK module.
The H252 can on top of this address more inputs/outputs if BSH-racks are used..

H200 H250 H252


BSM-racks Max. In-/Out (16 I/O- 256 In-/Out 256 In-/Out 256 In-/Out
modules)
New High function modules Not possible Not possible Not possible
BSH-racks Max. In-/Out (16 I/O- Not possible 256 In-/Out 464 In-/Out
modules)
New High function modules Not possible Possible Possible

The high function modules must be placed in a BSH rack.


Do not mix BSM- and BSH-racks.
For H200 CPU and expansion rack of H Board you can use all BSM-racks with following restrictions:
For older BSM-racks type BSM-3 - BSM-7 (not BSM A or BSM B)
max. amount of slots is 10.
For older BSM-racks type BSM-9 (not BSM A or BSM B) max. slots is
15 and no word addressing in the last slot is allowed.
For H250 and H252 CPU you can use BSH or BSM racks
For BSM racks the restrictions are as above.
For BSH racks you can use the High function models, which use the
system bus (e.g. the T-LINK module)
For the H252 you can also address up to 29 slots if BSH rack are used.

POW
RUN
ERR
0
1
2
3
5
5
6 10 14
7 11 15
8 12
9 13
0
1
2
3
5
5
6
7
0
1
2
3
5
5
6 10 14
7 11 15
8 12
9 13
0
1
2
3
5
5
6
7
0
1
2
3
5
5
8 12
9 13
6 10 14
7 11 15
0
1
2
3
5
5
6
7
0
1
2
3
5
5
6 10 14
7 11 15
8 12
9 13
0
1
2
3
5
5
6
7
0
1
2
3
5
5
6
7
Maximum build up of In/Outputs.
for H252-CPU. (29 slots)
RCL
0 0 0 0 0 0 0 0 0
STOP 8 8 8 8
1 1 1 1 1 1 1 1 1
RUN 9 9 9 9
2 2 2 2 2 2 2 2 2
10 10 10 10
3 3 3 3 3 3 3 3 3
11 11 11 11
4 4 4 4 4 4 4 4 4
12 12 12 12
5 5 5 5 5 5 5 5 5
13 13 13 13

If 16 I/O modules are used,


6 6 6 6 6 6 6 6 6
14 14 14 14
7 7 7 7 7 7 7 7 7
15 15 15 15
C1 C C1 C C1 C C1 C C
C2 C2 C2 C2

464 In/Outputs can be connected.


0
1
5
5
8 12
9 13
0
1
5
5
8 12
9 13
0
1
5
5
0
1
5
5
8 12
9 13
0
1
5
5
0
1
5
5
0
1
5
5
0
1
5
5
8 12
9 13
0
1
5
5
0
1
5
5
If 32 I/O modules are used,
928 In/Outputs can be connected.
2 6 10 14 2 6 10 14 2 6 2 6 10 14 2 6 2 6 2 6 2 6 10 14 2 6 2 6

3 7 11 15 3 7 3 7 11 15 3 7 3 7 3 7 3 7 11 15 3 7 3 7
3 7 11 15

0 0 0 0 0 0 0 0 0 0
8 8 8 8
1 1 1 1 1 1 1 1 1 1
9 9 9 9
2 2 2 2 2 2 2 2 2 2
10 10 10 10
3 3 3 3 3 3 3 3 3 3
11 11 11 11
4 4 4 4 4 4 4 4 4 4
12 12 12 12
5 5 5 5 5 5 5 5 5 5
13 13 13 13
6 6 6 6 6 6 6 6 6 6
14 14 14 14
7 7 7 7 7 7 7 7 7 7
15 15 15 15
C C1 C C C C1 C C

In both cases BSH-10 racks must be used.


C1 C1
C2 C2 C2 C2

0 5 8 12 0 5 0 5 8 12 0 5 0 5 0 5 0 5 8 12 0 5 0 5
0 5 8 12
1 5 9 13 1 5 1 5 9 13 1 5 1 5 1 5 1 5 9 13 1 5 1 5
1 5 9 13
2 6 10 14 2 6 10 14 2 6 2 6 10 14 2 6 2 6 2 6 2 6 10 14 2 6 2 6

3 7 11 15 3 7 11 15 3 7 3 7 11 15 3 7 3 7 3 7 3 7 11 15 3 7 3 7

0 0 0 0 0 0 0 0 0 0
8 8 8 8
1 1 1 1 1 1 1 1 1 1
9 9 9 9
2 2 2 2 2 2 2 2 2 2
10 10 10 10
3 3 3 3 3 3 3 3 3 3
11 11 11 11
4 4 4 4 4 4 4 4 4 4
12 12 12 12
5 5 5 5 5 5 5 5 5 5
13 13 13 13
6 6 6 6 6 6 6 6 6 6
14 14 14 14
7 7 7 7 7 7 7 7 7 7
15 15 15 15
C1 C1 C C1 C C C C1 C C
C2 C2 C2 C2

Copyright Actron AB 1994, 2009


Additional part H200 -H252

9.4 Mounting of H200:

Hole distance L2
140
110 mm
mm

Connector
for exp
Bus with connectors cable or
for modules Actterm-H

110 mm
L1
138 mm

Rack type L1 mm L2 mm Weight kg Rack type L1 mm L2 mm Weight kg


BSM-3 160 80 0.6 BSH-3 160 80 0.6
BSM-4 195 120 0.7 BSH-5 230 160 0.8
BSM-5 230 160 0.8 BSH-7 300 240 1.0
BSM-6 265 200 0.9 BSH-10 405 345 1.4
BSM-7 300 240 1.0
BSM-9 370 310 1.3

CNM-
06
cable

10-70 mm
CNM-01 cable

Copyright Actron AB 1994, 2009 191


Additional part H200 -H252

Not possible Warning.


Not possible
If the cable is mounted
incorrectly, the units can be
damaged

Copyright Actron AB 1994, 2009


Additional part H200 -H252

9.5 Module specification H200-H252:


Component type Name Description
CPUs CPU-02H for H200, max. 256 I/O (512 with 32 I/O-modules), 16 k memory, 1.5 s/instr.
CPU21-02H for H250 max. 256 I/O (512 with 32 I/O-modules), 16 k memory, 0.6 s/instr, extended instr.
CPU22-02H for H252 max. 464 I/O (928 with 32 I/O-modules), 16 k memory,
0.25 s/instr, completely extended instruction set , 64 PID loops
CPE-02H as CPU-02H, but requires EEPROM
MPH-4E 4 k EEPROM- memory
Memories MPH-8R 8 k EPROM- memory
MPH2-4E 4 k EEPROM- memory
MPH-8E 8 k EEPROM- memory
MPH-16E 16 k EEPROM-memory (only for H250 and H252)
MPH-16R 16 k EPROM-memory (only for H250 and H252)
BSM-3A Rack for 3 slots inclusive CPU (max. 256 I/O)
Racks for board BSM-4A Rack for 4 slots inclusive CPU (max. 256 I/O)
mounting BSM-5A Rack for 5 slots inclusive CPU (max. 256 I/O)
(Base or BSM-6A Rack for 6 slots inclusive CPU (max. 256 I/O)
expansion units) BSM-7A Rack for 7 slots inclusive CPU (max. 256 I/O)
BSM-9B Rack for 9 slots inclusive CPU (max. 256 I/O)
BSH-3 Rack for 3 slots inclusive CPU (more I/O for H252, High Function modules)
BSH-5 Rack for 5 slots inclusive CPU (more I/O for H252, High Function modules)
BSH-7 Rack for 7 slots inclusive CPU (more I/O for H252, High Function modules)
BSH-10 Rack for 10 slots inclusive CPU (more I/O for H252, High Function modules)
Power - PSM-A2 220/110 V AC Voltage supply. see page 194.
supply- PSM-B -"- with more current. see page 194.
modules PSM-D 24 V DC Voltage supply. see page 194.
PIM-A 8 inputs 220/110 V AC
Input modules PIM-AH 16 inputs 220/110 V AC
PIM-AW -"- with removable screw terminal
PIM-D 8 inputs 24 V DC, NPN
PIM-DH 16 inputs 24 V DC, NPN
PIM-DW -"- with removable screw terminal
PIM-DP 8 inputs 24 V DC, PNP
PIM-DPH 16 inputs 24 V DC, PNP
PIM-DPW -"- with removable screw terminal
PIM-DM 32 inputs 24 V DC
POM-R 8 relay outputs, 2 A
POM-RC 8 relay outputs, 2 A, separate outputs
Output modules POM-RH 16 relay outputs, 2 A
POM-RW -"- with removable screw terminal
POM-S 8 triac outputs
POM-SH 16 triac outputs
POM-SW -"- with removable screw terminal
POM-T 8 transistor outputs, NPN
POM-TH 16 transistor outputs, NPN
POM-TW -"- with removable screw terminal
POM-TP 8 transistor outputs, PNP
POM-TPH 16 transistor outputs, PNP
POM-TPW -"- with removable screw terminal
POH-TM 32 transitor outputs
Mixed modules PHH-DT 8 in, 8 out transistor
PHM-TT 16 in, 16 out TTL level
RIOM Link to large H-series (H300-H2002)
IOLH-T Link to H200 or HL
T-LINK-02H Two wire link to H250-H252 (needs BSH-racks), 16 k bits (1024 words)
LINK-02H Coaxial link to H250-H252 (needs BSH-racks) 16 k bits (1024 words)
BYP-02H Bypass module for LINK-02H
Communication RIOH-TM Remote master
RIOH-TL Remote slave
RIOH-DT Remote sub station 32 I/O
SIH Serial communication module (PLC program decides the protocol)

Copyright Actron AB 1994, 2009 193


Additional part H200 -H252

Special modules ACTANA-F Quick logic, Analog sampling/ 4 analog inputs/ 2 analog outputs (12 bit)
Positioning/ POSH Positioning module
Counter module CTH High speed counter module, 10 k Hz
Analog AGH-I 8 channels in, 4-20 mA, 8 bit resolution
in modules AGH-IV 8 channels in, 0-10 V, 8 bit resolution
AGH-IV2 8 analog 12 bit in Current or voltage
ACTANA-1 4 isolated analog 12 bit in Current or voltage
Analog AGH-O 4 channels out, 4-20 mA, 8 bit resolution
out modules AGH-OD 2 channels out, 4-20 mA, 8 bit resolution
AGH-OV 4 channels out, 0-10 V, 8 bit resolution
AGH-ODV 2 channels out, 0-10 V, 8 bit resolution
ACTANA-S2 4 isolated analog 12 bit in Current or voltage / 2 analog 12 bit out Current or voltage
3 digital fast inputs/ 2 digital transistor outputs

9.6 Specification of the modules:


9.6.1 Voltage supply:
PSM-A PSM-A2 PSM-B PSM-D
Voltage Nominal 100V/110V/120V AC, 200V/220V/240V AC (changed by switch P3 on the board) 24 V DC
Allowed range 85V - 132 V AC, 170 V - 264 V AC 19.2 - 30 V
DC
Frequency Nominal 50 / 60 Hz
Allowed range 47 / 63 Hz
Input current 0.6 A or less 1.6 A or less
Output current CH1 (5V) 1A 1A 1.7 A 1A
CH2(24V) 300 mA totally internal 500 mA 300 mA
CH3(24V) 450 mA supply 700 mA 250 mA 1A
External supply On CH3 (if jumper P4 on the On CH3 (if jumper P4 on the
board is removed max. 750 board is removed max. 750
mA.) mA.)
CH2 is used for the outputs (digital and analog). CH3 is used externally to sensors (Terminal on PSM)

9.6.2 Input modules:


PIM-DP, PIM-DPH/DPW PIM-D, PIM-DH/DW PIM-A, PIM-AH/AW
nput type DC input AC input
Nominal voltage 24 V DC 110 V /220 V AC
nput voltage 21.6 to 26 V DC 85 ON 264 V AC, 50/60 Hz
nput current about 9 mA. 7 mA (at 110 VAC)
Voltage range ON at 19 V DC or more / OFF at 7 V DC or less ON at 85 V AC or more
/ OFF at 30 V AC or less
Max. input delay ON to OFF 4 ms or less / OFF to ON 4 ms or less 16 ms or less
olarity PNP (Positive logic): NPN (Negative logic) -
Voltage CH1 0.5 mA+(X +1) 0.5 mA+(X +1) 1 mA
onsump- CH2 - - -
on CH3 X*9 mA (X* 9 mA at internal supply) -

External
onnection
f inputs

C1 and C2 connected internally C1 and C2 connected internally


C1 and C2 connected internally

Copyright Actron AB 1994, 2009


Additional part H200 -H252

Note.: -"H" in the model name stands for 16 inputs / outputs. Other modules have 8
- "X" in the table above stands for "amount of simultaneously active inputs".

Copyright Actron AB 1994, 2009 195


Additional part H200 -H252

9.6.3 Output modules:


POM-R, POM-RH, POM-S, POM-SH, POM-TP, POM-TPH,
POM-RW POM-SW POM-TPW
Output type Relay Triac Transistor
Nominal voltage 110 / 220 V ACC 110/220 V AC 24 V DC
Output voltage 85-264 V AC 85-264 V AC 3 ON 26 V DC
21-27 V DC
Max. load 1 circuit 2A 1A 0.5 A
current 8 circuits 4A 4A 1.25 A (four circuits)
Min load current 10 mA (5 V DC) 50 mA 10 mA (24 V DC)
Max. leakage current - 1 mA (220 V AC) 0.1 mA (24 V DC)
Max. top current 6 A (100 ms) 20 A (20 ms) 3 A (20 ms)
Max. 10 ms 11 ms 1 ms
delay. 10 ms 11 ms 1 ms
Amount of common 8 per C screw 8 per C screw terminal 8 per C screw terminal
outputs terminal
Polarity - - Common -
Insulation method Relay Opto coupler Opto coupler
Current CH1 0.2 mA + Y * 0.2 0.3 mA + Y * 0.2 mA 0.2 mA + Y * 0.2 mA
mA
consumpt CH2 Y * 10mA Y * 6.5 mA Y * 6.5 mA
ion
CH3 0 mA 0 mA 0 mA
External
connection
of outputs

Voltage Voltage DC Voltage


supply Voltage supply Voltage supply DC Voltage
supply supply supply

Note.:
-"H" in the module name stands for 16 in-/outputs. Other modules have 8
in-/outputs.
- "Y" in table above stands for "amount of simultaneously active outputs".

Copyright Actron AB 1994, 2009


Additional part H200 -H252

9.6.4 Analog modules Current:


AGH-I AGH-O AGH-OD
I/O specification Current in Current out
Current range 4-20 mA 4-20 mA
Impedance In 220 Load 0-500
Resolution 8 bits 8 bits
Update time 1 ms 1 ms
Overall accuracy +- (1 % + 1 bit) +- 1 %
Amount of channels 8 inputs 4 outputs 2 outputs
Insulation method opto coupler not insulated from DC input
Insulation between input no no
Current CH1 25 mA 50 mA 50 mA
consump- CH2 0 mA 0 mA 0 mA
tion CH3 60 mA 250 mA 140 mA
External connection

9.6.5 Analog modules Voltage:


AGH-IV AGH-OV AGH-ODV
I/O specification Voltage in Voltage out
Current range 0-10 V DC 0-10 V DC
Impedance In 100 k Load 10 k min
Resolution 8 bits 8 bits
Update time 1 ms 1 ms
Overall accuracy +- (1 % + 1 bit) +- 1 %
Amount of channels 8 4 outputs 2 outputs
Insulation method opto coupler not insulated from DC input
Insulation between input no no
Current CH1 25 mA 50 mA 30 mA
consump- CH2 0 mA 0 mA 0 mA
tion CH3 60 mA 140 mA 70 mA
External connection

Copyright Actron AB 1994, 2009 197


Additional part H200 -H252

Copyright Actron AB 1994, 2009


9.6.6 Isolated mixed Analog modules:

9.6.6.1 ACTANA-S modules mixed voltage and current.

Actana-S1 has 4 analog inputs and ACTANA-S2 has 4 analog inputs and 2 analog outputs.
ACTANA-S2 and Actana-F have 4 analog inputs, 2 analog outputs, 3 direct quick inputs and 2 direct
outputs.
Connection Connection Connection Digital inputs/outputs
description description description Opto insulated Transistor
Actana-S1 Actana-S2 Actana-F inputs and or contact
outputs inputs
ACTANA-S1 ACTANA-S2 ACTANA-F DIN1

DIN2
IN 1 +
IN 1 + IN 1 +
IN 1 -
IN 1 -
DIN3
IN 1 -
IN 2 +
IN 2 + IN 2 +
IN 2 -
IN 2 - IN 2 -

IN 3 + IN 3 +
IN 3 + 5-27 V DC
IN 3 -
IN 3 - IN 3 -
IN 4 +
IN 4 + IN 4 +
IN 4 -
IN 4 -
IN 4 -
OUT1 +
OUT1 +

COM 1
COM 1 Outp ut loa d
OUT2 +
OUT2 +
DOUT1
COM 2
COM 2
D IN 1

D IN 2
Outp ut loa d
D IN 3

D COM
DOUT2
D OUT 1

D OUT 2

Outputs (short circuit protected)


Max. output current 50 mA

0-20 4-20 0-10 -10 -


Jumpers and
H EM

0-20 4-20 0-1 0-10 mode switches


1

mA mA V +10 V
mA mA V V
on the
1

ACTANA
2 3

board:
2 3
MODE3
MODE2
MODE1
MODE0

OUT 2 OUT 1 IN 4 IN 3 IN 2 IN 1

199
Additional part H200 -H252

0-20 4-20 0-10 -10 -

H EM
0-20 4-20 0-1 0-10

1
mA mA V +10 V
mA mA V V

1
2 3

2 3
MODE3
MODE2
MODE1
MODE0
OUT 2 OUT 1 IN 4 IN 3 IN 2 IN 1

H or EM
1
2

Mode switch
3

200 Copyright Actron AB 1994


Additional part H200 -H252

Register
value decimal
-10 to +10 V Output

4095 (or 1000)


Analog inputs /outputs 4000

All inputs and outputs have got


a resolution of 12 bits 3000

( 0-4095 decimal)
0 V =2047 (or 500)
or represented as 2000
(0-1000 decimal)
1000

-10 V -5 V 0 V 5V 10 V

Register Register
value decimal 0-1 V Input value decimal 0-20 mA Input or Output
4095 (or 1000) 4095 (or 1000)
4000 4000

3000 3000

2000 2000

1000 1000

0V 0.5 V 1.0 V 0 mA 10 mA 20 mA

Register Register
value decimal 0-10 V Input or Output value decimal 4-20 mA Input or Output
4095 (or 1000) 4095 (or 1000)
4000 4000

3000 3000

2000 2000

1000 1000

0V 0
5V 10 V 0 mA 4 mA 10 mA 20 mA

9.6.6.1.1 Digital inputs /outputs using mode 1


(only available on Actana-S2 and Actana-F using mode 1)
These inputs/outputs can operate on a voltage level 5-27 V DC ( see circuit diagram)
The three digital inputs can be used in the PLC program as X0-X2.
Normally these inputs have a 4 ms filter like the inputs on e.g. PIM-DPH. But you can disconnect the
input filter if you set the analog IN1 to no filter.
The two digital outputs can be used in the PLC program as Y80-Y81.

Copyright Actron AB 1994 201


Additional part H200 -H252

Even short pulses less than


Application for no one program cycle ( down to
filter inputs: DIN1 200s) will be detected by the
three inputs.
Detection of short
pulses, where the filter
time and cycle time sets DIN2
a limit for the length of This status will be held until
the signal. next I/O update. That means
(This is a very common
DIN3 that the short signals will be
problem, which normally is detected by the normal PLC
solved with external
electronics)
X2 program.

202 Copyright Actron AB 1994


Additional part H200 -H252

9.6.6.1.2 Programming and addresses:

Mode 0: (valid for Actana-S and Actana-F)


Equal to the function of old Actana-1 and Actana-2 board:

Address H series (Module Example: Read analog input 2 in the 2nd slot (slot no
map: Setup 4WX/4WY) 1) and add the constant 100. The result will be stored
Words (+ 10 x slot no.) in the word RESULT.
Analog input 1 WX0
Analog input 2 WX1
Analog input 3 WX2 WR0 = 100 + WX11
Analog input 4 WX3 (RESULT = 100 + ANALOG 2)
Analog output 1 WY4
Analog output 2 WY5
Not used WY6
Not used WY7
Mode 1: (valid for Actana-S and Actana-F)

9.6.6.1.4 Filter time:


There are 4 different filter times available for each input channel. The filter is calculated as an average of
analog values during a period of time.
Channel 1 Channel 2 Channel 3 Channel 4
Y82 Y83 Y84 Y85 Y86 Y87 Y88 Y89 Filter time
0 0 0 0 0 0 0 0 4 ms
0 1 0 1 0 1 0 1 No filter (in practice approx. 50 s) *1
1 0 1 0 1 0 1 0 20 ms (50/60 Hz filter. *2)
1 1 1 1 1 1 1 1 300 ms
*1 If channel 1 is set to no filter, all digital inputs (DIN1 - DIN3) will work without filter.
*2 Decreases the influence of frequencies >= 50 Hz

9.6.6.1.4 Conversion factor:


The 12 bit signal is presented as a default as 0-4095. Very often the PLC program uses this value as a value
between 0-100, 0-1000, 0-10000 etc. A conversion through multiplication and division gives a loss of
information as there is no floating point arithmetics. If outputs Y88-Y91 are high, the value of analog
inputs 1-4 will be presented as 0-1000 instead of 0-4095. If outputs Y92-Y93 are high, the value of analog
outputs 1-2 will be given as 0-1000 instead of 0-4095.
Analog Channels
IN 1 IN 2 IN 3 IN 4 OUT 1 OUT 2
Y90 Y91 Y92 Y93 Y94 Y95 Presentation range of signal:
0 0 0 0 0 0 0 - 4095
1 1 1 1 1 1 0 - 1000

Example: H200-252. If the voltage range on analog input 2 is 0-10 V, than a 5.0 V input will be
represented as 2048 if CONV IN 3 (Y90) is low and as 500 if CONV IN 3 (Y90) is high.

9.6.6.1.5 Error information:


If the analog input is selected to 4-20 mA range the inputs X8-X11 gives input error information.. If the
wire is cut the current will be below 2 mA. Then the error bit goes
X7 DIF IMPULSE
high. Proper function
Bad function
IMPULSE CPU ALARM
CPU Watch dog:
When the Actana-S is Delay Timer
Preset 1.0 s
Copyright Actron AB 1994 203
Additional part H200 -H252

working properly it will always send a


3 - 4 Hz signal on X7.
If you want to use this you can e.g. add following program in the PLC:

204 Copyright Actron AB 1994


Additional part H200 -H252

Mode information:
Input X12-X13 give the mode number (0-3) so the PLC can check if right mode, fitting to the program, is
set on the ACTANA board. Only mode 0-1 are allowed for Actana-S.
If the board is an Actana-F type mode 0-3 are available. X15 is high if the board is Actana-F.
The choice of PLC type on the Actana board is indicated in bit X14. If X14 is high the board is adjusted for
EM and low if it is H200.

Address map mode 1:


H series (Setup as FUN00)
Words (+ 10*slot no.) Bits (+ 100*slot no.)
Digital inputs WX0 X0 - X15
Analog input 1 WX1
Analog input 2 WX2
Analog input 3 WX3
Analog input 4 WX4
Digital outputs WY5 Y80 - Y95
Analog output 1 WY6
Analog output 2 WY7

Digital Inputs (+100 * slot no) Digital Outputs (+100 * slot no)
X0 Fast input DIN1 information hold Y80 Control of direct output DOUT1
X1 Fast input DIN2 information hold Y81 Control of direct output DOUT2
X2 Fast input DIN3 information hold Y82 Filter time 1 definition analog input 1
X3 Not used Y83 Filter time 2 definition analog input 1
X4 Not used Y84 Filter time 1 definition analog input 2
X5 Not used Y85 Filter time 2 definition analog input 2
X6 Not used Y86 Filter time 1 definition analog input 3
X7 CPU Watch dog (3 -4 Hz) Y87 Filter time 2 definition analog input 3
X8 Error on analog input 1 Y88 Filter time 1 definition analog input 4
X9 Error on analog input 2 Y89 Filter time 2 definition analog input 4
X10 Error on analog input 3 Y90 Conversion definition analog input 1
X11 Error on analog input 4 Y91 Conversion definition analog input 2
X12 Mode number information bit 0 (LSB) Y92 Conversion definition analog input 3
X13 Mode number information bit 1 Y93 Conversion definition analog input 4
X14 H series on switch Y94 Conversion definition analog output 1
X15 Actana-S / Actana-F info on switch Y95 Conversion definition analog output 2

Example: Read analog input 3 in the 3rd slot (slot no 2) and show the value on the ACTTERM-H display
(as a value in text display no 3). We want the value converted to 0-1000 and the analog signal shall have a
50 Hz filter (20 ms).

CONV IN3 = 1 (Y90)


FILTER1 CH3 = 1 (Y86)
Condi- FILTER2 CH3 = 0 (Y87)
tion
DISPLAY = 3
VALUE1 = ANALOG 3 (WX23)

Copyright Actron AB 1994 205


Additional part H200 -H252

9.6.6.2 ACTANA-F module


Mode 2 and Mode 3:
(Mode 0 and 1 equal to ACTANA-S board)
Actana-F works for H200 and EM. In this description the H20 addresses are used. To convert to EM
addresses and programming, see Actana-S description.

9.6.6.2.1 Quick update logic.


ACTANA has a quick update function, which is partly programmable.
Through direct Quick inputs , DIN1 and DIN2, you can combine the slower logic from the PLC through
outputs Y80 and Y81.
You can define a simple logic condition for the quick reaction of the direct Quick outputs. DOUT1 and
DOUT2.
The response time from the direct input, executing the logic and updating the result on the direct outputs is
only 200 s.

The slower part of the logic and definition of the fast logic can be changed with a period of one PLC cycle.

Actana-F mode 3
Internal DIN1
PLC DIN2
program
Quick DOUT1
PLC output Logic
flags as (Defined by PLC
DOUT2
parts of the output flags)
quick logic
External
Input quick inputs
information and
signal hold outputs
The logic for DOUT1 and DOUT2 (the quick outputs) is a combination of the PLC program logic, which
we here call the slower part and the status from the quick reaction inputs DIN1 and DIN2.
The slow logic will be programmed in the PLC program in a normal way (in Ladder or Grafcet).
The outputs in this PLC program (Y80-Y83) are parts of the quick logic combination. See below.

The logic combination can be chosen from the table Possible quick logic combinations..... Such a
combination is defined by the other PLC outputs. This means that this definition is also a part of the PLC
program. E.g. if you want following logic for the quick output DOUT1:

Quick logic PLC program


you will find this in the Possible quick logic This means that you set Y84 high and Y85 low in the
combinations for mode 3. as alternative c/. PLC program. (to set low is not necessary)
PLC DIN1 DOUT1

COND1 ( )
Y84
( slow logic 1
) ( )
Y00080 Y80
slow lodic 2
( )
Y81
PLC DIN2
206 Copyright Actron AB 1994
Additional part H200 -H252


COND2



Y00081


Copyright Actron AB 1994 207


Additional part H200 -H252

PLC Program
Actana-F module
External
Y84
quick
Y85
Inputs and
Y86 Defines the
logic Outputs
Y87
combination
Y88
Y89 DIN1

DIN2
Part of the logic
(the slow part)
PLC DIN1 PLC DIN2 DOUT1
COND1 COND2 DOUT1
Y80 ( )
Y00080 Y00081

Y81

Y82 PLC
COND3
DIN1 DOUT2 DOUT2
( )
Y83 Y00082

Y90 PLC
COND4
DIN2


Y91 Y00083

X3 Quick logic
X2
processing
X1
X0

signal

Possible quick logic combinations for mode 3:



a/
PLC DIN1 PLC DIN2 DOUT1
e/ PLC
COND3
DIN1 PLC
COND4
DIN2 DOUT2

Y84=0 COND1

COND2
Y86=0 ( )
Y00082 Y00083
Y85=0 ( Y87=0



) DOUT2 =Y82*DIN1*Y83* DIN11
Y00080 Y00081





DOUT1 =Y80*DIN1*Y81*DIN2

b/
PLC DIN1 PLC DIN2 DOUT1
f/ PLC
COND3
DIN1 PLC
COND4
DIN2 DOUT2

Y84=1
COND1 COND2
Y86=1 / ( )
Y00082 Y00083
Y85=0
/ ( Y87=0
DOUT2 =Y82*/DIN1*Y83*DIN2

)
Y00080 Y00081



DOUT1 =Y80*/DIN1*Y81*DIN2

c/
PLC DIN1 DOUT1
g/ PLC
COND3
DIN1 DOUT2

( )
COND1 Y00082
Y84=0
( Y86=0
PLC

DIN2


) COND4
Y85=1 Y00080 Y87=1
Y00083

DOUT2 =Y82*DIN1+Y83*DIN2
PLC DIN2

COND2

208 Copyright Actron AB 1994


Additional part H200 -H252



Y00081



DOUT1 =Y80*DIN1+Y81*DIN2

d/
PLC DIN1 DOUT1
h/ PLC
COND3
DIN1 DOUT2

/( )
COND1 Y00082
Y84=1
/( Y86=1
PLC

DIN2


) COND4
Y85=1 Y00080 Y87=1
Y00083

DOUT2 =Y82*/DIN1+Y83*DIN2
PLC DIN2

COND2



Y00081



DOUT1 =Y80*/DIN1+Y81*DIN2

Copyright Actron AB 1994 209


Additional part H200 -H252

Example (mode 2):


Y84=0, Y86=1, DOUT1= Y80*DIN1+Y81*DIN2
Y85=1, Y87=0 DOUT2= Y82*/DIN1*Y83*DIN2
gives c/ in the table gives f/ in the table

Seen out of the PLC program point of view the condition could be:
PLC program: The fast logic looks like:

PLC DIN1 DOUT1
COND1
( )
Y00080

PLC DIN2
COND2

Y00081


PLC DIN1 PLC DIN2 DOUT2
COND3 COND4
/ ( )
Y00082 Y00083

Totally, this is equivalent to:


Y80

DIN0 DOUT0

DIN1
Y81
Y82 Y83

DIN0 DIN1 DOUT1

210 Copyright Actron AB 1994


Additional part H200 -H252

As the PLC CPU is slower than


the logic on the ACTANA the
signals DIN1, DIN2, DOUT1 and DIN1 Fast direct input 1
DOUT2 connected to inputs X0,
Fast direct input 1
X1, X2 and X3. information hold
When these signals go high they
will stay high until next PLC I/O DIN2 Fast direct input 2
update.
Thereafter they are equal to the Fast direct input 2
real status of DIN1-DOUT2 information hold
again. Therefore the PLC CPU DOUT1 Fast direct output 2
can detect if something has
happened. X2 Fast direct output 2
information hold
X0 and X1 could therefore be
DOUT2 Fast direct output 2
used as sample and hold of the
digital inputs DIN1 and DIN2. Fast direct output 2
information hold

Copyright Actron AB 1994 211


Additional part H200 -H252

General description of quick logic:

Mode 3 DOUT1 =Y80* a DIN1 b Y81*DIN2


DOUT2 =Y82* c DIN1 d Y83*DIN2

Where a is inverted (NOT) or normal function of DIN1: normal if Y84 is "0" and / (inverted) if Y84 is "1"
Where b is Boolean "*" (AND) or "+" (OR): "*" if Y85 is "0" and "+" if Y85 is "1".

Where c is inverted (NOT) or normal function of DIN1: normal if Y86 is "0" and / (inverted) if Y86 is "1"
Where d is Boolean "*" (AND) or "+" (OR): "*" if Y87 is "0" and "+" if Y87 is "1".

Extended function: Self hold /direct control function in mode 2:

DOUT1 =Y80* a DIN1 b Y81*DIN2 + Y90 * e


DOUT2 =Y82* c DIN1 d Y83*DIN2 + Y91 * f

Where e is output contact DOUT1 or TRUE DOUT1 if Y88=1 and TRUE if Y88 is 0
Where f is output contact DOUT2 or TRUE DOUT2 if Y89=1 and TRUE if Y89 is 0

This term gives a possibility to make parallel connection of the above described fast logic.

Y88 =0: DOUT1


Y80* a DIN1 b Y81*DIN2
Gives a possibility to make ( )

direct control of the output.
DOUT1




If the upper branch is set HOLD



false. Y00090
Y88 =1 DOUT1
Y80* a DIN1 b Y81*DIN2 ( )

Gives a possibility to make

self hold function on
DOUT1 DOUT1




DOUT1. HOLD



In this case Y90 will be the Y00090
breaking condition.
Y89 =0: DOUT2
Y82* c DIN1 d Y83*DIN2
Gives a possibility to make ( )

direct control of the output.
DOUT2




If the upper branch is set HOLD



false. Y00091
Y89 =1 DOUT2
Y82* c DIN1 d Y83*DIN2
Gives a possibility to make ( )

self hold function on
DOUT1 DOUT2




DOUT1. HOLD



In this case Y90 will be the Y00091
breaking condition.

212 Copyright Actron AB 1994


Additional part H200 -H252

Possible quick logic combinations for mode 2:



i/ PLC
COND1
DIN1 PLC
COND2
DIN2 DOUT1

q/ PLC
COND3
DIN1 PLC
COND4
DIN2 DOUT2

Y84=0 Y00080

Y00081
(

)

Y86=0 ( )
Y00082 Y00083
Y85=0 DOUT1



Y87=0
DOUT2




HOLD HOLD
Y88=0 Y89=0
Y00090 Y00091
DOUT1=Y80*DIN1*Y81*DIN2+Y90
DOUT2=Y82*DIN1*Y83*DIN2+Y91

j/ PLC
COND1
DIN1 PLC
COND2
DIN2 DOUT1

r/ PLC
COND3
DIN1 PLC
COND4
DIN2 DOUT2

Y84=0 ( )
Y00080 Y00081
Y86=0 ( )
Y00082 Y00083
Y85=0
DOUT1 DOUT1



Y87=0
DOUT2 DOUT2




HOLD HOLD
Y88=1 Y89=1
Y00090 Y00091
DOUT1=Y80*DIN1*Y81*DIN2+Y90*DOUT1 DOUT2=Y82*DIN1*Y83*DIN2+Y91*DOUT2

k/ PLC
COND1
DIN1 PLC
COND2
DIN2 DOUT1

s/ PLC
COND3
DIN1 PLC
COND4
DIN2 DOUT2

Y84=1 / ( )
Y00080 Y00081
Y86=1 / ( )
Y00082 Y00083
Y85=0
DOUT1



Y87=0
DOUT2




HOLD HOLD
Y88=0 Y89=0
Y00090 Y00091

DOUT1=Y80*/DIN1*Y81*DIN2+Y90 DOUT2=Y82*/DIN1*Y83*DIN2+Y91

l/ PLC
COND1
DIN1 PLC
COND2
DIN2 DOUT1

t/ PLC
COND3
DIN1 PLC
COND4
DIN2 DOUT2

Y84=1 / ( )
Y00080 Y00081
Y86=1 / ( )
Y00082 Y00083
Y85=0
DOUT1 DOUT1



Y87=0
DOUT2 DOUT2




HOLD HOLD
Y88=1 Y89=1
Y00090 Y00091
DOUT2=Y82*/DIN1*Y83*DIN2+Y91*DOUT2
DOUT1=Y80*/DIN1*Y81*DIN2+Y90*DOUT1

m/ PLC
COND1
DIN1 DOUT1

u/ PLC
COND3
DIN1 DOUT2

( ) ( )
Y00080 Y00082
Y84=0
PLC

DIN2

Y86=0
PLC

DIN2


COND2 COND4
Y85=1 Y87=1
Y00081 Y00083
Y88=0
DOUT1




Y89=0
DOUT2




HOLD HOLD

Y00090 Y00091
DOUT1=Y80*DIN1+Y81*DIN2+Y90 DOUT2=Y82*DIN1+Y83*DIN2+Y91

n/ PLC
COND1
DIN1 DOUT1

v/ PLC
COND3
DIN1 DOUT2

( ) ( )
Y00080 Y00082
Y84=0
PLC

DIN2

Y86=0
PLC

DIN2


COND2 COND4
Y85=1 Y87=1
Y00081 Y00083
Y88=1
DOUT1 DOUT1


Y89=1
DOUT2 DOUT2


HOLD HOLD

Y00090 Y00091
DOUT1=Y80*DIN1+Y81*DIN2+Y90*DOUT1 DOUT2=Y82*DIN1+Y83*DIN2+Y91*DOUT2

o/ PLC
COND1
DIN1 DOUT1

w/ PLC
COND3
DIN1 DOUT2

/( ) /( )
Y00080 Y00082
Y84=1
PLC

DIN2

Y86=1
PLC

DIN2


COND2 COND4
Y85=1 Y87=1
Y00081 Y00083
Y88=0
DOUT1




Y89=0
DOUT2




HOLD HOLD

Y00090 Y00091
DOUT1=Y80*/DIN1+Y81*DIN2+Y90 DOUT2=Y82*/DIN1+Y83*DIN2+Y91

p/ PLC
COND1
DIN1 DOUT1

z/ PLC
COND3
DIN1 DOUT2

/( ) /( )
Y00080 Y00082
Y84=1
PLC

DIN2

Y86=1
PLC

DIN2


COND2 COND4
Y85=1 Y87=1
Y00081 Y00083
Y88=1
DOUT1 DOUT1


Y89=1
DOUT2 DOUT2


HOLD HOLD

Copyright Actron AB 1994 213


Additional part H200 -H252

Y00090 Y00091
DOUT1=Y80*/DIN1+Y81*DIN2+Y90*DOUT1 DOUT2=Y82*/DIN1+Y83*DIN2+Y91*DOUT2

214 Copyright Actron AB 1994


Additional part H200 -H252

Application example:
A machine producing products at a very high speed has to cut and punch at a very quick response
when two detectors indicate the end of the product. But there are different types of products and
only product B shall be punched when detector B indicates. When detector A indicates product
A, B and D shall be punched.
All products shall be cut when detector B indicates.
The response time from the indication of the detector until the output signal starts to the knife has
to be shorter than 400 and 300 s.
Detector A (DIN1)

Detector B (DIN2)

50 ms hold
Cut output (DOUT1)

Punch output
(DOUT1) only product B product A, B and

max 400 s max 300s

There is obviously no way to handle such a quick logic and response by the PLC program and ordinary
inputs. (Even with interrupt handling we will have longer responses than 2 ms.)
Therefore we use the quick logic on the Actana-F board and write following program:

Wanted function Explanation Break apart


Find the corresponding Y80 always 0

AUTO DIN2 DOUT1 quick logic block in the


Y81

table on previous page.
AUTO

DIN2 DOUT1
Block

( Alternative n/ fits if we
( )
R000 n/
)
R000 remove the upper HOLD DOUT1 Y84=0
TIME
branch. (If Y80 is / Y85=1
TD0
HOLD DOUT1 always false the upper Y90 Y88=1
DOUT1 HOLD
TIME


branch is removed in TIME
( )
/
practice.)

5
x0.01s
TD0

AUTO PROD DIN1 DOUT2
A
DOUT1 HOLD ( )
R000 R001 Block
TIME
PROD u/
( B
)
5
Find the corresponding


R002




quick logic block in the Y86=0
PROD Y82
x0.01s

table. Alternative u/ fits

D



Y87=1

AUTO PROD DIN1 DOUT2


R003



Y89=0
AUTO PROD DIN2
A B

( R000 R002
) Y83
R000 R001 AUTO PUSH
BUT


/
R000 X00100 Y91

PROD

B



R002

Copyright Actron AB 1994 215


Additional part H200 -H252




PROD

D



R003



AUTO PROD DIN2

B



R000 R002



AUTO PUSH

BUT

/

R000 X00100


Continues on next page.

216 Copyright Actron AB 1994


Additional part H200 -H252

PLC program (Mode2 set on the board) Comments


**** Definition of the quick logic ***********
Define the type of quick
LOGIC DEF1 = 0 (Y84)
LOGIC DEF2 = 1 (Y85) logic. *1
LOGIC DEF3 = 0 (Y86)
LOGIC DEF4 = 1 (Y87)
DOUT1CONTR = 1 (Y88)
DOUT2CONTR = 0 (Y89)


***** PLC control of the cut output DOUT1
Input X002 indicates when DOUT1 is set.
Timer TD0 breaks the self hold after 50 ms.

AUTO PLC Define the serial condition
COND2 to DIN2 in the first quick
( )
R000 Y00081 logic block.

HOLD DOUT1
TIME HOLD Define the self hold
/( ) condition in the first quick
TD0 Y00090
logic block.
DOUT1 HOLD
INFO TIME
( ) Make the self hold timer of
X00002 5
x0.01s DOUT1. (Input X2 gives
the status of DOUT1)
***** PLC control of the punch output DOUT2
The Pushbutton allows direct control in
manual mode.

AUTO PROD PLC
A COND3
( ) Define the serial condition
R000 R001 Y00082 to DIN1 in the second quick

PROD logic block.
B

R002

PROD
D

R003

AUTO PROD PLC
B COND4 Define the serial condition
( ) to DIN2 in the second quick
R000 R002 Y00083
logic block.

AUTO PUSH DOUT2
BUT CONTR Define the direct control
/ ( ) output of DOUT2 in the
R000 X00100 Y00091
second quick logic block.

*1 Statements like LOGIC DEF1 = 0" can be excluded as the flag is "0" when it is unused.
These outputs can be used as normal contact outputs and they can be changed during RUN.
That means that the quick logic program itself can be changed during RUN as often as every
PLC program cycle.

To achieve a combination of fast response of position and logic you can combine the two modules CTH
and Actana-F. Connect one of the external outputs of CTH to an input (DIN1 or DIN2) of Actana-F and
combine the fast counter response with the rest of the quick logic on the Actana-F module. (see description
of CTH, page 257 )
Copyright Actron AB 1994 217
Additional part H200 -H252

218 Copyright Actron AB 1994


Additional part H200 -H252

9.6.6.2.2 Analog inputs sample and hold:


(Mode 2 and 3)
There is one quick digital input ( DIN3) reserved as a sample input for the four analog input
channels.
Y90 =0 (Repeated high precision sampling control = Low) in case of mode 3:
Y91=0 (Internal sampling control =Low) in case of mode 3:

When DIN3 goes high the current


DIN3 value of Analog inputs 1-4 are frozen
and stay frozen until the next PLC I/O
X4 update.
Y90 Thereafter they are equal to the real
Y91 value of Analog input 1-4.
When DIN3 goes high the input X4
stays high until the next I/O update.

When input X4 is high the PLC can


detect that a sample has occurred and
the analog values can be taken care
of.

(X4 could also be used to detect the


fast input signal, DIN3, separately
from analog sampling.)

Program example.
When the analog signal has been high the analog values of input 1-4 stay and they can be copied
during the next PLC program cycle.

9.6.6.2.3 Repeated sampling control with high precision: (Mode 3)


Y90 =1 (Repeated high precision sampling control = High):
The function of analog input 2-4 are the same as above.
When DIN3 goes high ACTANA will start to sample up to 170 values from analog input 1 with
an interval which is chosen by setting of outputs Y88, Y89. When input X5 goes high the 170
values can be read from the PLC CPU each update cycle thereafter. When all values are read (170
I/O updates) input X5 goes low and the read values are the normal analog values again. During
the sampling the read values are frozen on all analog inputs.

Copyright Actron AB 1994 219


Additional part H200 -H252

The sampling can also be started by the internal conditions. If output Y91 (internal sampling
control) is set high, it gives the same result as when DIN3 goes high. In practice:

Sampling start pulse is =DIN3 + Y91 (Boolean)

220 Copyright Actron AB 1994


Additional part H200 -H252

I/O Update

I/O Update

I/O Update

I/O Update

I/O Update
I/O Update

I/O Update
Sample no170
Sample no3

Sample no4

Sample no5
Sample no2
Sample no1
Read Read Read Read
DIN3 or etc. value 1 value 2 value 3 etc. value
Y91 170

X4
X5
Y90 (High)

Analog
value
input 1

Frozen read value during sampling Last sampling no 170

Normal read value start


Analog
value
input 2-4

To achieve an interval between the samplings with small variation the value of analog input 2 to 4
will be frozen until the repeated sampling is ready. Even the quick logic is frozen during the
sampling.

9.6.6.2.4 Repeated sampling control without stopping other functions: (Mode 3)


Y90 =0 (Repeated high precision sampling control = Low):
Y91=1 (Internal sampling control =High):
If output Y91 goes high (and starts the sampling ) or if Y91 is high when DIN3 starts the
sampling, the sampling will start to repeat on input channel. The sampling will go on until Y91
goes low or until 170 samples have been made. When the sampling stops, the values can be read
as in the high precision sampling case. This means that the period of the sampling can be
controlled and no other functions are stopped. On the other hand the precision of the sampling
will decrease to a variation of the intervals of approx. 250 s, which will cause a low
precision specially in the short interval sampling areas, 250 s and 500 s.

Program example.
When X5 is high the collection of samples
starts. The POINTER (Word) is reset. The
PLC collects one value every PLC cycle until
all values are stored in the PLC memory
(X5 goes low) from memory position
Copyright Actron AB 1994 221
Additional part H200 -H252

MEMORY (word) and upwards via indirect


addressing.

222 Copyright Actron AB 1994


Additional part H200 -H252

Application example:
The result of an expansion process during a short time period (maximum 100 ms) will be
analysed. The maximum will be detected (amplitude and time ). When the expansion starts a
digital input goes high.

Use mode 3. Connect the digital input to DIN3 and the analog signal to Channel 1.
Set the sample rate to 1 ms. (That means that 170 samples will cover 170 ms)
Set the filter time of channel 1 to no filter.

Sampling interval

Max Amplitude
Input DIN3

Analog pressure during


a short period

50 100 ms
time for max.

**** Set sampling interval to 1000 micro s.


Set filter time channel 1 to "no filter"
Set range of inputs to 0-1000.
Set repeated High precision Control High.

1 SAMPL PER1 = 0 (Y88)
SAMPL PER2 = 1 (Y89)
FILT TIME1 = 1 (Y92)
CONV IN = 1 (Y94)
REPEAT CON = 1 (Y90)



**** X5 starts sample read..
The maximum value is stored in MAX VALUE
After the samples are read (X5 is low)RESULT is set to MAX VALUE.
SAMP
2READ EDGE1 SAMPLE CNT = 0
MAX VALUE = 0
X00005 DIF0


SAMP
3READ NEW MAX = MAX VALUE < ANALOG1

X00005


NEW SAMP
4MAX READ MAX VALUE = ANALOG1

R005 X00005


SAMP
5READ RESULT = MAX VALUE
/
X00005

Copyright Actron AB 1994 223


Additional part H200 -H252

9.6.6.2.5 Filter time: (Mode 2 and 3)


There is a default filter time of each analog input channel of 4 ms. This reduces noise and quick
changes. The filter is calculated as an average of analog values during a period of time.
If no filter time is wanted the filter can be removed through setting output Y92- Y93 high.

Y92=0 standard filter time for analog input 1 (4 ms)


Y92=1 no filter time for analog input 1
Y93=0 standard filter time for analog input 2-4 (4 ms)
Y93=1 no filter time for analog input 2-4

9.6.6.2.6 Sampling interval: (mode 3)


Y88 Y89 Sampling interval
0 0 250 s
0 1 500 s
1 0 1000 s (1 ms)
1 1 5000 s (5 ms)

9.6.6.2.7 Conversion factor: (mode 2 and 3)


The 12 bit signal is presented as a default as 0-4095. Very often the PLC program uses this value as a value
between 0-100, 0-1000, 0-10000 etc. A conversion through multiplication and division gives a loss of
information as there is no floating point arithmetic.
If outputs Y94 is high the value of analog inputs 1-4 will be presented as 0-1000 instead of 0-4095.
If outputs Y95 is high the value of analog outputs 1-2 will be given as 0-1000 in stead of 0-4095.
Analog Channels
INPUTS OUT PUTS
Y94 Y95 Presentation range of signal:
0 0 0 - 4095
1 1 0 - 1000

Mode information:
Input X12-X13 give the mode number (0-3) so the PLC can check if right mode, fitting to the program, is
set on the ACTANA board.
X12 X13 Mode no. X14 PLC type X15 Type of board
0 0 Mode 0 0 Series H 0 Actana - S
0 1 Mode 1 1 Series EM 1 Actana - F
1 0 Mode 2
1 1 Mode 3

224 Copyright Actron AB 1994


Additional part H200 -H252

Digital Inputs (+100 * slot no) : mode 2 and 3 Digital Outputs (+100 * slot no) : mode 2

X0 Fast direct input 1 information hold Y80 Logic output 1 (condition 1 for DOUT1)
X1 Fast direct input 2 information hold Y81 Logic output 2 (condition 2 for DOUT1)
X2 Fast direct output 1 information hold Y82 Logic output 3 (condition 1 for DOUT2)
X3 Fast direct output 2 information hold Y83 Logic output 4 (condition 2 for DOUT2)
X4 (Analog) sample input information hold Y84 Logic expression definition 1
X5 Read Sampling Start info Y85 Logic expression definition 2
X6 Not used Y86 Logic expression definition 3
X7 CPU Watch dog , 3 - 4 Hz Y87 Logic expression definition 4
X8 Error on analog input 1 Y88 Control of direct output DOUT1
X9 Error on analog input 2 Y89 Control of direct output DOUT2
X10 Error on analog input 3 Y90 Self hold definition DOUT1 (1 = DOUT1, 0= TRUE)
X11 Error on analog input 4 Y91 Self hold definition DOUT2 (1 = DOUT2, 0= TRUE)
X12 Mode number information bit 0 (LSB) Y92 Filter time definition analog input 1
X13 Mode information bit 1 Y93 Filter time definition analog input 2-4
X14 H series on switch Y94 Conversion factor definition analog input 1-4
X15 Actana-S / Actana-F info on switch Y95 Conversion factor definition analog outputs

Mode 3
Y80 Logic output 1 (condition 1 for DOUT1)
Y81 Logic output 2 (condition 2 for DOUT1)
Y82 Logic output 3 (condition 1 for DOUT2)
Y83 Logic output 4 (condition 2 for DOUT2)
Y84 Logic expression definition 1
Y85 Logic expression definition 2
Y86 Logic expression definition 3
Y87 Logic expression definition 4
Y88 Sampling interval 1
Y89 Sampling interval 2
Y90 Repeated high precision sampling control
Y91 Internal sampling control
Y92 Filter time definition analog input 1
Y93 Filter time definition analog input 2-4
Y94 Conversion factor definition analog input 1-4
Y95 Conversion factor definition analog outputs

ACTANA-S1 / ACTANA-1 ACTANA-S2 / ACTANA-1


Inputs Outputs
I/O-specification Current or voltage Current or voltage
Range 0-10 V , 0-1 V DC, 0-20 mA, 4-20 mA 0-10 V , -10 ON +10 V DC, 0-20 mA, 4-20 mA
Impedance
Resolution 12 bits +/- 0.5% 12 bits +/- 1%
Update time < 1 program cycle < 1 program cycle
Min load current
Amount of channels 4 inputs 2 outputs
Max. top current
Insulation inputs potential free (750 V between the channels)
Current CH1 70 mA 70 mA
consump CH2 - -
tion CH3 180 mA 180 mA

Copyright Actron AB 1994 225


Additional part H200 -H252

9.7 Operator Terminals:


There are basically two types of operator terminals:
- Serial port operated terminals
- Bus operated terminals. E.g. The Actterm-H terminal.
The two types have advantages in different cases and sometimes suitable for different applications and
customers.

Serial port terminals Bus terminals, (Actterm-H)


Occupies the serial port of the CPU Yes No
Long distance serial connection Yes, as long as RS232 is OK Limited to 3 m from the CPU.
Fast response on key functions A small delay due to the serial Yes, Equivalent to normal inputs.
protocol (Proper machine hand control.)
Fast display update A small delay due to the serial Yes, Display gives fast and LEDs
protocol. give simultaneous update.
Works for other types Yes, An advantage for end No, works only for H200-252
(brands of PLC) users, who run different PLCs and H Board
Same programming tool, PLC and No, different programming Yes, Done by Actsip/ActGraph
terminal
Same documentation, PLC and terminal No, different documentation Yes, the documentation is not
possible to mix up.
Extra memory for data storage No Yes, up to 32 k words.
Main advantages End users with different PLC Serial produced machines or
brands using long distance when control comfort, proper
between machine and terminal hand control and documentation
is important. Also when large
extra memory is needed.

9.7.1 Actterm-H

226 Copyright Actron AB 1994


Additional part H200 -H252

ACTTERM-H TERMINAL
FOR HITACHI HB/H200

ACTTERM-H

7 8 9

7 8 9 F1 STOP START

4 5 6

4 5 6 F2 PROG
1
PROG
2
PROG
3
PROG
4

1 2 3

1 2 3 F3 PROG
5
CONV
LEFT
LIFT
Up
CONV
RIGHT
PROG
5
CONV
LEFT
LIFT
Up
CONV
RIGHT

CLEAR 0 ENTER

CLR 0 ENT F4 LIFT


Down Texts are put in from back side

Copyright Actron AB 1994 227


Additional part H200 -H252

Features:

-32 keys, all free to use as function keys. Out of these 12 are redefined as numeric keys and CLEAR,
ENTER. All keys are reflected on bit memories and they can be used just like an input in the
PLC program.
- 16 LED's. Each one reflects a bit memory in the PLC memory. They can be used just like an output in
the PLC program.
- Text memory for 32 k alpha numeric characters, which is divided into different texts, to be shown on
the display
- Expansion memory. Memory with battery back up for storage of up to 16 k 16-bit words. (For
Statistics, History storage, recipes etc.) Can be used as a large extension of the ordinary PLC
memories.
- Display for texts and values. The display is an intensive vacuum florescent type (high quality and very
easy to read in any light).
- Buzzer to call for attention or to amplify the response from the keys.

9.7.1.1 Start up

9.7.1.1.1 Start the program


Start the programming with Actsip-H or Actgraph.
Type "H ACTTERMH" in Actsip-H or "G ACTTERMG" in ActGraph
(Store the project directly under another name.)
A help project (ACTTERMH) is loaded. This consists of a number of program blocks, which handle the
communication with ActTerm-H. As a standard these blocks are hidden as this is a ready function, which has
nothing to do with the user project. These program blocks will follow the project and they must not be
modified. (These will only load the project to a small extent.).
Ladder programming (Actsip-H) Grafcet programming (Actgraph)
System Program Alloc ation Printout Files Communication Setup

Macro ACTTERMH
(Ladder bloc ks.)

DRAW MODE 0060 (0060) Offline H-200 Internal 7.5 Ks

In the help program there are pre defined a number of inputs, outputs and internal memories of both bit and word
type. These can directly be referred to as names in clear text. (See appendix A) E.g.
DISPLAY Defines which text/value display to be shown.
VALUE1 - VALUE6 Defines what values to be displayed.

9.7.1.1.2 Connecting (adding) Actterm-H to an existing project.


If the project already is started, you can load a macro named ACTTERMH. (In Actsip-H, go to <Files-Load
Macro>. In ActGraph press F10 and choose Macro. Place the macro first in the program. Answer Yes to the proposed
addressed if they are not already occupied. To get all short comments belonging to ActTerm-H, load the macro
"TERMDEF" and remove it directly afterwards. (the comments will remain.)

228 Copyright Actron AB 1994


Additional part H200 -H252

9.7.1.1.3 How to configure the System


The project is from the beginning configured for a HB (H20-H64). If ActTerm-H shall be connected
directly to such a PLC type, the configuring can be skipped as it is configured already from the beginning
in the pre defined project.

Configuring.
Not needed for H20-H60 without expansion.

If it shall be connected to a H200 unit or if it shall be connected to the expansion


modules on series HB you must change the configuration.
Go to "Setup-PLC", choose the right CPU and memory. Thereafter go to the I/O-
configuration and set up the valid In- and Output modules.
ActTerm-H is defined by "4/4W" and it is already placed on unit 5, slot 0 and it
shall not be moved. (This can sound peculiar as there are not 5 units in the system
Example but the H-series realises this by itself and it places internally the module on the
right place.)
The advantage is that you never have to move the module in the configuration.
Thereafter you have to fill the empty slots in a rack which is used with
Observe! "Dummy 16" in the configuration.

Max. amount
of slots used 0
1
0
1
with H200/H252 2
3
2
3
is 15. 4 4
5 5
(28 for H252). 6 6
7
2 x BSM9 is 8
7
8
impossible. 9 9

0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

Upper left: Basic configuration. The configuration never need to be changed if you connect
ActTerm-H to a HB without expansion unit.

Upper right: If you have a HB and you connect an expansion module between the base unit and
ActTerm-H, the expansion module is defined in the configuration without changing anything
else.

Lower left: If you connect ActTerm-H to a H200-system you have to configure the system in the usual way
through changing and adding modules. Empty slots are filled with "Dummy 16".

Lower right: H200 base unit with 4 modules plus CPU in a BSU-7 with room for 4 modules exclusive CPU.
Two empty slots must be filled up. In the expansion unit there are 2 slots but room for 4.
Therefore 2 "Dummy-16" are defined in the last slots of the rack.

Copyright Actron AB 1994 229


Additional part H200 -H252

Now you can start to program:

9.7.3.3 Programming

9.7.3.3.1 How to use the function keys

Each function key has a name when the system is started (F1 - F20). In the program these can be named by its
relevant name.

7 8 9

7 8 9 F1 F5 F9 F13 F17
4 5 6

4 5 6 F2 F6 F10 F14 F18


1 2 3

1 2 3 F3 F7 F11 F15 F19


CLEAR 0 ENTER

CLR 0 ENT F4 F8 F12 F16 F20


Beside F1 -F20 there are the keys ENTER, CLR and "0" - "9". (Even these keys can be used as function keys.

If you want an inverted key board 1 2 3


set the flag KEY_INV high. The figures on the key 4 5 6
board then change place. 7 8 9
0
Often it is suitable to rename the function keys in the project to more relevant names. This is done in the menu
"Allocation-Enter/Change". E.g. specify "F5" and following allocation list occurs:

Original names: Change the names to:


. .
F5 */ START
F6 LIFT UP
F7 LIFT DOWN
F8 HEAT ON
*/ Please avoid changing the name of .
F5 and LED 1 in Actgraph versions .
2.20A-3.0

230 Copyright Actron AB 1994


Additional part H200 -H252

(When you have decided the function of the keys


STOP START you can use a common design program and type
texts and draw symbols on the new key board
layer. If you have a laser printer available you
PROG PROG PROG PROG can easily make a very proper layer.
1 2 3 4 Cut it out and push it into a pocket under the
transparent foil of the keyboard.)
PROG CONV CONV
5 LEFT
LIFT
RIGHT
Now the keys have relevant names and these
Up
names can be used in clear text in the program.

HEAT HEAT LIFT


OFF ON Down

Copyright Actron AB 1994 231


Additional part H200 -H252

9.7.3.3.2 How to use the LEDs

Each LED has a name when the system


is started (LED 1 - LED 16, Observe
that there is a space between "LED" its
number). These can be used directly in
the program by using these names.

Example:
When you push the key "LIFT UP" the Lift motor
START STOP shall start if the end position "LIFT TOP" in not
closed.
LIFT As long as the lift moves, the Light emitting diode
UP
(LED 2) on the keyboard will light.
LIFT GRIP
DOWN LIFT LIFT M1
UP TOP LIFT+

HEAT HEAT
ON OFF LED 2

9.7.3.3.3 How to use the Buzzer


If you activate the flag BUZZER you will hear a sound from the terminal. A common use for this is to amplify
the sound from a key.
In this case, connect (in the program) the "coil" BUZZER directly to the "contact" KEYPRESS, which is
activated when any key is pressed. Another common use is to call for alarm attention.
In this case, connect the ALARM "contact" in serial with the internal time base "0.1 second" to BUZZER. You
will then achieve a sound which calls for attention.

9.7.3.3.4 How to use the DISPLAY


The principal is that each Display (the mix of texts and values, which are shown on the display in a certain
moment) is allocated to a number. When "DISPLAY" changes value, the display on the terminal will change to
the Display which has the new number.

9.7.3.3.5 How to type the texts and transfer the texts to the terminal
Typing text:
The texts are written in Actsip-H or Actgraph through
System Program Alloc ation Printout Files Communication Setup
opening the text "Type In Window" (Press F2 and choose
CONDI Nr. Text
ACTTERMH and the window on the screen will open. (see TION 1 Text no. 1 .....
next page) This is a short list of the existing texts and the 2 Adjust the le....
3 Alarm no. 2 .....
number they have. Choose the text number from the list and 4 Set value is....
5
type <Enter>. Reply "No" on the question "Is this text for 6
7
printer?" A new window is opened with the same with as the 8
9
display screen. Type the text as you want it to look like on the 10
11
screen. When you are ready, press ESC and store your text. 12
13
14
When you have created all the texts press ESC. If you are 15

Mark Searc h Hor-Exp Ver-Exp Goto + Comm - Comm Erase Comm ACTTERMH
232 Copyright Actron AB 1994
Additional part H200 -H252

ON-line you will get a question if you want to transfer the texts to the terminal.

Copyright Actron AB 1994 233


Additional part H200 -H252

9.7.3.3.6 Transfer the texts


You must be ON-Line and the PLC must be in RUN mode.
Enter reply "Yes" to the question after typing the texts or choose "Communication-Texts to ActTerm-H" and the
texts are transferred.
The texts are transferred while your application is still running.

9.7.3.3.7 Documentation:
Choose "Printout-Texts ActTerm-H" .

9.7.3.3.8 Display with only Text


Example
This display consists only text, namely the text: ACTTERM-H TERMINAL
ACTTERM-H TERMINAL FOR HITACHI HB/H200
FOR HITACHI HB/H200

9.7.3.3.9 Text typing


Ladder programming (Actsip-H) Grafcet programming (Actgraph)

9.7.3.3.10 How to program a pure text Display


If the number of the display is 12 it is called from the program in the following way: In ladder diagram
programming, open an arithmetic box. The condition for showing the text is given in contact symbols in front of
the box. Type "DISPLAY = 12" in clear text in the box.
In grafcet programming, type "DISPLAY=12" in an action box in a graph or an independent action box.
Ladder programming (Actsip-H) Grafcet programming (Actgraph)

234 Copyright Actron AB 1994


Additional part H200 -H252

9.7.3.4 Display with text and values


Example
This display is a mixture of text and a
value: Number of produced
The text is: items is 2341 pieces
Number of produced
items is ---- pieces
The value is a register or a counter in the
PLC, which counts items.

Copyright Actron AB 1994 235


Additional part H200 -H252

9.7.3.4.1 How to make a display with text and values


Display no 7
Open the Type-In Window with <F2>, Number of produced
<ACTTERM>. items is @@@} pieces

On the position where you want the value


you type "@" instead of the figures.
Instead of the last figure you type "}".

When you are ready, press ESC.

The symbols that are used to define where the values are on the display are @, } and ]. Normally you find these
on your keyboard as second choice alternatives (the key together with the Alt-key). If they are not present on
your keyboard, hold down the Alt-key and press following number combinations:
<64> for @
<125> for }
<93> for ]

9.7.3.4.2 How to program a display with text and values


If this display e.g. has number 7 and the value is "ITEMCOUNT" (e.g. the register WR100) the PLC-program is
activated in the following way:

Ladder programming (Actsip-H) Grafcet programming (Actgraph)

The first value, from top to bottom (from left to right) is called "VALUE1". This name is already written into
the help project (ACTTERMH) and therefore the name can be written directly in clear text..
The second value is called "VALUE2", the third is called "VALUE3" etc.

A value can consist of 1-5 figures, which are shown on the display. The amount of figures that are shown is decided
from the number of "@" (together with the end character) that are written in the text.
If the value is a binary value the end character is "}" and if the value is represented as a BCD value the end
character is "]".
(Most values in the H series are binary values. Some values, e.g. the real time clock are given as BCD values.)
e.g.
... @@@@} ... means show a binary value with 5 digits.
... @@@] ... means show a BCD value with 4 digits.
... @@} ... means show a binary value with 3 digits.

236 Copyright Actron AB 1994


Additional part H200 -H252

... @} ... means show a binary value with 2 digits.


... } ... means show a binary value with 1 digit.

Copyright Actron AB 1994 237


Additional part H200 -H252

9.7.3.4.3 How to show values with separation characters


If you want a separation character in a value, (e.g. "." for a decimal dot, ":" in a clock value etc.) the separation
character is written between the "@"-characters. E.g. if you want to the text "THE TIME IS 18:35" where 18:35
is a value:
THE TIME IS @@:@}
If you want to show a five digit binary value with dash-characters in-between you will write:
@-@-@-@-}

Temperature is 23 C
The Time is 17:35

Example.
This display is a mixture of text and two values:
The text is: Temperature is 23 C
Temperature is -- C The Time is 17:35
The time is --:--
Value 1 is a register in the PLC, which contains
the temperature and value 2 is a register, which
contains the clock (Hours, Minutes)

Ladder programming (Actsip-H) Grafcet programming (Actgraph)

If this display has number 84 and the first value is Register WR101 "TEMP" and the second value is register
"HOUR,MIN", which contains the hour/minute from the real time clock the PLC is activated in the following
way:
Ladder programming (Actsip-H) Grafcet programming (Actgraph)

238 Copyright Actron AB 1994


Additional part H200 -H252

Example:

Real Display Type in

*** ACTRON AB ***


*** ACTRON AB ***
19@]-@@-@] @@:@] @]
1992-11-30 14:35 34

YEAR and SECOND are two digit values. Programming


MON,DAY and HOUR, MIN are four digit values.
MON, DAY are separated with "-" and HOUR, MIN
are separated with ":".
The values are represented as BCD values, thus the
end character is a "]".

9.7.3.4.4 Rolling text: (Scroll)


When two rows are not enough to show all the message, the display can scroll up and down. You can therefore
write a text which is much longer than the size of the display.
A text which is made scrolling should not contain any values.

Ladder programming (Actsip-H) Grafcet programming (Actgraph)

When this text is called from the


program it can move up and down 1 2 3 F1
(scroll) if you connect conditions to
the pre defined flags "TEXT UP" 4 5 6 F2
and "TEXT DOWN" 7 8 9
If you e.g. want to use F3 to scroll TEXT
TEXT
the text up and F4 to scroll the text CLR 0 ENT
down the program will look as
follows:
Ladder programming (Actsip-H) Grafcet programming (Actgraph)

Copyright Actron AB 1994 239


Additional part H200 -H252

240 Copyright Actron AB 1994


Additional part H200 -H252

9.7.3.5 How to preset a value

Level is 3361 mm
Set maximum 6700 mm

Programming:
Ladder programming (Actsip-H) Grafcet programming (Actgraph)

"KEYIN" contains always a value, which is typed in on the numerical key pad. The "CLR"-key resets KEYIN
automatically.
To give a value, which is displayed when you start the pre-set the word "KEYINIT" is available. If you connect
KEYINIT to a value in the moment you change the display KEYIN will start with this value.
In the example above you start the pre-set with the old value of MAX_LEVEL before you start to give in another
value.

9.7.3.5.1 Texts that move and change

To enable changing of a part of a text on a display without changing the rest there is an alternative to the
DISPLAY command. This consists of two commands:
"TEXT" and "TEXTPOS"
TEXT specifies as DISPLAY the number of the text. These texts are created exactly as the DISPLAY texts
described above.
TEXTPOS specifies the position on the display where the text shall start.

01234567890123456789
01234567890123456789

Example. If you want following display:

Copyright Actron AB 1994 241


Additional part H200 -H252

WATERLEVEL IS: 1245 mm


The level is xxxxxxxxxxxxxx

242 Copyright Actron AB 1994


Additional part H200 -H252

Where XXXXXXX either is "LOW",


"NORMAL" , "HIGH" or "CRITICAL"
If the DISPLAY no 68 looks as follows:
"WATERLEVEL IS: 251 mm
The level is "

TEXT no 69 is "LOW"
TEXT no 70 is "NORMAL"
TEXT no 71 is "HIGH"
and TEXT no 72 is "CRITICAL"

The position of the first X is 29,


so TEXTPOS =29

Text that moves:


Let the text start and end with <space> and type
e.g. " ACTRON AB ":
TEXT = no
TEXTPOS = display counter

and count up or down the "display counter" within the area (0-40) Then the text moves on the display.

Extra updating of Display or Text:


If you want an extra update of a complete Display or a Text in a display without changing the number of the
DISPLAY or TEXT, you can use two flags:
Activate DISPUPDATE to update the display.
Activate TEXTUPDATE to update a text on the display.

Quick updating of the Display:


When you have very large programs the display will update slower than for small or medium size programs. If you
want a quick display update you can activate a flag which is called QUICKDISP. Then the display will be even
faster than the normal update for a small program. Observe that if this flag is activated the program after the
ActTerm-H macro will not be executed for approximately 100 ms.
If the application needs a faster response you should either not use the QUICKDISP command, place the time
critical part of the program before the ActTerm-H macro or use an interrupt routine for the critical part.

Control of the display:


To control the special modes on the display use the command CONTROL. Set CONTROL equal to the
display codes, which are:
(Cursor backwards =8 )
(Cursor forwards =9 )
(Line feed =10 )
(Carriage return =13 )
Cursor Off = 14
Cursor On = 15
Reset =20 (Display goes back to default)
Clear Home =21 (Clears display, Returns cursor to upper leftmost position)
(Cursor Home =22 Returns cursor to upper leftmost position)
Dimmest = 28 (12% intensity of the display)
Dim = 29 (25% intensity of the display)
Bright = 30 (50% intensity of the display)
Brightest = 31 (100% intensity of the display)
etc. (see special codes for the display)
Example. Set the CONTROL to this value for one program cycle.

Copyright Actron AB 1994 243


Additional part H200 -H252

This activates the cursor. There is also another flag, which is


called CLEAR DISP. When this is high it turns off the
DIF
display.

9.7.3.5.2 How to write in the expansion memory


To write in the expansion memory you must put the value to be stored into the word WRITEVALUE and the
address in the expansion memory in WRITEADDR. The writing is executed when the flag WRITEMEM is set
high.
WRITEMEM is reset automatically after writing. If only one value is to be written you should only activate
WRITEMEM once (edge condition or similar)
Expansion
memory
16888

WRITEADDR
Value
from the PLC
WRITEVALUE

Ladder programming (Actsip-H) Grafcet programming (Actgraph)


write
condition WRITEADDR = address WRITEADDR = address
WRITEVALUE = value
WRITEMEM = 1 WRITEVALUE = value
P WRITEMEM = 1

If you shall write a number of values, e.g. copy a recipe to the expansion memory you can do as follows:
Ladder programming (Actsip-H) Grafcet programming (Actgraph)
WR RD_ADR
WR WRI_ADR INDIRECT WR RD_VAL
WR WRI_VAL
WRITE IND
Where "start address1" is the first address in the expansion
pointer = 0
memory, "start address2" is the lowest of the values that are WR RD_ADR = start address2+ pointer
going to be copied to the expansion memory. "pointer" is WRITEVAL
WRITEADR
= WR RD_VAL
= start address1 + pointer
reset before writing and the write condition shall go false WRITEMEM
pointer =pointer+ 1
when POINTER has reached the maximum amount of
values to be copied.
To make indirect addressing in Grafcet programming,
load the macro INDIRECT. This performs reading in
the WR area on address WR (0+WR RD_ADR) to the
value WR RD_VAL.

9.7.3.5.3 How to read in the expansion memory

244 Copyright Actron AB 1994


Additional part H200 -H252

To read from the expansion memory you must put the read address in the expansion memory in the word
READADDR and thereafter read from the word
Expansion READVALUE. The reading is executed when the flag
memory READMEM goes high. READMEM is reset automatically
16888 after reading. If only one value shall be read you should only
activate READMEM once (edge condition or similar).
READADDR The value you read is not available in the word READVALUE
Value
to the PLC until one PLC program cycle after the READMEM command
READVALUE has been executed. Therefore a flag is available to indicate when
it is OK to read. This is called READ READY. Thereafter it is
automatically reset.

Copyright Actron AB 1994 245


Additional part H200 -H252

Ladder programming (Actsip-H) Grafcet programming (Actgraph)

If you want to read a number of values, e.g. copy a recipe from the expansion memory you can do as follows:
Ladder programming (Actsip-H) Grafcet programming (Actgraph)
WR RD_ADR
WR WRI_ADR INDIRECT WR RD_VAL
WR WRI_VAL
WRITE IND
P POINTER = 0
READADDR = START ADDR + POINTER
STARTADDR is the first address in the VALUE(POINTER) = READADDR
READMEM = 1
expansion memory, VALUE is the lowest of POINTER = POINTER + 1

the values that will be copied from the POINTER = MAX AMOUNT

expansion memory. POINTER shall be reset To make indirect addressing in Grafcet programming, load
before the reading and the read condition shall the macro INDIRECT. This performs writing of the value
be reset when the POINTER has reached the WR WRI_VAL in the WR area on address WR (0+WR
maximum value to be copied. WRI_ADR) when the flag WRITE IND is set..
9.7.4 ActTerm-H with printer port

9.7.4.1 Start the program


Start the programming with Actsip-H or Actgraph.
Type "H ACTPRTH" in Actsip-H or type "G ACTPRTG" in ActGraph
to start Actgraph for ActTerm-H programming.

9.7.4.1.1 Typing printer text


The texts are written in Actsip-H or Actgraph
System Program Alloc ation Printout Files Communication Setup
through opening the text "Type In Window" (see
CONDI Nr. Text "Typing text" above). Choose the text number
TION 1 Text no. 1 .....
2 Adjust the le.... from the list and type <Enter>. Reply "Yes" on
3 Alarm no. 2 ..... the question "Is this a printer text?" A new
4 Set value is....
P 5 Printer text.... window is opened with 78 character width. Type
6
P 7 Time @@:@]...... the text as you want it to look like on the printer.
8 When you are ready, press ESC and your text
9
10 will be stored. When you have created all the
11
12 texts press ESC.
13 The text will be marked in the text list with a "P"
14
15 as in Printer.
Therefore you can see from the list that this is a
Mark Searc h Hor-Exp Ver-Exp Goto + Comm - Comm Erase Comm ACTTERMH
printer text.

9.7.4.1.2 Text print out


E.g. printer text no 15
OVER PRESSURE ALARM DAY- MONTH @@-@] TIME @@:@]
Pressure level @@@} mBar
Emergency call 026-7529290
The text is printed in the format you want the printout. The definition of values is done in the same way as for
the Display .

246 Copyright Actron AB 1994


Additional part H200 -H252

Up to 6 values can be printed in the same printout. If more values are needed, make two or more printer texts to be
printed after each other.

Copyright Actron AB 1994 247


Additional part H200 -H252

9.7.4.1.3 Programming of a text printout


Use the command "PRINT" instead of "DISPLAY".
If the number of the print text is 12 it is called from the program in the following way: In ladder diagram
programming, open an arithmetic box. The condition for showing the text is given in contact symbols in front of
the box. Type "PRINT = 12" in clear text in the box.
In grafcet programming, type "PRINT=12" in an action box in a graph or an independent action box.
Ladder programming (Actsip-H) Grafcet programming (Actgraph)

PRINT = 12

PRINT = 12

9.7.4.1.4 Programming of mixed text and value


If this text printout is no 15, value 1 is "MON,DAY" (month,day from the real time clock) , value 2 is
"HOUR,MIN" and value 3 is the register "PRESSURE" (e.g. analogue input WX100) you program in the following
way:

Ladder programming (Actsip-H) Grafcet programming (Actgraph)


System Program Allocation Printout Files Communication Setup

CONDI
TION

DRAW MODE 0060 (0060) Offline H-200 Internal 7.5 Ks


+. Off-line Series H

OVER PRESSURE ALARM DAY- MONTH 03-04 TIME 14:32


Pressure level 1579 mBar
Emergency call 026-7529290

Detecting when the printer is ready


Sometimes you need to know when the
printer is ready to begin the next printout or when PRINT = 7
you can perform the next display.
(The Display and the printout use the same values /PRINTING
and do not work in parallel.) Therefore there is a PRINT = 15
VALUE1 = MON,DAY
flag available, called "PRINTING". This is high VALUE2 = HOUR,MIN
when the printer is active. On the right is a typical VALUE3 = PRESSURE
example, where printouts follow after each other.
/PRINTING
PRINT = 12
VALUE1 = TOT AMOUNT

248 Copyright Actron AB 1994


Additional part H200 -H252

How to avoid unnecessary updating of the display


PRINT = 7
After each printout the display is updated automatically. If + DISP STOP
you have several printouts in a row this could be /PRINTING
unnecessary. Therefore you can use the flag. "DISP PRINT = 15
VALUE1 = MON,DAY
STOP" to freeze the display during the printouts. VALUE2 = HOUR,MIN
VALUE3 = PRESSURE
/PRINTING
PRINT = 12
VALUE1 = TOT AMOUNT
- DISP STOP
Updating of a printout (repeating):
If the last printout shall be repeated (with new values) e.g. in a logging application, you can use the flag
"PRINTUPDAT". (As PRINT does not change number there will be no printout otherwise.)

Reset the printer:


If the printer is OFF-Line, the paper is out or similar, System Program Alloc ation Printout Files Communication Setup
most printers give a signal back to the terminal, which tells CONDI
TION PRINT = 15
the terminal to wait for the printer. In many cases it is VALUE1 = MON,DAY
VALUE2 = TIM,MIN
recommended to make a time check of the printout and VALUE3 = PRESSURE
PRINT
after the time has expired reset the printer and give an ING
TIME2

alarm to call for attention. 10.0

The reset flag is named "RES PRINT". E.g.


TIME2
RES PRINT = 1
DISPLAY = 18
Quick updating of the Printer: BUZZER = 1

When you have very large programs the printer will DRAW MODE 0060 (0060) Offline H-200 Internal 7.5 Ks
print slower than for small or medium size programs.
If you want a quick printout you can activate a flag which is called QUICKPRINT.
Observe that if this flag is activated the program after the ACTPRINT macro will not be executed during
the printout. If the application needs a faster response you should either not use the QUICKPRINT command,
place the time critical part of the program before the ActTerm-H macro or use an interrupt routine for the
critical part.

8 Digit type in:


In some applications it is useful to type in more figures than 4 or 5. Though using two words "HIGH WORD"
and "LOW WORD" and the flag "8 FIGURES" it is possible to type in 8 figures. The value is divided. The 4 most
significant figures are in "HIGH WORD" and the 4 least significant in "LOW WORD". The value is represented in
BCD-format and "]" must therefore be used as the end character when the text is typed in.
CONDI
TION

Where the text can e.g. look as follows following:


Text no 21: TYPE PRODUCT NO:
@@@]@@@] Press
ENTER

9.7.4.1.5 Connection of a printer


If ActTerm-H is equipped with a printer option there is a 25 pin D sub connector on the back side of the
terminal. The printer cable is connected here. The printer port is Centronics compatible. This means that most desk
top printers (all PC compatible) can be connected directly with a standard parallel printer cable. It is also possible to
connect panel printers. These printers normally require a special cable. Actron can supply one standard panel printer,
ACTPRINT. This is connected with a cable ACTCAB-4/1. This is a thermo printer with 24 characters per row. It
must also be connected to external 5 V power supply.

Copyright Actron AB 1994 249


Additional part H200 -H252

9.7.4.2 Mounting

ActTerm-H is connected to the PLC with an expansion cable, e.g. CNM-06. The total distance should not
exceed 3.0m total, including the length of the rack backplane.
The panel has 8 screws on the back housing. Remove the housing. Put the panel in from the front side and
mount the housing from the back . The panel is now installed.

9.7.4.2.1 Typical mounting of the PLC in a housing

Back side of the door Back side of the door

PLC (H200) PLC (series HB)

-
Expansion
Expansion - cable
cable

Inside housing Inside housing

Back side of Back side of


the terminal the terminal

Back side in a housing:


Back side in a housing:

Back side of the door Back side of the door

Back side of
the terminal
PLC (series HB)

-
Expansion
cable

Expansion
cable

Back side of
the terminal

PLC (H200)

Inside of a housing door Inside of a housing door

9.7.4.2.2 Power supply of ActTerm-H


ActTerm-H has a screw connector on the back side for external power supply of 10-30 V AC or DC.

Power supply:
The power could e.g. be supplied from the external 24 V supply on the PLC.
If this already is heavily loaded a simple external 24 V power supply is recommended.
The continuous 24 DC current consumption is max. 200 mA. This means that the external (on screw connector)
power supply can be used as long as the total load does not exceed the total capacity. (400 mA for HB and
H200).

250 Copyright Actron AB 1994


Additional part H200 -H252

9.7.4.2.3 Measurements
The hole in the panel shall be 199
187 mm (High) x 199 mm (Wide). The depth is 50 mm
187

Copyright Actron AB 1994 251


Additional part H200 -H252

9.7.4.2.4 Hints when using ACTTERM-H

with Hitachi series H200 and Hitachi series H Board Type

Cable length:
For the H board and H200/H250/H252 you can always safely use a 1.0 m expansion cable.
You can use up to 3.0 m expansions if you apply good shielding. (according to our tests)
Observe that when you calculate this length it shall be the total distance from the CPU. (incl. bus and
cable)
PLC base rack
total length 3.0 m

ACTTERM-H

PLC expansion

Slot occupation:
ActTerm-H occupies one slot. (even if it is not connected in the slot space)
That means that the maximum number of modules for H200 and H250 is 15.
For a H252 the maximum will be 28.

Set-up:
The set-up is described in the manual. Please do not forget to define empty slots as "Dummy 16", which
says "16" in the configuration and not "Dummy 0", which is blank in the configuration.
A H board PLC is always X48,Y32,16
A HL board PLC is always X48,Y32,LINK or X48,Y32,REMOTE depending on the jumper position.

Connection to H board + expansion module:


If an ActTerm-H is connected to a H board type via an expansion module type H16, there should not be
more than one expansion module and the expansion module and the ActTerm-H must have different power
supplies.

ACTTERM-H

252 Copyright Actron AB 1994


Additional part H200 -H252

9.8 Communication modules:

9.8.1 Remote communication (Remote modules):


RIOH-TM and RIOH-TL
Slave station 0 Slave station 1 Slave station 2

3 channels 3 channels 2 channels

Channel no Channel no Channel no

Twisted pair wire with a total lenght of 300 m


The remote units are connected with a twisted pair wire according to the drawing
(for detailed connection description, see description which follows the module.)

RIOH-TM is placed in the main unit and RIOH-TL in the slave units.
Max. 8 slave units can be connected in a chain.
The address area is divided into eight channels.
Each channel correspond to a slot in the slave rack. The channels are numbered in order from the first rack
to the last one and the switches on the modules are set according to this.

On RIOH-TL there are two switches. The first specifies the first channel in the rack and the second
specifies the number of channels (I/O modules) in the rack,

The CPU in the master rack sees the inputs/outputs in the slave rack exactly as they where in the master
rack with the difference that the address number tells that it is a remote module.
E.g. output 12 in the second module ( channel 4) in the remote station 1 according to above: Y10112. See
also addressing on page 9.

Each master rack can


Master station contain up to 4 remote
chains.

9.8.2 Current consumption RIOH and IOLH-T


RIOH-TM RIOH-TL IOLH-T
CH1 (5 V) 130 mA 150 mA 150 mA
CH3 (24V) 20 mA 20 mA 20 mA
CH3 (24 V) 5 mA 5 mA 5 mA

9.8.3 General specification RIOH and IOLH-T


RIOH-TM RIOH-TL IOLH-T
Number of connections 8/Master station x 4 systems 8 modules/system x 2
Number in/ outputs 128 x 4 systems 128/8 bits/word x 2
systems
Update time 5 ms 10 ms x amount of stations
Baud rate 768 k bps

Copyright Actron AB 1994 253


Additional part H200 -H252

Error check Inverted double transmit.

254 Copyright Actron AB 1994


Additional part H200 -H252

9.8.4 Link communication


IOLH-T:

Write area Read area Read area


Read area Write area Read area

Read area Read area Write area

Program example:
PLC 1 shall read information from the two input modules on PLC 0 and reflect these on the two output
modules. PLC 0 shall read the input module on PLC 1 and reflect this on memory word WR100. This shall
also be reflected on the output module on PLC 2.

Program in PLC 0 Program in PLC 1 Program in PLC 2

The link area for each PLC must be set under PLC- Setup in the programming software.
You can have two different link chains from a PLC.

CPU with 2 link chains

Link chain 1

Link chain 2

With the T-LINK-module (for H250-H252) the address area can be increased to 1024 words/ 16 k bits. It is
also possible to program the PLC over the Link system. With LINK-02H you can connect to a net together
with H300-H2002. The connection will be to a LINK-H-module.
Copyright Actron AB 1994 255
Additional part H200 -H252

256 Copyright Actron AB 1994


Additional part H200 -H252

9.8.5 CTH High speed counter module:


Two phase pulse encoder Red (Voltage supply)
with open collector output
Green (Phase B)
White (Phase A)
Black (Reset)

PLC (CTH module)

Up counting Down counting Phase A and B decides


the rotation direction.
Phase A
(Up- /down count)
Phase B Reset is done with the M
Phase B 90 degrees Phase A 90 degrees input.
When the encoder rotates in one direction (counts up) the phase A pulse comes 90 degrees before phase B.
(see above). When the direction is turned (down count) phase B comes 90 degrees before A. Therefore the
CTH can always keep track of the direction.

External Reset No Reset pulse


Reset pulse pulse (connected to 0 V)
from the encoder

CTH CTH CTH

Principal of the high speed counter:


There is a counting register. This counts up and down according to the encoder pulses.
To enable the counting there is an Enable bit E (Y88), which must be set high. To set the counter value
there is a counter set register (WY2). This is copied to counter value when the Counter Preset bit CP (Y80)
goes high.
The counter value is always compared to the content of four Comparison registers (CU0, CU1, CU2, CU3,
with addresses WY3, WY4, WY6, WY7). The result of these comparisons is in the eight bits CU0 = (X4),
CU0 > (X5)..........,CU3 >, (X11).

Counter set register


CP Counter set register is copied to
the counter when CP goes high
E
Counter value Compares the values
Enables the Counter Result to the flags

Flags, which
indicate the
Comparison position
values

Copyright Actron AB 1994 257


Additional part H200 -H252

By using a jumper on the board you can choose between BCD counting and binary counting in the counter
value (see instructions in delivery)

258 Copyright Actron AB 1994


Additional part H200 -H252

Disposition of in- and output words of the CTH:

The Area is divided into two input word and 6


output words.
(shall be defined in <Setup-PLC> as FUN3)

Input word 0 (WX0) and output word 5 (WY5)


contains the output bits (flags).
Input
The most important output bits are E , which words Output
enables counting, ALL CLR, which resets the words
counter etc. and CP, which presets the counter
value.
The most important input flags are =CU0,
>CU0,......., >CU3. which give the counter
position in relation to the values in the compare
registers.

Only word WX0 (bit x0 -X15) and WY5 (bits


Y80-Y95) can be used for bit addressing.

** Reset of High speed Counter and flags at Home (X100) position


Example:
HOME ALL C
A machine shall be reset
1 LR
in its home position
(
(X100) When the )
X00100
counter in CTH has Y00089

passed 1240 pulses an

external output shall go *** Preset of CTH controlled compare values
Comp value 0 = 1240
high. When it has passed Comp value 1 = 5000
*** Counter Enable

5000 pulses the output
2 COMP. CU0 = 1240
shall go low again.
COMP. CU1 = 5000
(CTH is placed on slot 0)
E = 1




** When the counter is > the compare value 0 (1240) output 1 (EXT OUT 1)
goes High and when it is > compare value 1 (5000) it goes low.
CU0 > CU1 > EXT

3 OUT 1

/(
)
X00005 X00003
Y00200

It takes some time for the PLC to read the flags CU0 > and CU1 > and make the logic combination. If this
time delay is too long you have to use the external outputs of the CTH, which have a quick response. Then
you must connect the outputs to an external logic to work as in block 3 in the example above.
OUT0 OUT1 EXT
OUT 1
/( )

Principal for output control of the outputs OUT0-OUT3:


Out control
(OUT0 to OUT3) Forced control
Status of OUTE
CU0 > to CU3 >

Copyright Actron AB Status


1994 of
External output 259
CU0= to CU3= terminals
Additional part H200 -H252

260 Copyright Actron AB 1994


Additional part H200 -H252

or you can connect the CTH outputs to the Actana-F Quick logic inputs DIN1 and DIN2 and let the
Actana-F construct the logic. (see Actana-F description )

To achieve a combination of fast response of position and logics you can combine the two modules CTH
and Actana-F. Connect one of the external outputs of CTH to an input (DIN1 or DIN2) of Actana-F and
combine the fast counter response with the rest of the quick logic on the Actana-F module. (see description
of Actana-F, page 199 )

The High speed counter in the CTH uses 16 bits.


A jumper on the CTH board (see special CTH board description) decides if it counts binary (0-65535) or
BCD (0-9999). This means that if the total distance is > 65535 pulses you have to make some PLC
programming to extend the counter range.
In such case it is easiest to use the BCD counting.


Example: ** Reset of High speed Counter and flags at Home (X100) position

HOME ALL C
1 LR
Let us say that we ( )
X00100 Y00089
have the same



example as above but HOME
2

HIGH COUNT = 0
our positions are
X00100


11240 for ON and

135000 for of. *** Preset of CTH controlled compare values


Comp value 0 = 1240 (+ 1x10000, see compare box below) = 11240
We make an internal Comp value 1 = 5000 (+ 13x10000, see compare box below) =135000
*** Counter Enable

counter in the PLC 3 COMP. CU0 = 1240
COMP. CU1 = 5000
program, which E = 1

counts every 10000
** Count up and down of the High part of the counter.
pulses. The OF
4 HIGH COUNT = HIGH COUNT + 1
information about up
X00007


count comes from the



Overflow flag when OF
5
OFC

the CTH counter ( )
X00007 Y00087
passes from 9999 to 0



The information about UF
6

HIGH COUNT = HIGH COUNT - 1

down count comes X00006

from the Underflow
UF UFC
flag when the CTH 7
( )
counter passes from 0 X00006 Y00086

to 9999. ** Compare position 1 and position 2
The output (EXT OUT 1) goes on when position 1 (11240) is reached
This means that we

and it goes off when position 2 (135000) is reached
CU0 > POSIT
shall also compare the 8HIGH COUNT WR0000
==
ION 1
( )
position of the 1

X00005

R000

10000-counter or
CU1 > POSIT

High counter. 9HIGH COUNT WR0000


==
ION 2
( )
13 X00003 R010


POSIT POSIT EXT
10ION 1 ION 2 OUT 1
/( )
R000 R010 Y00200

EXT
OUT 1

Y00200

Copyright Actron AB 1994 261


Additional part H200 -H252

Control bits OUT


Address+ Short Name Description
base
address
Y80 CP Counter Preset Copies the value in the counter preset register
to the Counter value.
Y81 ME Marker Enable 0 Reset input, (M) not activated
1 Reset input, (M) activated
Y84 =0 =flag clear 0 = flags remain when they have gone high
Y82 =1
Y92 =2 1 = flags are reset when the counter value
has
Y90 =3 passed the compare value.
Y85 OUT0 OUT Control 0 The outputs OUT0 to OUT3 reflect
Y83 OUT1 CU0 > to CU3 > flags
Y94 OUT2 1 The outputs OUT0 to OUT3 reflect
Y91 OUT3 CU0= to CU3= flags
Y86 UFC Under Flow flag Clear 0 Resets the UF-flag. (under flow)
Y87 OFC Over Flow flag Clear Resets the OF-flag. (over flow)
Y88 E Enable (counter) Enables the counter.
Y89 ALL CLR All Clear Resets the counter and all other flags.

Y94 OUT E Forced outputs Enables forced output of the outputs OUT0-
OUT3. (When OUT E is high the flags
OUT0-OUT3 control the outputs
individually)

Control flags IN
Address+ Short Name Description
base
address
X0 CPE Preset End flag Indicates when the counter value is preset.
(hand shake after the CP flag has gone high)
X1 MCE Marker Enable End Indicates when the ME flag has gone high
(hand shake after the ME flag has gone high)
Reset input (M) is active
X4 =CU 0 = flags These flags goes high when the
X2 =CU 1 (goes high when the counter = the compare value for each of the four
X12 =CU 2 counter = the compare compare values. (CU0 to CU3). They remain high
X10 =CU 3 values) until the = flag CLR flags goes high. (=0 to =3)
X5 >CU 0 > flags These flags goes high when the
X3 >CU 1 (goes high when the counter > the compare value for each of the four
X13 >CU 2 counter > the compare compare values. (CU0 to CU3)
X11 >CU 3 values)
X6 UF Under Flow BCD mode: goes high when the counter goes from 0 to 9999.
BIN mode: goes high when the counter goes from 0 to FFFF.
It is not reset before the UFC-flag goes high.
X7 OF Over Flow BCD mode: goes high when the counter goes from 9999 to 0.
BIN mode: goes high when the counter goes from FFFF to 0.
It is not reset before the OFC-flag goes high.
X15, X16 A, B Phase input A,B Pulse inputs A and B
X9 M Reset input Shows status of the reset counter input M input
X8 Phase Indicates rotation direction

262 Copyright Actron AB 1994


Additional part H300-H2002

263
Additional part H300 -H2002

10 Addition part H300-H2002:

RUN indication Force Error I/O modules


Halt indication indication indication

Power supply
module

Start / Remote/
Stop Key

Error code
indication

Serial port
(Computer
connection)
Connection of
240 V AC
Choice of 240 /
/110 V AC
Ground
RUN contact

LED for
Connection of CPU module indication of in-
expansion unit Extra RS232 Memory Cover
or out signal
connection cassette
10.1.1 Differences between H300-H2000 and H302-H2002
H302-H2002 have a faster cycle time than H300-H2000. It is the cycle time of H302-H2002 which is
mentioned in the tables.

H302-H2002 have a real time clock built in as a standard.

H302-H2002 have an extended instruction set, see list of instructions page 271
There are built in functions like PID and trigonometric functions.
See separate description

H302-H2002 have an extra serial port on the front for communication with e.g. printers, instruments or
computers. In order to program this you can use the TRNS-, QTRNS- ,RECV- and QRECV-instructions.
See separate description.

H302-H2002 offer the possibility of using faster On-Line programming. Then RAM3 -x memory modules
are used according to the table.

Copyright Actron AB 1994


Additional part H300 -H2002

10.1.2 Expansion of I/O-modules.


Max. for H300/H302 Max. for H700/H702 Max. for H2000/H2002

288 I/O (576 with 64


I/O modules)

BSU racks 640 I/O (1280 with


64 I/O modules)

EXU racks

2048 I/O (4096 with


64 I/O modules)

10.2 Communication:
Communication via the CPU port, see page 157.

10.2.1 Link modules:

With LINK-H and OLINK-H you can connect up to 64 PLCs.


The memory area for the link is 1024 words or 16 k bits.
Two modules such modules can be installed in one PLC. Then these modules will have different memory
areas.
The link memory is divided between the different PLCs in the Setup- PLC menu in the programming.
See also link communication page 255.

10.2.2 COMM2-H

Up to 32 stations

RS-422 shielded pair wire)


Station 1 Station 2 Station 3

Copyright Actron AB 1994 265


Additional part H300 -H2002

COMM-2H has a serial port which has the same protocol as the CPU port.
Through defining in the program, which CPU you want to talk to you can program or control the one you
want. See also the Actsip manual.

Copyright Actron AB 1994


Additional part H300 -H2002

10.2.3 Modules to H300-H2002


Type of module Name Description Note
CPU-20Ha 2048 (4096) In-/Outputs, max. 48 k steps H2000
CPU modules CPU-07Ha 640 (1280) In-/Outputs, max. 16 k steps H700
CPU-03Ha 288 (576) In-/Outputs, max. 8 k steps H300
CPU modules CPU2-20H 2048 (4096) In-/Outputs, max. 48 k steps H2002
incl. PID, real time CPU2-07H 640 (1280) In-/Outputs, max. 16 k steps H702
clock and serial port CPU2-03H 288 (576) In In-/Outputs, max. 8 k steps H302
RAM-04H 3.6 k steps
RAM-08H 7.6 k steps
Memory for RAM-16H 15.7 k steps
H300-H2000 RAM-48H 48.5 k steps
CPU-modules ROM-16H 15.7 k steps
RAM2-04H 3.6 k steps
RAM2-08H 7.6 k steps
Memory for RAM2-16H 15.7 k steps
H302-H2002 RAM2-48H 48.5 k steps
CPU-modules RAM3-08H 7.6 k steps with fast On- Line RUN
RAM3-16H 15.7 k steps with fast On- Line RUN
RAM3-48H 48.5 k steps with fast On- Line RUN
ROM2-16H 15.7 k steps
ROM2-48H 48.5 k steps
Expansion module IOC-01H used in all expansion units
BSU-09H Base plate for 9 slots
Base plates BSU-05H Base plate for 5 slots
BSU-02H Base plate for 2 slots
EXU-11H Expansion plate for 11 slots
Expansion plates EXU-07H Expansion plate for 7 slots
EXU-04H Expansion plate for 4 slots
BEU-04H " where REM-MAH can be mounted
Power supply AVRC-04H 220 VAC: 5 V DC gives 4 A 24 V DC gives 2 A
modules AVRC-08H 220 VAC: 5 V DC gives 9 A 24 V DC gives 1 A
AVR-04DH 24 VDC: 5 V DC gives 4 A 24 V DC gives 1.5 A
AVR-08DH 24 VDC: 5 V DC gives 6 A 24 V DC gives 1.0 A
CBL-05H 0.5 m Base unit to the expansion unit
Expansion cables CBL-10H 1.0 m Base unit to the expansion unit
CBL-20H 2.0 m Base unit to the expansion unit
CBL-40H 4.0 m Base unit to the expansion unit
CBE-05H 0.5 m expansions unit to expansion unit
CBE-10H 1.0 m expansions unit to expansion unit
CBE-20H 2.0 m expansions unit to expansion unit
CBE-40H 4.0 m expansions unit to expansion unit
CB-LEDH 4.0 m for external mounting of LED cover.
XAC10AH 16 in 85-132 V AC
XAC20AH 16 in 170-264 V AC
Input modules XAC10BH 32 in 85-132 V AC
XAC20BH 32 in 170-264 V AC
XDC24AH 16 in 12/24 V AC/DC
XDC48AH 16 in 48 V AC/DC
XDC24BH 32 in 12/24 V AC/DC
XDC48BH 32 in 48 V AC/DC
XHS24BH 32 in 12/24 V AC/DC, fast inputs
XDC12DH 64 in 12 VDC
XDC24D2H 64 in 24 VDC
XTT05BH 32 in 3-15 V DC TTL-level

Copyright Actron AB 1994 267


Additional part H300 -H2002

YRY20AH 16 out 240 VAC, 24 VDC, 2A Relay


YRY20BH 32 out 240 VAC, 24 VDC, 2A Relay
Output modules YSR20AH 16 out 100-240 VAC 1.7A Triac
YSR20BH 32 out 100-240 VAC 1.7A Triac
YTR48AH 16 out 24/48 VDC 2A Transistor, NPN
YTR48BH 32 out 24/48 VDC 0.7A Transistor, NPN
YTR24DH 64 out 24/48 VDC 0.1A Transistor, NPN
YTS48AH 16 out 24/48 VDC 2A Transistor, PNP
YTS48BH 32 out 24/48 VDC 0.7A Transistor, PNP
YTS24DH 64 out 24/48 VDC 0.1A Transistor, PNP
YTT05BH 32 out 4-15 VDC, 20 mA TTL, PNP
YDR20AH 16 insulated out 240 VAC, 24 VDC, 2A Relay
XAGV08H 0-10 V DC, 8 bits, 8 channels
Analog input XAGC08H 4-20 mA, 8 bits, 8 channels
modules XAGV12H -10- +10 V DC 12 bits, 8 channels
XAGC12H 4-20 mA, 12 bits, 8 channels
YAGV08H 0-10 V DC, 8 bits, 4 channels
Analog output YAGC08H 4-20 mA, 8 bits, 4 channels
modules YAGV12H -10- +10 V DC 12 bits, 4 channels
YAGC12H 4-20 mA, 12 bits, 4 channels
XCU001H 2-phase counter, 50 kHz, 16 bits, 1 channel
High function XCU232H 2- phase counter, 100/50 kHz, 32 bits, 2 channels
modules POSIT-A2H 2 axes positioning, analog output
POSIT-2H 2 axes positioning, pulse output
POSIT-H 1 axes positioning, pulse output
ASCII-1H ASCII-module for connection to CRT or printer
BASIC-H Module for BASIC-programming
XRTD01H RTD-input
SIO-H 1 port RS232C , 1 port RS422
CLOCK-H Real time Clock module
XINTOAH Interrupt module, 16 channels, 10-30 VDC
ETH-LAN Ethernet communication module
COMM-2H 1 port RS232C , 1 port RS422
Communications Kab RS-232 Cable for RS232-com. with COMM2H
modules LINK-H Link module, Up to 64 CPUs , 1024 words
REM-MAH Remote module, Up to 512 in/outputs per module,
(10 local modules), up to 4 modules per CPU
REM-LOH Local remote module, (Coaxial cable.)
REM-MMH Remote module, Up to 1024 bits in and 1024 out
per module., Up to 12 local modules in series.
REM-LMH Local remote module. (Twisted pair cable)
PGM-CHH Instruction code programming
Hand PGM-GPH Graphic programming
programming PGMIF1H PROM-programming and printer interface
units PGCB02H 2 m cable between CPU and cable
PGCB05H 5 m cable between CPU and cable
Others LIBAT-H Battery to memory cassette
DUMMY-H Covers an empty slot

Copyright Actron AB 1994


Additional part H300 -H2002

10.2.4 H300-H2002 Circuit diagram input modules:


0 0
0
7 7
7
COM0 COM0
COM0
8 8

15 15
8
COM1 COM1 15
XAC10AH 16 XAC10BH
XAC20AH XAC20BH COM1
XDC24AH
23 XDC48AH
COM2
24
Internal
31
logic
COM3

0 0 0
7 15 7
COM0
COM0 COM0

8 16 8
15 31 15
COM1
XDC24BH XDC12DH XINT0AH
COM1
XDC48BH XDC24D2H COM1
XHS24BH

24 48
31 63

COM3 COM3

For more detailed description, see Hitachi manual.

10.2.5 Circuit diagram output modules

For more detailed description, see Hitachi manual.

Copyright Actron AB 1994 269


Additional part
Extra program instructions for
series H252 and H302-H2002

270
Appendix

11 Extra instructions for H252 and H302-H2002:

11.1 PID-instructions:
FUN 0 PID-init. Decides the addresses of the PID-functions
FUN 1 PID control Execution management of PID operation
FUN 2 PID calculation Execution of PID operation

FUN0 decides a table, which defines the amount of PIDs and where in the PLC memory area to find the
addresses of these PIDs.
E.g. FUN0 (WR400) defines following table:
WR400 Error code 0
WR401 Error code 1
WR402 Error code 2
WR403 FUN0 normal operation
WR404 Loop count (amount of PIDs) 1 to 64 PIDs
WR405 Real addess*1 of PID1 table
WR406 Real addess*1 of PID2 table
WR406 Real addess*1 of PID3 table

WR n Real addess*1 of PID n table max. WR444 (64 PIDs)

*1 real address means the internal address number of the CPU. When the address is written you must
therefore use the instruction ADRIO =(d,S), which converts the specified address to the internal format.
Therefore if the PID1 table shall start on
WR200 and PID2 table shall start on WR300 ADRIO = (WR405,WR200)
ADRIO = (WR406,WR300)
you shall write following instruction:

Now the address area WR200 and following 48 words will contain the PID information about PID1 and
WR300 and following 48 words will contain PID2 etc.

There is also a bit table belonging to each PID (16 bits) The start of this table is defined by the first word in
the PID table. Use also here e.g. ADRIO (WR200,R100)

WR200 Address of the start of the bit table R100 Execution flag
WR201 Sampling time R101 Non-Bumbles flag
WR202 Proportional Gain R102 PID constant change flag
WR203 Integral constant R103 S Flag
WR204 Differential constant R104 R Flag
WR205 Differential delay constant R105 D-FREI flag
WR206 High output limit R106
WR207 Low output limit R107
WR208 Initial value INIT R108 PID RUN Flag
WR209 Set value address R109 PID in execution flag
WR20A Measured value address R10A PID constant OK flag
WR20B Output value address R10B Over High Limit flag
WR20C Set value bit pattern R10C Under High Limit flag
WR20D Measured value bit pattern R10D FUN2 Error flag
WR20E Output value bit pattern R10E
WR20F Not used (reserved) R10F
WR210 Not used (reserved)
WR211 Not used (reserved)

WR22F Not used (reserved)


These are all write addresses except R108-R10D, which are READ addresses.

Copyright Actron AB 1994 271


Appendix

Example with 3 PIDs


Initialisation of the parameters of PID 1 (address table WR200-)
INIT
ADRIO(WR0200 , R100 )
WR0201 = TZ
R7E3 WR0202 = KP
WR0203 = T1/TZ
WR0204 = TD/TZ
WR0205 = Tn/TZ
WR0206 = UL
WR0207 = LL
WR0208 = INITIAL
ADRIO(WR0209 , WX0000 )
ADRIO(WR020A , WX0010 )
ADRIO(WR020B , WY0030 )
WR020C = SET BITPAT
WR020D = MEA BITPAT
WR020E = OUT BITPAT

Initialisation of the parameters of PID 2 (address table WR250-)
and parameters of PID 3 (address table WR300-)

Initialsation of the PID definition table telling about amount of PIDs and
start adddress.

INIT
WR0404 = 3
ADRIO(WR0405 , WR0200 )
R7E3 ADRIO(WR0406 , WR0250 )
ADRIO(WR0407 , WR0300 )
FUN 0 (WR0400 )

Normal program
(setting of the bit outputs R100 - through normal logics.


END



Interrupt scan 20 ms.
Exexcution of the 3 PIDs (if not WR403, error information, is 0
Then the jump passes the FUN1 and FUN2 instructions )


INT 1





WR0403 JMP 0
==
0



FUN 1 (WR0400 )
FUN 2 (WR0200 )
FUN 2 (WR0250 )
FUN 2 (WR0300 )




LBL 0
RTI


For more detailed information, see Hitachi Instruction manual (software)
11.2 Trigonometric functions:
FUN 10 Sin function See short description below and separate detailed description
FUN 11 Cos function "
FUN 12 Tan Function "
FUN 13 Arc Sin function "
FUN 14 Arc Cos function "
FUN 15 Arc Tan function "

Principal of programming these instructions:

Copyright Actron AB 1994


Appendix

The Degree argument is fetched from S E.g. to get SIN( 40) will be:
WR, WM or WL words and the result goes to S+1 and S+2:

The integer (0) goes to WR101


for the ARC functions it will the and the decimal part goes to WR102.
opposite:

Copyright Actron AB 1994 273


Appendix

11.3 Search instructions:


FUN 20 Data search Search number and address for specified data *1
FUN 21 Table search Search value of the block from specified table *1

11.4 ASCII-conversion instructions:


FUN 30 ASCII conversion 16 bit binary data to decimal ASCII data *1
FUN 31 ASCII conversion 32 bit binary data to decimal ASCII data *1
FUN 32 ASCII conversion 16 bit binary data to hexadecimal ASCII data *1
FUN 33 ASCII conversion 32 bit binary data to hexadecimal ASCII data *1
FUN 34 ASCII conversion 16 bit BCD data to decimal ASCII data *1
FUN 35 ASCII conversion 32 bit BCD data to decimal ASCII data *1
FUN 36 ASCII conversion Decimal ASCII data to 16 bit binary data *1
FUN 37 ASCII conversion Decimal ASCII data to 32 bit binary data *1
FUN 38 ASCII conversion Hexadecimal ASCII data to 16 bit binary data *1
FUN 39 ASCII conversion Hexadecimal ASCII data to 32 bit binary data *1
FUN 40 ASCII conversion Decimal ASCII data to 16 bit BCD data *1
FUN 41 ASCII conversion Decimal ASCII data to 32 bit BCD data *1
FUN 42 ASCII conversion Specifies 16 bit binary data to decimal ASCII data *1
FUN 43 ASCII conversion Specifies ASCII data to 16 bit binary data *1

11.5 Diverse instructions:


FUN 44 Combine characters *1
FUN 45 Compare characters *1
FUN 46 Convert Word-byte *1
FUN 47 Convert Byte-Word *1
FUN 48 Shift one byte right *1
FUN 49 Shift one byte left *1

11.6 Sampling (trouble shooting) instructions:


FUN 50 See sampling Enable trace by sampling *1
FUN 51 Sampling Execution of sampling *1
FUN 52 Reset sampling Disable trace by sampling *1

11.7 Other instructions:


FUN 60 Binary square root *1
FUN 61 Pulse generation *1

11.8 Serial communication instructions:


TRNS Transmit and receive data 10 ms . (Used for ASCII, SIO, POSIT,CLOCK) *1
RECV Receive data 10 ms . (Used for ASCII, SIO, POSIT,CLOCK) *1
QTRNS Transmit and receive data 1 scan . (Used for ASCII, SIO, POSIT,CLOCK) *1
QRECV Receive data 1 scan . (Used for ASCII, SIO, POSIT,CLOCK) *1

ADRPR Address program *1


ADRIO Address I/O real address , see PID description above *1

*1 For more detailed information, see Hitachi Instruction manual (software)

Copyright Actron AB 1994


Appendix

Appendix

Copyright Actron AB 1994 275


Appendix

12 Appendix:

Bit or Input, output or internal output, which can be


represented by "ON/OFF" , "1/0" etc.
Word 16 bits, which form a value between 0 and
65535.
Double 32 bits, which form a value between 0 and
word 4,294,967,295

Decimal (10 as base) Hexadecimal (16 as base) Binary (2 as base)


Unit 0 to 9 Unit 0 to F Unit 0 to 1
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111

Binary Hexadecimal ( H before) Decimal


C689 1*20+0*21+0*23.+1*24.....1*15 =50825
(is written HC689)
9*1+8*16+6*256+12*4096=50825

MSB Most Significant Bit The bit which represents the highest position (normally the left one)

LSB Least Significant Bit The bit which represents the lowest position (normally the right one)

MSD Most Significant Digit The digit (4 bits) which represents the highest position (normally the left one)

LSD Least Significant Digit The digit (4 bits) which represents the lowest position (normally the right one)

Copyright Actron AB 1994


Appendix

12.1 Special memories (detailed):


12.2
WORDS BITS
WRF000 Self diagnostic error code R7C0 Program locked during program scan
WRF001 Syntax error information R7C1 Program locked during periodic scan
WRF002 In-/Output error in addressing R7C2 Program locked during interrupt scan
WRF003 Communication module addressing R7C3 Remote ON enabled
error
WRF004 Communication module slot no error R7C4 Remote OFF enabled
WRF005 In/Output slot no error R7C5 Debug enabled
WRF006 Remote in wrong slot address R7C6 Simulation enabled
WRF007 Link in wrong slot address R7C7 Modifications during RUN enabled
WRF008 Number on program block with error R7C8 Severe error
R7C9 Program step error
WRF00B Year, Real time Clock R7CA Memory error PI/O usage
WRF00C Month, Real time Clock R7CB PI/O bus error
WRF00D Weekday, Real time Clock R7CC Addressing outside memory area (by user)
WRF00E Hour/minute, Real time Clock R7CD Error on In-/Output information
WRF00F Second, Real time Clock R7CE Error on Communication module information
WRF010 Maximum measured cycle time R7CF -
WRF011 Current cycle time R7D0 Error on remote module
WRF012 Minimum measured cycle time R7D1 Cycle time too long during normal scan.
WRF013 CPU Status R7D2 Cycle time too long during periodic scan.
WRF014 Amount of word internal outputs R7D3 Cycle time too long during interrupt scan.
WRF015 Calculation error code. R7D4 Syntax error
WRF016 Calculation expansion register R7D5 Error on I/O-module
(remainder)
WRF017 -"- for 32-bit calculations R7D6 Addressing non existing I/O
WRF018 Communication module start flag R7D7 Communication module error
R7D8 System bus error
WRF01B Year, Real time Clock Preset R7D9 Battery error
WRF01C Month, Real time Clock Preset R7DA Power supply error
WRF01D Weekday, Real time Clock Preset R7DB Self diagnostic error
WRF01E Hour/minute, Real time Clock Preset R7DC Simulation error
WRF01F Second, Real time Clock Preset R7DD Addressing of non existing communication
module
WRF020 Communication module on R7DE Link module error
WRF021 slot 0 error R7DF -
etc. R7E0 Key in STOP position
WRF030 Communication module on R7E1 Key in REMOTE position
WRF031 slot 8 error R7E2 Key in RUN position
R7E3 ON during the first program scan after program
start (INIT)
WRF03F Member registration area 1 R7E4 Always ON
WRF040 R7E5 0.02 s clock pulse
WRF041 R7E6 0.1 s clock pulse
etc. R7E7 1.0 s clock pulse
WRF049 Member registration area 4 R7E8 CPU occupied
WRF04A R7E9 STOP of RUN
WRF04B R7EA Indication of modification during RUN
WRF04C Trouble shooting information area R7EB-7EF -
WRF04D (Debug) R7F0 Carry
WRF04E R7F1 Overflow
R7F2 Shift data
WRF080-097 Remote error information, chain 1 R7F3 Computation error
WRF098-0AF Remote error information, chain 2 R7F4 Data error
WRF0B0-0C7 Remote error information, chain 3 R7F5-7 -
WRF0C8-0DF Remote error information, chain 4 R7F8 Time reading request
WRF0E0-13F Link chain 1 error information R7F9 Time setting request
WRF140-19F Link chain 2 error information R7FA + / - 30 s adjust
Copyright Actron AB 1994 277
Appendix

WRF1A0-1FF Not used R7FB Time setting error


R7FC-7FF -

Copyright Actron AB 1994


d=S1 S/ S2 4 FUN 74 (S) 3
d=S1 B / S2 4 FUN 0
d= S1 OR S2 4
12.2 Instruction d=S1 AND S2 4
FUN 1
FUN 2
time: d=S1 R S2 4
FUN 10
d=S1 == S2 4
FUN 11
d=S1 S == S2 4
(Number of steps d=S1 <> S2 4 FUN 12
per instruction) d=S1 S <> S2 4 FUN 13
d=S1 < S2 4 FUN 14
d=S1 S < S2 4 FUN 15
Instruction Steps/ d=S1 <= S2 4 FUN 20
instruc- d=S1 S <= S2 4 FUN 21
tion BSET (d,n) 3 FUN 30
BRES (d,n) 3
1 FUN 31
BTS (d,n) 3
FUN 32
SHR (d,n) 3
1 SHL (d,n) 3 FUN 33
ROR (d,n) 3 FUN 34
1 ROL (d,n) 3 FUN 35
LSR (d,n) 3 FUN 36
LSL (d,n) 3 FUN 37
2 BSR (d,n) 3 FUN 38
BSL (d,n) 3 FUN 39
WSHR (d,n) 3
1 FUN 40
WSHL (d,n) 3
FUN 41
WBSR (d,n) 3
WBSL (d,n) 3 FUN 42
1 MOV (d,S,n) 4 FUN 43
COPY (d,S,n) 4 FUN 44
XCG (d1,d2,n) 4 FUN 45
3 NOT (d) 2 FUN 46
NEG (d) 2 FUN 47
ABS (d,S) 3 FUN 48
2
SGET (d,S) 3
FUN 49
EXT (d,S) 3
FUN 50
BCD (d,S) 3
3-4 FUN 51
BIN (d,S) 3
DECO (d,S,n) 4 FUN 52
3-4 ENCO (d,S,n) 4 FUN 60
SEG (d,S) 3 FUN 61
5-6 SQR (d,S) 4 TRNS 5
BCU (d,S) 3 RECV 5
SWAP (d) 2 QTRNS 5
TD 5 FIFIT (P,n) 3
SS 5 QRECV 5
FIFWR (P,S) 3
MS 5 ADRPR 3
FIFRD (P,d) 3
TMR 5 UNIT (d,S,n) 4 ADRIO 3
WTD 5 DIST (d,S,n) 4
CU 5 END 1
CTU 5 CEND (S) 2
CTD 3 JMP n 2
CT 5 CJMP n(S) 3
RCU 5 LBL(n) 1
CL 1 RSRV n 2
d=S 3 FREE 1
d=S(P) 4-5 START n 2
FOR n (S) 3
d(P)=S NEXT n 2
d(P1)=S(P2) CAL n 2
d=S1 + S2 4 SB n 1
d=S1 B + S2 4 RTS 1
d=S1 - S2 4 INT n 1
d=S1 B - S2 4 RTI 1
d=S1 * S2 4 FUN 70 (S) 3
d=S1 S* S2 4 FUN 71 (d) 3
d=S1 B * S2 4 FUN 72 (S) 3
d=S1 / S2 4 FUN 73 (d) 3

279
INDEX

280
Index

Copyright Actron AB 1994 281


INDEX:
Bit Reset, 74
Bit set, 73
7 Bit test, 75
Block, 20
7-Segment, 95 Block shift, 83
branch, 137
Branch, 21
8 BSH-racks, 191
BSM-racks, 191
8 Digit type in, 250
Buzzer, Actterm-H, 233

A
C
abbreviations, 5
Cable connection, 156
Absolute value, 90
Cable length, Actterm-H, 253
ACTANA-F module, 207
CALL, 106
ACTANA-S, 200
Change of an existing block, 123
ActGraph, 132
Choice of PLC, 114
Action boxes, 141
Circuit diagram, H300-H2002, 270
Actions, 134
COMM2-H, 266
Activity condition, 138
comments, 119
ActServ, 157
Compare block, 124
Actsip-H, 116
Comparison, 8, 124
Actterm-H, 227
Comparison contacts, 31
Actterm-H, Start up, 229
Comparison expressions, 50, 70, 143
Address map, 204
Comparison instructions, 44
addressing, 9
Complex logic, 32
Addressing, 9, 168
Computer programming, 116
Addressing of Remote modules, 169
Condition END, 101
Allocation of memories, 119
configuration, 117
Alternative branch, 137
configure the System, Actterm-H, 230
Analog inputs sample and hold, 220
Contact symbols, 22
Analog modules, 200
Control commands, 54
Analog modules Current, 198
Conversion factor, 204
Analog modules Voltage, 198
Conversion factor, Actana-F, 225
Application commands, 54, 96
Conversions, 52
Arithmetic, 126
Converting, 91
Arithmetic box, 8, 31
Copy, 57
Arithmetic instructions, 46
Copy data, 87
Arithmetics, 48, 59, 125
Counter programming, 32
ASCII-conversion instructions, 275
countermeasures, 158
Counters, 14, 40
B CPU link, 163
CPU-port, 157
BASICH-module, 104 CTH High speed counter module, 258
Battery backup, 15 current value, 43
BCD addition, 62
BCD division, 67
BCD multiplication, 65
D
BCD shift, 81, 85
D, 7
BCD subtraction, 64
DDE server, 157
BCDBIN, 93
Decimal, 277
Binary, 277
Decode, 93
Binary addition, 60
Detailed Actions, 136
Binary division, 66, 68
Detection of short pulses, 203
Binary multiplication, 64
DFN-Contacts, 29
Binary multiplication with +/- signs, 66
DIF, 29
Binary subtraction, 63
Direct update, 150
bit, 7
DISPLAY, Actterm-H, 233
Bit Count, 96
Distribute, 100
bit nr, 9
Documentation, 130
Bit operations, 50, 73
282
Index

Double words, 7 Internal memory, 8


Draw, 118 Interrupt, 107, 151
Draw a Ladder block, 120 Interrupt program scan, 17
Inverting, 24
Isolated mixed Analog modules, 200
E
Edge detection, 29 J
Edge memories:, 14
Encode, 94 Jump, 102
End, 101 jumpers and switches of HB, 172
Error codes, 158
Error information, 204
Excel, 157 L
Exchange of words, 88
expansion, 123 L, 7
expansion memory, 245 Label, 102
Extend, 91 ladder programming, 20
External, 9 Least Significant, 277
External output, 9 LEDs, Actterm-H, 233
Extra instructions for H252 and H302-H2002, 272 Link communication, 256
Link memories:, 12
Link modules, 266
F LINK-H, 266
Logic AND on Word, 69
FIFO, 97 Logic boxes, 140
Filter time, 204 Logic expressions, 69
Filter time, Actana-F, 225 Logic instruction programming, 109
FOR n, 104 Logic OR on Word, 69
function keys, 231 Logic R on Word, 69
FUN-instructions for H252, H302-H2002, 55
FUN-instructions for series HB, 54, 183
M
H M, 7
Macro boxes, 140
H20 to H64, 162 Make negative, 89
H300-H2002, 265 Master Control, 15
HB, 162 Master Control Set, 26
HB in remote version, 163 Mathematical expressions, 143
HB, link model, 163 memory, 7
H-COMM, 157 Memory address, 12
Hexadecimal, 277 memory size, 114
High speed counter specification, 175 Mode set, 183
History, 3 Modules to H300-H2002, 268
history about PLC, 4 Monitor, 129
Hitachi, 3 Monostable timer MS, 36
HL40-HL64, 162 Most Significant, 277
Host Link, 163 Mounting, 154
HR- expansion racks, 163 Mounting of H200, 192
Mounting of series HB, 172
Mounting, Actterm-H, 251
I Move data, 86
Moving data, 52
I/O-copying, 150
Indexed (relative) addressing, 57
indexed addressing, 46 N
Input, 7, 8
Input connection, 180 Negations, absolute value, 52, 89
Input connections, 156 Normal program scan, 17
input filter, 183
Input modules:, 195
Input specifications:, 173 O
Insert block, 122
Installation, 154 Off delay timer, 36
Integrating Timer TMR, 38 OLINK-H, 266
Internal memories, 12 ON Delay Timer TD, 34
Copyright Actron AB 1994 283
Index

ON-Line programming, 129 Self hold /direct control function, 213


Operator Terminals, 227 Sequence programming, 33
Output, 7, 8 Serial communication instructions, 275
Output connections, 157 Serial connection, 21
Output modules, 197 Series H200 - H 252, 189
Output specifications - Transistor:, 178 Set, 26
Set value, 43
Setup, 117
P Shift and rotation expressions, 76
Shift Left, 77
Parallel branch, 137 short pulses, 203
Parallel connection:, 21 Sign Get, 90
Periodic program scan, 17 Signed" integers, 44
PIDs, 272 Slot no, 9
Power connection, 156 Special memories, 16
power supply, 156 Special memories Bits:, 17
preset a value, Actterm-H, 242 Special memories detailed, 278
preset value, 43 specification, 149
print out text, 247 Square root, 96
printer port, Actterm-H, 247 Start step, 134
printer text, typing, 247 status row, 118
Printout, 131 Store the program, 130
Process system, 150 Sub Station no, 9
program scan, 17 Subroutine, 106
pulse encoder, 176 Super conditions, 138
Swap bytes, 96
Q Symbols, 5, 6
Syntax check, 127
syntax errors, 159
quick logic combinations, 209, 214
Quick update logic., 207
T
R
TC, 7
R, 7 texts, typing of, 233
read of current value, 43 Timer programming, 32
Real time Clock, 16 Timers, 14, 34
T-LINK-module, 256
Refresh, 150
transfer the texts, Actterm-H, 233
Relay output, 157
Transistor outputs, 157
Relay output:, 177
Transitions, 135
remote, 9
Remote communication, 254 Triac output, 157
Repeated sampling control, 220 Trigonometric functions, 273
Reset, 26 Two phase high speed counter, 183
Reset condition, 138
response of position and logic, 218 U
response of position and logics, 262
retentive areas, 15 Unit 4 bit data, 100
retentive memories, 118 Unit no, 9
Return, 106 Up Counter CU, 40
Return branch, 138 Up-/Down Counter, 41
Return from Interrupt routine, 107 updating, Actterm-H, 244
Ring counter, 42
RIOH-TL, 254
RIOH-TM, 254 V
Rotate Right, 78
RUN/ERROR contact:, 172 values with separation characters, 239
values, Actterm-H, 237
Variable preset value, 43
S Voltage supply:, 195

sample and hold, 220


Sampling interval, 225 W
Scroll, Actterm-H, 240
Search instructions, 275 W, 7
Self hold, 33
Copyright Actron AB 1994
Index

Watch Dog Timer (WTD), 38


Word, 7 Y
Word no., 9
WR, 7 Y, 7

X Z
Zoom, 144
X, 7

Copyright Actron AB 1994 285


i

Das könnte Ihnen auch gefallen