Lenze L-Force 3241C Software Manual
Lenze L-Force 3241C Software Manual

Lenze L-Force 3241C Software Manual

Backplane bus controller programming interface i/o-system 1000

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading

Summary of Contents for Lenze L-Force 3241C

  • Page 1 L-force Controls SHPIPCBPB .Dvñ Software Manual Industrial PC L-force Controller 3241C - Backplane Bus Programming Interface I/O-System 1000 ...
  • Page 3: Table Of Contents

    Contents Contents Introduction ................... 3     Architecture.................... 4     API functions ..................5     3.1  Functions of the interface DLL .................. 5  3.2  Basic functions......................6  3.2.1  Function: BpbOpen ....................6  3.2.2  Function: BpbClose ....................6  3.3  Diagnostics, service functions and network management ........7  3.3.1 ...
  • Page 4 Contents ...
  • Page 5: Introduction

    Introduction 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.
  • Page 6: Architecture

    Architecture 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 ...
  • Page 7: Api Functions

    API functions 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.
  • Page 8: Basic Functions

    API functions 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.
  • Page 9: Diagnostics, Service Functions And Network Management

    API functions 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...
  • Page 10 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.
  • Page 11: Service Functions

    API functions 3.3.2 Service functions The two functions BpbResetBpb and BpbResetError serve to carry out troubleshooting. BpbResetBpb function The service function BpbResetBpb carries out a reset of the backplane bus and restarts the backplane bus controller. Note: After a reset, BpbSetOperational should be called to start cyclic communication. Parameter [in] HANDLE hOpen...
  • Page 12: Network Management

    API functions 3.3.3 Network management By means of the BpbSetOperational network management function, the status of the backplane bus can be changed over from Operational to PreOperational. BpbSetOperational function The BpbSetOperational function implicitly executes the BpbReset function. Parameter [in] HANDLE hOpen Pointer to open context (handle) for identification [in] ULONG...
  • Page 13: Communication

    API functions Communication In this chapter the transmission/reception of process data (PDOs) and configuration data (SDOs) is described. 3.4.1 SDO communication Configuration data (SDOs) During writing the configuration data the SDOs are stored directly in an output buffer of the driver. Access is basically initiated by the IPC. The BPB controller then responds accordingly.
  • Page 14: Sdo Functions

    API functions A configuration parameter of an I/O module is treated as an SDO in the IPC and is transferred to the BPB controller via the FIFOs in the form of a structure, which contains the data in a format suitable for DS 401. Access of the IPC to the BPB controller is effected in 2 possible ways: BPB controller Writing:...
  • Page 15: Sdo Indexes

    API functions 3.4.3 SDO indexes The following table provides a summary of possible telegrams: Designation Index Subindex Description DS301 Hardware/firmware 1009 h version Indexes 0-1FFF 80 d String[14] for config. file version of the BPB controller 81 d String[14] for ID of the BPB master Software version 100A h 80 d...
  • Page 16 API functions In the following the identification of the modules is described: Module Value DI_2X 0x001 DI_4X 0x003 DI_8X 0x005 DI_4X_3WIRE 0x006 DI_2X_NPN 0x002 DI_4X_NPN 0x004 DI_8X_NPN 0x007 DO_2X 0x101 DO_4X 0x104 DO_8X 0x106 DO_2X_2A 0x102 DO_2X_NPN 0x103 DO_4X_NPN 0x105 DO_8X_NPN 0x107 AI_2X_U...
  • Page 17: Sdo Block Structure

    API functions 3.4.4 SDO block structure SDO memory area header 1. DWORD BpbSdoBlockHeader Status register 2. DWORD 3. DWORD (binary data, according to SDO SDOs … package formats) n. DWORD The structure of the SDO memory area results from the different SDO package formats.
  • Page 18 API functions In the following the SDOs for writing/reading and the corresponding status message/response are shown: Write request Structural element Type Bits Description FIFO Header 1 DWORD Value BYTE 24-31 0. WORD 1 DWORD Value BYTE 16-23 Number of values BYTE 8-15 Number of bytes (max.
  • Page 19: Memory Requirements For Sdo

    API functions Response Structural element Type Bits Description FIFO Header 1 DWORD Value BYTE 24-31 2. value Value BYTE 16-23 1. value 1 DWORD Number of values BYTE 8-15 Number of bytes (max. 64) Status BYTE Status information (0 = OK) Values ARRAY Other values to be transmitted...
  • Page 20: Pdo Communication

    API functions 3.4.6 PDO communication Process data (PDO) In order to read process data from the backplane bus, the BpbReadPdo function is used, reading the process input image. The process output image can be written to the backplane bus by means of the BpbWritePdo function. The reading/writing of PDOs is only possible in the Operational state.
  • Page 21: Pdo Functions

    API functions 3.4.7 PDO functions BpbReadPdo function Parameter [in] HANDLE hOpen Pointer to open context (handle) for identification [out] PUCHAR pReadBuffer PDO memory area [in] WORD usBufferSize Size of the memory area [out] PWORD pusActualPdoSize Size of the memory area assigned Return values S_OK Successful...
  • Page 22: Memory Requirements For Process Data

    API functions 3.4.8 Memory requirements for process data The memory requirements for process data can be calculated via the currently available modules: Terminal Process image Configurable Bytes @64 nodes DI,DO 2x 2 bits Always 1byte per terminal is transmitted DI,DO 4x 4 bits (1byte) DI,DO 8x...
  • Page 23 API functions In the next step, the BPB controller classifies the I/O compound modules determined on the basis of their slice ID according to the categories "input“ or "output“. Depending on the slice ID, the required number of bytes in the PI is determined on the basis of a look-up table.
  • Page 24 API functions INPUTS OUTPUT Abb. 7 Memory image of inputs and outputs in the address area ...
  • Page 25: Status Description Of The Backplane Bus (State Machine)

    API functions Status description of the backplane bus (state machine) The switch-on procedure in the backplane bus is effected in several steps. Status Transition Description Init Initialisation of the peripherals, automatic transition to the PreOperational state, and setting a status bit. No PDO &...
  • Page 26 API functions Error number Category Source Description Error BPB controller Controller timeout during processing the master queues Error BPB controller Error during the initialisation of the bus (error on one disk) Error BPB controller Cycle time exceeded Error BPB controller DPRAM semaphore timeout of group 1 (reading) Error BPB controller...
  • Page 27 API functions The following SDO errors can occur: Error list for the SDO status (status byte in the second DWORD of the SDO response) Error number Description No error; OK Telegram timeout Subindex out of range Group number out of range SDO timeout FATAL Error Subindex not supported Index not supported...
  • Page 28: I/O Module Types And Their Data Width

    API functions I/O module types and their data width In this chapter a list of the available I/O modules is shown: Disk Description Data width Digital I/O EPM−S200 2 digital inputs 2 bits EPM−S201 4 digital inputs 4 bits EPM−S202 8 digital inputs 8 bits EPM−S203...
  • Page 29 API functions Disk Description Data width Counter EPM−S600 1 counter 32 bits, 24 V DC (reading, 12 bytes input/10 bytes output setting, comparing) EPM−S601 2 counters 32 bits, 24 V DC 12 bytes input/12 bytes output (reading, setting) EPM−S602 1 counter 32 bits, 5 V DC (reading, 8 bytes input/10 bytes output setting) EPM−S603...
  • Page 30: Software

    Software Software List of the software required for the individual application: Driver Name Description Directory BpbDrvXp.sys Backplane bus driver for the ..\Windows\System32\Drivers\ backplane bus BpbDrvXp.inf Backplane bus driver ..\Windows\Inf\ installation routine WdfCoInstaller01007.dll KDMF Framework ..\Windows\System32\ The driver is preinstalled in the WES2009 for the 3241 controller Programming interface Name Description...
  • Page 31: Definitions, Acronyms, And Abbreviations

    Definitions, acronyms, and abbreviations Definitions, acronyms, and abbreviations The following abbreviations are relevant for understanding this document :  Industrial PC  Backplane bus  Service data object  Process data object  DS401 CanOpen profile for “generic IO modules” ...
  • Page 32  © 11/2010 Lenze Automation GmbH Service Lenze Service GmbH Hans-Lenze-Str. 1 Breslauer Straße 3 D-31855 Aerzen D-32699 Extertal Germany Germany +49 (0)51 54 / 82-0 00 80 00 / 24 4 68 77 (24 h helpline) +49 (0)51 54 / 82 - 28 00 +49 (0)51 54 / 82-11 12 Lenze@Lenze.de...

Table of Contents