Professional Documents
Culture Documents
Positioning Controller
Documentation
Windows 32-Bit DLL
TABLE OF CONTENTS
1 Introduction ..............................................................................................................................................5
2 Third Party Products ...............................................................................................................................6
2.1 IXXAT ......................................................................................................................................................6
2.2 Vector ......................................................................................................................................................6
2.3 National Instruments................................................................................................................................6
3 How to use this Guide .............................................................................................................................7
3.1 General Information .................................................................................................................................7
3.2 Communication Structure ........................................................................................................................8
3.3 Data Type Definitions ..............................................................................................................................8
4 Initialization Functions ............................................................................................................................9
4.1 Communication........................................................................................................................................9
4.1.1 Open Device ............................................................................................................................................... 9
4.1.2 Open Device Dialog .................................................................................................................................... 9
4.1.3 Get Protocol Stack Settings ...................................................................................................................... 10
4.1.4 Set Protocol Stack Settings....................................................................................................................... 10
4.1.5 Find Device Communication Settings ....................................................................................................... 10
4.1.6 Close All Devices ...................................................................................................................................... 11
4.1.7 Close Device............................................................................................................................................. 11
4.2 Info.........................................................................................................................................................11
4.2.1 Get Error Info ............................................................................................................................................ 11
4.2.2 Get Driver Info........................................................................................................................................... 12
4.2.3 Get Version............................................................................................................................................... 12
4.3 Advanced Functions ..............................................................................................................................12
4.3.1 Get Device Name Selection ...................................................................................................................... 12
4.3.2 Get Protocol Stack Name Selection .......................................................................................................... 13
4.3.3 Get Interface Name Selection ................................................................................................................... 13
4.3.4 Get Port Name Selection .......................................................................................................................... 14
4.3.5 Get Baud Rate Selection........................................................................................................................... 14
4.3.6 Programming Example.............................................................................................................................. 15
4.3.7 Get Key Handle......................................................................................................................................... 15
4.3.8 Get Device Name...................................................................................................................................... 15
4.3.9 Get Protocol Stack Name.......................................................................................................................... 16
4.3.10 Get Interface Name................................................................................................................................... 16
4.3.11 Get Port Name .......................................................................................................................................... 16
5 Configuration Functions .......................................................................................................................17
5.1 General..................................................................................................................................................17
5.1.1 Import Parameter ...................................................................................................................................... 17
5.1.2 Export Parameter...................................................................................................................................... 17
5.1.3 Set Object ................................................................................................................................................. 18
5.1.4 Get Object................................................................................................................................................. 18
5.1.5 Restore ..................................................................................................................................................... 19
5.1.6 Store ......................................................................................................................................................... 19
5.2 Advanced Functions ..............................................................................................................................19
5.2.1 Motor......................................................................................................................................................... 19
5.2.2 Sensor ...................................................................................................................................................... 22
5.2.3 Safety........................................................................................................................................................ 25
5.2.4 Position Regulator..................................................................................................................................... 27
5.2.5 Velocity Regulator ..................................................................................................................................... 29
5.2.6 Current Regulator ..................................................................................................................................... 29
5.2.7 Inputs/Outputs........................................................................................................................................... 30
5.2.8 Units.......................................................................................................................................................... 32
5.2.9 Compatibility Functions (do not use) ......................................................................................................... 33
6 Operation Functions..............................................................................................................................35
6.1 Operation Mode .....................................................................................................................................35
6.1.1 Set Operation Mode .................................................................................................................................. 35
6.1.2 Get Operation Mode ................................................................................................................................. 35
6.2 State Machine........................................................................................................................................36
6.2.1 Reset Device............................................................................................................................................. 36
6.2.2 Set State ................................................................................................................................................... 36
6.2.3 Set Enable State ....................................................................................................................................... 36
6.2.4 Set Disable State ...................................................................................................................................... 37
6.2.5 Set Quick Stop State................................................................................................................................. 37
6.2.6 Clear Fault ................................................................................................................................................ 37
6.2.7 Get State................................................................................................................................................... 38
6.2.8 Get Enable State....................................................................................................................................... 38
6.2.9 Get Disable State...................................................................................................................................... 38
6.2.10 Get Quick Stop State ................................................................................................................................ 39
6.2.11 Get Fault State.......................................................................................................................................... 39
1 Introduction
The present documentation “Windows 32-Bit DLL” provides instructions on the implemented functions of the
Windows DLL “EposCmd.dll”, which can be used for devices and .
The library is arranged in groups of functions and is intended to assist in programming of the control software
based on Microsoft Windows©.
This document describes the interface between a program and the Windows DLL (Dynamic Link Library). This DLL
supports devices of the EPOS family, which are attached to a serial interface RS232, USB or to a CAN board by
IXXAT, Vector or National Instruments. All other CANopen products of other manufacturers can also be used;
however no motion control library is available.
The Windows DLL supports the SDO protocol by CANopen but the Windows DLL is not suitable for real-time
communication.
For a number of high-level languages an applicable example, including respective documentation, is available.
BECAUSE THIS LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THIS LIBRARY,
TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM „AS IS” WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THIS LIBRARY IS WITH YOU. SHOULD THIS LIBRARY PROVE
DEFECTIVE OR INSUFFICIENT, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION
The latest edition of these „Windows 32-Bit DLL”, additional documentation and software to the EPOS positioning
controller may also be found in the internet under www.maxonmotor.com category <Service & Downloads> or in
the maxon motor e-shop http://shop.maxonmotor.com.
2.1 IXXAT
All IXXAT CANopen interfaces can be operated with the hardware-independent VCI driver V3 (Virtual CAN
Interface). The older version VCI driver V2 (2.16 and higher) is still supported but should not be used because of
lower performance.
See addresses below for ordering CANopen boards and further details of the driver.
Distributors
• www.ixxat.de subdirectory <contact>
2.2 Vector
For use of Vector CANopen cards, the ‘XL Driver Library’ is needed. Its latest edition may be found in the internet
under http://www.vector-informatik.de/english/ category <Hardware Products> subdirectory <Interfaces>. The
library must be installed manually in the appropriate working or system directory. With this library, it is possible to
write own CANopen applications based on Vector’s XL hardware.
See address below for ordering CANopen boards and further details of the driver.
Distributors
• General distributors
Contact
• www.ni.com/can
Getting Started
Firmware Specification
Communication Guide
• For detailed descriptions on used objects (Index-SubIndex), please refer to separate document Firmware
Specification.
• The units of measurement for the parameters are not being mentioned. They depend on the notation index
(position, velocity and acceleration). For details please refer to separate document Firmware Specification.
4 Initialization Functions
4.1 Communication
Description
Function „VCS_OpenDevice” opens the port for sending and receiving commands. This function
opens interfaces with the RS232, the USB and with CANopen boards.
For correct designations on DeviceName, ProtocolStackName, InterfaceName and PortName
use the functions Get Device Name Selection, Get Protocol Stack Name Selection,
Get Interface Name Selection and Get Port Name Selection.
Parameters
DeviceName char* Name of connected device:
EPOS, EPOS2
ProtocolStackName char* Name of used bus system:
MAXON_RS232, MAXON SERIAL V2, CANopen
InterfaceName char* Name of used interface:
MAXON_RS232: RS232
MAXON SERIAL V2: USB
CANopen: Is composed of:
Manufacturer_BoardName
DeviceNumber
Examples:
IXXAT_USB-to-CAN compact 0, …
Vector_CANcaseXL Channel 1, …
NI_PCI-CAN 0, …
PortName char* Name of port:
RS232: COM1, COM2, …
CANopen: CAN0, CAN1, …
USB: USB0, USB1, …
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_OpenDeviceDlg” registers available interfaces with which the EPOS can be
operated and opens the selected interface for communication.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_GetProtocolStackSettings” returns the communication parameters baud rate
and timeout.
Parameter
KeyHandle HANDLE Handle for port access
Return Parameters
pBaudrate DWORD* Actual baud rate from opened port [Bit/s]
pTimeout DWORD* Actual timeout from opened port [ms]
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetProtocolStackSettings” it is possible to write the communication
parameters. For exact values of available baud rates use the function Get Baudrate Selection.
Parameters
KeyHandle HANDLE Handle for port access
Baudrate DWORD Actual baud rate from opened port [Bit/s]
Timeout DWORD Actual timeout from opened port [ms]
Return Parameters
pErrorCode DWORD* Error information about the executed function
Remark
For correct communication use the same baud rate as on the connected device.
Description
With function „VCS_FindDeviceCommunicationSettings” it is possible to search the
communication setting parameters.
Remark
To accelerate the process some parameters can be defined.
Parameters
KeyHandle HANDLE Handle for port access
pDeviceName char* Device name
pProtocolStackName char* Protocol stack name
pInterfaceName char* Interface name
pPortName char* Port name
SizeName WORD Reserved memory size for return parameters
DialogMode int 0: Show Progress Dialog
1: Show Progress and Confirmation Dialog
2: Show Confirmation Dialog
Return Parameters
pDeviceName char* Device name
pProtocolStackName char* Protocol stack name
pInterfaceName char* Interface name
pPortName char* Port name
pBaudrate DWORD Baud rate
pTimeout DWORD Timeout
pNodeId WORD Node ID
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_CloseAllDevices” closes all opened ports and releases it for other applications.
Return Parameter
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_CloseDevice” closes the port and releases it for other applications.
Parameters
KeyHandle HANDLE Handle for port access
Return Parameters
pErrorCode DWORD* Error information about the executed function
4.2 Info
Description
Function „VCS_GetErrorInfo” returns the error information about the executed function from a
received error code. The function returns communication and library errors but no device errors
descriptions.
Parameters
ErrorCodeValue DWORD Received error code
MaxStrSize WORD Max. length of error string
Return Parameters
pErrorInfo char* Error string
Description
Function „VCS_GetDriverInfo” returns the name and version from the Windows DLL.
Parameters
MaxStrNameSize WORD Reserved memory size for the name
MaxStrVersionSize WORD Reserved memory size for the version
Return Parameters
pLibraryName char* Name from DLL
pLibraryVersion char* Version from DLL
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetVersion” returns the firmware version.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pHardwareVersion WORD* Hardware version Object: 0x2003-01
pSoftwareVersion WORD* Software version Object: 0x2003-02
pApplicationNumber WORD* Application number Object: 0x2003-03
pApplicationVersion WORD* Application version Object: 0x2003-04
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_GetDeviceNameSelection” returns all available device names.
Parameters
StartOfSelection BOOL True: Get first selection string
False: Get next selection string
MaxStrSize WORD Reserved memory size for the device name
Return Parameters
pDeviceNameSel char* Device name
pEndOfSelection BOOL* 1: No more selection string available
0: More string available
pErrorCode DWORD* Error information about the executed function
Go to Programming Example
Description
Function „VCS_GetProtocolStackNameSelection” returns all available protocol stack names.
Parameters
DeviceName char* Device name
StartOfSelection BOOL 1: Get first selection string
0: Get next selection string
MaxStrSize WORD Reserved memory size for the name
Return Parameters
pProtocolStackNameSel char* Pointer to available protocol stack name
pEndOfSelection BOOL* 1: No more string available
0: More string available
pErrorCode DWORD* Error information about the executed function
Go to Programming Example
Description
Function „VCS_GetInterfaceNameSelection” returns all available interface names.
Parameters
DeviceName char* Device name
ProtocolStackName char* Protocol stack name
StartOfSelection BOOL 1: Get first selection string
0: Get next selection string
MaxStrSize WORD Reserved memory size for the interface name
Return Parameters
pInterfaceNameSel char* Name from interface
pEndOfSelection BOOL* 1: No more string available
0: More string available
pErrorCode DWORD* Error information about the executed function
Go to Programming Example
Description
Function „VCS_GetPortNameSelection” returns all available port names.
Parameters
DeviceName char* Device name
ProtocolStackName char* Protocol stack name
InterfaceName char* Interface name
StartOfSelection BOOL 1: Get first selection string
0: Get next selection string
MaxStrSize WORD Reserved memory size for the port name
Return Parameters
pPortSel char* Pointer to port name
pEndOfSelection BOOL* 1: No more string available
0: More string available
pErrorCode DWORD* Error information about the executed function
Go to Programming Example
Description
Function „VCS_GetBaudrateSelection” returns all available baud rates for the connected port.
Parameters
DeviceName char* Name of device
ProtocolStackName char* Name of protocol stack
InterfaceName char* Interface name
PortName char* Port name
StartOfSelection BOOL 1: Get first selection value
0: Get next selection value
Return Parameters
pBaudrateSel DWORD* Pointer to baud rate [Bit/s]
pEndOfSelection BOOL* 1: No more value available
0: More value available
pErrorCode DWORD* Error information about the executed function
Go to Programming Example
Description
Function „VCS_GetKeyHandle” returns the key handle from the opened interface.
Parameters
DeviceName char* Device name
ProtocolStackName char* Protocol stack name
InterfaceName char* Interface name
PortName char* Port name
Return Parameters
pKeyHandle HANDLE* Handle for port access, if parameters are correct;
otherwise 0
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_GetDeviceName” returns the device name to corresponding handle.
Parameters
KeyHandle HANDLE Handle for port access
MaxStrSize WORD Reserved memory size for the device name
Return Parameters
pDeviceName char* Device name
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_GetProtocolStackName” returns the protocol stack name to corresponding
handle.
Parameters
KeyHandle HANDLE Handle for port access
MaxStrSize WORD Reserved memory size for the name
Return Parameters
pProtocolStackName char* Pointer to protocol stack name
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_GetInterfaceName” returns the interface name to corresponding handle.
Parameters
KeyHandle HANDLE Handle for port access
MaxStrSize WORD Reserved memory size for the interface name
Return Parameters
pInterfaceName char* Name from interface
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_GetPortName” returns the port name to corresponding handle.
Parameters
KeyHandle HANDLE Handle for port access
MaxStrSize WORD Reserved memory size for the port name
Return Parameters
pPortName char* Port name
pErrorCode DWORD* Error information about the executed function
5 Configuration Functions
For detailed information about the objects refer to associated document Firmware Specification.
5.1 General
Description
„VCS_ImportParameter” writes parameters from a file to the device.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
pParameterFileName char* Path of the needed file
ShowDlg BOOL Dialog is shown
ShowMsg BOOL Message box are activated
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ExportParameter” reads all parameters of the device and writes this into the file.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
pParameterFileName char* Path of the needed file
pBinaryFile char* Firmware file of the connected device
pUserID char* User name
pComment char* Comment
ShowDlg BOOL Dialog is shown
ShowMsg BOOL Message box are activated
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_SetObject” writes an object value at the given index and sub-index from
object dictionary.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ObjectIndex WORD Object index
ObjectSubIndex BYTE Object sub-index
pData void* Object data
NbOfBytesToWrite DWORD Object length to write (number of bytes)
Return Parameters
pNbOfBytesWritten DWORD* Object length written (number of bytes)
pErrorCode DWORD* Error information about the executed function
Remarks
All information about object index, object sub-index and object length can be checked in the
associated document Firmware Specification.
Description
The function „VCS_GetObject” reads an object value at the given index and sub-index from
object dictionary.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ObjectIndex WORD Object index
ObjectSubIndex BYTE Object sub-index
NbOfBytesToRead DWORD Object length to read (number of bytes)
Return Parameters
pData void* Object data
pNbOfBytesRead DWORD* Object length read (number of bytes)
pErrorCode DWORD* Error information about the executed function
Remarks
All information about object index, object sub-index and object length can be checked in the
associated document Firmware Specification.
5.1.5 Restore
Function
BOOL VCS_Restore (HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)
Description
The function „VCS_Restore” restores all default parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
5.1.6 Store
Function
BOOL VCS_Store (HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)
Description
The function „VCS_Store” stores all parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
5.2.1 Motor
Description
With function „VCS_SetMotorType” the motor type is written.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
MotorType WORD Kind of motor (see Table 2) Object: 0x6402-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Kind of motor
Description Constant name Value
brushed DC motor MT_DC_MOTOR 1
EC motor sinus commutated MT_EC_SINUS_COMMUTATED_MOTOR 10
EC motor block commutated MT_EC_BLOCK_COMMUTATED_MOTOR 11
Table 2: Kind of motor
Description
With function „VCS_SetDcMotorParameter” it is possible to write all DC motor parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
NominalCurrent WORD Maximal continuous current Object: 0x6410-01
MaxOutputCurrent WORD Maximal peak current Object: 0x6410-02
ThermalTimeConstant WORD Thermal time constant Object: 0x6410-05
winding
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetEcMotorParameter” it is possible to write all EC motor parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
NominalCurrent WORD Maximal continuous current Object: 0x6410-01
MaxOutputCurrent WORD Maximal peak current Object: 0x6410-02
ThermalTimeConstant WORD Thermal time constant Object: 0x6410-05
winding
NbOfPolePairs BYTE Number of pole pairs Object: 0x6410-03
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetMotorType” it is possible to read the motor type.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
MotorType WORD Kind of motor (see Table 2) Object: 0x6402-00
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetDcMotorParameter” it is possible to read all DC motor parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pNominalCurrent WORD* Maximal continuous current Object: 0x6410-01
pMaxOutputCurrent WORD* Maximal peak current Object: 0x6410-02
pThermalTimeConstant WORD* Thermal time constant Object: 0x6410-05
winding
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetEcMotorParameter” it is possible to read all EC motor parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pNominalCurrent WORD* Maximal continuous current Object: 0x6410-01
pMaxOutputCurrent WORD* Maximal peak current Object: 0x6410-02
pThermalTimeConstant WORD* Thermal time constant Object: 0x6410-05
winding
pNbOfPolePairs BYTE* Number of pole pairs Object: 0x6410-03
pErrorCode DWORD* Error information about the executed function
5.2.2 Sensor
Description
With function „VCS_SetSensorType” it is possible to write the sensor type.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
SensorType WORD Position Sensor Type (see Table 3) Object: 0x2210-02
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetIncEncoderParameter” it is possible to write the incremental encoder
parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
EncoderResolution DWORD Encoder pulse number [pulse Object: 0x2210-01
per turn]
InvertedPolarity BOOL Position sensor polarity Object: 0x2210-04
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetHallSensorParameter” it is possible to write the Hall sensor parameter.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
InvertedPolarity BOOL Position sensor polarity Object: 0x2210-04
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetSsiAbsEncoderParameter” it is possible to write all parameters for SSI
absolute encoder.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
DataRate WORD SSI encoder data rate Object: 0x2211-01
NbOfMultiTurnDataBits WORD number of bits multi turn Object: 0x2211-02
NbOfSingleTurnDataBits WORD number of bits single turn
InvertedPolarity BOOL Position sensor polarity Object: 0x2210-04
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetSensorType” it is possible to read the sensor type.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pSensorType WORD* Position sensor type (see Object: 0x2210-02
Table 3)
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetIncEncoderParameter” it is possible to read the incremental encoder
parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pEncoderResolution DWORD Encoder pulse number [pulse Object: 0x2210-01
per turn]
pInvertedPolarity BOOL Position sensor polarity Object: 0x2210-04
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetHallSensorParameter” it is possible to read the Hall sensor parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pInvertedPolarity BOOL Position sensor polarity Object: 0x2210-04
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetSsiAbsEncoderParameter” it is possible to read all parameters from SSI
absolute encoder.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pDataRate WORD* SSI encoder data rate Object: 0x2211-01
pNbOfMultiTurnDataBits WORD* number of bits multi turn Object: 0x2211-02
pNbOfSingleTurnDataBits WORD* number of bits single turn
pInvertedPolarity BOOL* Position sensor polarity Object: 0x2210-04
pErrorCode DWORD* Error information about the executed function
5.2.3 Safety
Description
„VCS_SetMaxFollowingError” writes the maximal allowed following error parameter.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
MaxFollowingError DWORD Maximal allowed difference of Object: 0x6065-00
position actual value to
position demand value.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetMaxFollowingError” reads the maximal allowed following error parameter.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pMaxFollowingError DWORD* Maximal allowed difference of Object: 0x6065-00
position actual value to
position demand value.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetMaxProfileVelocity” writes the maximal allowed velocity.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
MaxProfileVelocity DWORD This value is used as velocity Object: 0x607F-00
limit in a position (or velocity)
move.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetMaxProfileVelocity” reads the maximal allowed velocity.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pMaxProfileVelocity DWORD* This value is used as velocity Object: 0x607F-00
limit in a position (or velocity)
move.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetMaxAcceleration” writes the maximal allowed acceleration/deceleration.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
MaxAcceleration DWORD This value is the limit of the Object: 0x60C5-00
other
acceleration/deceleration
objects.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetMaxAcceleration” reads the maximal allowed acceleration/deceleration.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pMaxAcceleration DWORD* This value is the limit of the Object: 0x60C5-00
other
acceleration/deceleration
objects.
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetPositionRegulatorGain” it is possible to write all position regulator gains.
Determine the optimal parameters by using the 'Regulation Tuning' of EPOS Studio.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
P WORD Position regulator P-Gain Object: 0x60FB-01
I WORD Position regulator I-Gain Object: 0x60FB-02
D WORD Position regulator D-Gain Object: 0x60FB-03
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„ VCS_SetPositionRegulatorFeedForward” writes parameters for position regulation with feed
forward.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given
from hardware switches or the layer setting
services (LSS).
VelocityFeedForward WORD Velocity feed forward Object: 0x60FB-04
factor
AccelerationFeedForward WORD Acceleration feed Object: 0x60FB-05
forward factor
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetPositionRegulatorGain” it is possible to read all position regulator gains.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pP WORD* Position regulator P-Gain Object: 0x60FB-01
pI WORD* Position regulator I-Gain Object: 0x60FB-02
pD WORD* Position regulator D-Gain Object: 0x60FB-03
pErrorCode DWORD* Error information about the executed function
Description
„ VCS_GetPositionRegulatorFeedForward” sets parameter for position regulation feed forward.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pVelocityFeedForward WORD* Velocity feed forward factor Object: 0x60FB-04
pAccelerationFeedForward WORD* Acceleration feed forward Object: 0x60FB-05
factor
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetVelocityRegulatorGain” it is possible to write all velocity regulator gains.
Determine the optimal parameters by using the 'Regulation Tuning' of EPOS Studio.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
P WORD Velocity regulator P-Gain Object: 0x60F9-01
I WORD Velocity regulator I-Gain Object: 0x60F9-02
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetVelocityRegulatorGain” it is possible to read all velocity regulator gains.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pP WORD* Velocity regulator P-Gain Object: 0x60F9-01
pI WORD* Velocity regulator I-Gain Object: 0x60F9-02
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetCurrentRegulatorGain” it is possible to write all current regulator gains.
Determine the optimal parameters by using the 'Regulation Tuning' of EPOS Studio.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
P WORD Current regulator P-Gain Object: 0x60F6-01
I WORD Current regulator I-Gain Object: 0x60F6-02
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetCurrentRegulatorGain” it is possible to read all current regulator gains.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pP WORD* Current regulator P-Gain Object: 0x60F6-01
pI WORD* Current regulator I-Gain Object: 0x60F6-02
pErrorCode DWORD* Error information about the executed function
5.2.7 Inputs/Outputs
Description
„VCS_DigitalInputConfiguration” sets the parameter for one digital input.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
DigitalInputNb WORD Number of digital input (Sub- Object: 0x2070-0x
index of object)
Configuration WORD Configures which functionality will be assigned to
digital input (bit number)
For values see Table 4.
Mask BOOL 1: Functionality state will be Object: 0x2071-02
displayed
0: not displayed
Polarity BOOL 1: Low active Object: 0x2071-03
0: High active
ExecutionMask BOOL 1: Set the error routine. Object: 0x2071-04
Only for positive and negative
switch.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DigitalOutputConfiguration” sets parameter for one digital output.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
DigitalOutputNb WORD Number of digital output Object: 0x2079-0x
(Sub-index of object)
Configuration WORD Configures which functionality will be assigned to
digital output (bit number).
For values see Table 5.
State BOOL State of digital output Object: 0x2078-01
Mask BOOL 1: Register will be modified Object: 0x2078-02
Polarity BOOL 1: Output will be inverted Object: 0x2078-03
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_AnalogInputConfiguration” sets parameter for an analog input.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
AnalogInputNb WORD Number of analog input (Sub- Object: 0x2079
index of object)
Configuration WORD Configures which functionality will be assigned to
analog input (bit number)
For values see Table 6.
ExecutionMask BOOL 1: Register will be modified Object: 0x2078-02
Return Parameters
pErrorCode DWORD* Error information about the executed function
5.2.8 Units
Description
„VCS_SetVelocityUnits” writes velocity unit parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
VelDimension BYTE Velocity dimension index Object: 0x608C-00
VD_RPM = 0xA4
VelNotation char Velocity notation index Object: 0x608B-00
VN_STANDARD =0
VN_DECI = -1
VN_CENTI = -2
VN_MILLI = -3
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetVelocityUnits” reads velocity unit parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pVelDimension BYTE* Velocity dimension index Object: 0x608C-00
VD_RPM = 0xA4
pVelNotation char* Velocity notation index Object: 0x608B-00
VN_STANDARD = 0;
VN_DECI = -1;
VN_CENTI = -2;
VN_MILLI = -3
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetMotorParameter” it is possible to write all motor parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
MotorType WORD Kind of motor Object: 0x6402-00
See Table 2 on page 20.
ContinuousCurrent WORD Maximal continuous current Object: 0x6410-01
PeakCurrent WORD Maximal peak current Object: 0x6410-02
PolePair BYTE Number of pole pairs Object: 0x6410-03
ThermalTimeConstant WORD Thermal time constant Object: 0x6410-05
winding
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetEncoderParameter” it is possible to write all encoder parameters.
Parameters
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetMotorParameter” it is possible to read all motor parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pMotorType WORD* Kind of motor Object: 0x6402-00
See Table 2 on page 20.
pContinuousCurrent WORD* Maximal continuous current Object: 0x6410-01
pPeakCurrent WORD* Maximal peak current Object: 0x6410-02
pPolePair BYTE* Number of pole pairs Object: 0x6410-03
pThermalTime- WORD* Thermal time constant Object: 0x6410-05
Constant winding
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetEncoderParameter” it is possible to read all encoder parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pCounts WORD* Incremental encoder counts Object: 0x2210-01
[pulse per turn]
pPositionSensorType WORD* Position sensor type Object: 0x2210-02
See Table 3 on page 22.
pErrorCode DWORD* Error information about the executed function
6 Operation Functions
Description
„VCS_SetOperationMode” sets the operation mode.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Mode __int8 Operation mode (see Table 7) Object: 0x6060-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_GetOperationMode” returns the activated operation mode.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pMode __int8* Operation mode (see Table 7 Object: 0x6061-00
pErrorCode DWORD* Error information about the executed function
Operational Modes
Description Value Constant name
Position Profile Mode 1 OMD_PROFILE_POSITION_MODE
Position Velocity Mode 3 OMD_PROFILE_VELOCITY_MODE
Homing Mode 6 OMD_HOMING_MODE
Interpolated Position Mode 7 OMD_INTERPOLATED_POSITION_MODE
Position Mode -1 OMD_POSITION_MODE
Velocity Mode -2 OMD_VELOCITY_MODE
Current Mode -3 OMD_CURRENT_MODE
Master Encoder Mode -5 OMD_MASTER_ENCODER_MODE
Step Direction Mode -6 OMD_STEP_DIRECTION_MODE
Table 7: Operational modes
Description
The function „VCS_ResetDevice” is used to send the NMT service ‘Reset Node’. It is a
command without acknowledge.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetState” reads the actual state machine state.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
State WORD Value of state machine (see Object: 0x6040-00
Table 8)
Return Parameters
pErrorCode DWORD* Error information about the executed function
States
Description Value Constant name
Get/Set Disable State 0x0000 ST_DISABLED
Get/Set Enable State 0x0001 ST_ENABLED
Get/Set Quickstop State 0x0002 ST_QUICKSTOP
Get Fault State 0x0003 ST_FAULT
Table 8: State modes
Description
With the function „VCS_SetEnableState” the device changes to enable state.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetDisableState” changes the device to disable state.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetQuickStopState” the device changes to quick stop state.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_ClearFault” the device changes from fault state to disable state.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetState” reads the new state for the state machine.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pState WORD* Control word value (see Object: 0x6040-00
Table 8)
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetEnableState” checks if the device is enabled.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pIsEnabled BOOL* 1: Device enabled
0: Device not enabled
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetDisableState” checks if the device is disabled.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pIsDisabled BOOL* 1: Device disabled
0: Device not disabled
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetQuickStopState” returns the device state quick stop.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pIsQuickStopped BOOL* 1: Device is in quick stop state
0: Device is not in quick stop state
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetFaultState” returns the device state fault (pIsInFault = TRUE).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pIsInFault BOOL* 1: Device is in fault state
0: Device is not in fault state
pErrorCode DWORD* Error information about the executed function
Remarks
Get error information if the device is in fault state see chapter Error Handling.
Description
„VCS_GetNbOfDeviceError” returns the number of actual errors that are recorded.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pNbDeviceError BYTE* Number of occurred device Object: 0x1003-00
errors
pErrorCode DWORD* Error information about the executed function
Programming Example
Description
„VCS_GetDeviceErrorCode” returns the error code of selected error number .
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ErrorNumber BYTE Number (Object sub index) Object: 0x1003-0x
of device error (>= 1)
Return Parameters
pDeviceErrorCode BYTE* Actual error code from error Object: 0x1003-0x
history
pErrorCode DWORD* Error information about the executed function
//Global parameters
HANDLE KeyHandle = 1; //handle from opened interface
WORD NodeId = 1; //node ID from connected device
//Functional parameters
BYTE nbOfDeviceError = 0; //number of actual errors
DWORD functionErrorCode = 0; //error code from function
DWORD deviceErrorCode = 0; //error code from device
Description
With „VCS_GetMovementState” it is possible to check, if drive has reached the target.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pTargetReached BOOL* The drive has reached the Object: 0x6041-00
target. Bit 10
The function reads actual
state of bit 10 from the status
word.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetPositionIs” returns the position actual value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pPositionIs long* Position actual value Object: 0x6064-00
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetVelocityIs” reads the velocity actual value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pVelocityIs long* Velocity actual value Object: 0x606C-00
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetCurrentIs” returns the current actual value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pCurrentIs short* Current actual value Object: 0x6078-00
pErrorCode DWORD* Error information about the executed function
Description
„VCS_WaitForTargetReached” is waiting until the state is changed to target reached or the time
is up.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Timeout WORD Max. wait time until target reached
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With the function „VCS_ActivateProfilePositionMode” the device changes to profile position
mode (PPM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetPositionProfile” sets the position profile parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ProfileVelocity DWORD Position profile velocity Object: 0x6081-00
ProfileAcceleration DWORD Position profile acceleration Object: 0x6083-00
ProfileDeceleration DWORD Position profile deceleration Object: 0x6084-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetPositionProfile” returns the position profile parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pProfileVelocity DWORD* Position profile velocity Object: 0x6081-00
pProfileAcceleration DWORD* Position profile acceleration Object: 0x6083-00
pProfileDeceleration DWORD* Position profile deceleration Object: 0x6084-00
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_MoveToPosition” device movement starts with position profile to target
position.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
TargetPosition long Target position Object: 0x607A-00
Absolute BOOL TRUE starts an absolute, Object: 0x6040-00
FALSE a relative Bit 6
movement
Immediately BOOL TRUE starts immediately, Object: 0x6040-00
FALSE waits to end of last Bit 5
positioning
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetTargetPosition” returns the profile position mode target value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pTargetPosition long* Target position Object: 0x607A-00
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_HaltPositionMovement” movement stops with profile deceleration.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_EnablePositionWindow” the position window is activated.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
PositionWindow DWORD Position window value Object: 0x6067-00
PositionWindowTime WORD Position window time value Object: 0x6068-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_DisablePositionWindow” the position window is deactivated.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With the function „VCS_ActivateProfileVelocityMode” the device changes to profile velocity
mode (PVM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetVelocityProfile” sets the velocity profile parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ProfileAcceleration DWORD Velocity profile acceleration Object: 0x6083-00
ProfileDeceleration DWORD Velocity profile deceleration Object: 0x6084-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetVelocityProfile” returns the velocity profile parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pProfileAcceleration DWORD* Velocity profile acceleration Object: 0x6083-00
pProfileDeceleration DWORD* Velocity profile deceleration Object: 0x6084-00
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_MoveWithVelocity” device movement starts with velocity profile to target
velocity.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
TargetVelocity long Target velocity Object: 0x60FF-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetTargetVelocity” returns the profile velocity mode target value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pTargetVelocity long* Target velocity Object: 0x60FF-00
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_HaltVelocityMovement” movement stops with profile deceleration.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_EnableVelocityWindow” the velocity window is activated.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
VelocityWindow DWORD Velocity window value Object: 0x606D-00
VelocityWindowTime WORD Velocity window time value Object: 0x606E-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_DisableVelocityWindow” the velocity window is deactivated.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With the function „VCS_ActivateHomingMode” the device changes to homing mode (HM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetHomingParameter” it is possible to write all homing parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
HomingAcceleration DWORD Acceleration for homing Object: 0x609A-00
profile
SpeedSwitch DWORD Speed during search for Object: 0x6099-01
switch
Return Parameters
pErrorCode DWORD* Error information about the executed function
Remarks
Parameter units depend on (position, velocity, acceleration) notation index.
Description
With function „VCS_GetHomingParameter” it is possible to read all homing parameters.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pHomingAcceleration DWORD* Acceleration for homing Object: 0x609A-00
profile
pSpeedSwitch DWORD* Speed during search for Object: 0x6099-01
switch
pSpeedIndex DWORD* Speed during search for Object: 0x6099-02
index signal
pHomeOffset long* Home offset after homing Object: 0x607C-00
pCurrentThreshold WORD* Current threshold for Object: 0x2080-00
homing method -1, -2, -3
and -4
pHomePosition long* Home position value Object: 0x2081-00
pErrorCode DWORD* Error information about the executed function
Remarks
Parameter units depend on (position, velocity, acceleration) notation index.
Description
With function „VCS_FindHome” and the parameter „HomingMethod” it is possible to find the
system home. For example a home switch.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
HomingMethod __int8 Homing method Object: 0x6098-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Homing method
Method Constant value Description
Number
35 HM_ACTUAL_POSITION Actual Position
34 HM_INDEX_POSITIVE_SPEED Index Positive Speed
33 HM_INDEX_NEGATIVE_SPEED Index Negative Speed
27 HM_HOME_SWITCH_NEGATIVE_SPEED Home Switch Negative
Speed
23 HM_HOME_SWITCH_POSITIVE_SPEED Home Switch Positive
Speed
18 HM_POSITIVE_LIMIT_SWITCH Positive Limit Switch
17 HM_NEGATIVE_LIMIT_SWITCH Negative Limit Switch
11 HM_HOME_SWITCH_NEGATIVE_SPEED_ Home Switch Negative
AND_INDEX Speed & Index
7 HM_HOME_SWITCH_POSITIVE_SPEED_ Home Switch Positive
AND_INDEX Speed & Index
2 HM_POSITIVE_LIMIT_SWITCH_AND_INDEX Positive Limit Switch &
Index
1 HM_NEGATIVE_LIMIT_SWITCH_AND_INDEX Negative Limit Switch &
Index
0 No homing operation
required
-1 HM_CURRENT_THRESHOLD_POSITIVE_ Current Threshold
SPEED_AND_INDEX Positive Speed & Index
-2 HM_CURRENT_THRESHOLD_NEGATIVE_ Current Threshold
SPEED_AND_INDEX Negative Speed & Index
-3 HM_CURRENT_THRESHOLD_POSITIVE_SPEED Current Threshold
Positive Speed
-4 HM_CURRENT_THRESHOLD_NEGATIVE_SPEED Current Threshold
Negative Speed
Table 9: Homing methods
Description
The function „VCS_StopHoming” interrupts homing.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_DefinePosition” is using homing method 35 (Actual Position) to set a new
home position.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
HomePosition long Assign the homing position Object: 0x2081-00
with this value
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With the function „VCS_ActivateInterpolatedPositionMode” the device changes to interpolated
position mode (IPM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_SetIpmBufferParameter” set warning borders of the data input.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
UnderflowWarningLimit WORD This object gives lower Object: 0x20C4-02
signalization level of the
data input FIFO.
OverflowWarningLimit WORD This object gives the higher Object: 0x20C4-03
signalization level of the
data input FIFO.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetIpmBufferParameter” read warning borders and the max. buffer size of
the data input.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pUnderflowWarningLimit WORD* This object gives lower Object: 0x20C4-02
signalization level of the
data input FIFO.
pOverflowWarningLimit WORD* This object gives the Object: 0x20C4-03
higher signalization level
of the data input FIFO.
pMaxBufferSize DWORD* This object provides the Object: 0x60C4-01
maximal buffer size
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_ClearIpmBuffer” clears input buffer and enables the access to the input
buffer for the drive functions.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetFreeIpmBufferSize” read the actual free buffer size.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pBufferSize DWORD Actual free buffer size Object: 0x60C4-02
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_AddPvtValueToIpmBuffer” adds a new PVT reference point to the device.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Position long Position of the reference point
Object:
Velocity long Velocity of the reference point
0x20C1-00
Time BYTE Time of the reference point
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_StartIpmTrajectory” starts the IPM trajectory.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_StopIpmTrajectory” stops the IPM trajectory.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetIpmStatus” returns different warning and error states.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pTrajectoryRunning BOOL* State if IPM active
pIsUnderflowWarning BOOL* State if buffer underflow level is
reached
pIsOverflowWarning BOOL* State if buffer overflow level is
reached
pIsVelocityWarning BOOL* State if IPM velocity greater than
profile velocity
Object:
pIsAccelerationWarning BOOL* State if IPM acceleration greater
0x20C4-01
than profile acceleration
pIsUnderflowError BOOL* State of underflow error
pIsOverflowError BOOL* State of overflow error
pIsVelocityError BOOL* State if IPM velocity greater than
max. profile velocity
pIsAccelerationError BOOL* State if IPM acceleration greater
than max. profile acceleration
pErrorCode DWORD* Error information about the executed function
Description
With the function „VCS_ActivatePositionMode” the device changes to position mode (PM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetPositionMust” sets the position demand value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
PositionMust long Position demand value Object: 0x2062-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetPositionMust” returns the position demand value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pPositionMust long* Position demand value Object: 0x2062-00
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ActivateAnalogPositionSetpoint” configures the selected analog input for analog position
setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
AnalogInputNumber WORD Number of the used analog Object: 0x207B-01 or
input 0x207B-02
Scaling float The scaling factor for Object: 0x2303-01
analog position setpoint
functionality
Offset long Offset for analog position Object: 0x2303-02
setpoint functionality
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DeactivateAnalogPositionSetpoint” disable the selected analog input for analog position
setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
AnalogInputNumber WORD Number of the used analog Object: 0x207B-01 or
input 0x207B-02
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_EnableAnalogPositionSetpoint” enable the execution mask for analog position setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DisableAnalogPositionSetpoint” disable the execution mask for analog position setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With the function „VCS_ActivateVelocityMode” the device changes to velocity mode (VM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_SetVelocityMust” sets the velocity demand value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
VelocityMust long Velocity demand value Object: 0x206B-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_GetVelocityMust” returns the velocity demand value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pVelocityMust long* Velocity demand value Object: 0x206B-00
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ActivateAnalogVelocitySetpoint” configures the selected analog input for analog velocity
setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
AnalogInputNumber WORD Number of the used analog Object: 0x207B-01 or
input 0x207B-02
Scaling float The scaling factor for Object: 0x2302-01
analog velocity setpoint
functionality
Offset long Offset for analog velocity Object: 0x2302-02
setpoint functionality
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DeactivateAnalogVelocitySetpoint” disable the selected analog input for analog velocity
setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
AnalogInputNumber WORD Number of the used analog Object: 0x207B-01 or
input 0x207B-02
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_EnableAnalogVelocitySetpoint” enable the execution mask for analog velocity setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DisableAnalogVelocitySetpoint” disable the execution mask for analog velocity setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_ActivateCurrentMode” changes operational mode to current mode.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_GetCurrentMust” it is possible to read the current mode demand value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pCurrentMust short* Current mode demand value Object: 0x2030-00
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetCurrentMust” it is possible to write current mode demand value.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
CurrentMust short Current mode demand value Object: 0x2030-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ActivateAnalogCurrentSetpoint” configures the selected analog input for analog current
setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
AnalogInputNumber WORD Number of the used analog Object: 0x207B-01 or
input 0x207B-02
Scaling float The scaling factor for Object: 0x2301-01
analog current setpoint
functionality
Offset short Offset for analog current Object: 0x2301-02
setpoint functionality
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DeactivateAnalogCurrentSetpoint” disable the selected analog input for analog current
setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
AnalogInputNumber WORD Number of the used analog Object: 0x207B-01 or
input 0x207B-02
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_EnableAnalogCurrentSetpoint” enable the execution mask for analog current setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DisableAnalogCurrentSetpoint” disable the execution mask for analog current setpoint.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With the function „VCS_ActivateMasterEncoderMode” the device changes to master encoder
mode (MEM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetMasterEncoderParameter” it is possible to write all parameters for
master encoder mode.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ScalingNumerator WORD Scaling numerator for Object: 0x2300-02
position calculation
ScalingDenominator WORD Scaling denominator for Object: 0x2300-03
position calculation
Polarity BYTE Polarity of the direction Object: 0x2300-04
input.
0: Positive
1: Negative
MaxVelocity DWORD This parameter is the Object: 0x607F-01
maximal allowed speed
during a profiled move.
MaxAcceleration DWORD Defines the maximal Object: 0x60C5-01
allowed acceleration.
Description
With function „VCS_GetMasterEncoderParameter” it is possible to read all parameters for
master encoder mode.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pScalingNumerator WORD* Scaling numerator for Object: 0x2300-02
position calculation
pScalingDenominator WORD* Scaling denominator for Object: 0x2300-03
position calculation
pPolarity BYTE* Polarity of the direction Object: 0x2300-04
input.
0: Positive
1: Negative
Description
With the function „VCS_ActivateStepDirectionMode” the device changes to step direction mode
(SDM).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
With function „VCS_SetStepDirectionParameter” it is possible to write all parameters for step
direction mode.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ScalingNumerator WORD Scaling numerator for Object: 0x2300-02
position calculation
ScalingDenominator WORD Scaling denominator for Object: 0x2300-03
position calculation
Polarity BYTE Polarity of the direction Object: 0x2300-04
input.
0: Positive
1: Negative
MaxVelocity DWORD This parameter is the Object: 0x607F-01
maximal allowed speed
during a profiled move.
MaxAcceleration DWORD Defines the maximal Object: 0x60C5-01
allowed acceleration.
Description
With function „VCS_GetStepDirectionParameter” it is possible to read all parameters for step
direction mode.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pScalingNumerator WORD* Scaling numerator for Object: 0x2300-02
position calculation
pScalingDenominator WORD* Scaling denominator for Object: 0x2300-03
position calculation
pPolarity BYTE* Polarity of the direction Object: 0x2300-04
input.
0: Positive
1: Negative
pMaxVelocity DWORD* This parameter is the Object: 0x607F-01
maximal allowed speed
during a profiled move.
pMaxAcceleration DWORD* Defines the maximal Object: 0x60C5-01
allowed acceleration.
pErrorCode DWORD* Error information about the executed function
Remark
More information about the inputs from the other devices are available in the “Firmware
Specification” documents!
Description
„VCS_GetAllDigitalInputs” returns state of all digital inputs.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pInputs WORD* Display the state of the digital Object: 0x2071-01
input functionalities. If a bit is
read as “1”, the functionality
is
activated.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetAllDigitalOutputs” returns state of all digital outputs.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pOutputs WORD* State of all digital outputs. If a Object: 0x2078-01
bit is read as “1”, the state
activated.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetAllDigitalOutputs” set state of all digital outputs.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Outputs WORD State of all digital outputs. If Object: 0x2078-01
a bit is written as “1”, the
state is activated.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetAnalogInput” returns the value from an analog input.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
InputNumber WORD Analog input number
Return Parameters
pAnalogValue WORD* Analog value from input Object: 0x207C-0?
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetAnalogOutput” set the voltage level of an analog output.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
OutputNumber WORD Analog output number
pAnalogValue WORD* Analog value for output Object: 0x207E-00
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetPositionCompareParameter” write all parameters for position compare.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
OperationalMode BYTE Used operational mode in
position sequence mode:
(see Table 10)
IntervalMode BYTE Used interval mode in position
Object:
sequence mode:
0x207A-01
(see Table 11)
DirectionDependency BYTE Used direction dependency in
position sequence mode:
(see Table 12)
IntervalWidth WORD This object holds the width of the Object:
position intervals 0x207A-03
IntervalRepetitions WORD This object allows to configure Object:
the number of position intervals 0x207A-04
to be considered by position
compare
PulseWidth WORD This object configures the pulse Object:
width of the trigger output 0x207A-05
Return Parameters
pErrorCode DWORD* Error information about the executed function
OperationalMode
Description Value Constant name
Single position mode 0 PCO_SINGLE_POSITION_MODE
Position sequence mode 1 PCO_POSITION_SEQUENCE_MODE
Table 10: Position Compare - Operational mode
IntervalMode
Description Value Constant name
Interval positions are set in negative 0 PCI_NEGATIVE_DIR_TO_REFPOS
direction relative to the position compare
reference position
Interval positions are set in positive 1 PCI_POSITIVE_DIR_TO_REFPOS
direction relative to the position compare
reference position
Interval positions are set in positive and 2 PCI_BOTH_DIR_TO_REFPOS
negative direction relative to the position
compare reference position
Table 11: Position Compare - Interval mode
DirectionDependency
Description Value Constant name
Positions are compared only if actual 0 PCD_MOTOR_DIRECTION_NEGATIVE
motor direction is negative
Positions are compared only if actual 1 PCD_MOTOR_DIRECTION_POSITIVE
motor direction is positive
Positions are compared regardless of the 2 PCD_MOTOR_DIRECTION_BOTH
actual motor direction
Table 12: Position Compare - Direction Dependency
Description
„VCS_GetPositionCompareParameter” read all parameters for position compare.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pOperationalMode BYTE* Used operational mode in position
sequence mode:
(see Table 10)
pIntervalMode BYTE* Used interval mode in position
Object:
sequence mode:
0x207A-01
(see Table 11)
pDirectionDependency BYTE* Used direction dependency in
position sequence mode:
(see Table 12)
pIntervalWidth WORD* This object holds the width of the Object:
position intervals 0x207A-03
pIntervalRepetitions WORD* This object allows to configure the Object:
number of position intervals to be 0x207A-04
considered by position compare
pPulseWidth WORD* This object configures the pulse Object:
width of the trigger output 0x207A-05
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_ActivatePositionCompare” enables the output to position compare method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
DigitalOutputNumber WORD Selected digital output Object: 0x2079
for position compare
Polarity BOOL Polarity of the selected Object: 0x2078-03
output
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_DeactivatePositionCompare” disables the output to position compare method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
DigitalOutputNumber WORD Selected digital output Object: 0x2079
for position compare
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_EnablePositionCompare” enables the output mask for position compare
method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_DisablePositionCompare” disables the output mask from position compare
method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetPositionCompareReferencePosition” writes the reference position for position
compare method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ReferencePosition long This object holds the Object: 0x207A-02
position that is
compared with the
position actual value
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetPositionMarkerParameter” write all parameters for position marker method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given
from hardware switches or the layer setting
services (LSS).
PositionMarkerEdgeType BYTE The value of this object defines on Object:
what kind of edge the position 0x2074-02
should be captured: (see Table 13)
PositionMarkerMode BYTE This object defines the position Object:
marker-capturing mode: 0x2074-03
(see Table 14)
Return Parameters
pErrorCode DWORD* Error information about the executed function
PositionMarkerEdgeType
Description Value Constant name
Both edges 0 PET_BOTH_EDGES
Rising edge 1 PET_RISING_EDGE
Falling edge 2 PET_FALLING_EDGE
Table 13: Position marker edge types
PositionMarkerMode
Description Value Constant name
Continuous 0 PM_CONTINUOUS
Single 1 PM_SINGLE
Multiple 2 PM_MULTIPLE
Table 14: Position marker modes
Description
„VCS_GetPositionMarkerParameter” read all parameters for position marker method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given
from hardware switches or the layer setting
services (LSS).
Return Parameters
pPositionMarkerEdgeType BYTE* The value of this object Object:
defines on what kind of edge 0x2074-02
the position should be
captured:
(see Table 13)
pPositionMarkerMode BYTE* This object defines the Object:
position marker capturing 0x2074-03
mode:
(see Table 14)
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_ActivatePositionMarker” enables the digital input to position marker method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
DigitalInputNumber WORD Selected digital input for Object: 0x2070
position marker
Polarity BOOL Polarity of the selected Object: 0x2071-03
input
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
Function „VCS_DeactivatePositionMarker” disables the digital input to position marker method.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
DigitalInputNumber WORD Selected digital input for Object: 0x2070
position marker
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ReadPositionMarkerCounter” returns the number of the detected edges.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pCount WORD* This object counts the Object: 0x2074-04
number of the detected
edges.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ReadPositionMarkerCapturedPosition” returns the last captured position or the position
from the position marker history.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
CounterIndex WORD 0: Read position marker Object: 0x2074-01
captured position
1 or 2: Read position Object:
marker history 0x2074-05 or 06
Return Parameters
pCapturedPosition long* This object contains the Object: 0x2074-01 or
captured position or the 0x2074-05/06
position marker history
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ResetPositionMarkerCounter” clears the counter and the captured positions by writing
zero to object position marker counter (0x2074-04).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SetRecorderParameter” writes parameters for data recorder .
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
SamplingPeriod WORD Sampling Period as a Object: 0x2012-00
multiple of the current
regulator cycle
(n-times 0.1ms)
NbOfPrecedingSamples WORD Number of preceding Object: 0x2013-00
samples (data history).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_GetRecorderParameter” reads parameters for data recorder .
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
Return Parameters
pSamplingPeriod WORD* Sampling Period as a Object: 0x2012-00
multiple of the current
regulator cycle
(n-times 0.1ms)
pNbOfPrecedingSamples WORD* Number of preceding Object: 0x2013-00
samples (data history).
pErrorCode DWORD* Error information about the executed function
Description
„VCS_EnableTrigger” connects trigger(-s) for data recording.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
TriggerType BYTE Configuration of Auto Trigger functions. If a Object: 0x2011-00
bit is write as one the trigger is activated:
(see Table 15)
Return Parameters
pErrorCode DWORD* Error information about the executed function
Trigger Types
Description Value Constant name
Trigger movement start 1 DR_MOVEMENT_START_TRIGGER
Error trigger 2 DR_ERROR_TRIGGER
Digital input trigger 4 DR_DIGITAL_INPUT_TRIGGER
Trigger movement end 8 DR_MOVEMENT_END_TRIGGER
Table 15: Data recorder trigger types
Description
„VCS_DisableAllTrigger” sets data recorder configuration (0x2011-00) for triggers to zero.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ActivateChannel” connects object for data recording.
Start with channel number one! For every activated channel the number of sampling variables
(Object 0x2014-00) will be incremented
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services (LSS).
ChannelNumber BYTE Channel number [1 … 4]
ObjectIndex WORD Object index for data recording Object: 0x2015-
ChannelNumber
ObjectSubIndex BYTE Object sub index for data recording Object: 0x2016-
ChannelNumber
ObjectSize BYTE Object size in bytes for data recording
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_DeactivateAllChannel” sets all data recording objects to zero (0x2014, 0x2015 and
0x2016).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_StartRecorder” starts the data recording.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_StopRecorder” stops the data recording.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ForceTrigger” forces the data recording triggers.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_IsRecorderRunning” returns data recorder status running.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pRunning BOOL 1: Data recorder running Object: 0x2017-00,
0: Data recorder stopped (bit 0)
pErrorCode DWORD* Error information about the executed function
Description
„VCS_IsRecorderTriggered” returns data recorder status triggered.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pTriggered BOOL 1: Data recorder triggered Object: 0x2017-00
0: Data recorder not triggered (bit 1)
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ReadChannelVectorSize” returns the maximal number of samples per variable. This
parameter is dynamically calculated by the data recorder.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from hardware
switches or the layer setting services (LSS).
Return Parameters
pVectorSize DWORD Maximal number of Object: 0x2018-00
samples per variable.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ReadChannelDataVector” returns the data points of a selected channel.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services (LSS).
ChannelNumber BYTE Selected channel
VectorSize DWORD Size of data points Object: 0x2018-00
Return Parameters
pDataVector BYTE Data points of selected Object: 0x201B-00
channel
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ShowChannelDataDlg” opens the dialog to show the data channel(-s).
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services (LSS).
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ExportChannelDataToFile” saves data point in a file.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services (LSS).
FileName char* Path and file name for save data points.
File endings: *.csv, *.txt or *.rda.
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ReadDataBuffer” returns the buffer data points.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services (LSS).
BufferSizeToRead DWORD Buffer size
Return Parameters
pDataBuffer BYTE* Data points Object: 0x201B-00
pBufferSizeRead DWORD* Size of read data buffer
pVectorStartOffset WORD* Offset to the start of the Object: 0x201A-00
recorded data vector
within the ring buffer.
pMaxNbOfSamples WORD* Maximal number of Object: 0x2018-00
samples per variable.
pNbOfRecordedSamples WORD* Number of recorded Object: 0x2019-00
samples.
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ExtractChannelDataVector” returns the vector of one data channel.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
ChannelNumber BYTE Selected channel
pDataBuffer BYTE Data points Object: 0x201B-00
BufferSize DWORD Buffer size
VectorSize DWORD Vector size
VectorStartOffset WORD Offset to the start of the Object: 0x201A-00
recorded data vector
within the ring buffer.
MaxNbOfSamples WORD Maximal number of Object: 0x2018-00
samples per variable.
NbOfRecordedSamples WORD Number of recorded Object: 0x2019-00
samples.
Return Parameters
pDataVector BYTE* Data points of the channel
pErrorCode DWORD* Error information about the executed function
Description
„VCS_SendCANFrame” sends a general CAN frame to the CAN bus.
Parameters
KeyHandle HANDLE Handle for port access
CobID WORD CAN frame 11-bit identifier
Length WORD CAN frame data length
pData void* CAN frame data
Return Parameters
pErrorCode DWORD* Error information about the executed function
Description
„VCS_ReadCANFrame” reads a general CAN frame from the CAN bus.
Parameters
KeyHandle HANDLE Handle for port access
CobID WORD CAN frame 11-bit identifier
Length WORD CAN frame data length
Timeout WORD Maximum waiting period
Return Parameters
pData void* CAN frame data
pErrorCode DWORD* Error information about the executed function
Description
„VCS_RequestCANFrame” requests a general CAN frame from the CAN bus using Remote
Transmit Request (RTR).
Parameters
KeyHandle HANDLE Handle for port access
CobID WORD CAN frame 11-bit identifier
Length WORD CAN frame data length
Return Parameters
pData void* CAN frame data
pErrorCode DWORD* Error information about the executed function
Description
The function „VCS_SendNMTService” is used to send a NMT protocol from a master to a slave.
It is a command without acknowledge.
Parameters
KeyHandle HANDLE Handle for port access
NodeId WORD Node ID of the addressed device. ID is given from
hardware switches or the layer setting services
(LSS).
CommandSpecifier WORD NMT service
(see Table 16)
Return Parameters
pErrorCode DWORD* Error information about the executed function
Command Specifier
Description Value Constant name
Start remote node 1 NCS_START_REMOTE_NODE
Stop remote node 2 NCS_STOP_REMOTE_NODE
Enter pre-operational 128 NCS_ENTER_PRE_OPERATIONAL
Reset node 129 NCS_RESET_NODE
Reset communication 130 NCS_RESET_COMMUNICATION
Table 16: Command specifier
9 Error Overview
10 Version History
Date DLL Documentation Description
Version
11.11.2003 1.00 Edition November • First library version
2003
01.12.2003 1.01 Edition December • All selection functions have been changed:
2003 VCS_GetBaudrateSelection(..), VCS_GetDeviceName(..),
VCS_GetDeviceNameSelection(..), VCS_GetDriverInfo(..),
VCS_GetInterfaceName(..), VCS_GetInterfaceNameSelection(..),
VCS_GetPortName(..), VCS_GetPortNameSelection(..),
VCS_GetProtocolStackModeSelection(..),
VCS_GetProtocolStackName(..),
VCS_GetProtocolStackNameSelection(..)
05.01.2004 1.02 Edition • Insert IXXAT details
January 2004
06.04.2004 2.0.0.0 Edition • New functions documented:
April 2004 VCS_CloseAllDevices(..), VCS_DigitalInputConfiguration(..),
VCS_DigitalOutputConfiguration(..), VCS_GetAllDigitalInputs(..),
VCS_GetAllDigitalOutputs(..), VCS_GetAnalogInput(..),
VCS_SetAllDigitalOutputs(..), VCS_SendNMTService(..),
VCS_OpenDeviceDlg(..)
• All this functions have been changed:
VCS_GetBaudrateSelection(..), VCS_FindHome(..),
VCS_GetHomingParameter(..), VCS_SetHomingParameter(..),
VCS_MoveToPosition(..), VCS_GetOperationMode(..),
VCS_SetOperationMode(..), VCS_GetObject(..),
VCS_SetObject(..)
• All this functions have been deleted:
VCS_GetProtocolStackMode(..),
VCS_GetProtocolStackModeSelection(..)
16.07.2004 2.0.3.0 Edition • Error correction documentation
July 2004 • Additional information about error codes
01.03.2005 3.0.0.0 Edition • Insert from Vector CAN cards details
March 2005
01.10.2005 4.0.0.0 Edition • Error correction documentation
October 2005
03.02.2006 4.0.0.0 Edition • Additional information about error codes
February 2006
12.04.2006 4.1.0.0 Edition • New error codes
April 2006
12.04.2006 4.1.1.0 Edition • VCS_SendCANFrame bug fixed
April 2006
11.10.2006 4.2.0.0 Edition • New function: VCS_GetErrorInfo(..)
October 2006
16.10.2006 4.2.1.0 Edition • VCS_GetDriverInfo, VCS_SetHomingParameter bug fixed
October 2006
01.02.2007 4.3.0.0 Edition • Support for National Instruments Interfaces
January 2007
10.08.2007 4.4.0.0 Edition • Support for IXXAT VCI V3
August 2007
01.05.2008 4.5.0.0 Edition • New functions for read device errors (Get Device Error)
April 2008 • Adaption for EPOS2
04.09.2009 4.6.0.0 Edition • Support for EPOS2 functionality
September 2009 • Support for data recorder
• Support for parameter export and import
• VCS_ReadCANFrame
22.10.2009 4.6.1.3 Edition • Multithreading bug fixed
October 2009
30.08.2009 4.7.1.0 Edition • New Parameter “DialogMode” for Findxxx Functions
August 2010 • New ProtocolStack Name “MAXON SERIAL V2”
(Library is still compatible with old name “EPOS2_USB”)
• VCS_WaitForTargetReached returns false, if timeout elapses
LIST OF FIGURES
Figure 1: EPOS documentation hierarchy ......................................................................................................7
Figure 2: Communication structure example..................................................................................................8
LIST OF TABLES
Table 1: Data type definitions........................................................................................................................8
Table 2: Kind of motor.................................................................................................................................20
Table 3: Position Sensor Type ....................................................................................................................22
Table 4: Digital Input Configuration .............................................................................................................31
Table 5: Digital Output Configuration ..........................................................................................................31
Table 6: Analog Input Configuration............................................................................................................32
Table 7: Operational modes ........................................................................................................................35
Table 8: State modes ..................................................................................................................................36
Table 9: Homing methods ...........................................................................................................................50
Table 10: Position Compare - Operational mode ..........................................................................................67
Table 11: Position Compare - Interval mode.................................................................................................67
Table 12: Position Compare - Direction Dependency ...................................................................................67
Table 13: Position marker edge types...........................................................................................................70
Table 14: Position marker modes..................................................................................................................70
Table 15: Data recorder trigger types............................................................................................................74
Table 16: Command specifier .......................................................................................................................81
Table 17: Communication errors ...................................................................................................................82
Table 18: „Windows 32-Bit DLL” specified general errors .............................................................................83
Table 19: „Windows 32-Bit DLL” specified interface layer errors...................................................................83
Table 20: „Windows 32-Bit DLL” specified interface layer ‘RS232’ errors .....................................................83
Table 21: „Windows 32-Bit DLL” specified interface layer ‘CAN’ errors ........................................................83
Table 22: „Windows 32-Bit DLL” specified interface layer ‘USB’ errors.........................................................83
Table 23: „Windows 32-Bit DLL” specified protocol ‘MaxonRS232’ errors ....................................................84
Table 24: „Windows 32-Bit DLL” specified protocol ‘CANopen’ errors ..........................................................84
Table 25: „Windows 32-Bit DLL” specified protocol ‘USB’ errors ..................................................................84