ADwin-Pro
Hardware, manual version 2.9, June 2006
179
Pro I: Signal Conditioning and Interface Modules
Pro-Fieldbus Modules
ADwin
Programming
All fieldbus modules are easily programmed with the
ADbasic
instructions.
Therefore the programs can be used for various fieldbus modules, without hav-
ing to change them.
The following instructions can be found in the include file
<ADPEXT.INC>
:
The instructions are described in the Pro Software manual or the online help.
Initialization
Initializing the fieldbus module
This program initializes a fieldbus module in the
LOWINIT
:
section (see also
). The initialization must be a low-priority process,
because it takes some seconds; if it is a process with high priority, the PC inter-
rupts the communication after a time (time-out).
#INCLUDE
adwpext.inc
DIM
adr
AS
LONG
LOWINIT
:
adr
= 1
REM Initialization of the anybus-module
par_1
=
INIT_SLAVE
(
adr
,16,0,32,0,2,2,0)
After initialization the module has the following parameters:
– 16 bytes input data in the cyclic data exchange
– 0 byte input data in acyclic data exchange
– 32 bytes output data in the cyclic data exchange
– 0 byte output data in the acyclic data exchange
–
CHANGED_DATA
function is enabled
– Outputs are frozen at bus OFF
– No interrupt
For more information see the Pro Software manual or the online help.
Area
Instructions
Initialization
INIT_SLAVE
Access right to the DP-RAM
(handshake)
CHECK_ACCESS
REQUEST_ACCESS
REQUEST_RELEASE_ACCESS
Writing to and reading out the memory
areas
CHANGED_DATA
GET_PRO_BYTE
SET_PRO_BYTE
GET_READ_BUFFER
SET_WRITE_BUFFER