8dll functions – Lenze P94DLL01A User Manual

Page 9

Advertising
background image

9

P94DLL01A

8

DLL Functions

All functions in the DLL library are described in detail in paragraphs 8.1 “Connection Services Functions”
and 8. “Data Manipulation Functions”.

8.1 Connection Services Functions

There are six DLL Connection Service functions applicable to the PositionServo drive. The function names
are identified by

bold italic text.

long GetDllVersion( )
Purpose: To obtain the DLL version
Inputs:

none

Returns:

DLL version as an integer number

long SS940_EnableSerialInterface ( long port, long baudrate )
Purpose: To open the specified serial port for communication and redirect all communication requests

to the serial port.

Inputs:

port

serial port number

(example: 1 selects COM port 1)

baudrate port baudrate

(example: 11500)

Returns:

error code. Value 1 indicates OK.

long SS940_DisableSerialInterface ( )

Purpose: To close the serial port for communication and stops redirecting all communication to the se-
rial port.
Inputs:

none

Returns:

error code

SHANDLE SS940_OpenInterfaceB ( BYTE* address, int timeout )

Purpose: To open communication interface to device with the IP address supplied
Inputs:

address

byte array containing 4 bytes IP address of the drive.

Example: Form byte array for device IP 19.168.4.1

BYTE address[] = { 192,168,24,12 };

NOTE: For operation with a serial port use IP = 17.0.0.N, where N is the drive’s
serial address in the range 0-1. The function

SS940_EnableSerialInterface

must be executed before communication is routed to the serial port

timeout

request timeout in milliseconds. Set this value as 000 in general case.

Returns:

Handle to open interface. Valid handle is a non-zero number.

Advertising