L_candsxopen − initialisation of the candsx driver, Function library lenzecandsxdrv.lib, Functions/function blocks – Lenze DDS Global Drive PLC Developer Studio User Manual

Page 16

Advertising
background image

3.3

L_CanDSxOpen − Initialisation of the CanDSx driver

Function library LenzeCanDSxDrv.lib

Functions/function blocks

3−4

L

LenzeCanDSxDrv.lib EN 1.2

3.3

L_CanDSxOpen − Initialisation of the CanDSx driver

Function

This function is used to initialise the CanDSx driver in the operating system of the PLC.

·

For initialisation, the transfer parameter bOpen must be TRUE.

·

After the driver has been initialised, the indeces accessed via the system bus interface will not
be directed to the automatically assigned codes, but redirected to the codes of the mapping
table configured by the function L_CanDSxIndexInitCode.

Declaration

DWORD

L_CanDSxOpen (bOpen);

Transfer parameters

Data type

Information/possible settings

bOpen

Bool

Initialisation of the CanDSx drive in the operating system.

TRUE The CanDSx driver is initialised in the operating system.

Return value

Data type

Value/meaning

Double word

Status

Bit

Value

0

0 Driver initialised.

1 Driver is not initialised.

·

Remedy: Call the function with transfer parameter bOpen = TRUE.

1−15

Reserved for future extensions (bits are set to 0).

·

Invalid if bit 0 = 1

16−31

Version of function library LenzeCanDSxDrv.lib

·

Format: Main version/subversion (e. g. 0103hex = version 1.03)

·

Invalid if bit 0 = 1

Note!

If the function L_CanDSxOpen is called while code read or write requests are active an error may
occur!

This is why all actions with code access should be completed before this function is called.

Example

Calling the function in ST:

IF bOpenCanDSxDriver AND NOT bOpen THEN
bOpen :=

TRUE;

dwReturnOpen :=

L_CanDSxOpen(bOpen:= TRUE);

END_IF

Advertising