Jäger ADwin-light-16 User manual

ADwin-light-16
Manual
ADwin-light-16 , manual version 2.2, December 2004

ADwin-light-16 , manual version 2.2, December 2004
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-light-16 , manual version 2.2, December 2004 III
ADwin
Table of contents
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV
1 Information about this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 System description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
2.1 ADwin system concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 ADwin-light-16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Operating Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Start-up of the Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
5.1 Analog Inputs and Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2 Digital Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.3 Impulse/Event Counter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.4 Time-critical tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7 CO1 Counter Add-On . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.2 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8 DIO1 Add-On . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
8.1 Digital Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.2 Counters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.3 CAN-Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
9 ADwin-light-16-Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
10 Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
11 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
11.1 Example Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Annex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
A-1 Technical Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
A-2 Hardware Addresses - General Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
A-3 Table of figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
A-4 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
A-5 List of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-8

Typographical Conventions ADwin
IV ADwin-light-16 , manual version 2.2, December 2004
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 a "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 parentheses and characterized in the font
Courier New.
Program text Program instructions and user inputs are characterized by the font Courier
New.
Var_1 Source code elements such as INSTRUCTIONS, variables, comment and
other text are characterized by the font Courier New and are printed in
color (see also the editor of the ADbasic development environment).
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-light-16 , manual version 2.2, December 2004 1
Information about this manual
ADwin
1 Information about this manual
This manual contains comprehensive information about the operation of the
ADwin-light-16 system. Additional information are available in
– the manual "ADwin Driver Installation", which describes all interface
installations for the ADwin systems.
Start your installation with this manual.
– the description of the configuration program ADconfig. With it, you ini-
tialize the communication from the corresponding interface to your
ADwin-light-16 system.
– the manual ADbasic, which contains all instructions for the compiler
ADbasic and explains the principle of ADwin systems in particular.
– the description of the driver installation and command instructions for all
well known development environments.
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 stan-
dards, guidelines, accident prevention regulations and operating condi-
tions, 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 364).
Availability of the
documents
This product documentation and all documents referred to, have always to be
available and to be observed. For damages caused by disregarding the infor-
mation in this documentation or in all other additional documentations, no lia-
bility is assumed by the company Jäger Computergesteuerte Messtechnik
GmbH, Lorsch, Germany.
Legal instructionsThis documentation, including all pictures is protected by copyright. Reproduc-
tion, translation as well as electronical and photographical archiving and mod-
ification 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

System description ADwin
2ADwin-light-16 , manual version 2.2, December 2004
2 System description
2.1 ADwin system concept
ADwin systems guarantee fast and accurate operation of measurement data
acquisition and automation tasks under real-time conditions. This offers an
ideal basis for applications such as:
– very fast digital closed-loop control systems
– very fast open-loop control systems
– data acquisition with very fast online analysis of the measurement data
– monitoring of complex trigger conditions and many more
ADwin systems are optimized for processes which need very short process
cycle times of one millisecond upto some microseconds.
System features The ADwin system is equipped with analog and digital inputs and outputs, a
fast processor (32-bit floating point signal processor) and local memory. The
processor is responsible for the whole real-time processing in the system. The
applications are running independent of the PC and its workload.
Processor The processor of the ADwin system processes each measurement value at
once.
In one cycle you can acquire the status of the inputs, process the status by the-
help of any mathematical functions, and react to the results, even at very fast
process cycle times of some microseconds. This results in a perfect and logical
work sharing: The PC runs a program for visualizing of data, for input and oper-
ation of the processes, togeher with access to networks and data bases, while
the processor of the ADwin system executes all tasks which require real-time
in parallel.
Real-time operating
system
The operating system for the DSP of the ADwin system has been optimized
to reach the fastest response times possible. It manages parallel processes in
a multitasking manner. Low priority processes are managed by time slicing.
Requested high priority processes interrupt all low priority processes and are
instantaneously and completely executed (preemtive multitasking). High prior-
ity processes are executed as time-controlled or event-controlled processes
(external trigger).
Timing The built-in timer is responsible for the precise calling of high priority pro-
cesses. It has a resolution of 25 nanoseconds. The ADwin systems are char-
acterized by an extremely short response time of only 300 nanoseconds during
the change from a low to a high priority process. A continously running com-
munication process enables a continous data exchange between the ADwin
system and the PC even during applications in process. The communication
has no influence on the real-time capability of the ADwin system, neverthe-
less, it is possible to exchange data at any time.
ADbasic The real-time development tool ADbasic gives the opportunity to create
time-critical programs for ADwin systems very easily and quickly. ADbasic is
an integrated development environment under Windows with possibilities
for online debugging. The habitual, easy-to-learn BASIC instruction syntax has
been extended by many more functions, in order to get direct access to inputs
and outputs as well as by functions for process control and communication with
the PC.

ADwin-light-16 , manual version 2.2, December 2004 3
System description
ADwin
Communication between ADwin system and PC
InterfacesThe ADwin system is connected to the PC via an USB or Ethernet interface.
After power-up the ADwin system is booted from the PC via this interface.
Afterwards the ADwin operating system is waiting for instructions from the PC
which it will process.
Instruction processingThere are two kinds of instructions: On the one hand instructions, which trans-
fer data from the PC to the ADwin system, for instance "load process", "start
process" or "set parameter", on the other hand instructions which wait for a
response from the ADwin system, for instance "read variables" or "read data
sets". Both kinds of instructions are processed immediately by the ADwin sys-
tem, which means immediate and full range responds. The ADwin system
never sends data to the PC without request! The data transfer to the PC is
always a response to an instruction coming from the PC. Thus, embedding the
ADwin system into various programming languages and standard software
packages for measurements is easily made, because they have only to be able
to call functions and process the return value.
Software interfacesUnder Windows 95/98/NT/ME/2000/XP you can use a DLL and an ActiveX
interface. On this basis the following drivers for development environments
are available:
.NET, Visual Basic, Visual-C, C/C++, Delphi, VBA (Excel, Access, Word),
TestPoint, LabVIEW / LabWINDOWS, Agilent VEE (HP-VEE), InTouch, DIA-
dem, MATLAB.
The easy, instruction-oriented communication with the ADwin system enables
several Windows programs to access the same ADwin system in coordination
at the same time. This is of course a great advantage when programs are
developed and installed.
Fig. 1 – Concept of the ADwin systems

System description ADwin
4ADwin-light-16 , manual version 2.2, December 2004
2.2 ADwin-light-16
Processor and memory The ADwin-light-16 system is equipped with the 32 bit signal processor
ADSP 21062 (SHARC) from Analog Devices with floating point and integer
processing. It is responsible for the complete measurement data acquisition,
online processing, and signal output and can instantaneously process - in com-
bination with the A/D-converter - each measurement value with sample rates
of up to 100 kHz.
The on-chip memory with 256 kB has a very short access time of 25 ns and
is large enough to hold the complete ADwin operating system, the ADbasic
process and all variables.
In order to get maximum access speed, all inputs and outputs are memory
mapped in the external memory section of the DSP. For buffering larger quan-
tities of data the DSP uses an external memory (SDRAM) of 8MB.
Analog inputs In a 37-pin D-SUB socket there are 8 analog inputs available, which are con-
nected to a multiplexer, whose output signal is converted with a 16 bit ana-
log-to-digital converter (ADC, see figure below).
Fig. 2 – Functions diagram (with USB interface)
Analog outputs ADwin-light-16 is equipped with 2 analog outputs with 16 bit resolution and
an output voltage range of -10 V ... +10 V. You can synchronize and calibrate
the output of the voltage of all DACs per software. In order to smooth the output
signal, it passes through a low pass filter with a cut-off frequency of fc=
700 kHz.
Digital inputs and outputs 6 digital inputs and 6 digital outputs are available on the 37-pin D-SUB
socket. The inputs and outputs are TTL-compatible.
Trigger input ADwin-light-16 is equipped with a trigger input (EVENT, see also chapter 5.2
"Digital Inputs and Outputs"). Thus, processes can be triggered by a signal
(trigger) and completely processed at once (see ADbasic manual, chapter
"Processes in the ADwin Operating System").
Scope of delivery The standard scope of delivery for ADwin-light-16:
–ADwin-light-16 system
– USB or Ethernet connecting cable, length 1.8 m
–ADwin-CD-ROM
– Manual "Driver Installation"
– this hardware manual
The additional items for the type with external enclosure (L16-EXT) are:
– Power adapter: a slot metal sheet with power supply socket and
PC-internal three-pole connecting cable
– power supply cable (between slot metal sheet and L16-EXT)
6 digital inputs
(TTL / 5V-CMOS)
6 digital outputs
(TTL / 5V-CMOS)
16bit / 10µs
A
D
MUX
IN 1
IN 3
IN 5
IN 7
IN 9
IN 11
IN 13
IN 15
D
A
D
A
16bit
16bit
OUT 1
OUT 2
EVENT
InAmp
+
-
OP
+
-
OP
+
-
DIGOUT5:0
CLK 1
CLK 2
two 32 bit
impuls-counter
SHARC
™
ADSP 21062
Analog Devices
8 MB external SDRAM
DIGIN5:0
to PC
USB-
controller USB

ADwin-light-16 , manual version 2.2, December 2004 5
System description
ADwin
DesignsADwin-light-16 is available as basic version with USB connection in different
designs.
Fig. 3 – Designs
TypesThe designs L16-EURO and L16-EXT can optionally be delivered with USB or
10/100 MBit Ethernet interface. The available types of the ADwin-light-16
basic version are described in the following table.
Please take into account that the power supply for the different designs varies:
–+5VoltforL16-PCI, L16-EURO and L16-cPCI
– +10 ... +18 Volt for L16-EXT
PC plug-in board (L16-PCI) 19" plug-in board (L16-EURO)
external enclosure (L16-EXT) Compact-PCI plug-in board
(L16-cPCI)
Type Interface
USB Ethernet
PC plug-in board L16-PCI –
19" plug-in module (Euro) L16-EURO L16-EURO-ENET
Compact PCI plug-in module L16-cPCI –
External enclosure L16-EXT L16-EXT-ENET
Fig. 4 – Types of the ADwin-light-16 basic version

System description ADwin
6ADwin-light-16 , manual version 2.2, December 2004
2.2.1 Ordering options (no later upgrading possible)
ADwin-light-16 can be equipped with the following options:
–L16-CO1: counter option with a 32-bit up/down counter with four edge
evaluation for incremental encoders.
–L16-DIO1: add-on module with
•32 digital inputs/outputs (programmable in groups of 8)
•CAN interface (high speed)
•two 32 bit up/down counters for impulse, period duration and
duty cycle measurements as well as a four edge evaluation for the
connection of incremental encoders.
–L16-Boot: Flash-EPROM bootloader for standalone operation with-
out PC. Can only be ordered in combination with an Ethernet interface.
–L16-Mount: Kit for installation of the system on a DIN rail in a control
cabinet.
Please take into account, that the counters of the add-on boards are not addi-
tionally available, but they replace the counters of the basic version. Therefore
you cannot use the counters of different add-ons at the same time.
2.2.2 Accessories
ADbasic –ADbasic, real-time development tool for all ADwin systems
– cable connectors for an external power supply (for L16-EXT only)
– external power supply (necessary for notebook operation)

ADwin-light-16 , manual version 2.2, December 2004 7
Operating Environment
ADwin
3 Operating Environment
The borad of the ADwin-light-16 may only be operated in a closed casing
(already given with L16-EXT design).
According to type and accessories (see chapter 2.2.1f, delivery options /
accessories) the system can be operated in 19" enclosures, control cabinets
or as a mobile system (e.g. in cars).
The ADwin-light-16 system must be earth-protected, in order to
– build a ground reference point for the electronic
– conduct interferencing energy to earth.
Do connect the GND socket, which is internally connected with the ground ref-
erence point and the enclosure, via a short low-impedance solid-type cable to
the central earth connection point of your installation.
Galvanic connectionThe types with USB interface have a galvanic connection to the PC via USB
and possibly also via power supply.
The types with Ethernet interface have their data lines galvanically isolated, but
the ground potentials are connected, because the shielding of the Ethernet
connector (RJ-45) is connected with GND.
Excluding transient
currents
Transient currents, which are conducted via the enclosure or the shielding,
have influence on the measured signal.
If you want to prevent transient currents, please make sure that the shielding
is fully operative. Take measures for bleeding off interferences, such as earth-
ing the shielding close to the entry into the control cabinet. The more frequently
you earth the shielding on its way to the machine the better the shielding will
operate.
Use cables with shielding on both ends for signal lines. Here too, you should
reduce the bleed off of interferences via the enclosure by using screen clips.
Protection low voltageThe ADwin-light-16 system is internally operated with a voltage of +5 V and
±15 V against GND and thus is not life-threatening. For operation with an
external power supply, the instructions of the manufacturer apply.
Ambient temperatureADwin-light-16 is designed for operation in dry rooms. The installation envi-
ronment (PC or 19" rack) shall have an ambient temperature of +5 ... +50 °C,
and a relative humidity of 0 ... 80 % (no condensation, see also Annex).
Chassis temperatureThe temperature of the casing (surface temperature) of the type L16-EXT must
not exceed +55 °C, even under extreme operating conditions - e.g. in a control
cabinet or if the system is exposed to the sun for a longer period of time. Oth-
erwise, you risk damages to the device or the output of not-defined data (val-
ues) which can cause damages to your measurement device under
unfavorable circumstances.

Start-up of the Hardware ADwin
8ADwin-light-16 , manual version 2.2, December 2004
4 Start-up of the Hardware
Do not connect any cables to the ADwin-light-16 system on start-up before
you have executed the following steps:
1. Software installation / hardware installation in the PC or 19“ rack.
Follow the instructions in the manual: "ADwin Driver Installation".
2. Read chapter 5 "Inputs and Outputs" in this manual
3. Only now connect the signal lines to the inputs and outputs.
Notes
Avoid direct contact with uninsulated parts in order to protect them against
electrostatic discharges.
Reliable power supply Please pay attention that a reliable power source is supplied.
This concerns the PC (standard scope of delivery), otherwise also the external
power supply, if operated in a car, the battery voltage.
If using current-limiting power supplies, please pay attention the current
demand on power-up which can be a multiple of the idle current. You find more
detailed information in the Technical Data (Annex).
In case of power failure all unsaved data are lost. Not-defined data (values)
can under unfavorable circumstances cause damages to your measurement
device.
Check Data Connection
Start ADbasic and boot the ADwin system by clicking the boot button .
The display in the status line: "ADwin is booted" shows that the operating
system has been loaded appropriately and that ADbasic can establish a con-
nection to the ADwin system.
ADbasic programs Programming the ADwin systems is described more detailed in the ADbasic
manual.
Start with the programming examples in the ADbasic Tutorial.

ADwin-light-16 , manual version 2.2, December 2004 9
Inputs and Outputs
ADwin
5 Inputs and Outputs
ConnectionsThe ADwin-light-16 system is equipped with a connecting socket for USB or
Ethernet as well as with a 37-pin D-SUB socket. You will find on the D-SUB
socket (pin assignment next page) as follows:
– 8 analog inputs
– 2 analog outputs
– 6 digital inputs and outputs each
– 1 digital trigger input
– 2 impulse/event counters with 32 bit
– Output for power supply +5V; L16-PCI and L16-cPCI also ±12V
The design L16-EXT has an additional GND socket (see earth protection,
page 7), a power input socket and a manual on/off switch.
All inputs and outputs may only be operated according to the specifications
given (see Annex A-1: Technical Data). In case of doubt, ask the manufacturer
of the device to which you want to connect the ADwin-light-16 system.
Open inputs can cause errors – above all in an environment which is not free
of any interferences. For your own safety, set unused inputs as close as pos-
sible to the D-SUB socket on a defined level (e.g. GND). Separate these inputs
also from open-ended lines.
Exception to this is the event input, which already has an internal pull-up resis-
tor (10 kΩ).
Front
Back
L16-PCI L16-EURO
and L16-cPCI L16-EXT
Fig. 5 – Connections at the ADwin-light-16 system
ADwin-I/O-CONNECTOR
ADwin
-L16
USB
USB
ADwin
I/O CONNECTOR
10-18VDC
ONPOWERGND

Inputs and Outputs ADwin
10 ADwin-light-16 , manual version 2.2, December 2004
Fig. 6 – L16-EURO VGA pin socket female (power supply)
Fig. 7 – L16-EXT power connector (male)
Standard instructions For fast and easy programming there are standard instructions available in the
compiler ADbasic, which enable a user to easily measure or output data (see
also ADbasic manual). Use other instructions (such as direct register access)
only if extremely time-critical or special tasks require to do so. (see also
chapter 11).
More detailed information about the analog as well as the digital inputs and out-
puts can be found in the following chapters.
L16-PCI and L16-cPCI L16-EURO and L16-EXT
Fig. 8 – Pin assignment inputs/outputs (female)
a b c
a b c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
+5V *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
DGND *
+5V *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
DGND *
+5V *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
DGND *
ab c
+9...18VPE
GND
1
2
3
+5V (max. 100mA)
+12V (max. 100mA)
DGND
DIGIN-5 / CNTR 2, CLK
DIGIN-4 / CNTR 1, CLK
DIGIN-3
DIGIN-2
DIGIN-1
DIGIN-0
ADC 11 INPUT(+)
ADC 09 INPUT(+)
ADC 07 INPUT(+)
ADC 05 INPUT(+)
ADC 03 INPUT(+)
ADC 01 INPUT(+)
ADC 15 INPUT(+)
ADC 13 INPUT(+)
DAC 2 OUTPUT
DAC 1 OUTPUT
RESERVED
-12V (max. 100mA)
EVENT INPUT
DIGOUT-5
DIGOUT-4
DIGOUT-3
DIGOUT-2
DIGOUT-1
DIGOUT-0
ADC 11 INPUT(-)
ADC 09 INPUT(-)
ADC 07 INPUT(-)
ADC 05 INPUT(-)
ADC 03 INPUT(-)
ADC 01 INPUT(-)
ADC 15 INPUT(-)
ADC 13 INPUT(-)
AGND DAC
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
+5V (max. 100mA)
RESERVED
DGND
DIGIN-5 / CNTR 2, CLK
DIGIN-4 / CNTR 1, CLK
DIGIN-3
DIGIN-2
DIGIN-1
DIGIN-0
ADC 11 INPUT(+)
ADC 09 INPUT(+)
ADC 07 INPUT(+)
ADC 05 INPUT(+)
ADC 03 INPUT(+)
ADC 01 INPUT(+)
ADC 15 INPUT(+)
ADC 13 INPUT(+)
DAC 2 OUTPUT
DAC 1 OUTPUT
RESERVED
RESERVED
EVENT INPUT
DIGOUT-5
DIGOUT-4
DIGOUT-3
DIGOUT-2
DIGOUT-1
DIGOUT-0
ADC 11 INPUT(-)
ADC 09 INPUT(-)
ADC 07 INPUT(-)
ADC 05 INPUT(-)
ADC 03 INPUT(-)
ADC 01 INPUT(-)
ADC 15 INPUT(-)
ADC 13 INPUT(-)
AGND DAC
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1

ADwin-light-16 , manual version 2.2, December 2004 11
Inputs and Outputs
ADwin
5.1 Analog Inputs and Outputs
Earth protectionThe design L16-EXT has to be earth-protected, in order to execute measure-
ments without interferences. For this, connect the GND socket via a low imped-
ance solid-type cable to the central earth connection point of your installation.
When using the design PCI or EURO, the earth protection is made via PC or
the 19" rack.
At the L16-EXT system, the enclosure is connected to the protective earth con-
ductor of the PC via the GND-line of the power supply cable as well as via the
GND-line of the USB cable.
5.1.1 Inputs
MultiplexerThe system has 8 analog measurement inputs, which are connected to the
16-bit analog-to-digital converter (ADC) via one multiplexer. The inputs are
solely odd-numbered (ADC 01, ADC 03, ... ADC 15), which has to be consid-
ered upon programming.
DifferentialThe analog inputs are differential. For each of the measurement channels
there is one plus and one minus input; between them the voltage difference is
measured (pay attention to the potential of the input lines).
16-bit measurementThe signal at the multiplexer output is converted by a 16-bit analog-to-digital
converter (ADC) (see Fig. 2 – Functions diagram (with USB interface)). The
conversion time is 10 µs at a resolution of 305 µV.
Complete measurementThe instruction ADC() executes a complete measurement with an ADC on one
analog input. Thus, this instruction considers for instance the settling time of
the multiplexer and assures perfect measurements (see also ADbasic man-
ual).
5.1.2 Outputs
DAC instructionThe standard instruction DAC(number,value)checks each of the values
exceeding or falling below of the 16-bit value range. If the value is in the 16-bit
value range, the indicated value is output on the output number. If it is not, the
maximum or minimum value is output (see also ADbasic manual).
5.1.3 Calculation Basis
Voltage rangeThe voltage range of the ADwin-light-16 system at the analog inputs and out-
puts is –10 V to +10 V (bipolar 10 V).
Allocation of digits and
voltage
The 65,536 (216) digits are allocated to the corresponding voltage ranges of
the ADCs and DACs insofar that
– 0 (zero) digits correspond to the maximum negative voltage and
– 65,535 digits correspond to the maximum positive voltage
The value for 65,536 digits, exactly 10 Volt, is just outside the measurement
range, so that you will get a maximum voltage value of 9.999695 Volt for the
16-bit conversion.

Inputs and Outputs ADwin
12 ADwin-light-16 , manual version 2.2, December 2004
Fig. 9 – Zero offset in the standard setting of bipolar 10 Volt
In the bipolar settings you will get a zero offset.
For the voltage range of –10 V ... +10 V applies UOFF = –10 V
Least Significant Bit The quantization level ULSB is the smallest digitally displayable voltage differ-
ence and is equivalent to the voltage of the least significant bit (LSB). The ULSB
is equivalent to the formula: 20 V / 216 = 305.175 µV.
The measured 16-bit value of the ADC is returned to the lower word of the
binary cell. Here you must also find the DAC value to be output.
Conversion Digits
'
Voltage
DAC For a DAC:
ADC For an ADC:
+10
-10
0 32768 65536
0
[V]
[Digit]
Bit 31...16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
32-bit memory upper word 16-bit value of the ADC/DAC in the lower word
UOUT Digits ULSB UOFF
+⋅=
Digits
UOUT U–OFF
ULSB
-----------------------------------------
=

ADwin-light-16 , manual version 2.2, December 2004 13
Inputs and Outputs
ADwin
Tolerance ranges
Slight deviations regarding the calculated values may be within the tolerance
range of the individual component. Two kinds of deviations are possible, which
are indicated in this manual (in LSB):
INL– The integral non-linearity (INL) defines the maximum deviation from the
ideal straight line of the conversion characteristics curve, covering the
whole input voltage range.
DNL– The differential non-linearity (DNL) defines the maximum deviation from
the ideal quantization level.
5.2 Digital Inputs and Outputs
Digital inputs/outputs6 digital inputs (DIGIN 00 … DIGIN 05) and 6 digital outputs (DIGOUT 00 …
DIGOUT 05) are available on the 37-pin D-SUB socket. You will find the pin
assignment in figure 8 on page 10.
The inputs DIGIN 04 and DIGIN 05 can be used as counter inputs at the same
time (this is not possible when using a DIO1-add-on) and can optionally be
used for both purposes.
The digital inputs and outputs are TTL-compatible and not protected against
overvoltage.
Do not use connections marked as "RESERVED". They are reserved for
upcoming changes or expansions and can cause damages to your system if
you do not pay attention to this fact.
Trigger input (EVENT)The ADwin-light-16 system is equipped with an external trigger input
(EVENT). An external signal (trigger) with rising edge can start processes,
which are processed completely and immediately (see ADbasic manual,
chapter "Structure of an ADbasic-Program").
5.3 Impulse/Event Counter
The ADwin-light-16 system is equipped with 2 impulse/event counters with
32-bit, which you can configure or read out both together or each individually.
With the options L16-CO1 and L16-DIO1 the counters described here are
replaced by other counters. You will find the corresponding description in chap-
ter 7 "CO1 Counter Add-On" or chapter 8 "DIO1 Add-On".
5.3.1 Hardware
The figure shows the design of a single counter.
Digits
UIN UOFF
–
ULSB
------------------------------------
=
UIN Digits ULSB UOFF
+⋅=

Inputs and Outputs ADwin
14 ADwin-light-16 , manual version 2.2, December 2004
Fig. 10 – Block diagram of the impulse/event counter
The counters are externally clocked that means they increase their counter
values by incrementing at each positive edge at the clock input (CLK). Both
counters have a latch A, into which the counter value can be latched (by pro-
gramm instruction) for read out.
The counters are controlled with special ADbasic instructions via the control
register. The instructions are described in Fig. 11 – Counter instructions - short
reference (below) and in the ADbasic manual (or online help).
Setting inputs The clock inputs are on pins 15 and 16 (see Fig. 8 – Pin assignment inputs/out-
puts (female), page 10); for the correct function TTL compatible signals are
necessary. More details and limit values can be found in the Technical Data in
the Annex. Both inputs can optionally be used as digital signal input (see also
chapter 5.2).
The inputs of the impulse/event counters have a pull-down resistor. Neverthe-
less open-ended inputs can cause errors in an environment which is not free
of interferences. Therefore set the unused inputs to a defined level (e.g. GND).
5.3.2 Software
Include file The counters are easily programmed by using ADbasic instructions. The
instructions are part of an include file which must be included at the beginning
of a program:
#INCLUDE ADWL16.INC
The instructions for both counters are shortly illustrated in the following table
and more detailed in the ADbasic manual or online help. You can configure
each counter individually or both counters together.
Control-Register
32 bit Counter (#1, #2)
32 bit Latch A (#1, #2)
CLK
EN
CLR
CLK
ADwin-light-16 bus
Data
Data
10k
Counter no2 1 Comment
Bit 1 0
CNT_CLEAR( ) 0 0 no effect
1 1 clear counter*
CNT_ENABLE( ) 0 0 disable counter
1 1 enable counter (pay attention to running counters)
CNT_LATCH( ) 0 0 no effect
1 1 copy counter value into latch A *
CNT_READLATCH(#) read latch A (# = counter-no1, 2)
CNT_READ(#) copy counter value into latch A and read it
(# = counter no1, 2)
* these functions are reset after being executed. All other functions are reset by the opposing
function..
Fig. 11 – Counter instructions - short reference

ADwin-light-16 , manual version 2.2, December 2004 15
Inputs and Outputs
ADwin
Sequence of instructionsPlease configure a counter according to the following order:
1. disable specified counter (CNT_ENABLE)
The instruction CNT_ENABLE always accesses all counters. Even if you
want to change the status (disabled/enabled) of only one counter, you
also have to configure the counters whose status shall remain un-
changed.
2. clear counter (CNT_CLEAR)
3. enable counter(CNT_ENABLE)
For further processing of the counter value in the ADbasic program, transfer
the value into latch A and read it from there.
5.3.3 Evaluation of the counter contents
The binary counters generate 32 bit values. Distinguish clearly between the
evaluation of these binary values (e.g. differences) and the screen represen-
tation as decimal numbers.
unchanged bit patternTo correctly evaluate the counter contents you need its original 32 bit values,
especially with calculating differences. This is guaranteed only by use of
ADbasic variables of type INTEGER or LONG.
The representation of 32 bit values in ADbasic often leads to confusion,
because the signless counter value is shown as signed decimal number (see
circle below). Consequently a transition between positive and negative range
of numbers is shown on the screen, which yet is of no importance to the eval-
uation of the counter contents.
For completion the following describes the interpretation of a binary value:
The most significant bit (MSB) is interpreted as sign.
With a positive sign, the following 31 bits are directly interpreted as numerical
value; binary and decimal value are similar.
With a negative sign, the 31 bits are first inverted, one added, and then inter-
preted as numerical value (2’s complement); thus, negative decimal numbers
have an absolute value different to the corresponding binary value.
Calculate differences only with integer numbers (INTEGER, LONG).
"Lap overflow"For programming please remember that an "lap overflow" between the read
out of two counts - i.e. the current counter value "laps" the last counter value
which has been read - is not registered.
Such a lap overflow occurs after some 3½ minutes with an input frequency of
20 MHz or after more than 14 minutes with 5 MHz.

Inputs and Outputs ADwin
16 ADwin-light-16 , manual version 2.2, December 2004
Circle
Fig. 12 – Circle model for interpretation of counter values
5.4 Time-critical tasks
Time-critical tasks For extremely time-critical tasks you can use instructions with which you have
direct access to control and data registers of the hardware (see ADbasic man-
ual or online help). These registers can be found in the memory address area
of the ADSP (memory mapped). These instructions also allow to optimize the
program structure.
Contrary to the standard instructions ADC() and DAC() the instructions for
direct access do not have any test routines. Before you use them you should
have good knowlegde about programming and time and function sequences in
an analog-to-digital converter, because you are now programming closely to
the hardware.
Analog inputs and outputs
ADC() Execute the following ADbasic instructions instead of the standard instruction
ADC() according to the following order:
Program structure SET_MUX()
... 'wait for settling time
START_CONV()
WAIT_EOC() 'wait for end of conversion
READADC()
It is important to set a sufficient time-delay using additional programming
instructions between the instructions START_CONV() and SET_MUX(), in
order to consider the multiplexer settling time (see also ADbasic manual:
"Instruction Reference").
Use the waiting times shown below for instance for computing operations and
thus, save computing time:
– Settling time of the multiplexer: At a maximum voltage jump of 20 V it is
6.5 µs.
– Conversion time of the 16 bit ADC: 10 µs.
0000 0000h
FFFF FFFFh
7FFF FFFFh
8000 0000h
4000 0000h
3FFF FFFFh
BFFF FFFFh
C000 0000h
-1,073,741,824-1,073,741,825
1,073,741,823 1,073,741,824
2,147,483,647
-2,147,483,648
0
-1
inside: value of the
binary counter
outside: decimal number
in ADbasic
Other manuals for ADwin-light-16
1
Table of contents