Jäger ADwin HSM-24V User manual

ADwin HSM-24V
Module for LS Bus
Manual
ADwin LS Bus, Manual version 1.0, September 2006

ADwin LS Bus, Manual version 1.0, September 2006
Jäger Computergesteuerte
Messtechnik GmbH
Rheinstraße 2-4
D-64653 Lorsch
Germany
For any questions, please don’t hesitate to contact us:
Hotline: +49 6251 96320
Fax: +49 6251 5 68 19
E-Mail: [email protected]
Internet www.ADwin.de

ADwin LS Bus, Manual version 1.0, September 2006 III
ADwin
Table of Contents
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV
1 Information about this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 The LS bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 HSM-24V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1 Hardware. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2 Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2.1 LS Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Typographical Conventions ADwin
IV ADwin LS Bus, Manual version 1.0, September 2006
Typographical Conventions
"Warning" stands for information, which indicate damages of hardware or soft-
ware, test setup or injury to persons caused by incorrect handling.
You find "note" next to
– information, which have absolutely to be considered in order to guaran-
tee an operation without any errors.
– advice for efficient operation.
"Information" refers to further information in this documentation or to other
sources such as manuals, data sheets, literature, etc.
<C:\ADwin\ …> File names and paths are placed in angle brackets and characterized in the
font Courier New.
Programmtext Program instructions and user inputs are characterized in the font Courier New
ADbasic source code elements such as INSTRUCTIONS, variables, com-
ment and other text are characterized by colours and the font Courier
New (as with the editor of the development environment ADbasic).
Bits in data (here: 16 bit) are referred to as follows:
BitNo. 151413…0100
Bit value 215 214 213 …21=2 20=1
Synonym MSB - - - - LSB

ADwin LS Bus, Manual version 1.0, September 2006 1
Information about this Manual
ADwin
1 Information about this Manual
This manual describes the LS bus and the modules being operated on the LS
bus. Additional information are available in
– the description of the LS bus interface in the hardware manual for ADwin-
light-16, ADwin-Gold or ADwin-Pro.
– the manual ADbasic, which describes the basic instructions for the
compiler of same denominator as well explains the function principle of
ADwin systems.
The online help has the same content as the manual and additionally
contains the hardware related instructions, LS bus too.
Please note:
To have your ADwin systems work properly, keep strictly to the information
given in this documentation and in other mentioned manuals.
Qualified personnelProgramming, start-up and operation, as well as the modification of program
parameters must be performed only by appropriately qualified personnel.
Qualified personnel are persons who, due to their education, experience
and training as well as their knowledge of applicable technical standards,
guidelines, accident prevention regulations and operating conditions,
have been authorized by a quality assurance representative at the site to
perform the necessary acivities, while recognizing and avoiding any
possible dangers. (Definition of qualified personnel as per VDE 105 and
ICE 60364).
Availability of
Documents
This product documentation and all documents referred to, have always to be
available and to be observed. For damages caused by disregarding the
information in this documentation or in all other additional documentations, no
liability is assumed by the company Jäger Computergesteuerte Messtechnik
GmbH, Lorsch, Germany.
Legal instructionsThis documentation, including all pictures is protected by copyright.
Reproduction, translation as well as electronical and photographical archiving
and modification require a written permission by the company Jäger
Computergesteuerte Messtechnik GmbH, Lorsch, Germany.
OEM products are mentioned without referring to possible patent rights, whose
existence is not to be excluded.
Subject to change.
Hotline address: see inner side of cover page.

The LS bus ADwin
2ADwin LS Bus, Manual version 1.0, September 2006
2 The LS bus
The LS bus is a bi-directional serial bus with 5MHz clock rate. The bus
connects an ADwin system via its LS bus interface with up to 15 LS bus
modules.
Figure 1shows the standard connections of an LS bus module: Bus input and
output with LED, protection earth PE, DIP switch for bus termination and bus
address.
The bus is set up as line connection, i.e. the interface and the LS bus modules
are connected to each other via two-way links. Each module has a female
DSub connector (9-pole) as bus input and a male DSub connector (9-pole) as
bus output. The maximum bus length is 5m.
The LED besides bus Bus input/output indicates data traffic on the LS bus:
– Green LED: The module receives or sends data.
– Red LED: Data for other modules is sent on the bus.
– LED off: No data traffic.
Bus Termination The bus termination on the last module of the LS bus must be activated with
the DIP switches Term., deactivated on all other modules. To activate the bus
termination both DIP switches are set down.
Bus address Each module on the LS bus is addresses via its bus address; therefore the
address must be unique for each module.
The bus address is set manually with the DIP switch block on the PCB besides
the bus connectors (see fig. 1). Using the 4 DIP switches Device Address
the address may be set to 1…15. The setting is: 1 = DIP switch down, 0 = DIP
switch up.
Address 0 disables the module. Even if a module is disabled, the foloowing
modules on the LS bus receive all bus data.
PE
BUS INBUS OUT
gn / active
rd / rea dy
Term .Device Address
1 2 3 4
DIP switch block
5
4
3
2
1
9
8
7
6
SIGNAL GND
RESERVED
SIGNAL HIGH
RESERVED
SIGNAL LOW
RESERVED
RESERVED
1
2
3
4
5
6
7
8
9
SIGNAL HIGH
RESERVED
SIGNAL GND
SIGNAL LOW
RESERVED
RESERVED
RESERVED
Input LS bus
(male)
Output LS bus
(female)
Bus
termination
Bus
address
LED

ADwin LS Bus, Manual version 1.0, September 2006 3
The LS bus
ADwin
Protection EarthThe GND level of the module is connected to the top hat rail, which serves as
protection earth (PE). Protection earth is connected to the screw PE on the
module's top.
Module
address
Setting of DIP
switches
1234
0 0000Moduledisabled
1 1000
2 0100
3 1100
4 0010
5 1010
……
15 1111
Fig. 1 – Module addressing with DIP switches

HSM-24V ADwin
4ADwin LS Bus, Manual version 1.0, September 2006
3 HSM-24V
The LS bus module HSM-24V provides 32 digital channels which process 24V
signals.
3.1 Hardware
The 32 channels can be set to inputs or outputs in groups of 8. After power-up
all channels are set as inputs.
The module processes a supply voltage of 19V… 29V. The supply connector
plug is placed bottom right (see fig. 2) on the module and has each 2 pins for
Vcc and GND. The supply voltage is led to a fuse (5A, delay-action). Both
ground pins are connected to protection earth PE.
The supply connection is reverse polarity safe.
The channels are designed to process 24V signals typically and are short-
circuit-proof. A signal above 82% of supply voltage is processed as High level,
a signal below 66% as Low level. For each channel there is a LED indicating
the status: LED on relates to High level.
The channels have a permissible operation current of 0mA…150mA. If the
current exceeds 500mA at a channel, the channel is automatically switched
off. An over-current in the range of 150mA…500mA may activate the
superheating protection of the driver, i.e. the driver is switched off, including
the corresponding 16 channels.
Each 4 channels have a common GND. The input / output wires are connected
to plug-in blocks of binding posts.
The inputs have a filter causing about 12µs signal delay.
The module is easily snapped onto the DIN top hat rail. The module may be
processed inside a control cabinet only (industrial use).
Fig. 2 – Board HSM-24V
ADwin
HSM-24V
ON
PE|G ND
gn / active
rd / rea dy
Term.Device Address
1 2 3 4
PE
DIG.I/O
Vcc =
+19...29VDC
GNDGNDGNDGND 17181920212223242526272829303132
DIG.I/O 1 2 3 4 5
GND 6 7 8 9 10 11 12 13 14 15 16
GND GND GND
BUS INBUS OUT
T5A

ADwin LS Bus, Manual version 1.0, September 2006 5
HSM-24V
ADwin
Fig. 3 – Pin assignment LS bus HSM-24V
3.2 Software
Include FileThe functions of the module HSM-24V are easily programmed with ADbasic
instructions. The instructions are contained in an include file; include this file at
the top of the program with this line
#INCLUDE ADWL16.inc
The sintructions of the following table are described on the following pages or
in the online help:
Input LS bus (male) Output LS bus (female)
1
2
3
4
5
6
7
8
9
SIGNAL HIGH
RESERVED
SIGNAL GND
SIGNAL LOW
RESERVED
RESERVED
RESERVED
5
4
3
2
1
9
8
7
6
SIGNAL GND
RESERVED
SIGNAL HIGH
RESERVED
SIGNAL LOW
RESERVED
RESERVED
Instruction Function
LS_DIO_INIT Initialize modul HSM-24V.
LS_DIGPROG Set channels as inputs or outputs.
LS_WATCHDOG_INIT Disable watchdog counter or enable and set
watchdog time.
LS_DIG_IO Set level of digital outputs and return current
levels. This instruction is valid for 1 module only.
Fig. 4 – Instructions for HSM-24V, overview

HSM-24V ADwin
6ADwin LS Bus, Manual version 1.0, September 2006

ADwin LS Bus, Manual version 1.0, September 2006 7
HSM-24V
LS_WATCHDOG_INIT
ADwin
3.2.1 LS Bus LS_WATCHDOG_
INIT
LS_WATCHDOG_INIT enables or disables the watchdog counter of a specified
module on the LS bus. If enabled, the counter is set to the start value and is
started.
Syntax
#INCLUDE ADWL16.INC
ret_val = LS_WATCHDOG_INIT(ls-module,enable,time)
Parameters
Notes
The instruction only be used in section INIT:, since it takes long pro-
cessing time.
As long as the watchdog counter is enabled, it decrements the counter
value continuously. After the set release time the counter value reaches
0 (zero). If so, the module assumes a malfunction and stops; thus, all
output signals are reset.
After power-up of the module the counter is set to the start value 10ms
and the watchdog counter is enabled.
Reset the active watchdog timer at least once to the start value within
the counting interval, in order to keep the module working. To reset the
module use any module specific instruction or LS_WATCHDOG_RESET.
The watchdog function is used as to monitor the connection between
ADwin system and LS bus module.
To be used for the modules
HSM-24V
See also
LS_DIO_INIT, LS_DIGPROG, LS_DIG_IO
ls-module Specified module address on the LS bus (1…15).
enable Set status of watchdog counter:
0 : Disable watchdog counter.
1 : Enable watchdog counter.
time Release time (0…107374) of the counter in milli-
seconds.
ret_val Bit pattern representing the error status.
Bit = 0:No error.
Bit = 1: Error occurred.
Bit no. 31…8 7 6 5…4 3210
Status – Temp2 Temp1 – WD Time Ovr Par
- :don't care (mask with 0CFh)
Par:Parity error during data transfer on the LS bus.
Ovr: Overrun error during data transfer on the LS bus.
Time: Timeout error during data transfer on the LS bus.
WD: Watchdog was released. The channel drivers are deactivated.
Temp1: Superheating on driver for channels 1…16. Driver is deactivated.
Temp2: Superheating on driver for channels 17…32. Driver is deactivated.
LONG
LONG
LONG
LONG
HSM
-
24
V

HSM-24V
LS_WATCHDOG_INIT ADwin
8ADwin LS Bus, Manual version 1.0, September 2006
Example
REM Example prozess for one module HSM-24V and ADwin-L16
#INCLUDE ADWL16.inc
init:
PROCESSDELAY = 4000000 '10Hz HP
PAR_1 = LS_DIO_INIT(1)
PAR_2 = LS_DIGPROG(1, 0Fh) 'channels 1…32 as output
PAR_3 = LS_WATCHDOG_INIT(1, 1, 1100) 'watchdog time 1.1 sec
event:
REM set one channel to high, rotating from 1 to 32
INC PAR_10
IF (PAR_10>=32) THEN PAR_10=0
PAR_11 = SHIFT_LEFT(1,PAR_10)
REM set channels and read back real state
PAR_12 = LS_DIG_IO(PAR_11)

ADwin LS Bus, Manual version 1.0, September 2006 9
HSM-24V
LS_DIO_INIT
ADwin
LS_DIO_INIT
LS_DIO_INIT initializes the specified module of type HSM-24V on the LS bus
and returns the error status.
Syntax
#INCLUDE ADWL16.INC
ret_val = LS_DIO_INIT(ls-module)
Parameters
Notes
The instruction only be used in section INIT:, since it takes long pro-
cessing time.
The initialization does the following settings:
• All DIO channels are set as inputs.
Other settings see LS_DIGPROG.
• The over-current status (> ca. 500mA) is reset.
• The error status for superheating is reset.
• The error status for timeout on the LS bus is reset.
The error "superheating" of a driver may only occur, if over-currrent in
the range of 150…500mA is present on several channels at the same
time. Irrespective of this, an over-current of mor than 500mA automati-
cally switches off the concerned channel.
The channels of the module HSM-24V may only be operated in the
range of 0…150mA.
To be used for the modules
HSM-24V
See also
LS_DIGPROG, LS_WATCHDOG_INIT, LS_DIG_IO
ls-module Specified module address on the LS bus (1…15).
ret_val Bit pattern representing the error status.
Bit = 0: No error.
Bit = 1: Error occurred.
Bit no. 31…8 7 6 5…4 3210
Status – Temp2 Temp1 – WD Time Ovr Par
- :don't care (mask with 0CFh).
Par:Parity error during data transfer on the LS bus.
Ovr:Overrun error during data transfer on the LS bus.
Time:Timeout error during data transfer on the LS bus.
WD:Watchdog was released. The channel drivers are deactivated.
Temp1:Superheating on driver for channels 1…16. Driver is deactivated.
Temp2:Superheating on driver for channels 17…32. Driver is deactivated.
LONG
LONG

HSM-24V
LS_DIO_INIT ADwin
10 ADwin LS Bus, Manual version 1.0, September 2006
Example
REM Example prozess for one module HSM-24V and ADwin-L16
#INCLUDE ADWL16.inc
init:
PROCESSDELAY = 4000000 '10Hz HP
PAR_1 = LS_DIO_INIT(1)
PAR_2 = LS_DIGPROG(1, 0Fh) 'channels 1…32 as output
PAR_3 = LS_WATCHDOG_INIT(1, 1, 1100) 'watchdog time 1,1 sec
event:
REM set one channel to high, rotating from 1 to 32
INC PAR_10
IF (PAR_10>=32) THEN PAR_10=0
PAR_11 = SHIFT_LEFT(1,PAR_10)
REM set channels and read back real state
PAR_12 = LS_DIG_IO(PAR_11)

ADwin LS Bus, Manual version 1.0, September 2006 11
HSM-24V
LS_DIGPROG
ADwin
LS_DIGPROG
LS_DIGPROG sets the digital channels 1…32 of the specified module of type
HSM-24V on the LS bus as inputs or outputs in groups of 8.
Syntax
#INCLUDE ADWL16.INC
ret_val = LS_DIGPROG(ls-module, pattern)
Parameters
Notes
The instruction only be used in section INIT:, since it takes long pro-
cessing time.
After initialization with LS_DIO_INIT all channels are set as inputs.
The channels may be set as inputs or outputs in groups of 8 only (4 rel-
evant bits only, other bits are ignored).
To be used for the modules
HSM-24V
See also
LS_DIO_INIT, LS_WATCHDOG_INIT, LS_DIG_IO
ls-module Specified module address on the LS bus (1…15).
pattern Bit pattern, setting the channels as inputs or out-
puts:
Bit = 0: Set channels as inputs.
Bit = 1: Set channels as outputs.
Bit No. 31…4 3 2 1 0
Channel
no.
– 32:25 24:17 16:9 8:1
ret_val Bit pattern representing the error status.
Bit = 0: No error.
Bit = 1: Error occurred.
Bit no. 31…8 7 6 5…4 3210
Status – Temp2 Temp1 – WD Time Ovr Par
- :don't care (mask with 0CFh).
Par:Parity error during data transfer on the LS bus.
Ovr:Overrun error during data transfer on the LS bus.
Time:Timeout error during data transfer on the LS bus.
WD:Watchdog was released. The channel drivers are deactivated.
Temp1:Superheating on driver for channels 1…16. Driver is deactivated.
Temp2:Superheating on driver for channels 17…32. Driver is deactivated.
LONG
LONG
LONG

HSM-24V
LS_DIGPROG ADwin
12 ADwin LS Bus, Manual version 1.0, September 2006
Example
REM Example prozess for one module HSM-24V and ADwin-L16
#INCLUDE ADWL16.inc
init:
PROCESSDELAY = 4000000 '10Hz HP
PAR_1 = LS_DIO_INIT(1)
PAR_2 = LS_DIGPROG(1, 0Fh) 'channels 1…32 as output
PAR_3 = LS_WATCHDOG_INIT(1, 1, 1100) 'watchdog time 1,1 sec
event:
REM set one channel to high, rotating from 1 to 32
INC PAR_10
IF (PAR_10>=32) THEN PAR_10=0
PAR_11 = SHIFT_LEFT(1,PAR_10)
REM set channels and read back real state
PAR_12 = LS_DIG_IO(PAR_11)

ADwin LS Bus, Manual version 1.0, September 2006 13
HSM-24V
LS_DIG_IO
ADwin
LS_DIG_IO
LS_DIG_IO sets all digital outputs of the specified module HSM-24V on the LS
bus to the level High oder Low and returns the status of all channels as bit pat-
tern.
Syntax
#INCLUDE ADWL16.INC
ret_val = LS_DIG_IO(pattern)
Parameters
Notes
LS_DIG_IO only runs correctly, if the following conditions are given:
• There is only one module on the LS bus.
• The module is of type HSM-24V.
• The module's address is set to 1.
The channels are set as inputs or outputs using LS_DIGPROG.
The pattern is applied to those channels only, which are set as out-
puts. Bits for input channels are ignored.
The return value contains the real state of both inputs and outputs. The
inputs have a filter causing about 12µs signal delay.
LS_DIG_IO resets the watchdog counter of the module to the start val-
ue. The counter remains enabled. The start value is set using LS_
WATCHDOG_INIT.
Reset the active watchdog timer at least once to the start value within
the counting interval, in order to keep the module working.
To be used for the modules
HSM-24V
See also
LS_DIO_INIT, LS_DIGPROG, LS_WATCHDOG_INIT
pattern Bit pattern, setting the digital outputs (see table).
Bit = 0: Set outputs to level Low.
Bit = 1: Set outputs to level High.
ret_val Bit pattern representing the real state of all digital
channels (see table).
Bit = 0: Channel has level Low.
Bit = 1: Channel has level High.
Bit No. 31 30 29 … 2 1 0
Inputno. 323130… 3 2 1
LONG
LONG

HSM-24V
LS_DIG_IO ADwin
14 ADwin LS Bus, Manual version 1.0, September 2006
Example
REM Example prozess for one module HSM-24V and ADwin-L16
#INCLUDE ADWL16.inc
init:
PROCESSDELAY = 4000000 '10Hz HP
PAR_1 = LS_DIO_INIT(1)
PAR_2 = LS_DIGPROG(1, 0Fh) 'channels 1…32 as output
PAR_3 = LS_WATCHDOG_INIT(1, 1, 1100) 'watchdog time 1,1 sec
event:
REM set one channel to high, rotating from 1 to 32
INC PAR_10
IF (PAR_10>=32) THEN PAR_10=0
PAR_11 = SHIFT_LEFT(1,PAR_10)
REM set channels and read back real state
PAR_12 = LS_DIG_IO(PAR_11)
Table of contents