de and library files........................................................................................... 28
5Definitions, acronyms, and abbreviations .........................................29
1
Contents
2
Introduction 1
1 Introduction
This manual describes the programming interface for the on board I/O system 1000.
The L-force Controller 3241 and the I/O compound modules are connected via a
backplane bus. By means of an interface DLL (BpbDrvApi.dll), the connection of the
individual application to the backplane bus device driver (BpbDrvXp.sys) and the I/O
system is enabled.
Up to 64 I/O compound modules can be connected to the 3241 controller. Digital
input/output modules, analog modules, and counter modules are provided as I/O
compound modules. Further information can be found in the manual of the I/O
system 1000.
3
2 Architecture
2 Architecture
In the following illustration the architecture of the backplane bus to the application is
shown in a detailed manner.
Abb. 1 Structure of the backplane bus driver
4
API functions 3
3 API functions
The programming interface is based on the backplane bus device driver and provides
an interface for the transmission/reception of process data (PDOs) and configuration
data (SDOs).
By means of this interface, a cyclic thread is created, copying the process data from/to
the I/O modules. The grouping for the customer application interface is simplified, so
that there only is one group. During transmission this group contains all output data,
and during reception it contains all input data.
In the following the functions listed above are specified.
5
3 API functions
3.2 Basic functions
The basic functions serve to the connection establishment or connection termination:
3.2.1 Function: BpbOpen
Register to the hardware
identification. This handle must be transferred as the first parameter for all further
functions.
Parameters
[in] LPTSTR szAppName Name of the application to be registered
[out] PHANDLE hOpen Pointer to open context (handle) for identification
Return values
S_OK Successful
E_LOADED Incomplete (driver not loaded)
3.2.2 Function: BpbClose
Disconnection of the backplane bus
Parameter
[in] HANDLE hOpen Pointer to open context (handle) for identification
of the controller. The return value is a handle for
connection to the 3241 controller.
Return values
S_OK Successful
E_HANDLE Error during connection termination (handle is invalid)
6
API functions 3
3.3 Diagnostics, service functions and network management
3.3.1 Diagnostics functions
The diagnos
tics function provide some return information on the version, available
errors, and states of the backplane buses.
BpbGetVersion function
The
BpbGetVersion function supplies the version of the backplane bus driver.
Parameter
[in] HANDLE hOpen Pointer to open context (handle) for identification
[out] PSTRING pszVersion Version of the backplane bus driver
Return values
S_OK Successful
E_HANDLE Incorrect (handle is invalid)
BpbGetError function
In the stat
us register an error status is signalised. It contains a byte error code. The
BpbGetError function reads out this error code from the status register of the
backplane bus.
Parameter
[in] HANDLE hOpen Pointer to open context (handle) for identification
[out] PUCHAR pbError Error code
Return values
S_OK Successful
E_HANDLE Incorrect (handle is invalid)
A description of the error code can be found in the chapter "Error code“.
7
3 API functions
BpbGetStates function
Parameter
[in] HANDLE hOpen Pointer to open context (handle) for identification
[out] PBPBSTATES pBpbStates Pointer to the states structure
Return values
S_OK Successful
E_HANDLE Incorrect (handle is invalid)
The states are returned in the BpbStates structure. In the following the organisation
of this structure is shown.
BpbState structure
Structure of
UCHAR hRaw Raw value of the status information
Name
the status register:
hName Status information of the controller and the groups
Structure of the name
Structure of the name:
Bit 0 .. bit 1 Controller Status of the controller
Bit 2 .. bit 3 Group1 Status of group 1
Bit 4 .. bit 5 Group2 Status of group 2
Bit 6 .. bit 7 Group3 Status of group 3
The byte is divided according to the status byte of the 3241 controller status register
and the I/O modules configured.
Return values of the controller
1 BPB_ CONTROLLER_STATE_INIT
2 BPB_ CONTROLLER_STATE_PREOP
3 BPB_ CONTROLLER_STATE_OP
Return values of the group
0 BPB_GROUP_STATE_UNAVAILABLE
1 BPB_GROUP_STATE_INIT
2 BPB_GROUP_STATE_RUNNING
3 BPB_GROUP_STATE_ERROR
Please note: Under XP the grouping for the programming interface is simplified, so
that there only is one group. During transmission this group contains all output data,
and during reception it contains all input data.
8
Loading...
+ 22 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.