bihl+Wiedemann 1195 User manual

AS-i PCI Board
User Manual


AS-i PCI Board Table of Contents
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Tel. +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
1
Table of Contents
1 The Used Symbols .............................................................................. 5
2 Safety .................................................................................................... 7
2.1 Intended Use ...................................................................................................... 7
2.2 General Safety Information ............................................................................... 7
3 Features of the AS-i PCI Board .......................................................... 9
4 Installation of the AS-i PCI Board .................................................... 11
5 Accessing the Data ........................................................................... 13
5.1 Windows Device Drivers and DLLs ............................................................... 13
5.2 OPC-Server ...................................................................................................... 13
5.3 Using the AS-i PCI card without the Windows Device Driver ..................... 13
5.3.1 Identifying the Board .......................................................................................... 13
5.3.2 Register Map ..................................................................................................... 14
5.3.3 DPRAM Access ................................................................................................. 14
5.3.4 Interrupt Handling .............................................................................................. 14
6 Data Exchange via the Dual Port RAM (DPRAM) ............................ 15
6.1 Detailed DPRAM Address Map ....................................................................... 15
6.2 AS-i Master Execution Control Lists ............................................................. 16
6.3 Working with AS-i Control Programs ............................................................ 16
6.4 Mailbox Commands ......................................................................................... 17
6.4.1 Write Permanent Parameter (PP) ...................................................................... 18
6.4.2 Read Permanent Parameter (PP) ..................................................................... 18
6.4.3 Write Parameter (PI) .......................................................................................... 18
6.4.4 Store Actual Parameter (PI) .............................................................................. 18
6.4.5 Write Permanent Configuration Data (PCD) ...................................................... 18
6.4.6 Read Permanent Configuration Data (PCD) ..................................................... 19
6.4.7 Store Actual Configuration ................................................................................. 19
6.4.8 Read Configuration Data Image (CDI) .............................................................. 19
6.4.9 Write List of Projected Slaves (LPS) ................................................................. 19
6.4.10 Set Operation Mode .......................................................................................... 19
6.4.11 Change Slave Address ...................................................................................... 20
6.4.12 Write Extended ID-code 1 of slave 0 ................................................................. 20
6.4.13 Read 16 Bit Input Data ...................................................................................... 21
6.4.14 Write 16 Bit Output Data .................................................................................... 21
6.4.15 Read 16 Bit Output Data ................................................................................... 21
6.4.16 Write AS-i Control Flags .................................................................................... 21
6.4.17 Get Status (AS-i Control) ................................................................................... 22
6.4.18 Write User Memory (AS-i Control) ..................................................................... 22
6.4.19 Read User Memory (AS-i Control) ..................................................................... 22
6.4.20 Read and Clear LCS (Advanced AS-i Diagnostics) ........................................... 22
6.4.21 Read and Clear Transmission Error Counters (Advanced AS-i Diagnostics) .... 23

AS-i PCI Board Table of Contents
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Tel. +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
2
6.4.22 Set LOS (Advanced AS-i Diagnostics) ............................................................... 23
6.4.23 Update DPRAM ................................................................................................. 23
6.5 Watchdog .......................................................................................................... 23
6.6 Config_ok Delay ...............................................................................................23
6.7 Interrupts .......................................................................................................... 24
7 Advanced Diagnostics for AS-i Masters ......................................... 25
7.1 List of Corrupted AS-i Slaves (LCS) ............................................................... 25
7.2 Protocol Analysis: Counters of Corrupted Data Telegrams ........................ 25
7.3 Off-line Phase on Configuration Errors (LOS) .............................................. 25
8 Commissioning Tools and Accessories ......................................... 27
8.1 Windows Software AS-i Control Tools .......................................................... 27
9 Appendix - Representation of Information in the User Data
Bytes .................................................................................................. 29
9.1 Input and Output Data ..................................................................................... 29
9.2 AS-i Slave Lists ................................................................................................ 29
9.3 Execution Control Flags (ec-flags) .................................................................30
9.4 Host Interface Flags (hi-flags) ........................................................................30
9.5 Installed Software/Flags of the Host Interface .............................................. 31
9.6 AS-i Control Flags, Start/Stop Code .............................................................. 32
9.7 Non-volatile stored Data .................................................................................. 33
10 We Are Interested in Your Opinion! ................................................. 35

AS-i PCI Board
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
3
Declaration of Conformity
according to 89/336/EEC and 73/23/EEC
Bihl+Wiedemann GmbH, Mannheim, hereby declares under its sole responsibility
that the products mentioned below are according to the listed harmonized stan-
dards or normative documents and (where neccessary) a component body has
been released.
Specification: AS-i PCI Board
Article-no.: 1195
Applied harmonized Standards:
EN 50081-2
EN 61000-6-2
Applied national standards or normative documents:
AS-i Complete Specification (EN50295)
Prüfungsordnung für AS-i Master
Manufacturer: Bihl+Wiedemann GmbH
Date: 14.1.00 Bernhard Wiedemann

AS-i PCI Board
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
4

AS-i PCI Board The Used Symbols
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
5
1 The Used Symbols
This symbol warns the user of possible danger. Failure to heed this
warning can lead to personal injury or death and/or damage to
equipment.
This symbol warns the user of a possible failure. Failure to heed this
warning can lead to total failure of the equipment or any other con-
nected equipment.
This symbol gives the user important hints.

AS-i PCI Board The Used Symbols
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
6

AS-i PCI Board Safety
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
7
2 Safety
2.1 Intended Use
2.2 General Safety Information
The protection of operating personnel and the system against possi-
ble danger is not guaranteed if the control interface unit is not oper-
ated in accordance with its intended use.
The device may only be operated by appropriately qualified person-
nel in accordance with this operating manual.
Safety and correct functioning of the device cannot be guaranteed if
any operation other than that described in this operation manual is
performed.
The connecting of the equipment and any maintenance work to be
carried out with voltage applied to the equipment must only be per-
formed by appropriately qualified electrotechnical personnel.
In the case that a failure cannot be repaired, the device must be
taken out of operation and kept from inadvertently put back into
operation.
Repair work is to be carried out by the manufacturer only. Additions
or modifications to the equipment are not allowed and void the war-
ranty.
The operator is responsible for the observance of local safety stan-
dards.

AS-i PCI Board Safety
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
8

AS-i PCI Board Features of the AS-i PCI Board
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
9
3 Features of the AS-i PCI Board
The AS-i PCI Board of the Bihl+Wiedemann GmbH:
• ... contains two complete AS-i Masters with AS-i Control option (PLC), built as
a board for the PCI-bus.
• ... easy installation with "Plug and Play"
• ... is able to execute a control program1. It operates without taking an affect to
the performance of your PC. The other way round the control program runs with
a constant cycle time independent from the PC capacity required by other appli-
cations.
• ... exchanges data with the PC via Dual Port RAM (DPRAM).
• ... an event mechanism can notify the PC application about changes of the data
on the board.
• ... up to 4 AS-i PCI boards can operate in one PC system.
• ... is capable to generate an interrupt on the PCI-bus, for example if the AS-i
data changes.
• ... is able to detect a breakdown of the PC, if the built-in watchdog is activated
(The AS-i masters will change to the Off-line phase if the watchdog is not trig-
gered by a PC program).
• ... Advanced Diagnostics: to detect occasionally occuring configuration errors
and to judge the quality of the AS-i communication.
• ... the included driver makes it possible to use the AS-i PCI board with several
applications simultaneously.
1. The control functions is not available at the A²SI and SAP4 Programming- and Testtool (art. no. 1355).

AS-i PCI Board Features of the AS-i PCI Board
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
10

AS-i PCI Board Installation of the AS-i PCI Board
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
11
4 Installation of the AS-i PCI Board
The "Plug and Play"-feature makes the installation of the AS-i PCI Board very
easy:
1. Switch off the PC.
2. Then just insert the board into a free PCI slot and connect the AS-i circuit(s).
3. The following pictures shows the possibilities to connect an AS-i circuit.
4. Now switch on the PC.
Windows 95/98:
If you have Windows 95 or Windows 98 you will be asked to insert the driver disk
for the AS-i PCI Board ("Windows 95/98 driver install disk for AS-i PCI Board"; this
is the disk 1 of the software AS-i Control Tools).
Then install the AS-i Control Tools (setup.exe on disk 1) and follow the given in-
structions.
Windows NT:
If you have Windows NT, make sure that are you logged in as administrator, then
just install the AS-i Control Tools (setup.exe on disk 1) and follow the given instruc-
tions.
Connection samples for the AS-i power supply:
In the wiring schemes above the current through the AS-i mas-
ter must not exceed 5 A.
AS-i Master
max. 5 A
PELV according to EN
50178 (Protective
extra low voltage)
A
S-i
power
supply
-
+
AS-i Slave
-
+
AS-i Slave
-
+
AS-i Master
max. 8 A
PELV according to EN 50178
(Protective extra low voltage)
A
S-i
power
supply
-
+
AS-i Slave
-
+
AS-i Slave
-
+

AS-i PCI Board Installation of the AS-i PCI Board
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
12

AS-i PCI Board Accessing the Data
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
13
5 Accessing the Data
5.1 Windows Device Drivers and DLLs
The AS-i PCI card comes with Windows device drivers for Windows 95/98/NT and
2000 (see chapter 3). In addition to that you can download the DLLs "asidrv32"
and "asipci.dll" from the Internet. These DLLs enable the user to write its own Win-
dows application. The use of these DLLs is described in the files "readme.txt" and
"aasidrv.h" that are also contained in the driver package "Windows drivers for AS-i
Masters (32Bit DLL)".
5.2 OPC-Server
Another possibility of data access is the use of the OPC-Server. The OPC-Server
is an easy possibility to use a wide variety of SCADA-systems together with the
AS-i PCI card.
5.3 Using the AS-i PCI card without the Windows Device Driver
The DPRAM of the AS-i PCI board is accessible both memory mapped and I/O
mapped. The PCI host system should provide ways (such as the PCI BIOS in case
of an IBM AT) to determine the I/O and/or memory base address and interrupt
number.
5.3.1 Identifying the Board
The following information is needed to find and identify the AS-i PCI board on the
PCI bus:
Vendor ID E159h
Device ID 0002h
Subsystem Vendor ID 0022h
Subsystem Device ID 0001h

AS-i PCI Board Accessing the Data
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
14
5.3.2 Register Map
5.3.3 DPRAM Access
The AS-i PCI board uses a 1 kByte, byte-wide DPRAM. The access to this DPRAM
is done through a 16 byte window starting at offset C0h.
To select the window for a certain DPRAM_address, set the register "AUX pin da-
ta" at offset 03haccording to the following formula:
"AUX pin data" = DPRAM_address/16 + 128
In other words, bits 20to 25of "AUX pin data" determine the bits 24to 29of the
DPRAM address. "AUX pin data", bit 27should be set.
To access a certain cell of the DPRAM within the DPRAM window, read or write at
the following offset:
offset = C0h+ DPRAM_address mod 16 * 4
5.3.4 Interrupt Handling
Besides installing an interrupt handler on the PCI host and selecting an interrupt
source in the DPRAM, you have to set the "Interrupt mask" register at offset 05h
to 40hin order to enable interrupt generation of the AS-i PCI board.
If the AS-i PCI asserts an interrupt, bit 26of "AUX pin status" is set to zero. To ack-
nowledge the interrupt, set bit 27of "AUX pin data" to zero and wait for bit 26of
"AUX pin status" until it becomes ’1’. Afterwards, read the "Interrupt Event"
DPRAM cell to determine the interrupt source that caused the interrupt.
(If this is done within a interrupt handler, you should save and restore the contents
of the "AUX pin data" register in order to avoid switching the DPRAM window du-
ring DPRAM access of an other task.)
Offset Bits Description Value
00hsubsystem reset FFh: asserted, FEh: released
02h"AUX pin control" set to BFh
03h
0..5
6
7
"AUX pin data"
DPRAM window selection
interrupt request
interrupt acknowledge
initialize with 80h
04hset to 00h
05h"Interrupt mask" set to 40hto enable interrupts,
else set to 00h
07h"AUX pin status"
C0h...
FCh
DPRAM window

AS-i PCI Board Data Exchange via the Dual Port RAM (DPRAM)
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
15
6 Data Exchange via the Dual Port RAM (DPRAM)
6.1 Detailed DPRAM Address Map
AS-i Circuit 1:
AS-i Circuit 2:
Device, Part 1:
address size data access
000h8 list of active slaves LAS r/–
008h8 list of detected slaves LDS r/–
010h8 list of projected slaves LPS r/–
018h8 list of peripheral faults LPF r/–
020h32 parameter image PI r/w
040h32 permanent parameter PP r/–
060h32 output data image ODI (inverted!) r/w
080h32 input data image IDI r/–
0A0h2 execution control flags ec-flags r/–
0A2h1 host interface flags hi-flags r/w
0A8h8 list of ‘offline slaves’ LOS r/–
address size data access
100h8 list of active slaves LAS r/–
108h8 list of detected slaves LDS r/–
110h8 list of projected slaves LPS r/–
118h8 list of peripheral faults LPF r/–
120h32 parameter image PI r/w
140h32 permanent parameter PP r/–
160h32 output data image ODI (inverted!) r/w
180h32 input data image IDI r/–
1A0h2 execution control flags ec-flags r/–
1A2h1 host interface flags hi-flags r/w
1A8h8 list of ‘offline slaves’ LOS r/–
address size data access
0C8h8 Date Code r/–
0D0h16 Features r/–
0E0h32 Master Name r/–

AS-i PCI Board Data Exchange via the Dual Port RAM (DPRAM)
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
16
Device, Part 2:
If an AS-i Control program1runs, buffers C and D are occupied by the AS-i Control
user memory (flags).
6.2 AS-i Master Execution Control Lists
All data of the AS-i master may be read at any time out of the DPRAM (addresses
000hto 0AFhresp. 100hto 1AFh).
The only lists, that are read cyclically by the AS-i master are the output data image
ODI, the host interface flags (hi-flags)and the parameter image PI. All other lists
can only be written by using the mailbox commands.
The AS-i master writes cyclically the input data image IDI, the execution control
flags (ec-flags), the list of active slaves LAS, the list of detected slaves LDS and
the configuration data image CDI.
Additionally, the installed software string is updated.
Due to the internal processing of the output data image ODI, the user has to store
it inverted to the DPRAM.
While a control program1is running, it generates the new ODI, so the AS-i master
writes it to the DPRAM image.
6.3 Working with AS-i Control Programs
While an AS-i Control program1is running all output data that are written directly
to the ouput data image ODI are overwritten instantly by the AS-i Control program.
To write output data from the PC to the card you have to write these data to the
user flags. These user flags must be copied in the AS-i Control program to the out-
address size data access
1B9h1 Config_ok Delay r/w
1BAh1 Watchdog Enable r/w
1BBh1 Watchdog Counter r/w
1BCh2 Interrupt Enable r/w
1BEh2 Interrupt Event r/–
1C0h16 Mailbox A r/w
1D0h16 Mailbox B r/w
1E0h16 Mailbox C r/w
1F0h16 Mailbox D r/w
200h128 Buffer A r/w
280h128 Buffer B r/w
300h128 Buffer C r/w
380h128 Buffer D r/w
1. The control functions is not available at the A²SI and SAP4 Programming- and Testtool (art. no. 1355).

AS-i PCI Board Data Exchange via the Dual Port RAM (DPRAM)
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
17
puts. You can copy the data either bit-wise or with transfer-commands byte- or
word-wise to the outputs.
6.4 Mailbox Commands
To read and write the execution control lists that are not directly accessibly in the
DPRAM the AS-i PC card has four mailboxes. These mailboxes have to be used
as well if commands like "Change Slaveaddress" or "Store Configuration" shall be
executed.
Each mailbox consists of 16 bytes:
In addition to that there is a 128 byte buffer assigned to each mailbox.
The command is initiated by writing a valid command value to the first byte of the
mailbox. After command execution, the master overwrites the command with one
of the following values:
00h:ACK
successful command execution
FFh:NAK
an error occured during command exectution
Before the AS-i Master overwrites the first byte of the mailbox with NAK, it writes
an error message to the second byte of the mailbox:
00h:OK
no error occured
01h:NOK
error occured, no more precise diagnosis available
10h: Request
invalid command value was written to the first byte of the mailbox
12h:CtrlBuff
command is not allowed in this mailbox because buffers C and D are oc-
cupied by the AS-i Control user memory.
13h: NotImplemented
command is valid but not implemented yet
The following mailbox commands are available:
(See chapter 9 for detailed explanation of the lists and parameters of the individual
commands).
byte 0 byte 1 byte 2...15
in command AS-i circuit
(0: AS-i circuit 1,
1: AS-i circuit 2)
parameter in
out result error message parameter out

AS-i PCI Board Data Exchange via the Dual Port RAM (DPRAM)
Subject to reasonable modifications due to technical advances Copyright Bihl+Wiedemann, Printed in Germany
Bihl+Wiedemann GmbH · D-68199 Mannheim · Phone +49-621-339960 · Fax +49-621-3392239 · Internet http://www.bihl-wiedemann.de
issue date 12.2.2002
18
6.4.1 Write Permanent Parameter (PP)
6.4.2 Read Permanent Parameter (PP)
6.4.3 Write Parameter (PI)
6.4.4 Store Actual Parameter (PI)
Stores the actual parameters of the AS-i slaves as permanent parameters.
6.4.5 Write Permanent Configuration Data (PCD)
command 3hex/3dec
parameter in –
parameter out –
buffer in PP[32]
buffer out –
command 4hex/4dec
parameter in –
parameter out –
buffer in –
buffer out PP[32]
command 5hex/5dec
parameter in [slave address][PI]
parameter out [slave address][PI][slave response]
buffer in –
buffer out –
command 7hex/7dec
parameter in –
parameter out –
buffer in –
buffer out –
command 8hex/8dec
parameter in –
parameter out –
buffer in PCD[128]
buffer out –
Table of contents
Popular PCI Card manuals by other brands

ADS Technologies
ADS Technologies Instant Video PCI user guide

StarTech.com
StarTech.com 21050-PC-SERIAL-LP quick start guide

ICP DAS USA
ICP DAS USA PCI-P8R8 user manual

ICP DAS USA
ICP DAS USA PISO-730 Series quick start

Plura
Plura PCIe TS operating instructions

ICS Advent
ICS Advent PB751-AT product manual