0% found this document useful (0 votes)
46 views42 pages

BISS 1SL Interfacemanual E7en

The document outlines the BiSS Shared Library, which serves as an interface for application developers to interact with BiSS hardware. It details features such as reading SCD frames, automatic slave detection, and manual setup of communication parameters. Additionally, it provides a comprehensive list of functions available within the library for various operations related to BiSS communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views42 pages

BISS 1SL Interfacemanual E7en

The document outlines the BiSS Shared Library, which serves as an interface for application developers to interact with BiSS hardware. It details features such as reading SCD frames, automatic slave detection, and manual setup of communication parameters. Additionally, it provides a comprehensive list of functions available within the library for various operations related to BiSS communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

BiSS Shared Library i nar y

im
INTERFACE DESCRIPTION prel
Rev E7, Page 1/42

DESCRIPTION
This document describes the functionality of the shared library available to application developers for the
BiSS Interface. The shared library provides an intermediate layer between applications, e.g. Graphical User
Interfaces (GUI), and the underlying hardware (drivers). This is demonstrated in figure 1.

Application
Layer
Appl 1 ... XYZ

Library / OS Shared Library


Layer

Hardware MB4U MB5U ...


Layer

Figure 1: Three layer model

Features

• Reading of SCD frames from multiple slaves via the BiSS chain
• Reading and writing of slave registers
• Automatic detection of slaves using BiSS identifier or profile XML
• Manual setup of BiSS Communication and Frame parameters

Copyright © 2007, 2022 iC-Haus http://www.ichaus.com


BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 2/42

CONTENTS

GENERAL SETUP 4

PACKAGE DESCRIPTION 4

FUNCTIONS 5
BISS_Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
BISS_Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
BISS_SetInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
BISS_GetInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
BISS_SetComParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
BISS_GetComParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
BISS_SetFrameParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
BISS_GetFrameParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
BISS_AutoDetection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
BISS_WriteMasterParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
BISS_InitBissComm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
BISS_ReadSCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
BISS_WriteSlaveRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
BISS_ReadSlaveRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
BISS_SendCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
BISS_GetDLLVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

OPTIONAL FUNCTIONS 13
BISS_SetSlaveLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
BISS_GetSlaveLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
BISS_SetScdContentLabels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
BISS_GetScdContentLabels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
BISS_SetScdContentParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
BISS_GetScdContentParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
BISS_GetScdContent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
BISS_WriteMasterRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
BISS_ReadMasterRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
BISS_GetMasterRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
BISS_ReadSCDFrames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
BISS_GetSCDFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
BISS_GetSCDFrameEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
BISS_GetScdFrameContent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
BISS_GetScdFrameContentEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
BISS_SaveMasterConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
BISS_SaveRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
BISS_LoadRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
BISS_SaveDLLConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
BISS_LoadDLLConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
BISS_CalculateCRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
BISS_CalculateCRC_Ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 3/42

BISS_GetInterfaceInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
BISS_SetMb3uPins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
BISS_GetMb3uPins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
BISS_SetFtdiFreq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
BISS_SetEdsParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
BISS_GetEdsParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
BISS_SetEdsRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
BISS_GetEdsRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
BISS_ReadEdsParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
BISS_WriteEdsParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
BISS_GetLastError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

PARAMETER AND ERROR CODING 28


BiSS Communication Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
BiSS Frame Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Error Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
EDS Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

APPLICATION EXAMPLES 32
Example 1 - Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Example 2 - BISS_ReadSCD with Control Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Example 3 - Two connected MB4U adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Example 4 - Read BiSS chain with BISS_ReadSCDFrames . . . . . . . . . . . . . . . . . . . . . . . . . 36
Example 5 - Read BiSS chain with BISS_GetScdContents . . . . . . . . . . . . . . . . . . . . . . . . . . 38

APPENDIX 40

REVISION HISTORY 41
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 4/42

GENERAL SETUP

Supported Programming Environments


This shared library can be used in combination with the following programming languages:
• C
• C++
• LabVIEW

Other programming languages are not verified but may be able to use this library.

Operating Systems
This shared library was developed for Microsoft Windows and Linux (x86-64).

USB adapter drivers


To communicate with the evaluation board, USB adapter drivers need to be installed. The minimum required
driver versions for this library are:
• MB5U: 6.2.0.0
• MB4U: 6.2.0.0
• MB3U: 2.12.24.0
The driver installation must be completed successfully before connecting the adapter to your PC. If you have not
already installed the driver for the USB adapter, run USB_MB* U_driver_XX.exe to install the necessary drivers
for the MB3U, MB4U or MB5U.

PACKAGE DESCRIPTION

The BiSS shared library package comprises the following directories:


• bin
• drivers
• include
• documentation
• lv_interface
• examples

The bin directory contains the shared libraries for several operating systems (OS) in subdirectories named
according to the OS. The subdirectory windows includes the Dynamic Link Libraries (.dll) and import libraries
(.lib) for the Windows OS.The libraries are provided both as 32 bit and 64 bit compilations. The 32 bit-version is
located in the subdirectory x86, and the 64 bit-version is located in x86-64, respectively. The Shared Object files
for the Linux (.so) are provided only as 64 bit-compilation, and can be found in the subdirectory linux.

The package includes the latest PC USB-adapter drivers for running 32 and 64 bit applications. The drivers can
be found in the directory drivers.

The include folder contains C/C++ header files for easier integration of the BiSS shared library into customer
applications. In documentation users can find the release notes and the software manual for the current shared
library version. The directory examples includes C++ example programs to demonstrate certain usages of the
shared library. The lv_interface directory contains all necessary sources for an easy integration of the BiSS
shared library into customer LabVIEW applications.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 5/42

FUNCTIONS

BISS_Open
Loads the library and returns a handle that will be used for subsequent accesses.

unsigned long BISS_Open ( unsigned long *pulBISSHandle)

Parameters :

pulBISSHandle Pointer to the handle.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_Close
Releases the handle and terminates established connections.

unsigned long BISS_Close ( unsigned long ulBISSHandle)

Parameters :

ulBISSHandle Handle of the library.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SetInterface
Connects to the interface defined by parameter ulInterface.

unsigned long BISS_SetInterface ( unsigned long ulBISSHandle,


unsigned long ulInterface,
char *pcInterfaceOption)
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 6/42

Parameters :

ulBISSHandle Handle of the library.


ulInterface Selection of the interface type.

Value Name Description


0 eBISS_NO_INTERFACE no device
4 eBISS_MB3U USB port
5 eBISS_MB4U USB port
6 eBISS_MB5U USB port
7 eBISS_MB3U_SPI reserved

Table 1: Supported devices (BISS_InterfaceEnum)


pcInterfaceOption For MB4U/MB5U: serial number of the adapter ( last 4 chars: e.g. "CABC"
). Only needed if multiple MB4U/MB5U are connected. For example, see
listing 3 in the appendix.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetInterface
Returns the selected interface from the shared library.

unsigned long BISS_GetInterface ( unsigned long ulBISSHandle,


unsigned long *pulInterface)

Parameters :

ulBISSHandle Handle of the library.


pulInterface Pointer to the value of the selected interface type (see table 1, page 6).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SetComParam
Sets the BiSS Communication parameter in the shared library.

unsigned long BISS_SetComParam ( unsigned long ulBISSHandle,


unsigned long ulParam,
unsigned long ulValue)
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 7/42

Parameters :

ulBISSHandle Handle of the library.


ulParam The BiSS Communication parameter. A list of parameters can be found
in table 5, page 28.
ulValue The value of the BiSS Communication parameter.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code.(see table 8, page 30).

Hints :
Configure BiSS Communication and Frame parameters with calls of the functions BISS_SetComParam and
BISS_SetFrameParam. Then use BISS_WriteMasterParams to write all parameters to the BiSS master.

XML
File
AutoDetection

SetFrameParam
SetComParam WriteMasterParams
DLL BiSS
Master
Application GetComParam
GetFrameParam Device
Software
ReadSCD
ReadSlaveRegister
WriteSlaveRegister

BiSS
BiSS
Slave
Slave
Device
Devices

Figure 2: Illustration of the main functions of the BiSS shared library

BISS_GetComParam
Gets the BiSS Communication parameter from the shared library.

unsigned long BISS_GetComParam ( unsigned long ulBISSHandle,


unsigned long ulParam,
unsigned long *pulValue)
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 8/42

Parameters :

ulBISSHandle Handle of the library.


ulParam The BiSS Communication parameter. A list of parameters can be found
in table 5, page 28.
pulValue Pointer to the value of the BiSS Communication parameter.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SetFrameParam
Sets a BiSS Frame parameter in the shared library.

unsigned long
BISS_SetFrameParam ( unsigned long ulBISSHandle,
unsigned long ulDataChannel,
unsigned long ulParam,
unsigned long ulValue)

Parameters :

ulBISSHandle Handle of the library.


ulDataChannel Index of the data channel (0..(N-1))
ulParam The BiSS Frame parameter. A list of parameters can be found in table 6,
page 29.
ulValue The value of the BiSS Frame parameter.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Configure BiSS Communication and Frame parameters with calls of the functions BISS_SetComParam and
BISS_SetFrameParam. Then use BISS_WriteMasterParams to write all parameters to the BiSS master.

BISS_GetFrameParam
Gets a BiSS Frame parameter from the shared library.

unsigned long
BISS_GetFrameParam ( unsigned long ulBISSHandle,
unsigned long ulDataChannel,
unsigned long ulParam,
unsigned long *pulValue)
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 9/42

Parameters :

ulBISSHandle Handle of the library.


ulDataChannel Index of the data channel (0..(N-1))
ulParam The BiSS Frame parameter. A list of parameters can be found in table 6,
page 29.
pulValue Pointer to the value of the BiSS frame configuration parameter.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_AutoDetection
Reads the BiSS Identification and BiSS Profile XML file to detect the connected slaves and sets the BiSS
Communication and Frame parameters.

unsigned long
BISS_AutoDetection ( unsigned long ulBISSHandle,
char *pcFilename,
unsigned long *pulSlaveCount,
unsigned long ulWriteMasterParams)

Parameters :

ulBISSHandle Handle of the library.


pcFilename Absolute path of the XML file.
pulSlaveCount Pointer to the number of detected slaves.
ulWriteMasterParams Set to ’1’ writes all BiSS parameters from the shared library to the BiSS
master. Set to ’0’ configures the shared library only.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_WriteMasterParams
Writes all BiSS parameters from the shared library to the BiSS master.

unsigned long
BISS_WriteMasterParams ( unsigned long ulBISSHandle)

Parameters :

ulBISSHandle Handle of the library.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 10/42

BISS_InitBissComm
Initializes the BiSS bus communication.

unsigned long BISS_InitBissComm ( unsigned long ulBISSHandle)

Parameters :

ulBISSHandle Handle of the library.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_ReadSCD
Reads one SCD frame.

unsigned long BISS_ReadSCD ( unsigned long ulBISSHandle,


unsigned long *pulDataScdH,
unsigned long *pulDataScdL,
unsigned long *pulScdValid,
unsigned long ulStartControlFrame,
unsigned long *pulControlFrameEnd)

Parameters :

ulBISSHandle Handle of the library.


pulDataScdH Pointer to an array containing the single cycle data (bit 63..32) of all data
channels.
pulDataScdL Pointer to an array containing the single cycle data (bit 31..0) of all data
channels.
pulScdValid Pointer to value to flag which SCD values are valid. (e.g. b1100 → Slaves
3 and 2: valid, Slaves 1 and 0: invalid CRC).
ulStartControlFrame <optional> default = ’0’; ’1’ triggers the control frame.
pulControlFrameEnd <optional> see hint.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30). In case of
eBISS_COMM_FAILED, check pulScdValid for details.

Hints :
Transmission of Control Data is optional and for BiSS C slaves only. Before using ulStartControlFrame to
start the transmission of a control frame, set the following parameters via the function BISS_SetComParam:
eBISS_SLAVE_ID, eBISS_REGISTER_ADDRESS, eBISS_WNR and eBISS_REGISTER_VALUE.
Call the function BISS_ReadSCD in a loop until the parameter pulControlFrameEnd returns ’1’. Use
BISS_GetComParam to get eBISS_REGISTER_VALUE after a read. For example, see listing 2 in the ap-
pendix.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 11/42

BISS_WriteSlaveRegister
Writes a specified number of registers to the BiSS slave.

unsigned long
BISS_WriteSlaveRegister ( unsigned long ulBISSHandle,
unsigned long ulProtocol,
unsigned long ulSlaveId,
unsigned long ulRegisterAddress,
unsigned long *pulNumberOfBytes,
unsigned long *pulRegisterContent)

Parameters :

ulBISSHandle Handle of the device.


ulProtocol Set to ’0’ for BiSS-C. Set to ’1’ for BiSS-B.
ulSlaveId Slave identifier (0..7).
ulRegisterAddress The address of the register.
pulNumberOfBytes Pointer to the number of registers to write. After execution this parameter
contains the number of successfully written bytes.
pulRegisterContent Pointer to an array containing the values.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
The number of bytes for parameter pulNumberOfBytes is limited by the BiSS master. Use parameter
eBISS_MAX_REG_CNT from the enumeration BISS_ComParamEnum to determine the maximum number of
bytes. See table 5 on page 28 and or the respective BiSS master specification for more details.

BISS_ReadSlaveRegister
Reads a specified number of registers from the BiSS slave.

unsigned long
BISS_ReadSlaveRegister ( unsigned long ulBISSHandle,
unsigned long ulProtocol,
unsigned long ulSlaveId,
unsigned long ulRegisterAddress,
unsigned long *pulNumberOfBytes,
unsigned long *pulRegisterContent)

Parameters :

ulBISSHandle Handle of the device.


ulProtocol Set to ’0’ for BiSS-C. Set to ’1’ for BiSS-B.
ulSlaveId Slave identifier (0..7).
ulRegisterAddress The address of the register.
pulNumberOfBytes Pointer to the number of registers to read. After execution this parameter
contains the number of successfully read bytes.
pulRegisterContent Pointer to an array containing the values.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 12/42

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
The number of bytes for parameter pulNumberOfBytes is limited by the BiSS master. Use parameter
eBISS_MAX_REG_CNT from the enumeration BISS_ComParamEnum to determine the maximum number of
bytes. See table 5 on page 28 and or the respective BiSS master specification for more details.

BISS_SendCommand
Sends a command to the selected slaves.

unsigned long BISS_SendCommand ( unsigned long ulBISSHandle)


unsigned long ulIds,
unsigned long ulCmd)

Parameters :

ulBISSHandle Handle of the library.


ulIds ID-Select.
ulCmd Command.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetDLLVersion
Gets the version number of the shared library.

unsigned long BISS_GetDLLVersion ( unsigned long *pulDllVersion))

Parameters :

*pulDllVersion Pointer to the shared library version number.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Index ’1’ of the version number comprises the major version number, index ’0’ the minor version number. The
function does not need a handle.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 13/42

OPTIONAL FUNCTIONS

BISS_SetSlaveLabel
Sets information of the selected slave.

unsigned long BISS_SetSlaveLabel ( unsigned long ulBISSHandle,


unsigned long ulSlave,
char *pcManufacturerLabel,
char *pcSlaveLabel,
char *pcCompleteLabel)

Parameters :

ulBISSHandle Handle of the device.


ulSlave Index of the slave (0..(N-1)).
pcManufacturerLabel Label of the slave manufacturer.
pcSlaveLabel Label of the slave (only type information).
pcCompleteLabel Label of the slave (complete information).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetSlaveLabel
Gets information of the selected slave.

unsigned long BISS_GetSlaveLabel ( unsigned long ulBISSHandle,


unsigned long ulSlave,
char *pcManufacturerLabel,
char *pcSlaveLabel,
char *pcCompleteLabel)

Parameters :

ulBISSHandle Handle of the device.


ulSlave Index of the slave (0..(N-1)).
pcManufacturerLabel Label of the slave manufacturer.
pcSlaveLabel Label of the slave (only type information).
pcCompleteLabel Label of the slave (complete information).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SetScdContentLabels
Sets the labels of the SCD content of the selected data channel.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 14/42

unsigned long
BISS_SetScdContentLabels ( unsigned long ulBISSHandle,
unsigned long ulDataChannel,
unsigned long ulContentIndex,
char *pcScdContentLabel,
char *pcScdContentUnit)

Parameters :

ulBISSHandle Handle of the device.


ulDataChannel Index of the data channel (0..(N-1)).
ulContentIndex Index of the SCD content.
pcScdContentLabel Label of the SCD content.
pcScdContentUnit Unit of the SCD content.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Initially set the parameter eBISS_SCD_CONTENT_CNT via the function BISS_SetFrameParam to set the num-
ber of SCD contents of the data channel.

BISS_GetScdContentLabels
Gets the labels of the SCD content of the selected data channel.

unsigned long
BISS_GetScdContentLabels ( unsigned long ulBISSHandle,
unsigned long ulDataChannel,
unsigned long ulContentIndex,
char *pcScdContentLabel,
char *pcScdContentUnit)

Parameters :

ulBISSHandle Handle of the device.


ulDataChannel Index of the data channel (0..(N-1)).
ulContentIndex Index of the SCD content.
pcScdContentLabel Label of the SCD content.
pcScdContentUnit Unit of the SCD content.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Use BISS_GetFrameParam to get the number of SCD contents of the data channel (eBISS_SCD_CONTENT_CNT).
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 15/42

BISS_SetScdContentParams
Sets the parameters of the SCD content.

unsigned long
BISS_SetScdContentParams ( unsigned long ulBISSHandle,
unsigned long ulDataChannel,
unsigned long ulContentIndex,
BISS_ScdContentStruct *pScdContentItems)

Parameters :

ulBISSHandle Handle of the device.


ulDataChannel Index of the data channel (0..(N-1)).
ulContentIndex Index of the SCD content.
pScdContentItems Pointer to the data structure containing the SCD content parameters.

Element Description
ulZero Set to ’1’ if content is a zerobit (for iC-NQ only)
ulDataLength Data length (bits).
ulResolution Resolution (e.g. 1024)
lOffset Output offset

Table 2: Definition of data type "BISS_ScdContentStruct"

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Initially set the parameter eBISS_SCD_CONTENT_CNT via the function BISS_SetFrameParam to set the num-
ber of SCD contents of the data channel.

BISS_GetScdContentParams
Gets the parameters of the SCD content.

unsigned long
BISS_GetScdContentParams ( unsigned long ulBISSHandle,
unsigned long ulDataChannel,
unsigned long ulContentIndex,
BISS_ScdContentStruct *pScdContentItems)

Parameters :

ulBISSHandle Handle of the device.


ulDataChannel Index of the data channel (0..(N-1)).
ulContentIndex Index of the SCD content.
pScdContentItems Pointer to the data structure containing the SCD content parameters. See
table 2
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 16/42

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Use BISS_GetFrameParam to get the number of SCD contents of the data channel (eBISS_SCD_CONTENT_CNT).

BISS_GetScdContent
Gets the SCD content of the selected data channel.

unsigned long BISS_GetScdContent ( unsigned long ulBISSHandle,


unsigned long ulDataChannel,
unsigned long *pulScdContentValues)

Parameters :

ulBISSHandle Handle of the device.


ulDataChannel Index of the data channel (0..(N-1)).
pulScdContentValues Pointer to an array with the SCD content.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Use BISS_GetFrameParam to get the number of SCD contents of the data channel (eBISS_SCD_CONTENT_CNT).

BISS_WriteMasterRegister
Writes a register to the BISS master.

unsigned long
BISS_WriteMasterRegister ( unsigned long ulBISSHandle,
unsigned long ulRegisterAddress,
unsigned long ulRegisterContent)

Parameters :

ulBISSHandle Handle of the device.


ulRegisterAddress The address of the register.
ulRegisterContent The register value.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 17/42

BISS_ReadMasterRegister
Reads a register from the BISS master.

unsigned long
BISS_ReadMasterRegister ( unsigned long ulBISSHandle,
unsigned long ulRegisterAddress,
unsigned long *pulRegisterContent)

Parameters :

ulBISSHandle Handle of the device.


ulRegisterAddress The address of the register.
pulRegisterContent Pointer to a variable containing the register value.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetMasterRegister
Gets a master register value from the shared library.

unsigned long
BISS_GetMasterRegister ( unsigned long ulBISSHandle,
unsigned long ulRegisterAddress,
unsigned long *pulRegisterContent)

Parameters :

ulBISSHandle Handle of the device.


ulRegisterAddress The address of the register.
pulRegisterContent Pointer to a variable containing the register value.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_ReadSCDFrames
Reads multiple SCD frames via the MB4U/MB5U adapter only.

unsigned long
BISS_ReadSCDFrames ( unsigned long ulBISSHandle,
unsigned long ulCycleCnt,
unsigned long *pulDataScdH
unsigned long *pulDataScdL
unsigned long *pulTimestamp
unsigned long *pulStatus)

Parameters :
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 18/42

ulBISSHandle Handle of the device.


ulCycleCnt Number of SCD frames.
pulDataScdH Pointer to an array containing the single cycle data (bit 63..32) of
data channel 0.
pulDataScdL Pointer to an array containing the single cycle data (bit 31..0) of
data channel 0.
pulTimestamp Pointer to an array containing the timestamps of the corresponding single
cycle data array.
pulStatus Pointer to an array containing the BiSS master status information to each
data transmission (BiSS master register 0xF0).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Use BISS_SetComParam to set master clock frequency (FREQ_SCD) and frame repetition rate (FREQ_AGS)
(see table 5, 11, and 13).
If multiple data channels are configured, use the function BISS_GetSCDFrame to get single cycle data of all data
channels.

BISS_GetSCDFrame
Gets selected SCD frame acquired by the function BISS_ReadSCDFrames.

unsigned long
BISS_GetSCDFrame ( unsigned long ulBISSHandle,
unsigned long ulFrameIndex,
unsigned long *pulDataScdH
unsigned long *pulDataScdL
unsigned long *pulTimestamp
unsigned long *pulStatus)

Parameters :

ulBISSHandle Handle of the device.


ulFrameIndex Index of the SCD frame.
pulDataScdH Pointer to an array containing the selected single cycle data (bit 63..32)
of all data channels.
pulDataScdL Pointer to an array containing the selected single cycle data (bit 31..0) of
all data channels.
pulTimestamp Pointer to the timestamp value of the selected SCD frame.
pulStatus Pointer to BiSS master status information of the selected SCD frame.
(BiSS master register 0xF0).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetSCDFrameEx
Gets SCD frames of selected data channel acquired by the function BISS_ReadSCDFrames.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 19/42

unsigned long
BISS_GetSCDFrameEx ( unsigned long ulBISSHandle,
unsigned long ulCycleCnt,
unsigned long ulDataChannel,
unsigned long *pulDataScdH
unsigned long *pulDataScdL
unsigned long *pulTimestamp
unsigned long *pulStatus)

Parameters :

ulBISSHandle Handle of the device.


ulCycleCnt Number of SCD frames.
ulDataChannel Index of the data channel.
pulDataScdH Pointer to an array containing the selected single cycle data (Bit 63..32)
of all SCD frames.
pulDataScdL Pointer to an array containing the selected single cycle data (Bit 31..0) of
all SCD frames.
pulTimestamp Pointer to the timestamp value of the selected data channel.
pulStatus Pointer to BiSS master status information of the selected data channel.
(BiSS master register 0xF0).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetScdFrameContent
Gets contents of selected data channel acquired by the function BISS_ReadSCDFrames.

unsigned long
BISS_GetScdFrameContent ( unsigned long ulBISSHandle,
unsigned long ulCycleCnt,
unsigned long ulDataChannel,
unsigned long ulContentIndex,
unsigned long *pulValues)

Parameters :

ulBISSHandle Handle of the device.


ulCycleCnt Number of SCD frames.
ulDataChannel Index of the data channel.
ulContentIndex Index of the content.
pulValues Pointer to an array containing the selected content of all SCD frames.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 20/42

BISS_GetScdFrameContentEx
Gets contents of selected data channel acquired by the function BISS_ReadSCDFrames.

uint32_t
BISS_GetScdFrameContentEx ( unsigned long ulBISSHandle,
uint32_t ulCycleCnt,
uint32_t ulDataChannel,
uint32_t ulContentIndex,
uint64_t *pulValues)

Parameters :

ulBISSHandle Handle of the device.


ulCycleCnt Number of SCD frames.
ulDataChannel Index of the data channel.
ulContentIndex Index of the content.
pulValues Pointer to an array containing the selected content of all SCD frames.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SaveMasterConfig
Saves the BiSS master configuration to a file.

unsigned long
BISS_SaveMasterConfig ( unsigned long ulBISSHandle,
char *pcCfgFilename)

Parameters :

ulBISSHandle Handle of the device.


pcCfgFilename Absolute path of the file.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SaveRegister
Saves the data of the specified address range to a file. The file format is Intel HEX.

unsigned long
BISS_SaveRegister ( unsigned long ulBISSHandle,
char *pcFilename,
unsigned long ulStartAdr,
unsigned long ulNumberOfBytes,
unsigned long *pulData)

Parameters :
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 21/42

ulBISSHandle Handle of the device.


pcFilename Absolute path of the file.
ulStartAdr Start address of the register address range.
ulNumberOfBytes Number of registers.
pulData Pointer to an array containing the values.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_LoadRegister
Loads the data of the specified address range from a file. The file format is Intel HEX.

unsigned long
BISS_LoadRegister ( unsigned long ulBISSHandle,
char *pcFilename,
unsigned long ulStartAdr,
unsigned long ulNumberOfBytes,
unsigned long *pulData)

Parameters :

ulBISSHandle Handle of the device.


pcFilename Absolute path of the file.
ulStartAdr Start address of the register address range.
ulNumberOfBytes Number of registers.
pulData Pointer to an array containing the values.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SaveDLLConfig
Saves the shared library configuration to a XML file.

unsigned long
BISS_SaveDLLConfig ( unsigned long ulBISSHandle,
char *pcCfgFilename)

Parameters :

ulBISSHandle Handle of the device.


pcCfgFilename Absolute path of the file.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 22/42

BISS_LoadDLLConfig
Loads the shared library configuration from a XML file.

unsigned long
BISS_LoadDLLConfig ( unsigned long ulBISSHandle,
char *pcCfgFilename)

Parameters :

ulBISSHandle Handle of the device.


pcCfgFilename Absolute path of the file.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_CalculateCRC
Calculates the CRC checksum over a range of bytes.

unsigned long
BISS_CalculateCRC ( unsigned long ulBISSHandle,
unsigned long ulCrcPoly,
unsigned long *pulData,
unsigned long ulByteCount,
unsigned long *pulCheckSum)

Parameters :

ulBISSHandle Handle of the device.


ulCrcPoly The CRC polynomial.
pulData Pointer to an array containing the data.
ulByteCount Number of registers.
pulCheckSum Pointer to the resulting CRC checksum.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_CalculateCRC_Ex
Calculates the CRC checksum over a range of bytes.

unsigned long
BISS_CalculateCRC_Ex ( unsigned long ulBISSHandle,
unsigned long ulCrcPoly,
unsigned long ulCrcStartValue,
unsigned long *pulData,
unsigned long ulByteCount,
unsigned long *pulCheckSum)
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 23/42

Parameters :

ulBISSHandle Handle of the device.


ulCrcPoly The CRC polynomial.
ulCrcStartValue The CRC start value.
pulData Pointer to an array containing the data.
ulByteCount Number of registers.
pulCheckSum Pointer to the resulting CRC checksum.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetInterfaceInfo
Gets additional information about the selected interface.

unsigned long
BISS_GetInterfaceInfo ( unsigned long ulBISSHandle,
unsigned long ulIndex,
char *pcInterfaceInfo)

Parameters :

ulBISSHandle Handle of the device.


ulIndex
Value Name Description
0 eBISS_SERIAL_NUMBER Gets the serial number (MB4U/MB5U
only)
1 eBISS_DRIVER_VERSION Gets the driver version

Table 3: Interface Info Index (BISS_InterfaceInfoEnum)

pcInterfaceInfo Interface information string.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SetMb3uPins
Sets direction and state of the free MB3U interface pins.

unsigned long BISS_SetMb3uPins ( unsigned long ulBISSHandle,


unsigned long ulDir,
unsigned long ulValue)

Parameters :
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 24/42

ulBISSHandle Handle of the device.


ulDir Value of the direction. Set to ’1’ to define pin as an output, set to ’0’ to
define as an input.
ulValue Value of the logic. Set to ’1’ to define pin logic level as high, set to ’0’ to
define as low.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetMb3uPins
Gets direction and state of the free MB3U interface pins.

unsigned long BISS_GetMb3uPins ( unsigned long ulBISSHandle,


unsigned long *pulDir,
unsigned long *pulValue)

Parameters :

ulBISSHandle Handle of the device.


pulDir Pointer to the value. Contains ’1’ if pin is used as an output, ’0’ if input.
pulValue Pointer to the value. Contains ’1’ if pin logic level is high, ’0’ if low.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SetFtdiFreq
Sets the MB3U internal SPI frequency.

unsigned long BISS_SetFtdiFreq ( unsigned long ulBISSHandle,


unsigned long ulFreqH,
unsigned long ulFreqL)

Parameters :

ulBISSHandle Handle of the device.


ulFreqH Upper byte of the FTDI frequency value.
ulFreqL Lower byte of the FTDI frequency value.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

Hints :
Formula for the SPI frequency:

12 MHz
(1 + [(ulFreqH(7:0) · 256) + ulFreqL(7:0)]) · 2
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 25/42

BISS_SetEdsParam
Sets an EDS parameter in the shared library.

unsigned long BISS_SetEdsParam ( unsigned long ulBISSHandle,


unsigned long ulParam,
unsigned long ulValue)

Parameters :

ulBISSHandle Handle of the library.


ulParam The EDS configuration parameter. A list of parameters can be found in
table 9, page 32.
ulValue The value of the EDS configuration parameter.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetEdsParam
Gets an EDS parameter from the shared library.

unsigned long BISS_GetEdsParam ( unsigned long ulBISSHandle,


unsigned long ulParam,
unsigned long *pulValue)

Parameters :

ulBISSHandle Handle of the library.


ulParam The EDS configuration parameter. A list of parameters can be found in
table 9, page 32.
pulValue Pointer to the value of the EDS configuration parameter.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_SetEdsRegister
Sets an EDS register in the shared library.

unsigned long BISS_SetEdsRegister ( unsigned long ulBISSHandle,


unsigned long ulAdr,
unsigned long ulValue)

Parameters :
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 26/42

ulBISSHandle Handle of the library.


ulAdr The address of the EDS register.
ulValue The value of the EDS register.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetEdsRegister
Gets an EDS register from the shared library.

unsigned long
BISS_GetEdsRegister ( unsigned long ulBISSHandle,
unsigned long ulAdr,
unsigned long *pulValue)

Parameters :

ulBISSHandle Handle of the library.


ulAdr The address of the EDS register.
pulValue Pointer to the value of the EDS register.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_ReadEdsParams
Reads EDS registers from the iC-BISS to the shared library.

unsigned long
BISS_ReadEdsParams ( unsigned long ulBISSHandle,
unsigned long ulSlaveId)

Parameters :

ulBISSHandle Handle of the library.


ulSlaveId Slave identifier (0..7).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_WriteEdsParams
Writes all EDS parameters from the shared library to the iC-BISS registers.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 27/42

unsigned long
BISS_WriteEdsParams ( unsigned long ulBISSHandle,
unsigned long ulSlaveId)

Parameters :

ulBISSHandle Handle of the library.


ulSlaveId Slave identifier (0..7).

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).

BISS_GetLastError
Returns details about the last error occurred.

unsigned long
BISS_GetLastError ( unsigned long ulBISSHandle,
unsigned long *pulLastError,
unsigned long *pulErrorType,
char *pcErrorText)

Parameters :

ulBISSHandle Handle of the library.


pulLastError Pointer to the error code. (see table 8, page 30)
pulErrorType
Value Name
0 eBISS_NONE
1 eBISS_HINT
2 eBISS_WARNING
3 eBISS_PROGRAMMING_ERROR
4 eBISS_OPERATING_ERROR
5 eBISS_COMMUNICATION_ERROR

Table 4: BISS_ErrorTypeEnum

pcErrorText Pointer to string with the detailed error text.

Return Value :
eBISS_OK if successful, otherwise the return value is an error code (see table 8, page 30).
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 28/42

PARAMETER AND ERROR CODING

BiSS Communication Parameters

Value Parameter Description


0 eBISS_MASTER_VERSION BiSS master version (read only)
1 eBISS_MASTER_REVISION BiSS master revision (read only)
2 eBISS_PROTOCOL See table 7 on page 29
3 eBISS_CLKENI ’0’ = external Clock; ’1’ = enable internal Clock (iC-MB3)
4 eBISS_FREQ_SCD Sensor data frequency (see table 11)
5 eBISS_FREQ_REG Register data frequency (see table 12)
6 eBISS_FREQ_AGS AutoGetSens frequency (see table 13)
7 eBISS_SLAVE_ID <optional: see BISS_ReadSCD> ID of the Slave (0..7)
8 eBISS_REGISTER_ADDRESS <optional: see BISS_ReadSCD> Address of the register
9 eBISS_WNR <optional: see BISS_ReadSCD> ’1’ = write; ’0’ = read
10 eBISS_REGISTER_VALUE <optional: see BISS_ReadSCD> Value of the register
11 eBISS_SSIWRITE <reserved: default = ’0’>
12 eBISS_SSIWRITE_TIMEOUT <reserved: default = ’0’>
13 eBISS_MAX_DATACH_CNT Max. number of data channels (BiSS master dependent, read
only)
14 eBISS_MAX_REG_CNT Max. number of registers (BiSS master dependent, read only)
15 eBISS_EN_MO <reserved: default = ’0’>
16 eBISS_FREQ_AGS_REG Automatic request frequency for MB4U/MB5U register communi-
cation
17 eBISS_EDS_BANK Address of the first EDS bank
18 eBISS_DISABLE_TIMEOUT Default = ’0’; for debug purposes only, set to ’1’ to disable the
timeout for BiSS communication. Shared library functions may
freeze if there is no valid BiSS communication.
19 eBISS_ENABLE_TTL TTL flag enable (MB4U, MB5U only).
20 eBISS_NUMBER_OF_DATACHANNELS Current number of data channels (read only)
21 eBISS_SSIWRITE_DL Data length for register communication in SSI mode (MB3U only)
22 eBISS_SLAVELOC Slave location (iC-MB4 only)
22 eBISS_HOLD_CDM Refer to the BiSS Interface specification

Table 5: BiSS Communication Configuration Parameters (BISS_ComParamEnum)

BiSS Frame Parameters

Value Parameter Description


0 eBISS_SCD_LENGTH Data range of the Single Cycle Data incl. CRC-bits (1.. N)
1 eBISS_SCD_CRC_POLY Single Cycle Data CRC-polynomial
2 eBISS_SCD_CRC_INVERT ’0’ = not inverted CRC-bits; ’1’ = inverted CRC-bits
3 eBISS_SCD_CONTENT_COUNT Number of SCD contents
4 eBISS_RESERVED Reserved
5 eBISS_SLAVEID BiSS Slave-ID (read only)
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 29/42

Value Parameter Description


6 eBISS_IDCOUNT Number of IDs occupied by the slave
7 eBISS_CRCS Startvalue of Single Cycle Data CRC
8 eBISS_GRAYS Enable gray-to-binary conversion
9 eBISS_GRAY_MSB Most significant bit of the gray coded content
10 eBISS_GRAY_LSB Least significant bit of the gray coded content
11 eBISS_CRC_CLOSING_VALUE Closing value of Single Cycle Data CRC

Table 6: BiSS Frame Configuration Parameters (BISS_FrameParamEnum)

Protocols

Value Parameter Description


0 eBISS_PROTOCOL_C BiSS C transmission
1 eBISS_DISABLE_CDS BiSS C transmission (CDS disabled)
2 eBISS_PROTOCOL_SSI SSI transmission

Table 7: Protocols (BISS_ProtocolEnum)

Error Definitions

Value Error Message Description (Solution)


0 eBISS_OK Function call successful.
1 eBISS_INVALID_HANDLE Use the handle returned by the BISS_Open function.
2 eBISS_INTERFACEDRIVER_NOT_FOUND Install FTDI Interface Drivers.
3 eBISS_INTERFACE_NOT_FOUND Check wire connections and power supply.
4 eBISS_INVALID_INTERFACE Interface not specified. See table 1, page 6
5 eBISS_INVALID_PARAMETER Parameter not specified. See tables 5 and 6 on page 28
6 eBISS_INVALID_ADDRESS Address out of range.
7 eBISS_INVALID_VALUE Value out of range.
8 eBISS_USB_ERROR Check USB to interface connection.
9 eBISS_FILE_NOT_FOUND Check if file exists.
10 eBISS_INVALID_FILE Check file format.
11 eBISS_VERIFY_FAILED Verification failed, check device connection.
12 eBISS_MASTERCOMM_FAILED Failed communication to BiSS master, check the selected
interface.
13 eBISS_TIMEOUT BiSS communication failed, check wire connections and power
supply.
14 eBISS_REGERROR BiSS register communication failed, the slave has rejected the
access to the register.
15 eBISS_COMM_FAILED BiSS communication failed, check device connection and
frame configuration.
16 eBISS_INVALID_NUMBEROFBYTES Parameter pulNumberOfBytes > eBISS_MAX_REGCNT value
17 eBISS_AGS_FAILED Frame Repetition Rate is to high.
18 eBISS_USB_HIGHSPEED_WARNING High speed USB device plugged into non high speed USB
hub.
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 30/42

Value Error Message Description (Solution)


19 eBISS_USB_DATA_LOSS Slow down the Frame Repetition Rate (eBISS_FREQ_AGS,
see table 13) and/or reduce the system load of your PC.
20 eBISS_FILE_ACCESS_DENIED Insufficient permission to access file.
21 eBISS_EDS_UNDEFINED EDS is not used in current EEPROM configuration.
22 eBISS_INVALID_EDS EDS contains invalid values.
23 eBISS_INVALID_EDS_CHECKSUM EDS checksum error.
24 eBISS_REG_COMM_FAILED Register communication failed, check device connection and
frame configuration.
25 eBISS_INVALID_NUMBER_OF_DATACHANNELS Current number of data channels exceeds the maximum data
channel count. (BiSS master dependent)
26 eBISS_BLM_ERROR reserved
26 eBISS_OUT_OF_MEMORY reserved

Table 8: Error Definitions (BISS_ErrorEnum)

EDS Configuration Parameters

Value Parameter Description (see latest eds data sheet)


0 eBISS_EDS_EDS_VER
1 eBISS_EDS_EDS_LEN
2 eBISS_EDS_USR_STA
3 eBISS_EDS_USR_END
4 eBISS_EDS_TMA
5 eBISS_EDS_TO_MIN
6 eBISS_EDS_TO_MAX
7 eBISS_EDS_TOS_MIN
8 eBISS_EDS_TOS_MAX
9 eBISS_EDS_TCLK_MIN
10 eBISS_EDS_TCLK_MAX
11 eBISS_EDS_TCYC
12 eBISS_EDS_TBUSY_S
13 eBISS_EDS_BUSY_S
14 eBISS_EDS_PON_DLY
15 eBISS_EDS_DC_NUM
16 eBISS_EDS_SL_NUM
17 eBISS_EDS_SL_OFF
18 eBISS_EDS_BANK1
19 eBISS_EDS_DLEN1
20 eBISS_EDS_FORMAT1_STOP
21 eBISS_EDS_FORMAT1_ALIGN
22 eBISS_EDS_FORMAT1_TYPE
23 eBISS_EDS_CPOLY1
24 eBISS_EDS_BANK2
25 eBISS_EDS_DLEN2
26 eBISS_EDS_FORMAT2_STOP
27 eBISS_EDS_FORMAT2_ALIGN
28 eBISS_EDS_FORMAT2_TYPE
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 31/42

Value Parameter Description (see latest eds data sheet)


29 eBISS_EDS_CPOLY2
30 eBISS_EDS_BANK3
31 eBISS_EDS_DLEN3
32 eBISS_EDS_FORMAT3_STOP
33 eBISS_EDS_FORMAT3_ALIGN
34 eBISS_EDS_FORMAT3_TYPE
35 eBISS_EDS_CPOLY3
36 eBISS_EDS_BANK4
37 eBISS_EDS_DLEN4
38 eBISS_EDS_FORMAT4_STOP
39 eBISS_EDS_FORMAT4_ALIGN
40 eBISS_EDS_FORMAT4_TYPE
41 eBISS_EDS_CPOLY4
42 eBISS_EDS_BANK5
43 eBISS_EDS_DLEN5
44 eBISS_EDS_FORMAT5_STOP
45 eBISS_EDS_FORMAT5_ALIGN
46 eBISS_EDS_FORMAT5_TYPE
47 eBISS_EDS_CPOLY5
48 eBISS_EDS_BANK6
49 eBISS_EDS_DLEN6
50 eBISS_EDS_FORMAT6_STOP
51 eBISS_EDS_FORMAT6_ALIGN
52 eBISS_EDS_FORMAT6_TYPE
53 eBISS_EDS_CPOLY6
54 eBISS_EDS_BANK7
55 eBISS_EDS_DLEN7
56 eBISS_EDS_FORMAT7_STOP
57 eBISS_EDS_FORMAT7_ALIGN
58 eBISS_EDS_FORMAT7_TYPE
59 eBISS_EDS_CPOLY7
60 eBISS_EDS_BANK8
61 eBISS_EDS_DLEN8
62 eBISS_EDS_FORMAT8_STOP
63 eBISS_EDS_FORMAT8_ALIGN
64 eBISS_EDS_FORMAT8_TYPE
65 eBISS_EDS_CPOLY8
66 eBISS_EDS_BC_OFF
67 eBISS_EDS_BP_VER
68 eBISS_EDS_BP_LEN
69 eBISS_EDS_BP_ID
70 eBISS_EDS_FB1
71 eBISS_EDS_FB2
72 eBISS_EDS_PON_PDL
73 eBISS_EDS_EN_TYP
74 eBISS_EDS_POS_NUM
75 eBISS_EDS_MT_LEN
76 eBISS_EDS_MT_FMT
77 eBISS_EDS_CO_LEN
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 32/42

Value Parameter Description (see latest eds data sheet)


78 eBISS_EDS_CO_FMT
79 eBISS_EDS_FI_LEN
80 eBISS_EDS_FI_FMT
81 eBISS_EDS_MT_CNT
82 eBISS_EDS_SIP_CNT
83 eBISS_EDS_SIP_RES
84 eBISS_EDS_CPOLY
85 eBISS_EDS_CSTART
86 eBISS_EDS_ABS_ACU
87 eBISS_EDS_REL_ACU
88 eBISS_EDS_SPD_ACU
89 eBISS_EDS_HYST
90 eBISS_EDS_SPD_MAX
91 eBISS_EDS_ACC_MAX
92 eBISS_EDS_TMP_MIN
93 eBISS_EDS_TMP_MAX
94 eBISS_EDS_VLT_MIN
95 eBISS_EDS_VLT_MAX
96 eBISS_EDS_CUR_MAX

Table 9: EDS Configuration Parameters (BISS_EdsParamEnum)

APPLICATION EXAMPLES

Example 1 - Getting Started

Listing 1: Source code example (C++)


#include "BISS_1SL_interface.h"
#include <iostream>

using namespace std;

int main()
{
uint32_t version[2];
uint32_t error;
uint32_t bissHandle;

// Get the version number of the library


BISS_GetDLLVersion(version);
cout << "BISS_1SL_interface library version: " << version[1] << "." << version[0] << endl << endl;

// Load the library and get a handle that will be used for subsequent accesses.
error = BISS_Open(&bissHandle);
if (error) {
return -1;
}

// Connect the interface MB3U


error = BISS_SetInterface(bissHandle, eBISS_MB3U, "");
if (error) {
switch (error) {
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 33/42

case eBISS_INTERFACEDRIVER_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACEDRIVER_NOT_FOUND):" << endl
<< "Install FTDI Interface Drivers" << endl;
break;
case eBISS_INTERFACE_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACE_NOT_FOUND): " << endl
<< "Check wire connections and power supply" << endl;
break;
default:
cout << "BISS_SetInterface failed (error code: " << error << ")"
<< endl;
break;
}
} else {
cout << "Interface MB3U opened" << endl << endl;

// Set the library properties (BiSS Master Clock Frequency for Single Cycle Data)
// p.e. FREQ_SCD = 2 MHz @ MB3U
error = BISS_SetComParam(bissHandle, eBISS_FREQ_SCD, 0x4);
error = BISS_SetComParam(bissHandle, eBISS_FREQ_AGS, 0x64);

// Try to AutoDetect the connected slaves


uint32_t slaveCount;
uint32_t writeMasterParams = 1;
error = BISS_AutoDetection(bissHandle, "resources/idbiss6943.xml", &slaveCount,
writeMasterParams);

// or set the properties of the connected slaves manually (e.g. iC-NQC)


if (error) {
// BiSS-C
error = BISS_SetComParam(bissHandle, eBISS_PROTOCOL, eBISS_PROTOCOL_C);

// CrcPoly: 1000011
error = BISS_SetFrameParam(bissHandle, 0x0, eBISS_SCD_CRC_POLY, 0x43);
error = BISS_SetFrameParam(bissHandle, 0x0, eBISS_SCD_CRC_INVERT, 0x1);

// 12bit resolution + 2bit error + 6bit crc = 20 bit


error = BISS_SetFrameParam(bissHandle, 0x0, eBISS_SCD_LENGTH, 0x14);

error = BISS_WriteMasterParams(bissHandle);
}

error = BISS_InitBissComm(bissHandle);

// Read one SCD frame


uint32_t scdH[1];
uint32_t scdL[1];
uint32_t scdValid;
uint32_t startControlFrame = 0;
uint32_t controlFrameEnd;
error = BISS_ReadSCD(bissHandle, scdH, scdL, &scdValid, startControlFrame, &controlFrameEnd);
cout << "SCD: 0x" << hex << scdH[0] << scdL[0] << endl;
}

// Release the handle and terminate established connections


BISS_Close(bissHandle);
}

Example 2 - BISS_ReadSCD with Control Data

Listing 2: Using BISS_ReadSCD with Control Data (C++)


#include "BISS_1SL_interface.h"
#include <iostream>

using namespace std;


BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 34/42

int main()
{
uint32_t error;
uint32_t bissHandle;
error = BISS_Open(&bissHandle);
error = BISS_SetInterface(bissHandle, eBISS_MB3U, "");

uint32_t slCount;
error = BISS_AutoDetection(bissHandle, "resources/idbiss6943.xml", &slCount, 1);

error = BISS_SetComParam(bissHandle, eBISS_SLAVE_ID, 0);


error = BISS_SetComParam(bissHandle, eBISS_REGISTER_ADDRESS, 0);
error = BISS_SetComParam(bissHandle, eBISS_WNR, 0);

uint32_t regEnd;
uint32_t scdDataH[3];
uint32_t scdDataL[3];
uint32_t scdValid;

error = BISS_InitBissComm(bissHandle);

error = BISS_ReadSCD(bissHandle, scdDataH, scdDataL, &scdValid, 1, &regEnd);


do {
error = BISS_ReadSCD(bissHandle, scdDataH, scdDataL, &scdValid, 0, &regEnd);
} while ((!regEnd) && (error == eBISS_OK));

uint32_t registerValue;
error = BISS_GetComParam(bissHandle, eBISS_REGISTER_VALUE, &registerValue);

BISS_Close(bissHandle);
}

Example 3 - Two connected MB4U adapters

Listing 3: Source code example (C++) with two connected MB4U adapters
#include "BISS_1SL_interface.h"

#include <iostream>

using namespace std;


uint32_t bissHandleA;
uint32_t bissHandleB;

int main()
{
uint32_t version[2];
uint32_t error;

// Get the version number of the library


BISS_GetDLLVersion(version);
cout << "BISS_1SL_interface library version: " << version[1] << "." << version[0] << endl << endl;

// Load the library and get the handles that will be used for subsequent accesses.
error = BISS_Open(&bissHandleA);
error = BISS_Open(&bissHandleB);

// Set the DLL properties (BiSS Master Clock Frequency for Single Cycle Data)
// p.e. FREQ_SCD = 2 MHz @ MB4U
error = BISS_SetComParam(bissHandleA, eBISS_FREQ_SCD, 4);
error = BISS_SetComParam(bissHandleB, eBISS_FREQ_SCD, 4);

// Connect the interface MB4U A


error = BISS_SetInterface(bissHandleA, eBISS_MB4U, "CADM");
if (error) {
switch (error) {
case eBISS_INTERFACEDRIVER_NOT_FOUND:
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 35/42

cout << "BISS_SetInterface failed (eBISS_INTERFACEDRIVER_NOT_FOUND):" << endl


<< "Install FTDI Interface Drivers" << endl;
break;
case eBISS_INTERFACE_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACE_NOT_FOUND): " << endl
<< "Check wire connections and power supply" << endl;
break;
default:
cout << "BISS_SetInterface failed (error code: " << error << ")"
<< endl;
break;
}
} else {
cout << "Interface MB4U A opened" << endl << endl;

// Connect the interface MB4U B


error = BISS_SetInterface(bissHandleB, eBISS_MB4U, "CAGE");

if (error) {
switch (error) {
case eBISS_INTERFACEDRIVER_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACEDRIVER_NOT_FOUND):" << endl
<< "Install FTDI Interface Drivers" << endl;
break;
case eBISS_INTERFACE_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACE_NOT_FOUND): " << endl
<< "Check wire connections and power supply" << endl;
break;
default:
cout << "BISS_SetInterface failed (error code: " << error << ")"
<< endl;
break;
}
} else {
cout << "Interface MB4U B opened" << endl << endl;

// Configure Slave @ MB4U A


// BiSS-C
error = BISS_SetComParam(bissHandleA, eBISS_PROTOCOL, eBISS_PROTOCOL_C);

// CrcPoly: 1000011
error = BISS_SetFrameParam(bissHandleA, 0, eBISS_SCD_CRC_POLY, 0x43);
error = BISS_SetFrameParam(bissHandleA, 0, eBISS_SCD_CRC_INVERT, 1);

// 12bit resolution + 2bit error + 6bit crc


error = BISS_SetFrameParam(bissHandleA, 0, eBISS_SCD_LENGTH, 20);

error = BISS_WriteMasterParams(bissHandleA);

// Configure Slave @ MB4U B


// BiSS-C
error = BISS_SetComParam(bissHandleB, eBISS_PROTOCOL, eBISS_PROTOCOL_C);

// CrcPoly: 1000011
error = BISS_SetFrameParam(bissHandleB, 0, eBISS_SCD_CRC_POLY, 0x43);
error = BISS_SetFrameParam(bissHandleB, 0, eBISS_SCD_CRC_INVERT, 1);

// 10bit resolution + 2bit error + 6bit crc


error = BISS_SetFrameParam(bissHandleB, 0, eBISS_SCD_LENGTH, 18);

error = BISS_WriteMasterParams(bissHandleB);

error = BISS_InitBissComm(bissHandleA);
error = BISS_InitBissComm(bissHandleB);

// Read one SCD frame


uint32_t scdH[1];
uint32_t scdL[1];
uint32_t scdValid;
uint32_t startControlFrame = 0;
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 36/42

uint32_t controlFrameEnd;
error = BISS_ReadSCD(bissHandleA, scdH, scdL, &scdValid, startControlFrame, &
controlFrameEnd);
cout << "SCD MB4U A: 0x" << hex << scdH[0] << scdL[0] << endl;
error = BISS_ReadSCD(bissHandleB, scdH, scdL, &scdValid, startControlFrame, &
controlFrameEnd);
cout << "SCD MB4U B: 0x" << hex << scdH[0] << scdL[0] << endl;
}
}

// Release the handles and terminate established connections


BISS_Close(bissHandleA);
BISS_Close(bissHandleB);
}

Example 4 - Read BiSS chain with BISS_ReadSCDFrames

Listing 4: Source code example (C++) for BiSS chain with BISS_ReadSCDFrames
#include "BISS_1SL_interface.h"

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>

using namespace std;


uint32_t bissHandle;

#define SLAVECNT 2
#define CYCLECNT 1000

int main()
{
uint32_t version[2];
uint32_t error;

// Get the version number of the library


BISS_GetDLLVersion(version);
cout << "BISS_1SL_interface library version: " << version[1] << "." << version[0] << endl << endl;

// Load the library and get a handle that will be used for subsequent accesses.
error = BISS_Open(&bissHandle);

// Set the BiSS Master properties


error = BISS_SetComParam(bissHandle,
eBISS_FREQ_SCD,
0x04); // Single Cycle Data communication clockrate 2MHz
error = BISS_SetComParam(bissHandle, eBISS_FREQ_AGS, 0x63); // Auto Get Sens 100us

// Connect the interface MB4U


error = BISS_SetInterface(bissHandle, eBISS_MB4U, "");
// Set Protocol to BiSS-C
error = BISS_SetComParam(bissHandle, eBISS_PROTOCOL, eBISS_PROTOCOL_C);

if (error) {
switch (error) {
case eBISS_INTERFACEDRIVER_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACEDRIVER_NOT_FOUND):" << endl
<< "Install FTDI Interface Drivers" << endl;
break;
case eBISS_INTERFACE_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACE_NOT_FOUND): " << endl
<< "Check wire connections and power supply" << endl;
break;
default:
cout << "BISS_SetInterface failed (error code: " << error << ")"
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 37/42

<< endl;
break;
}
} else {
cout << "Interface MB4U opened" << endl << endl;

// Define DUT properties


uint32_t scdLength[SLAVECNT] = {36, 27}; // SCD Length of Slaves
uint32_t crcPoly[SLAVECNT] = {0x43, 0x43};
uint32_t crcInvert[SLAVECNT] = {1, 1};

// Set the properties of the connected slaves


for (int iSlave = 0; iSlave < SLAVECNT; iSlave++) {
error = BISS_SetFrameParam(bissHandle, iSlave, eBISS_SCD_CRC_POLY, crcPoly[iSlave]);
error = BISS_SetFrameParam(bissHandle, iSlave, eBISS_SCD_CRC_INVERT, crcInvert[iSlave]);
error = BISS_SetFrameParam(bissHandle, iSlave, eBISS_SCD_LENGTH, scdLength[iSlave]);
}
error = BISS_WriteMasterParams(bissHandle); // Write Masterconfig to MB4U
error = BISS_InitBissComm(bissHandle);

// Read one SCD frame to check Connection


uint32_t scdH[SLAVECNT];
uint32_t scdL[SLAVECNT];
uint32_t scdValid;
uint32_t startControlFrame = 0;
uint32_t controlFrameEnd;
error = BISS_ReadSCD(bissHandle, scdH, scdL, &scdValid, startControlFrame, &controlFrameEnd);
for (int iSlave = 0; iSlave < SLAVECNT; iSlave++) {
cout << "Slave: " << iSlave << " SCD: 0x" << hex << scdH[iSlave] << scdL[iSlave] << endl;
}

// Cycle read of the BiSS-Chain

// Buffer for Dut Data


uint32_t multiScdH[SLAVECNT][CYCLECNT];
uint32_t multiScdL[SLAVECNT][CYCLECNT];
uint32_t timestamp[SLAVECNT][CYCLECNT];
uint32_t status[SLAVECNT][CYCLECNT];
uint32_t dummy1[CYCLECNT];
uint32_t dummy2[CYCLECNT];
uint32_t timeDummy[CYCLECNT];
uint32_t statusDummy[CYCLECNT];

// Read Number of Cycles


error = BISS_ReadSCDFrames(bissHandle, CYCLECNT, dummy1, dummy2, timeDummy, statusDummy);

if (error) {
cout << "Data Acquisition failed!" << endl;
} else {
// Get Slave data from last ReadSCDFrames
for (int iFrameIndex = 0; iFrameIndex < CYCLECNT; iFrameIndex++) {
error = BISS_GetSCDFrame(bissHandle, iFrameIndex, dummy1, dummy2, timeDummy,
statusDummy);

for (int i = 0; i < SLAVECNT; i++) {


multiScdH[i][iFrameIndex] = dummy1[i];
multiScdL[i][iFrameIndex] = dummy2[i];
timestamp[i][iFrameIndex] = timeDummy[i];
status[i][iFrameIndex] = statusDummy[i];
}
}

// Show Data of the first 20 reads


cout << "Slave1: \t\t| Slave 2 \t| Timestamp \t| Status \n";
for (int i = 0; i < 20; i++) {
cout << "0x" << hex << setw(8) << setfill(’0’) << multiScdH[0][i] << multiScdL[0][i]
<< "\t|";
cout << "0x" << hex << multiScdH[1][i] << multiScdL[1][i] << "\t|";
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 38/42

cout << "0x" << hex << timestamp[0][i] << "\t|";


cout << "0x" << hex << status[0][i] << endl;
}

// Add individual code her, e.g. save data to text file


}
}

// Release the handle and terminate established connections


BISS_Close(bissHandle);
}

Example 5 - Read BiSS chain with BISS_GetScdContents

Listing 5: Source code example (C++) for BiSS chain with BISS_GetScdContents
#include "BISS_1SL_interface.h"

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>

using namespace std;

#define SLAVECNT 2
#define CYCLECNT 1000

int main()
{
uint32_t bissHandle;
uint32_t version[2];
uint32_t error;

// Get the version number of the library


BISS_GetDLLVersion(version);
cout << "BISS_1SL_interface library version: " << version[1] << "." << version[0] << endl << endl;

// Load the library and get a handle that will be used for subsequent accesses.
error = BISS_Open(&bissHandle);

// Set the BiSS Master properties


error = BISS_SetComParam(bissHandle, eBISS_FREQ_SCD, 0x04); // Single Cycle Data communication
clock rate 2MHz
error = BISS_SetComParam(bissHandle, eBISS_FREQ_AGS, 0x63); // Auto Get Sens 100us

// Connect the interface MB4U


error = BISS_SetInterface(bissHandle, eBISS_MB4U, "");
// Set Protocol to BiSS-C
error = BISS_SetComParam(bissHandle, eBISS_PROTOCOL, eBISS_PROTOCOL_C);

if (error) {
switch (error) {
case eBISS_INTERFACEDRIVER_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACEDRIVER_NOT_FOUND):" << endl
<< "Install FTDI Interface Drivers" << endl;
break;
case eBISS_INTERFACE_NOT_FOUND:
cout << "BISS_SetInterface failed (eBISS_INTERFACE_NOT_FOUND): " << endl
<< "Check wire connections and power supply" << endl;
break;
default:
cout << "BISS_SetInterface failed (error code: " << error << ")"
<< endl;
break;
}
} else {
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 39/42

cout << "Interface MB4U opened" << endl << endl;

// Define DUT properties


uint32_t scdLength[SLAVECNT] = {36, 27}; // SCD length of slaves
uint32_t crcPoly[SLAVECNT] = {0x43, 0x43};
uint32_t crcInvert[SLAVECNT] = {1, 1};

// Set the properties of the connected slaves


for (int iSlave = 0; iSlave < SLAVECNT; iSlave++) {

error = BISS_SetFrameParam(bissHandle, iSlave, eBISS_SCD_CRC_POLY, crcPoly[iSlave]);


error = BISS_SetFrameParam(bissHandle, iSlave, eBISS_SCD_CRC_INVERT, crcInvert[iSlave]);
error = BISS_SetFrameParam(bissHandle, iSlave, eBISS_SCD_LENGTH, scdLength[iSlave]);
}

BISS_ScdContentStruct contents;
// Slave 0
// MT
contents.ulDataLength = 16;
BISS_SetScdContentParams(bissHandle, 0, 0, &contents);

// ST
contents.ulDataLength = 12;
BISS_SetScdContentParams(bissHandle, 0, 1, &contents);

// EW
contents.ulDataLength = 2;
BISS_SetScdContentParams(bissHandle, 0, 2, &contents);

error = BISS_WriteMasterParams(bissHandle); // Write master config to MB4U


error = BISS_InitBissComm(bissHandle);

// Read one SCD frame


uint32_t scdH[SLAVECNT];
uint32_t scdL[SLAVECNT];
uint32_t scdValid;
uint32_t startControlFrame = 0;
uint32_t controlFrameEnd;
error = BISS_ReadSCD(bissHandle, scdH, scdL, &scdValid, startControlFrame, &controlFrameEnd);
for (int iSlave = 0; iSlave < SLAVECNT; iSlave++) {
cout << "Slave: " << iSlave << " SCD: 0x" << hex << scdH[iSlave] << scdL[iSlave] << endl;
}

// Detailed output slave 0


cout << endl;
uint32_t scdContent[3];
BISS_GetScdContent(bissHandle, 0, scdContent);
cout << "Detailed output Slave 0" << endl;
cout << "MT: " << dec << scdContent[0] << endl;
cout << "ST: " << dec << scdContent[1] << endl;
cout << "EW: " << dec << scdContent[2] << endl;
}

// Release the handle and terminate established connections


BISS_Close(bissHandle);
}
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 40/42

APPENDIX

Prefix Type Description


ul unsigned long Data type size of 32 bits; positive values only
pul pointer to unsigned long
l long Data type size of 32 bits
c char Data type size of 8 bits
pc pointer to char String
d double Double precision floating point
pd pointer to double
e enum List of items

Table 10: Data Type Definitions

FREQ_SCD Description
0x00.. f CLK
0x0F 2·(FREQ_SCD(3:0)+1)
0x10 not permissible
0x11.. f CLK
0x1F 20·(FREQ_SCD(3:0)+1)
Note f CLK = 20 MHz for PC adapters MB3U (MB3U-I2C), MB4U and MB5U

Table 11: Sensor Data Frequency

FREQ_REG Description
0x00 FREQ_SCD / 2
0x01 FREQ_SCD / 4
0x02 FREQ_SCD / 8
0x03 FREQ_SCD / 16
0x04 FREQ_SCD / 32
0x05 FREQ_SCD / 64
0x06 FREQ_SCD / 128
0x07 FREQ_SCD / 256

Table 12: Register Data Frequency

FREQ_AGS Description
0x00.. f CLK
0x7B 20·(FREQ_AGS(6:0)+1)
0x7C AGSMIN
0x7D.. AGSINFINITE
0x7F
0x80.. f CLK
0xFF 625·(FREQ_AGS(6:0)−127)
Notes f CLK = 20 MHz for PC adapters MB3U (MB3U-I2C), MB4U and MB5U

Table 13: AutoGetSens Frequency


BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 41/42

REVISION HISTORY

Modifications made to this document are listed below. For modifications made to the corresponding shared library
see the latest release notes (included in the shared library zip package).

Rev Notes Pages affected Library reference


A1 Initial version Version 1.0
B1 Document layout revised 1, 9, 10 Version 1.0
B2 Multi Cycle Data removed 5, 8, 9, 10.. 12 Version 2.0
C1 Document revised all Version 3.0
C2 Interface MB4U added 5, 16 Version 3.2
C3 Functions added: SaveMasterConfig, SaveRegister, 20.. 22 Version 3.3
LoadRegister, CalculateCRC
C4 Functions added: GetSCDFrame, GetInterfaceInfo 18, 23 Version 4.0
D1 Functions added: GetMb3uPins, SetMb3uPins 20, 21, 22 Version 5.0
BISS_ComParamEnum extended
D2 Table 8 BISS_ErrorEnum extended 30 Version 5.1
D3 Function BiSS_SetInterface modified 5 Version 5.2
C++ example (Listing 3) added 34
D4 Functionality and description of the parameter pulScdValid (con- 10 Version 5.4
tained in function BiSS_ReadSCD) modified
E1 New: PC Adapter MB5U added Version 6.0
New functions: BISS_SetEdsParam, BISS_GetEdsParam 25, 25
BISS_SetEdsRegister, BISS_GetEdsRegister 25, 26
BISS_ReadEdsParams, BISS_WriteEdsParams 26, 26
BISS_SetFtdiFreq 24
New enum: BISS_EdsParamEnum 32
Enums extended: BISS_InterfaceEnum, BISS_ComParamEnum 6, 28
BISS_FrameParamEnum, BISS_ErrorEnum 29, 30
E2 Chapter Revision History revised 41 Version 6.2
E3 New functions: BISS_SetSlaveLabel, BISS_GetSCDFrameEx, 13, 18 Version 6.4
BISS_GetScdFrameContent, BISS_SaveDLLConfig, 19, 21
BISS_LoadDLLConfig, BISS_GetLastError 21, 27
Enums extended: BISS_ComParamEnum, BISS_ErrorEnum 28, 30
E4 Enum extended: BISS_InterfaceInfoEnum 23 Version 6.5
E5 Enum extended: BISS_InterfaceEnum 6 Version 6.6
Function added: BISS_CalculateCRC_Ex 22
Enum extended: BISS_FrameParamEnum 29
C++ example (Listing 4 and 5) added 36, 38
E6 New chapter GENERAL SETUP added 4 Version 7.0.1
Minimum required adapter driver versions added 4
LPT interfaces support removed 6
E7 New function BISS_GetScdFrameContentEx 20 Version 7.6.0
BiSS Shared Library i nar y
im
INTERFACE DESCRIPTION prel
Rev E7, Page 42/42
iC-Haus expressly reserves the right to change its products, specifications and related supplements (together the Documents). A Datasheet Update Notification
(DUN) gives details as to any amendments and additions made to the relevant Documents on our internet website www.ichaus.com/DUN and is automatically
generated and shall be sent to registered users by email.
Copying – even as an excerpt – is only permitted with iC-Haus’ approval in writing and precise reference to source.

The data and predicted functionality is intended solely for the purpose of product description and shall represent the usual quality and behaviour of the product.
In case the Documents contain obvious mistakes e.g. in writing or calculation, iC-Haus reserves the right to correct the Documents and no liability arises insofar
that the Documents were from a third party view obviously not reliable. There shall be no claims based on defects as to quality and behaviour in cases of
insignificant deviations from the Documents or in case of only minor impairment of usability.
No representations or warranties, either expressed or implied, of merchantability, fitness for a particular purpose or of any other nature are made hereunder with
respect to information/specification resp. Documents or the products to which information refers and no guarantee with respect to compliance to the intended
use is given. In particular, this also applies to the stated possible applications or areas of applications of the product.

iC-Haus products are not designed for and must not be used in connection with any applications where the failure of such products would reasonably be
expected to result in significant personal injury or death (Safety-Critical Applications) without iC-Haus’ specific written consent. Safety-Critical Applications
include, without limitation, life support devices and systems. iC-Haus products are not designed nor intended for use in military or aerospace applications or
environments or in automotive applications unless specifically designated for such use by iC-Haus.
iC-Haus conveys no patent, copyright, mask work right or other trade mark right to this product. iC-Haus assumes no liability for any patent and/or other trade
mark rights of a third party resulting from processing or handling of the product and/or any other use of the product.

Software and its documentation is provided by iC-Haus GmbH or contributors "AS IS" and is subject to the ZVEI General Conditions for the Supply of Products
and Services with iC-Haus amendments and the ZVEI Software clause with iC-Haus amendments (www.ichaus.com/EULA).

You might also like