Lenze L-Force 3241C Mounting instructions

SHPIPCBPB
.Dvñ
Ä.Dv'ä
Software Manual
Industrial PC
L-force Controller 3241C - Backplane Bus
Programming Interface I/O-System 1000
L-force Controls


Contents
1
Contents
1Introduction ........................................................................................... 3
2Architecture............................................................................................ 4
3API functions .......................................................................................... 5
3.1Functions of the interface DLL.................................................................................. 5
3.2Basic functions........................................................................................................... 6
3.2.1Function: BpbOpen ...............................................................................................6
3.2.2Function: BpbClose ...............................................................................................6
3.3Diagnostics, service functions and network management.................................... 7
3.3.1Diagnostics functions...........................................................................................7
3.3.2Service functions ...................................................................................................9
3.3.3Network management...................................................................................... 10
3.4Communication....................................................................................................... 11
3.4.1SDO communication.......................................................................................... 11
3.4.2SDO functions...................................................................................................... 12
3.4.3SDO indexes......................................................................................................... 13
3.4.4SDO block structure ........................................................................................... 15
3.4.5Memory requirements for SDO....................................................................... 17
3.4.6PDO communication.......................................................................................... 18
3.4.7PDO functions...................................................................................................... 19
3.4.8Memory requirements for process data....................................................... 20
3.4.9Example constellation....................................................................................... 20
3.5Status description of the backplane bus (state machine) .................................... 23
3.6Error codes ............................................................................................................... 23
3.7I/O module types and their data width................................................................. 26
4Software ...............................................................................................28
4.1Driver........................................................................................................................ 28
4.2Programming interface........................................................................................... 28
4.3Include and library files........................................................................................... 28
5Definitions, acronyms, and abbreviations .........................................29

Contents
2

Introduction 1
3
1Introduction
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.

2 Architecture
4
2Architecture
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

API functions 3
5
3API 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.
3.1 Functions of the interface DLL
The following functions are provided:
Function Description
BpbApiOpen Log on application on application interface
BpbApiClose Log off application on application interface
BpbApiGetVersion Returns the version
BpbApiGetStates Read out status of the backplane bus (BPB)
BpbApiResetBpb Carries out a reset on the BPB controller
BpbApiGetError Read last error message of the BPB
BpbApiResetError Resets the error memory in the BPB controller
BpbApiReadSdo Reading out the input buffer
BpbApiWriteSdo Writing to the output buffer
BpbApiSetOperational Starts free-running BPB operation
BpbApiReadPdo Imports the process image
BpbApiWritePdo Writes the process image
In the following the functions listed above are specified.

3 API functions
6
3.2 Basic functions
The basic functions serve to the connection establishment or connection termination:
3.2.1 Function: BpbOpen
Register to the hardware of the controller. The return value is a handle for
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 connection to the 3241 controller.
Parameter
[in] HANDLE hOpen Pointer to open context (handle) for identification
Return values
S_OK Successful
E_HANDLE Error during connection termination (handle is invalid)

API functions 3
7
3.3 Diagnostics, service functions and network management
3.3.1 Diagnostics functions
The diagnostics 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 status 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“.

3 API functions
8
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 the status register:
UCHAR hRaw Raw value of the status information
Name
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.
Table of contents
Other Lenze Industrial PC manuals

Lenze
Lenze MC-CAN2 User manual

Lenze
Lenze L-force CPC 2800 User manual

Lenze
Lenze L-force Controls User guide

Lenze
Lenze L-force Controls User manual

Lenze
Lenze EL 1800 User guide

Lenze
Lenze MP 800 DVI User manual

Lenze
Lenze CS 5800 User manual

Lenze
Lenze V80GBS Series User manual

Lenze
Lenze EPCZEBED User manual

Lenze
Lenze L-force MC Series User manual
Popular Industrial PC manuals by other brands

Dell
Dell Embedded Box PC 5000 Installation and operation manual

IBASE Technology
IBASE Technology ASB200-918 Series user manual

Lenovo
Lenovo ThinkCentre M90q Hardware Maintenance Manual

IXXAT
IXXAT Econ 100 Hardware manual

Kontron
Kontron KBox A-151-TGL user guide

AXIOMTEK
AXIOMTEK ICO500-518 Series user manual
















