Download as pdf or txt
Download as pdf or txt
You are on page 1of 92

maxon document number: rel3096

EPOS Positioning Controller

EPOS Command Library

1 2 2.1 2.2 2.3 3 3.1 3.2 3.3 3.4 4 4.1

Introduction Third Party Products IXXAT ......................................................................................................................................................7 Vector ......................................................................................................................................................7 National Instruments ................................................................................................................................ 7 How to use this Guide General Information .................................................................................................................................8 Communication Structure Windows .........................................................................................................9 Communication Structure Linux ...............................................................................................................9 Data Type Definitions ............................................................................................................................ 10 Initialization Functions Communication ...................................................................................................................................... 11
Open Device ............................................................................................................................................. 11 Open Device Dialog .................................................................................................................................. 11 Get Protocol Stack Settings ...................................................................................................................... 12 Set Protocol Stack Settings ....................................................................................................................... 12 Find Device Communication Settings ....................................................................................................... 12 Close All Devices ...................................................................................................................................... 13 Close Device ............................................................................................................................................. 13

4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7

4.2
4.2.1 4.2.2 4.2.3

Info......................................................................................................................................................... 13
Get Error Info ............................................................................................................................................ 13 Get Driver Info........................................................................................................................................... 14 Get Version ............................................................................................................................................... 14

4.3

Advanced Functions .............................................................................................................................. 14


Get Device Name Selection ...................................................................................................................... 14 Get Protocol Stack Name Selection .......................................................................................................... 15 Get Interface Name Selection ................................................................................................................... 15 Get Port Name Selection .......................................................................................................................... 16 Get Baud Rate Selection ........................................................................................................................... 16 Programming Example .............................................................................................................................. 17 Get Key Handle......................................................................................................................................... 17 Get Device Name ...................................................................................................................................... 17 Get Protocol Stack Name .......................................................................................................................... 18 Get Interface Name ................................................................................................................................... 18 Get Port Name .......................................................................................................................................... 18

4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.3.10 4.3.11

5 5.1

Configuration Functions General .................................................................................................................................................. 19


Import Parameter ...................................................................................................................................... 19 Export Parameter ...................................................................................................................................... 19 Set Object ................................................................................................................................................. 20 Get Object ................................................................................................................................................. 20 Restore ..................................................................................................................................................... 21 Store ......................................................................................................................................................... 21

5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6

5.2
5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8

Advanced Functions .............................................................................................................................. 21


Motor......................................................................................................................................................... 21 Sensor ...................................................................................................................................................... 24 Safety........................................................................................................................................................ 27 Position Regulator ..................................................................................................................................... 29 Velocity Regulator ..................................................................................................................................... 31 Current Regulator ..................................................................................................................................... 32 Inputs/Outputs........................................................................................................................................... 33 Units.......................................................................................................................................................... 35

6 6.1 6.2

Operation Functions Operation Mode ..................................................................................................................................... 37


Set Operation Mode .................................................................................................................................. 37 Get Operation Mode ................................................................................................................................. 37

6.1.1 6.1.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.2.10

State Machine ........................................................................................................................................ 38


Reset Device............................................................................................................................................. 38 Set State ................................................................................................................................................... 38 Set Enable State ....................................................................................................................................... 38 Set Disable State ...................................................................................................................................... 39 Set Quick Stop State ................................................................................................................................. 39 Clear Fault ................................................................................................................................................ 39 Get State................................................................................................................................................... 40 Get Enable State....................................................................................................................................... 40 Get Disable State ...................................................................................................................................... 40 Get Quick Stop State ................................................................................................................................ 41

2 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library


6.2.11

EPOS Positioning Controller

Get Fault State .......................................................................................................................................... 41 Get Number of Device Error ...................................................................................................................... 41 Get Device Error Code .............................................................................................................................. 42 Programming Example .............................................................................................................................. 42

6.3
6.3.1 6.3.2 6.3.3

Error Handling........................................................................................................................................ 41

6.4
6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 6.4.6 6.4.7

Motion Info ............................................................................................................................................. 43


Get Movement State ................................................................................................................................. 43 Get Position Is........................................................................................................................................... 43 Get Velocity Is ........................................................................................................................................... 43 Get Velocity Is Averaged ........................................................................................................................... 44 Get Current Is ........................................................................................................................................... 44 Get Current Is Averaged ........................................................................................................................... 44 Wait For Target Reached .......................................................................................................................... 45

6.5
6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7

Profile Position Mode ............................................................................................................................. 45


Activate Profile Position Mode................................................................................................................... 45 Set Position Profile .................................................................................................................................... 45 Get Position Profile ................................................................................................................................... 46 Move To Position ...................................................................................................................................... 47 Get Target Position ................................................................................................................................... 47 Halt Position Movement ............................................................................................................................ 47 Advanced Functions ................................................................................................................................. 48

6.6
6.6.1 6.6.2 6.6.3 6.6.4 6.6.5 6.6.6 6.6.7

Profile Velocity Mode ............................................................................................................................. 48


Activate Profile Velocity Mode ................................................................................................................... 48 Set Velocity Profile .................................................................................................................................... 49 Get Velocity Profile ................................................................................................................................... 49 Move With Velocity ................................................................................................................................... 49 Get Target Velocity ................................................................................................................................... 50 Halt Velocity Movement ............................................................................................................................ 50 Advanced Functions ................................................................................................................................. 50

6.7
6.7.1 6.7.2 6.7.3 6.7.4 6.7.5 6.7.6 6.7.7 6.7.8

Homing Mode ........................................................................................................................................ 51


Activate Homing Mode .............................................................................................................................. 51 Set Homing Parameter.............................................................................................................................. 51 Get Homing Parameter ............................................................................................................................. 52 Find Home ................................................................................................................................................ 52 Stop Homing ............................................................................................................................................. 53 Define Position .......................................................................................................................................... 54 Get Homing State ..................................................................................................................................... 54 Wait For Homing Attained ......................................................................................................................... 54

6.8
6.8.1 6.8.2 6.8.3 6.8.4 6.8.5 6.8.6 6.8.7 6.8.8 6.8.9

Interpolated Position Mode (IPM) .......................................................................................................... 55


Activate Interpolated Position Mode .......................................................................................................... 55 Set IPM Buffer Parameter ......................................................................................................................... 55 Get IPM Buffer Parameter ......................................................................................................................... 55 Clear IPM Buffer ....................................................................................................................................... 56 Get Free IPM Buffer Size .......................................................................................................................... 56 Add PVT Value To IPM Buffer................................................................................................................... 56 Start IPM Trajectory .................................................................................................................................. 57 Stop IPM Trajectory .................................................................................................................................. 57 Get IPM Status.......................................................................................................................................... 57

6.9
6.9.1 6.9.2 6.9.3 6.9.4

Position Mode ........................................................................................................................................ 58


Activate Position Mode.............................................................................................................................. 58 Set Position Must ...................................................................................................................................... 59 Get Position Must...................................................................................................................................... 59 Advanced Functions ................................................................................................................................. 59

6.10

Velocity Mode ........................................................................................................................................ 61


Activate Velocity Mode .............................................................................................................................. 61 Set Velocity Must ...................................................................................................................................... 61 Get Velocity Must ...................................................................................................................................... 61 Advanced Functions ................................................................................................................................. 62 Activate Current Mode .............................................................................................................................. 63 Get Current Must ...................................................................................................................................... 63 Set Current Must ....................................................................................................................................... 64 Advanced Functions ................................................................................................................................. 64 Activate Master Encoder Mode ................................................................................................................. 65 Set Master Encoder Parameter ................................................................................................................. 66 Get Master Encoder Parameter ................................................................................................................ 66 Activate Step Direction Mode .................................................................................................................... 67 Set Step Direction Parameter.................................................................................................................... 67 Get Step Direction Parameter ................................................................................................................... 68

6.10.1 6.10.2 6.10.3 6.10.4

6.11

Current Mode ......................................................................................................................................... 63

6.11.1 6.11.2 6.11.3 6.11.4

6.12

Master Encoder Mode ........................................................................................................................... 65

6.12.1 6.12.2 6.12.3

6.13

Step Direction Mode .............................................................................................................................. 67

6.13.1 6.13.2 6.13.3

6.14

Inputs Outputs ....................................................................................................................................... 68 maxon motor control 3

March 2013 Edition / Subject to change

EPOS Positioning Controller


6.14.1 6.14.2 6.14.3 6.14.4 6.14.5 6.14.6 6.14.7

EPOS Command Library

Get All Digital Inputs ................................................................................................................................. 68 Get All Digital Outputs ............................................................................................................................... 69 Set All Digital Outputs ............................................................................................................................... 69 Get Analog Input ....................................................................................................................................... 69 Set Analog Output ..................................................................................................................................... 70 Position Compare ..................................................................................................................................... 70 Position Marker ......................................................................................................................................... 73

7 7.1

Data Recording Functions Data Recorder Setup ............................................................................................................................. 77


Set Recorder Parameter ........................................................................................................................... 77 Get Recorder Parameter ........................................................................................................................... 77 Enable Trigger .......................................................................................................................................... 78 Disable all Triggers ................................................................................................................................... 78 Activate Channel ....................................................................................................................................... 79 Deactivate all Channels ............................................................................................................................ 79

7.1.1 7.1.2 7.1.3 7.1.4 7.1.5 7.1.6

7.2
7.2.1 7.2.2 7.2.3 7.2.4 7.2.5

Data Recorder Status ............................................................................................................................ 80


Start Recorder........................................................................................................................................... 80 Stop Recorder ........................................................................................................................................... 80 Force Trigger ............................................................................................................................................ 80 Is Recorder Running ................................................................................................................................. 81 Is Recorder Triggered ............................................................................................................................... 81

7.3
7.3.1 7.3.2 7.3.3 7.3.4

Data Recorder Data ............................................................................................................................... 82


Read Channel Vector Size ........................................................................................................................ 82 Read Channel Data Vector ....................................................................................................................... 82 Show Channel Data Dialog ....................................................................................................................... 83 Export Channel Data to File ...................................................................................................................... 83

7.4
7.4.1 7.4.2

Advanced Functions .............................................................................................................................. 84


Read Data Buffer ...................................................................................................................................... 84 Extract Channel Data Vector ..................................................................................................................... 84

8 8.1 8.2 8.3 8.4 9 9.1 9.2

Low Layer Functions Send CAN Frame .................................................................................................................................. 85 Read CAN Frame .................................................................................................................................. 85 Request CAN Frame ............................................................................................................................. 85 Send NMT Service................................................................................................................................. 86 Error Overview Overview Communication Errors ........................................................................................................... 87 Overview EPOS Command Library specified Errors ........................................................................... 88
General Errors .......................................................................................................................................... 88 Interface Layer Errors ............................................................................................................................... 88 Interface Layer 'RS232' Errors .................................................................................................................. 88 Interface Layer 'CAN' Errors...................................................................................................................... 88 Interface Layer 'USB' Errors ...................................................................................................................... 88 Protocol Layer 'MaxonRS232' Errors ........................................................................................................ 89 Protocol Layer 'CANopen' Errors .............................................................................................................. 89 Protocol Layer 'USB' Errors ...................................................................................................................... 89

9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8

10

Version History

4 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

The present documentation EPOS Command Library provides instructions on the implemented functions of the Windows dynamic link libraries EposCmd.dll,EposCmd64.dll and Linux 32-bit shared object library libEposCmd.so, 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 and 32-bit Linux platform. This document describes the interface between a program and the EPOS Command Libraries. This libraries support devices of the EPOS family, which are attached to a , on the Windows and Linux platform or to a available for the Windows systems. All other CANopen products of other manufacturers can also be used; however no motion control library is available. OS Interface RS-232 USB IXXAT CAN Board Table 1: NI Vector Supported platforms Windows X X X X X 32-Bit Linux X X 64-Bit Windows X X X X

The parameters of the 32-bit and 64-bit interfaces are the same. The EPOS Command Libraries support the SDO protocol by CANopen but the EPOS Command Libraries are not suitable for real-time communication. Additional information is available in the following documents: EposCmd.Net.chm The document EposCmd.Net.chm describes the implementation for applications. Examples for and are available. DLL Integration into MS VC++ The document DLL Integration into MS VC++ describes implementation and structure for in detail. DLL Integration into MS Visual Basic The document DLL Integration into MS Visual Basic describes implementation and structure for in detail. DLL Integration into Borland C++ The document DLL Integration into Borland C++ describes implementation and structure for in detail. DLL Integration into Borland Delphi The document DLL Integration into Borland Delphi describes implementation and structure for in detail. DLL Integration into LabVIEW The document DLL Integration into LabVIEW describes implementation and structure for in detail. DLL Integration into National Instruments LabWindows/CVI The document DLL Integration into National Instruments LabWindows/CVI describes implementation and structure for in detail. Linux shared library Integration into Eclipse C++/QT The document Linux shared library Integration into Eclipse C++/QT describes implementation and structure for in detail.

For a number of high-level languages an applicable example, including respective documentation, is available.

March 2013 Edition / Subject to change

maxon motor control 5

EPOS Positioning Controller

EPOS Command Library

This library is intended to cover most applications used in automation. It is based on the experience of maxon motor control. maxon motor control certifies that the content of this library is correct according to the best of their knowledge. 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 EPOS Command Library, additional documentation and software to the EPOS positioning controller may also be found in the internet under www.maxonmotor.com category <Products> or direct from maxon motor catalog.

6 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

Use one of the listed PC CANopen interface cards. For all of these manufacturers motion control libraries (example and documentation) are available. All other CANopen products of other manufacturers can also be used; however no motion control library is available.

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.

www.ixxat.de

For use of Vector CANopen cards, the XL Driver Library will be required. The installed edition of this library must be installed manually in the appropriate working directory (or system directory). With this library, it is possible to write own CANopen applications based on Vectors XL hardware. See address below for ordering CANopen boards and further details of the driver.

www.vector-informatik.com

CAN Interfaces of National Instruments are supported. The NI-CAN software and hardware must be installed. See address below for ordering CANopen boards and further details of the driver.

www.ni.com/can

March 2013 Edition / Subject to change

maxon motor control 7

EPOS Positioning Controller

EPOS Command Library

Getting Started

Cable Starting Set

EPOS Studio

Application Notes Application Samples

Hardware Reference

IEC1131 Libraries

Firmware Specification

Communication Guide

Figure 1: EPOS documentation hierarchy

For detailed descriptions on used objects (Index-SubIndex), please refer to separate document . 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 .

8 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

Figure 2: Example Windows communication structure

Figure 3: Example Linux communication structure March 2013 Edition / Subject to change maxon motor control 9

EPOS Positioning Controller

EPOS Command Library

Below is a table of all used data types. 128 ... 127 0 ... 256 32'768 ... 32'767 0 ... 65'535 2'147'483'648 ... 2'147'483'647 0 ... 4'294'967'295 TRUE = 1 FALSE = 0 0 ... 4'294'967'295 0 18'446'744'073'709'551'615

char, __int8 BYTE short WORD long DWORD BOOL HANDLE Table 2:

signed integer unsigned integer signed integer unsigned integer signed integer unsigned integer signed integer

8 8 16 16 32 32 32

1 1 2 2 4 4 4 4 8

pointer to an object 32 64 Data type definitions

OS dependent

10 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

HANDLE (char *DeviceName, char *ProtocolStackName, char *InterfaceName, char *PortName, DWORD *pErrorCode) 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.

DeviceName ProtocolStackName InterfaceName

char* char* char*

Name of connected device: EPOS, EPOS2 Name of used bus system: MAXON_RS232, MAXON SERIAL V2, CANopen 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, Name of port: RS232: COM1, COM2, CANopen: CAN0, CAN1, USB: USB0, USB1,

PortName

char*

pErrorCode

DWORD* HANDLE

Error information about the executed function Handle for port access. Nonzero if successful; otherwise 0

HANDLE

(DWORD *pErrorCode)

The function VCS_OpenDeviceDlg registers available interfaces with which the EPOS can be operated and opens the selected interface for communication.

pErrorCode

DWORD* HANDLE

Error information about the executed function Handle for port access. Nonzero if successful; otherwise 0

Function is not available in the Linux library

March 2013 Edition / Subject to change

maxon motor control 11

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, DWORD *pBaudrate, DWORD *pTimeout, DWORD *pErrorCode) Function VCS_GetProtocolStackSettings returns the communication parameters baud rate and timeout.

KeyHandle

HANDLE

Handle for port access

pBaudrate pTimeout pErrorCode

DWORD* DWORD* DWORD* BOOL

Actual baud rate from opened port [Bit/s] Actual timeout from opened port [ms] Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, DWORD Baudrate, DWORD Timeout, DWORD *pErrorCode) 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.

KeyHandle Baudrate Timeout

HANDLE DWORD DWORD

Handle for port access Actual baud rate from opened port [Bit/s] Actual timeout from opened port [ms]

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

For correct communication use the same baud rate as on the connected device.

BOOL (HANDLE KeyHandle, char *pDeviceName, char *pProtocolStackName, char *pInterfaceName, char *pPortName, WORD SizeName, DWORD *pBaudrate, DWORD *pTimeout, WORD *pNodeId, int DialogMode, DWORD *pErrorCode) With function VCS_FindDeviceCommunicationSettings it is possible to search the communication setting parameters.

To accelerate the process some parameters can be defined.

KeyHandle pDeviceName pProtocolStackName pInterfaceName pPortName SizeName DialogMode

HANDLE char* char* char* char* WORD int

Handle for port access Device name Protocol stack name Interface name Port name Reserved memory size for return parameters 0: Show Progress Dialog 1: Show Progress and Confirmation Dialog 2: Show Confirmation Dialog March 2013 Edition / Subject to change

12 maxon motor control

EPOS Command Library

EPOS Positioning Controller 3: Dont show any Dialog Actual timeout from opened port [ms]

Timeout

DWORD

pDeviceName pProtocolStackName pInterfaceName pPortName pBaudrate pTimeout pNodeId pErrorCode

char* char* char* char* DWORD DWORD WORD DWORD* BOOL

Device name Protocol stack name Interface name Port name Baud rate Timeout Node ID Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

BOOL

(DWORD *pErrorCode)

Function VCS_CloseAllDevices closes all opened ports and releases it for other applications.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, DWORD *pErrorCode)

Function VCS_CloseDevice closes the port and releases it for other applications.

KeyHandle

HANDLE

Handle for port access

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(DWORD ErrorCodeValue, char *pErrorInfo, WORD MaxStrSize)

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.

ErrorCodeValue MaxStrSize

DWORD WORD

Received error code Max. length of error string

pErrorInfo

char* BOOL

Error string Nonzero if error information found; otherwise 0 maxon motor control 13

March 2013 Edition / Subject to change

EPOS Positioning Controller

EPOS Command Library

BOOL (char *pLibraryName, WORD MaxStrNameSize, char *pLibraryVersion, WORD MaxStrVersionSize, DWORD *pErrorCode) Function VCS_GetDriverInfo returns the name and version from the EPOS Command DLL.

MaxStrNameSize MaxStrVersionSize

WORD WORD

Reserved memory size for the name Reserved memory size for the version

pLibraryName pLibraryVersion pErrorCode

char* char* DWORD* BOOL

Name from DLL Version from DLL Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD *pHardwareVersion, WORD *pSoftwareVersion, WORD *pApplicationNumber, WORD *pApplicationVersion, DWORD *pErrorCode) VCS_GetVersion returns the firmware version.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pHardwareVersion pSoftwareVersion pApplicationNumber pApplicationVersion pErrorCode

WORD* WORD* WORD* WORD* DWORD* BOOL

Hardware version Object: 0x2003-01 Software version Object: 0x2003-02 Application number Object: 0x2003-03 Application version Object: 0x2003-04 Error information about the executed function Nonzero if successful; otherwise 0

This group defines all required functions to get additional information:

BOOL (BOOL StartOfSelection, char *pDeviceNameSel, WORD MaxStrSize, BOOL *pEndOfSelection, DWORD *pErrorCode) Function VCS_GetDeviceNameSelection returns all available device names.

StartOfSelection MaxStrSize

BOOL WORD

True: Get first selection string False: Get next selection string Reserved memory size for the device name

14 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

pDeviceNameSel pEndOfSelection pErrorCode

char* BOOL* DWORD* BOOL

Device name 1: No more selection string available 0: More string available Error information about the executed function Nonzero if successful; otherwise 0

Go to Programming Example

BOOL (char *DeviceName, BOOL StartOfSelection, char *pProtocolStackNameSel, WORD MaxStrSize, BOOL *pEndOfSelection, DWORD *pErrorCode) Function VCS_GetProtocolStackNameSelection returns all available protocol stack names.

DeviceName StartOfSelection MaxStrSize

char* BOOL WORD

Device name 1: Get first selection string 0: Get next selection string Reserved memory size for the name

pProtocolStackNameSel pEndOfSelection pErrorCode

char* BOOL* DWORD* BOOL

Pointer to available protocol stack name 1: No more string available 0: More string available Error information about the executed function Nonzero if successful; otherwise 0

Go to Programming Example

BOOL (char *DeviceName, char *ProtocolStackName, BOOL StartOfSelection, char *pInterfaceNameSel, WORD MaxStrSize, BOOL *pEndOfSelection, DWORD *pErrorCode) Function VCS_GetInterfaceNameSelection returns all available interface names.

DeviceName ProtocolStackName StartOfSelection MaxStrSize

char* char* BOOL WORD

Device name Protocol stack name 1: Get first selection string 0: Get next selection string Reserved memory size for the interface name

pInterfaceNameSel pEndOfSelection pErrorCode

char* BOOL* DWORD* BOOL

Name from interface 1: No more string available 0: More string available Error information about the executed function Nonzero if successful; otherwise 0

Go to Programming Example

March 2013 Edition / Subject to change

maxon motor control 15

EPOS Positioning Controller

EPOS Command Library

BOOL (char *DeviceName, char *ProtocolStackName, char *InterfaceName, BOOL StartOfSelection, char *pPortSel, WORD MaxStrSize, BOOL *pEndOfSelection, DWORD *pErrorCode) Function VCS_GetPortNameSelection returns all available port names.

DeviceName ProtocolStackName InterfaceName StartOfSelection MaxStrSize

char* char* char* BOOL WORD

Device name Protocol stack name Interface name 1: Get first selection string 0: Get next selection string Reserved memory size for the port name

pPortSel pEndOfSelection pErrorCode

char* BOOL* DWORD* BOOL

Pointer to port name 1: No more string available 0: More string available Error information about the executed function Nonzero if successful; otherwise 0

Go to Programming Example

BOOL (char *DeviceName, char *ProtocolStackName, char *InterfaceName, char *PortName, BOOL StartOfSelection, DWORD *pBaudrateSel, BOOL *pEndOfSelection, DWORD *pErrorCode) Function VCS_GetBaudrateSelection returns all available baud rates for the connected port.

DeviceName ProtocolStackName InterfaceName PortName StartOfSelection

char* char* char* char* BOOL

Name of device Name of protocol stack Interface name Port name 1: Get first selection value 0: Get next selection value

pBaudrateSel pEndOfSelection pErrorCode

DWORD* BOOL* DWORD* BOOL

Pointer to baud rate [Bit/s] 1: No more value available 0: More value available Error information about the executed function Nonzero if successful; otherwise 0

Go to Programming Example

16 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

The example shows how to read all protocol stack names of the available interfaces. Programming language: C++
const WORD maxStrSize = 100; char *strDeviceName = EPOS; char *strProtocolStackName[maxStrSize]; BOOL endOfSel; DWORD errorCode; //get first protocol stack name if(VCS_GetProtocolStackNameSelection(strDeviceName, TRUE, strProtocolStackName, maxStrSize, &endOfSel, &errorCode)) { //get next protocol stack name (as long as endOfSel == FALSE) while(!endOfSel) { VCS_GetProtocolStackNameSelection (strDeviceName, FALSE, strProtocolStackName, maxStrSize, &endOfSel, &errorCode); } }

The same example can be used for find out all device names, protocol stack names, interface names, port names and all available baud rates. A combination of theses names is to open the communication interface (use function Open Device).

BOOL (char *DeviceName, char *ProtocolStackName, char *InterfaceName, char *PortName, HANDLE *pKeyHandle, DWORD *pErrorCode) Function VCS_GetKeyHandle returns the key handle from the opened interface. DeviceName ProtocolStackName InterfaceName PortName char* char* char* char* Device name Protocol stack name Interface name Port name

pKeyHandle pErrorCode

HANDLE* DWORD* BOOL

Handle for port access, if parameters are correct; otherwise 0 Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, char *pDeviceName, WORD MaxStrSize,

Function VCS_GetDeviceName returns the device name to corresponding handle. KeyHandle MaxStrSize HANDLE WORD Handle for port access Reserved memory size for the device name

pDeviceName pErrorCode

char* DWORD* BOOL

Device name Error information about the executed function Nonzero if successful; otherwise 0 maxon motor control 17

March 2013 Edition / Subject to change

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, char *pProtocolStackName, WORD MaxStrSize, DWORD *pErrorCode) Function VCS_GetProtocolStackName returns the protocol stack name to corresponding handle.

KeyHandle MaxStrSize

HANDLE WORD

Handle for port access Reserved memory size for the name

pProtocolStackName pErrorCode

char* DWORD* BOOL

Pointer to protocol stack name Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, char *pInterfaceName, WORD MaxStrSize, DWORD *pErrorCode) Function VCS_GetInterfaceName returns the interface name to corresponding handle.

KeyHandle MaxStrSize

HANDLE WORD

Handle for port access Reserved memory size for the interface name

pInterfaceName pErrorCode

char* DWORD* BOOL

Name from interface Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, char *pPortName, WORD MaxStrSize,

Function VCS_GetPortName returns the port name to corresponding handle.

KeyHandle MaxStrSize

HANDLE WORD

Handle for port access Reserved memory size for the port name

pPortName pErrorCode

char* DWORD* BOOL

Port name Error information about the executed function Nonzero if successful; otherwise 0

18 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

For detailed information about the objects refer to associated document Firmware Specification.

BOOL (HANDLE KeyHandle, WORD NodeId, char *pParameterFileName, BOOL ShowDlg, BOOL ShowMsg, DWORD *pErrorCode) VCS_ImportParameter writes parameters from a file to the device.

KeyHandle NodeId

HANDLE WORD

pParameterFileName ShowDlg ShowMsg

char* BOOL BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Full path of parameter file for import Dialog is shown Message box are activated

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

BOOL (HANDLE KeyHandle, WORD NodeId, char *pParameterFileName, char *pFirmwareFileName, char *pUserID, char *pComment, BOOL ShowDlg, BOOL ShowMsg, DWORD *pErrorCode) VCS_ExportParameter reads all parameters of the device and writes this into the file.

KeyHandle NodeId

HANDLE WORD

pParameterFileName pFirmwareFileName pUserID pComment ShowDlg ShowMsg

char* char* char* char* BOOL BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Full path of parameter file for export Full path of firmware file of the connected device User name Comment Dialog is shown Message box are activated

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

March 2013 Edition / Subject to change

maxon motor control 19

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD ObjectIndex, BYTE ObjectSubIndex, void *pData, DWORD NbOfBytesToWrite, DWORD *pNbOfBytesWritten, DWORD *pErrorCode) The function VCS_SetObject writes an object value at the gi ven index and sub-index from object dictionary.

KeyHandle NodeId

HANDLE WORD

ObjectIndex ObjectSubIndex pData NbOfBytesToWrite

WORD BYTE void* DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Object index Object sub-index Object data Object length to write (number of bytes)

pNbOfBytesWritten pErrorCode

DWORD* DWORD* BOOL

Object length written (number of bytes) Error information about the executed function Nonzero if successful; otherwise 0

All information about object index, object sub-index and object length can be checked in the associated document Firmware Specification.

BOOL (HANDLE KeyHandle, WORD NodeId, WORD ObjectIndex, BYTE ObjectSubIndex, void *pData, DWORD NbOfBytesToRead, DWORD *pNbOfBytesRead, DWORD *pErrorCode) The function VCS_GetObject reads an object value at the given index and sub-index from object dictionary.

KeyHandle NodeId

HANDLE WORD

ObjectIndex ObjectSubIndex NbOfBytesToRead

WORD BYTE DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Object index Object sub-index Object length to read (number of bytes)

pData pNbOfBytesRead pErrorCode

void* DWORD* DWORD* BOOL

Object data Object length read (number of bytes) Error information about the executed function Nonzero if successful; otherwise 0

All information about object index, object sub-index and object length can be checked in the associated document Firmware Specification.

20 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

The function VCS_Restore restores all default parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

The function VCS_Store stores all parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD MotorType,

With function VCS_SetMotorType the motor type is written.

KeyHandle NodeId

HANDLE WORD

MotorType

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Kind of motor (see Table 3) Object: 0x6402-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 21

EPOS Positioning Controller Kind of motor brushed DC motor EC motor sinus commutated EC motor block commutated Table 3: Kind of motor

EPOS Command Library

MT_DC_MOTOR MT_EC_SINUS_COMMUTATED_MOTOR MT_EC_BLOCK_COMMUTATED_MOTOR

1 10 11

BOOL (HANDLE KeyHandle, WORD NodeId, WORD NominalCurrent, WORD MaxOutputCurrent, WORD ThermalTimeConstant, DWORD *pErrorCode) With function VCS_SetDcMotorParameter it is possible to write all DC motor parameters.

KeyHandle NodeId

HANDLE WORD

NominalCurrent MaxOutputCurrent ThermalTimeConstant

WORD WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Maximal continuous current Object: 0x6410-01 Maximal peak current Object: 0x6410-02 Thermal time constant Object: 0x6410-05 winding

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD NominalCurrent, WORD MaxOutputCurrent, WORD ThermalTimeConstant, BYTE NbOfPolePairs, DWORD *pErrorCode) With function VCS_SetEcMotorParameter it is possible to write all EC motor parameters.

KeyHandle NodeId

HANDLE WORD

NominalCurrent MaxOutputCurrent ThermalTimeConstant NbOfPolePairs

WORD WORD WORD BYTE

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Maximal continuous current Object: 0x6410-01 Maximal peak current Object: 0x6410-02 Thermal time constant Object: 0x6410-05 winding Number of pole pairs Object: 0x6410-03

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD *pMotorType,

With function VCS_GetMotorType it is possible to read the motor type.

22 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

MotorType pErrorCode

WORD DWORD* BOOL

Kind of motor (see Table 3) Object: 0x6402-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pNominalCurrent, WORD* pMaxOutputCurrent, WORD *pThermalTimeConstant, DWORD *pErrorCode) With function VCS_GetDcMotorParameter it is possible to read all DC motor parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pNominalCurrent pMaxOutputCurrent pThermalTimeConstant pErrorCode

WORD* WORD* WORD* DWORD* BOOL

Maximal continuous current Object: 0x6410-01 Maximal peak current Object: 0x6410-02 Thermal time constant Object: 0x6410-05 winding Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pNominalCurrent, WORD* pMaxOutputCurrent, WORD* pThermalTimeConstant, BYTE* pNbOfPolePairs, DWORD *pErrorCode) With function VCS_GetEcMotorParameter it is possible to read all EC motor parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pNominalCurrent pMaxOutputCurrent pThermalTimeConstant pNbOfPolePairs pErrorCode

WORD* WORD* WORD* BYTE* DWORD* BOOL

Maximal continuous current Object: 0x6410-01 Maximal peak current Object: 0x6410-02 Thermal time constant Object: 0x6410-05 winding Number of pole pairs Object: 0x6410-03 Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 23

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD Counts, WORD SensorType, DWORD *pErrorCode) With function VCS_SetSensorType it is possible to write the sensor type.

KeyHandle NodeId SensorType

HANDLE WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Position Sensor Type (see Table 4) Object: 0x2210-02

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Description Unknown sensor (undefined) Incremental Encoder 1 with index (3-channel) Incremental Encoder 1 without index (2-channel) Hall Sensors SSI Encoder binary coded SSI Encoder Grey coded Table 4: Position Sensor Type

Constant name ST_UNKNOWN ST_INC_ENCODER_3CHANNEL ST_INC_ENCODER_2CHANNEL ST_HALL_SENSORS ST_SSI_ABS_ENCODER_BINARY ST_SSI_ABS_ENCODER_GREY

Value 0 1 2 3 4 5

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD EncoderResolution, BOOL InvertedPolarity, DWORD *pErrorCode) With function VCS_SetIncEncoderParameter it is possible to write the incremental encoder parameters.

KeyHandle NodeId

HANDLE WORD

EncoderResolution InvertedPolarity

DWORD BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Encoder pulse number [pulse Object: 0x2210-01 per turn] Position sensor polarity Object: 0x2210-04

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

24 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, BOOL InvertedPolarity, DWORD *pErrorCode) With function VCS_SetHallSensorParameter it is possible to write the Hall sensor parameter.

KeyHandle NodeId

HANDLE WORD

InvertedPolarity

BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Position sensor polarity Object: 0x2210-04

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD DataRate, WORD NbOfMultiTurnDataBits, WORD NbOfSingleTurnDataBits, BOOL InvertedPolarity, DWORD *pErrorCode) With function VCS_SetSsiAbsEncoderParameter it is possible to write all parameters for SSI absolute encoder.

KeyHandle NodeId

HANDLE WORD

DataRate NbOfMultiTurnDataBits NbOfSingleTurnDataBits InvertedPolarity

WORD WORD WORD BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). SSI encoder data rate Object: 0x2211-01 number of bits multi turn Object: 0x2211-02 number of bits single turn Position sensor polarity Object: 0x2210-04

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD *pSensorType,

With function VCS_GetSensorType it is possible to read the sensor type.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pSensorType pErrorCode

WORD* DWORD* BOOL

Position sensor type (see Object: 0x2210-02 Table 4) Error information about the executed function Nonzero if successful; otherwise 0 maxon motor control 25

March 2013 Edition / Subject to change

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD* pEncoderResolution, BOOL* pInvertedPolarity, DWORD *pErrorCode) With function VCS_GetIncEncoderParameter it is possible to read the incremental encoder parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pEncoderResolution pInvertedPolarity pErrorCode

DWORD BOOL DWORD* BOOL

Encoder pulse number [pulse Object: 0x2210-01 per turn] Position sensor polarity Object: 0x2210-04 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, BOOL* pInvertedPolarity, DWORD *pErrorCode) With function VCS_GetHallSensorParameter it is possible to read the Hall sensor parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pInvertedPolarity pErrorCode

BOOL DWORD* BOOL

Position sensor polarity Object: 0x2210-04 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pDataRate, WORD* pNbOfMultiTurnDataBits, WORD* pNbOfSingleTurnDataBits, BOOL* pInvertedPolarity, DWORD* pErrorCode) With function VCS_GetSsiAbsEncoderParameter it is possible to read all parameters from SSI absolute encoder.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

26 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

pDataRate pNbOfMultiTurnDataBits pNbOfSingleTurnDataBits pInvertedPolarity pErrorCode

WORD* WORD* WORD* BOOL* DWORD* BOOL

SSI encoder data rate Object: 0x2211-01 Number of bits multi turn Object: 0x2211-02 Number of bits single turn Position sensor polarity Object: 0x2210-04 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD MaxFollowingError, DWORD *pErrorCode) VCS_SetMaxFollowingError writes the maximal allowed following error parameter.

KeyHandle NodeId

HANDLE WORD

MaxFollowingError

DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Maximal allowed difference of Object: 0x6065-00 position actual value to position demand value.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD* pMaxFollowingError, DWORD *pErrorCode) VCS_GetMaxFollowingError reads the maximal allowed following error parameter.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pMaxFollowingError

DWORD*

pErrorCode

DWORD* BOOL

Maximal allowed difference of Object: 0x6065-00 position actual value to position demand value. Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 27

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD MaxProfileVelocity, DWORD *pErrorCode) VCS_SetMaxProfileVelocity writes the maximal allowed velocity.

KeyHandle NodeId

HANDLE WORD

MaxProfileVelocity

DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). This value is used as velocity Object: 0x607F-00 limit in a position (or velocity) move.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD* pMaxProfileVelocity, DWORD *pErrorCode) VCS_GetMaxProfileVelocity reads the maximal allowed velocity.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pMaxProfileVelocity

DWORD*

pErrorCode

DWORD* BOOL

This value is used as velocity Object: 0x607F-00 limit in a position (or velocity) move. Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD MaxAcceleration, DWORD *pErrorCode) VCS_SetMaxAcceleration writes the maximal allowed acceleration/deceleration.

KeyHandle NodeId

HANDLE WORD

MaxAcceleration

DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). This value is the limit of the Object: 0x60C5-00 other acceleration/ deceleration objects.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0 March 2013 Edition / Subject to change

28 maxon motor control

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD* pMaxAcceleration, DWORD *pErrorCode) VCS_GetMaxAcceleration reads the maximal allowed acceleration/deceleration.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pMaxAcceleration

DWORD*

pErrorCode

DWORD* BOOL

This value is the limit of the Object: 0x60C5-00 other acceleration/deceleration objects. Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD P, WORD I, WORD D, DWORD *pErrorCode) 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.

KeyHandle NodeId

HANDLE WORD

P I D

WORD WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Position regulator P-Gain Object: 0x60FB-01 Position regulator I-Gain Object: 0x60FB-02 Position regulator D-Gain Object: 0x60FB-03

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD VelocityFeedForward, WORD AccelerationFeedForward, DWORD *pErrorCode) VCS_SetPositionRegulatorFeedForward writes parameters for position regulation with feed forward.

March 2013 Edition / Subject to change

maxon motor control 29

EPOS Positioning Controller

EPOS Command Library

KeyHandle NodeId

HANDLE WORD

VelocityFeedForward AccelerationFeedForward

WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Velocity feed forward Object: 0x60FB-04 factor Acceleration feed forward Object: 0x60FB-05 factor

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD *pP, WORD *pI, WORD *pD, DWORD *pErrorCode) With function VCS_GetPositionRegulatorGain it is possible to read all position regulator gains.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pP pI pD pErrorCode

WORD* WORD* WORD* DWORD* BOOL

Position regulator P-Gain Object: 0x60FB-01 Position regulator I-Gain Object: 0x60FB-02 Position regulator D-Gain Object: 0x60FB-03 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pVelocityFeedForward, WORD* pAccelerationFeedForward, DWORD *pErrorCode) VCS_GetPositionRegulatorFeedForward reads parameters for position regulation feed forward.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pVelocityFeedForward pAccelerationFeedForward pErrorCode

WORD* WORD* DWORD* BOOL

Velocity feed forward factor Object: 0x60FB-04 Acceleration feed forward Object: 0x60FB-05 factor Error information about the executed function Nonzero if successful; otherwise 0

30 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL WORD I, DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD P,

With function VCS_SetVelocityRegulatorGain it is possible to write all velocity regu lator gains. Determine the optimal parameters by using the 'Regulation Tuning' of EPOS Studio.

KeyHandle NodeId

HANDLE WORD

P I

WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Velocity regulator P-Gain Object: 0x60F9-01 Velocity regulator I-Gain Object: 0x60F9-02

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD VelocityFeedForward, WORD AccelerationFeedForward, DWORD *pErrorCode) VCS_SetVelocityRegulatorFeedForward writes parameters for velocity regulation with feed forward.

KeyHandle NodeId

HANDLE WORD

VelocityFeedForward AccelerationFeedForward

WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Velocity feed forward Object: 0x60F9-04 factor Acceleration feed forward Object: 0x60F9-05 factor

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL WORD *pI, DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD *pP,

With function VCS_GetVelocityRegulatorGain it is possible to read all velocity regulator gains.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pP March 2013 Edition / Subject to change

WORD*

Velocity regulator P-Gain

Object: 0x60F9-01 maxon motor control 31

EPOS Positioning Controller pI pErrorCode WORD* DWORD* BOOL

EPOS Command Library Velocity regulator I-Gain Object: 0x60F9-02 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pVelocityFeedForward, WORD* pAccelerationFeedForward, DWORD *pErrorCode) VCS_GetVelocityRegulatorFeedForward reads parameters for velocity regulation feed forward.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pVelocityFeedForward pAccelerationFeedForward pErrorCode

WORD* WORD* DWORD* BOOL

Velocity feed forward factor Object: 0x60F9-04 Acceleration feed forward Object: 0x60F9-05 factor Error information about the executed function Nonzero if successful; otherwise 0

BOOL WORD I, DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD P,

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.

KeyHandle NodeId

HANDLE WORD

P I

WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Current regulator P-Gain Object: 0x60F6-01 Current regulator I-Gain Object: 0x60F6-02

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL WORD *pI, DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD *pP,

With function VCS_GetCurrentRegulatorGain it is possible to read all current regulator gains.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). March 2013 Edition / Subject to change

32 maxon motor control

EPOS Command Library

EPOS Positioning Controller

pP pI pErrorCode

WORD* WORD* DWORD* BOOL

Current regulator P-Gain Object: 0x60F6-01 Current regulator I-Gain Object: 0x60F6-02 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD DigitalInputNb, WORD Configuration, BOOL Mask, BOOL Polarity, BOOL ExecutionMask, DWORD *pErrorCode) VCS_DigitalInputConfiguration sets the parameter for one digital input.

KeyHandle NodeId

HANDLE WORD

DigitalInputNb Configuration

WORD WORD

Mask

BOOL

Polarity ExecutionMask

BOOL BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of digital input (SubObject: 0x2070-0x index of object) Configures which functionality will be assigned to digital input (bit number) For values see Table 5. 1: Functionality state will be Object: 0x2071-02 displayed 0: not displayed 1: Low active Object: 0x2071-03 0: High active 1: Set the error routine. Object: 0x2071-04 Only for positive and negative switch.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 33

EPOS Positioning Controller

EPOS Command Library

Description General purpose A General purpose B General purpose C General purpose D General purpose E General purpose F General purpose G General purpose H General purpose I General purpose J Quick stop Device enable Position marker Home switch Positive limit switch Negative limit switch Table 5: Digital Input Configuration

Constant name DIC_GENERAL_PURPOSE_A DIC_GENERAL_PURPOSE_B DIC_GENERAL_PURPOSE_C DIC_GENERAL_PURPOSE_D DIC_GENERAL_PURPOSE_E DIC_GENERAL_PURPOSE_F DIC_GENERAL_PURPOSE_G DIC_GENERAL_PURPOSE_H DIC_GENERAL_PURPOSE_I DIC_GENERAL_PURPOSE_J DIC_QUICK_STOP DIC_DRIVE_ENABLE DIC_POSITION_MARKER DIC_HOME_SWITCH DIC_POSITIVE_LIMIT_SWITCH DIC_NEGATIVE_LIMIT_SWITCH

Value 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD DigitalOutputNb, WORD Configuration, BOOL State, BOOL Mask, BOOL Polarity, DWORD *pErrorCode) VCS_DigitalOutputConfiguration sets parameter for one digital output.

KeyHandle NodeId

HANDLE WORD

DigitalOutputNb Configuration

WORD WORD

State Mask Polarity

BOOL BOOL BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of digital output Object: 0x2079-0x (Sub-index of object) Configures which functionality will be assigned to digital output (bit number). For values see Table 6. State of digital output Object: 0x2078-01 1: Register will be modified Object: 0x2078-02 1: Output will be inverted Object: 0x2078-03

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Description General purpose A General purpose B General purpose C General purpose D General purpose E Position compare Ready / Fault Table 6: Digital Output Configuration

Constant name DOC_GENERAL_PURPOSE_A DOC_GENERAL_PURPOSE_B DOC_GENERAL_PURPOSE_C DOC_GENERAL_PURPOSE_D DOC_GENERAL_PURPOSE_E DOC_POSITION_COMPARE DOC_READY_FAULT

Value 15 14 13 12 11 1 0

34 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, WORD AnalogInputNb, WORD Configuration, BOOL ExecutionMask, DWORD *pErrorCode) VCS_AnalogInputConfiguration sets parameter for one analog input.

KeyHandle NodeId

HANDLE WORD

AnalogInputNb Configuration

WORD WORD

ExecutionMask

BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of analog input (Sub- Object: 0x2079 index of object) Configures which functionality will be assigned to analog input (bit number) For values see Table 7. 1: Register will be modified Object: 0x2078-02

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Description Analog position set point Analog velocity set point Analog current set point Table 7: Analog Input Configuration

Constant name AIC_ANALOG_POSITION_SETPOINT AIC_ANALOG_VELOCITY_SETPOINT AIC_ANALOG_CURRENT_SETPOINT

Value 2 1 0

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE VelDimension, char VelNotation, DWORD *pErrorCode) VCS_SetVelocityUnits writes velocity unit parameters.

KeyHandle NodeId

HANDLE WORD

VelDimension

BYTE

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Velocity dimension index Object: 0x608C-00 VD_RPM = 0xA4 Velocity notation index VN_STANDARD VN_DECI VN_CENTI VN_MILLI =0 = -1 = -2 = -3

VelNotation

char

Object: 0x608B-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 35

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE* pVelDimension, char* pVelNotation, DWORD *pErrorCode) VCS_GetVelocityUnits reads velocity unit parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pVelDimension

BYTE*

Velocity dimension index VD_RPM = 0xA4 Velocity notation index

Object: 0x608C-00

pVelNotation

char*

Object: 0x608B-00

pErrorCode

DWORD* BOOL

VN_STANDARD = 0; VN_DECI = -1; VN_CENTI = -2; VN_MILLI = -3 Error information about the executed function Nonzero if successful; otherwise 0

36 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, __int8 Mode,

VCS_SetOperationMode sets the operation mode.

KeyHandle NodeId

HANDLE WORD

Mode

__int8

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Operation mode (see Table 8) Object: 0x6060-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, __int8 *pMode,

Function VCS_GetOperationMode returns the activated operation mode.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pMode pErrorCode

__int8* DWORD* BOOL

Operation mode (see Table 8 Object: 0x6061-00 Error information about the executed function Nonzero if successful; otherwise 0

Description Position Profile Mode Position Velocity Mode Homing Mode Interpolated Position Mode Position Mode Velocity Mode Current Mode Master Encoder Mode Step Direction Mode Table 8: Operational modes

Value 1 3 6 7 -1 -2 -3 -5 -6

Constant name OMD_PROFILE_POSITION_MODE OMD_PROFILE_VELOCITY_MODE OMD_HOMING_MODE OMD_INTERPOLATED_POSITION_MODE OMD_POSITION_MODE OMD_VELOCITY_MODE OMD_CURRENT_MODE OMD_MASTER_ENCODER_MODE OMD_STEP_DIRECTION_MODE

March 2013 Edition / Subject to change

maxon motor control 37

EPOS Positioning Controller

EPOS Command Library

For detailed information about the state machine refer to associated document Firmware Specification.

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

The function VCS_ResetDevice is used to send the NMT service Reset Node. It is a command without acknowledge.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD State, DWORD *pErrorCode) VCS_SetState reads the actual state machine state.

KeyHandle NodeId

HANDLE WORD

State

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Value of state machine (see Object: 0x6040-00 Table 9)

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Description Get/Set Disable State Get/Set Enable State Get/Set Quickstop State Get Fault State Table 9: State modes

Value 0x0000 0x0001 0x0002 0x0003

Constant name ST_DISABLED ST_ENABLED ST_QUICKSTOP ST_FAULT

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

With the function VCS_SetEnableState the device changes to enable state.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). March 2013 Edition / Subject to change

38 maxon motor control

EPOS Command Library

EPOS Positioning Controller

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

With function VCS_SetDisableState changes the device to disable state.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

With function VCS_SetQuickStopState the device changes to quick stop state.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

With function VCS_ClearFault the device changes from fault state to disable state.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 39

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pState, DWORD *pErrorCode) VCS_GetState reads the new state for the state machine.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pState pErrorCode

WORD* DWORD* BOOL

Control word value (see Object: 0x6040-00 Table 9) Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, BOOL *pIsEnabled,

VCS_GetEnableState checks if the device is enabled.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pIsEnabled pErrorCode

BOOL* DWORD* BOOL

1: Device enabled 0: Device not enabled Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, BOOL *pIsDisabled,

VCS_GetDisableState checks if the device is disabled.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pIsDisabled pErrorCode

BOOL* DWORD* BOOL

1: Device disabled 0: Device not disabled Error information about the executed function Nonzero if successful; otherwise 0

40 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, BOOL *pIsQuickStopped, DWORD *pErrorCode) The function VCS_GetQuickStopState returns the device state quick stop.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pIsQuickStopped pErrorCode

BOOL* DWORD* BOOL

1: Device is in quick stop state 0: Device is not in quick stop state Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, BOOL *pIsInFault,

The function VCS_GetFaultState returns the device state fault (pIsInFault = TRUE).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pIsInFault pErrorCode

BOOL* DWORD* BOOL

1: Device is in fault state 0: Device is not in fault state Error information about the executed function Nonzero if successful; otherwise 0

Get error information if the device is in fault state see chapter Error Handling.

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE *pNbDeviceError, DWORD *pErrorCode) VCS_GetNbOfDeviceError returns the number of actual errors that are recorded.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

March 2013 Edition / Subject to change

maxon motor control 41

EPOS Positioning Controller

EPOS Command Library

pNbDeviceError pErrorCode

BYTE* DWORD* BOOL

Number of occurred device Object: 0x1003-00 errors Error information about the executed function Nonzero if successful; otherwise 0

Programming Example

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE ErrorNumber, DWORD *pDeviceErrorCode, DWORD *pErrorCode) VCS_GetDeviceErrorCode returns the error code of selected error number .

KeyHandle NodeId

HANDLE WORD

ErrorNumber

BYTE

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number (Object sub index) Object: 0x1003-0x of device error (>= 1)

pDeviceErrorCode pErrorCode

BYTE* DWORD* BOOL

Actual error code from error Object: 0x1003-0x history Error information about the executed function Nonzero if successful; otherwise 0

The example shows how to read the error history from a device. It is written in programming language C++.
//Global parameters HANDLE KeyHandle = 1; //handle from opened interface WORD NodeId = 1; //node ID from connected device //Functional parameters BYTE nbOfDeviceError = 0; DWORD functionErrorCode = 0; DWORD deviceErrorCode = 0; //number of actual errors //error code from function //error code from device

//get number of device errors if(VCS_GetNbOfDeviceError (KeyHandle, NodeId, &nbOfDeviceError, &functionErrorCode)) { //read device error code for(BYTE errorNumber = 1; subIndex <= nbOfDeviceError; errorNumber++) { if(!VCS_GetDeviceErrorCode(KeyHandle, NodeId, errorNumber, &deviceErrorCode, &functionErrorCode)) { break; } } }

42 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

This group defines all required functions for motion information:

BOOL (HANDLE KeyHandle, WORD NodeId, BOOL *pTargetReached, DWORD *pErrorCode) With VCS_GetMovementState it is possible to check, if drive has reached the target.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pTargetReached

BOOL*

pErrorCode

DWORD* BOOL

The drive has reached the Object: 0x6041-00 target. Bit 10 The function reads actual state of bit 10 from the status word. Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long *pPositionIs,

VCS_GetPositionIs returns the position actual value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pPositionIs pErrorCode

long* DWORD* BOOL

Position actual value Object: 0x6064-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long *pVelocityIs,

VCS_GetVelocityIs reads the velocity actual value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

March 2013 Edition / Subject to change

maxon motor control 43

EPOS Positioning Controller

EPOS Command Library

pVelocityIs pErrorCode

long* DWORD* BOOL

Velocity actual value Object: 0x606C-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, long *pVelocityIsAveraged, DWORD *pErrorCode) VCS_GetVelocityIsAveraged reads the velocity actual averaged value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pVelocityIsAveraged pErrorCode

long* DWORD* BOOL

Velocity actual value Object: 0x2028-00 averaged Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, short *pCurrentIs,

VCS_GetCurrentIs returns the current actual value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pCurrentIs pErrorCode

short* DWORD* BOOL

Current actual value Object: 0x6078-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, short *pCurrentIsAveraged, DWORD *pErrorCode) VCS_GetCurrentIsAveraged returns the current actual averaged value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pCurrentIsAveraged pErrorCode

short* DWORD*

Current actual value Object: 0x2027-00 Error information about the executed function

44 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library BOOL

EPOS Positioning Controller Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, DWORD Timeout,

VCS_WaitForTargetReached is waiting until the state is changed to target reached or the time is up.

KeyHandle NodeId

HANDLE WORD

Timeout

DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Max. wait time [ms] until target reached

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

This group defines all required functions for profile position mode:

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivateProfilePositionMode the device changes to profile position mode (PPM).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD ProfileVelocity, DWORD ProfileAcceleration, DWORD ProfileDeceleration, DWORD *pErrorCode) VCS_SetPositionProfile sets the position profile parameters.

KeyHandle NodeId

HANDLE WORD

ProfileVelocity ProfileAcceleration ProfileDeceleration

DWORD DWORD DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Position profile velocity Object: 0x6081-00 Position profile acceleration Object: 0x6083-00 Position profile deceleration Object: 0x6084-00

March 2013 Edition / Subject to change

maxon motor control 45

EPOS Positioning Controller

EPOS Command Library

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD *pProfileVelocity, DWORD *pProfileAcceleration, DWORD *pProfileDeceleration, DWORD *pErrorCode) VCS_GetPositionProfile returns the position profile parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pProfileVelocity pProfileAcceleration pProfileDeceleration pErrorCode

DWORD* DWORD* DWORD* DWORD* BOOL

Position profile velocity Object: 0x6081-00 Position profile acceleration Object: 0x6083-00 Position profile deceleration Object: 0x6084-00 Error information about the executed function Nonzero if successful; otherwise 0

46 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, long TargetPosition, BOOL Absolute, BOOL Immediately, DWORD *pErrorCode) With function VCS_MoveToPosition device movement starts with position profile to target position.

KeyHandle NodeId

HANDLE WORD

TargetPosition Absolute Immediately

long BOOL BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Target position Object: 0x607A-00 TRUE starts an absolute, Object: 0x6040-00 FALSE a relative movement Bit 6 TRUE starts immediately, Object: 0x6040-00 FALSE waits to end of last Bit 5 positioning

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long *pTargetPosition,

The function VCS_GetTargetPosition returns the profile position mode target value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pTargetPosition pErrorCode

long* DWORD* BOOL

Target position Object: 0x607A-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With function VCS_HaltPositionMovement movement stops with profile deceleration.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0 maxon motor control 47

March 2013 Edition / Subject to change

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD PositionWindow, WORD PositionWindowTime, DWORD *pErrorCode) With function VCS_EnablePositionWindow the position window is activated.

KeyHandle NodeId

HANDLE WORD

PositionWindow PositionWindowTime

DWORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Position window value Object: 0x6067-00 Position window time value Object: 0x6068-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With function VCS_DisablePositionWindow the position window is deactivated.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

This group defines all required functions for profile velocity mode:

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivateProfileVelocityMode the device changes to profile velocity mode (PVM).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0 March 2013 Edition / Subject to change

48 maxon motor control

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD ProfileAcceleration, DWORD ProfileDeceleration, DWORD *pErrorCode) VCS_SetVelocityProfile sets the velocity profile parameters.

KeyHandle NodeId

HANDLE WORD

ProfileAcceleration ProfileDeceleration

DWORD DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Velocity profile acceleration Object: 0x6083-00 Velocity profile deceleration Object: 0x6084-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD *pProfileAcceleration, DWORD *pProfileDeceleration, DWORD *pErrorCode) VCS_GetVelocityProfile returns the velocity profile parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pProfileAcceleration pProfileDeceleration pErrorCode

DWORD* DWORD* DWORD* BOOL

Velocity profile acceleration Object: 0x6083-00 Velocity profile deceleration Object: 0x6084-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long TargetVelocity,

With function VCS_MoveWithVelocity device movement starts with velocity profile to target velocity.

KeyHandle NodeId

HANDLE WORD

TargetVelocity

long

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Target velocity Object: 0x60FF-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 49

EPOS Positioning Controller

EPOS Command Library

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long *pTargetVelocity,

The function VCS_GetTargetVelocity returns the profile velocity mode target value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pTargetVelocity pErrorCode

long* DWORD* BOOL

Target velocity Object: 0x60FF-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With function VCS_HaltVelocityMovement movement stops with profile deceleration.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD VelocityWindow, WORD VelocityWindowTime, DWORD *pErrorCode) With function VCS_EnableVelocityWindow the velocity window is activated.

KeyHandle NodeId

HANDLE WORD

VelocityWindow VelocityWindowTime

DWORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Velocity window value Object: 0x606D-00 Velocity window time value Object: 0x606E-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

50 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With function VCS_DisableVelocityWindow the velocity window is deactivated.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

This group defines all required functions for homing mode:

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivateHomingMode the device changes to homing mode (HM).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD HomingAcceleration, DWORD SpeedSwitch, DWORD SpeedIndex, long HomeOffset, WORD CurrentThreshold, long HomePosition, DWORD *pErrorCode) With function VCS_SetHomingParameter it is possible to write all homing parameters.

KeyHandle NodeId

HANDLE WORD

HomingAcceleration SpeedSwitch

DWORD DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Acceleration for homing Object: 0x609A-00 profile Speed during search for Object: 0x6099-01 switch Speed during search for index signal Home offset after homing Current threshold for Object: 0x6099-02 Object: 0x607C-00 Object: 0x2080-00 maxon motor control 51

SpeedIndex HomeOffset CurrentThreshold March 2013 Edition / Subject to change

DWORD long WORD

EPOS Positioning Controller homing method -1, -2, -3 and -4 Assign the current Homing position with this value

EPOS Command Library

HomePosition

long

Object: 0x2081-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Parameter units depend on (position, velocity, acceleration) notation index.

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD *pHomingAcceleration, DWORD *pSpeedSwitch, DWORD *pSpeedIndex, long *pHomeOffset, WORD *pCurrentThreshold, long *pHomePosition, DWORD *pErrorCode) With function VCS_GetHomingParameter it is possible to read all homing parameters.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pHomingAcceleration pSpeedSwitch pSpeedIndex pHomeOffset pCurrentThreshold

DWORD* DWORD* DWORD* long* WORD*

pHomePosition pErrorCode

long* DWORD* BOOL

Acceleration for homing Object: 0x609A-00 profile Speed during search for Object: 0x6099-01 switch Speed during search for Object: 0x6099-02 index signal Home offset after homing Object: 0x607C-00 Current threshold for Object: 0x2080-00 homing method -1, -2, -3 and -4 Home position value Object: 0x2081-00 Error information about the executed function Nonzero if successful; otherwise 0

Parameter units depend on (position, velocity, acceleration) notation index.

BOOL (HANDLE KeyHandle, WORD NodeId, __int8 HomingMethod, DWORD *pErrorCode) With function VCS_FindHome and the parameter HomingMethod it is possible to find the system home. For example a home switch.

52 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

KeyHandle NodeId

HANDLE WORD

HomingMethod

__int8

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Homing method Object: 0x6098-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

35 34 33 27 23 18 17 11 7 2 1 0 -1 -2 -3 -4

HM_ACTUAL_POSITION HM_INDEX_POSITIVE_SPEED HM_INDEX_NEGATIVE_SPEED HM_HOME_SWITCH_NEGATIVE_SPEED HM_HOME_SWITCH_POSITIVE_SPEED HM_POSITIVE_LIMIT_SWITCH HM_NEGATIVE_LIMIT_SWITCH HM_HOME_SWITCH_NEGATIVE_SPEED_ AND_INDEX HM_HOME_SWITCH_POSITIVE_SPEED_ AND_INDEX HM_POSITIVE_LIMIT_SWITCH_AND_INDEX HM_NEGATIVE_LIMIT_SWITCH_AND_INDEX

HM_CURRENT_THRESHOLD_POSITIVE_ SPEED_AND_INDEX HM_CURRENT_THRESHOLD_NEGATIVE_ SPEED_AND_INDEX HM_CURRENT_THRESHOLD_POSITIVE_SPEED HM_CURRENT_THRESHOLD_NEGATIVE_SPEED

Actual Position Index Positive Speed Index Negative Speed Home Switch Negative Speed Home Switch Positive Speed Positive Limit Switch Negative Limit Switch Home Switch Negative Speed & Index Home Switch Positive Speed & Index Positive Limit Switch & Index Negative Limit Switch & Index No homing operation required Current Threshold Positive Speed & Index Current Threshold Negative Speed & Index Current Threshold Positive Speed Current Threshold Negative Speed

Table 10: Homing methods

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

The function VCS_StopHoming interrupts homing.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 53

EPOS Positioning Controller

EPOS Command Library

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long HomePosition,

The function VCS_DefinePosition is using homing method 35 (Actual Position) to set a new home position.

KeyHandle NodeId

HANDLE WORD

HomePosition

long

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Assign the homing position Object: 0x2081-00 with this value

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, BOOL *pHomingAttained, BOOL *pHomingError, DWORD *pErrorCode) The function VCS_GetHomingState returns the states if the homing position is attained and if an homing error is occurred.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pHomingAttained pHomingError pErrorCode

BOOL BOOL DWORD* BOOL

0: Homing mode not yet completed 1: Homing mode successfully terminated 0: No homing error 1: Homing error occurred Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD Timeout, DWORD *pErrorCode) VCS_WaitForHomingAttained is waiting until the homing mode is successfully terminated or the time is up.

KeyHandle NodeId

HANDLE WORD

Timeout

DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Max. wait time [ms] until target reached

pErrorCode

DWORD*

Error information about the executed function March 2013 Edition / Subject to change

54 maxon motor control

EPOS Command Library

EPOS Positioning Controller

BOOL

Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivateInterpolatedPositionMode the device changes to interpolated position mode (IPM).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD UnderflowWarningLimit, WORD OverflowWarningLimit, DWORD *pErrorCode) The function VCS_SetIpmBufferParameter set warning borders of the data input.

KeyHandle NodeId

HANDLE WORD

UnderflowWarningLimit

WORD

OverflowWarningLimit

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). This object gives lower Object: 0x20C4-02 signalization level of the data input FIFO. This object gives the higher Object: 0x20C4-03 signalization level of the data input FIFO.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pUnderflowWarningLimit, WORD* pOverflowWarningLimit, DWORD* pMaxBufferSize, DWORD *pErrorCode) The function VCS_GetIpmBufferParameter read warning border s and the max. buffer size of the data input.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services maxon motor control 55

March 2013 Edition / Subject to change

EPOS Positioning Controller (LSS).

EPOS Command Library

pUnderflowWarningLimit

WORD*

pOverflowWarningLimit

WORD*

pMaxBufferSize pErrorCode

DWORD* DWORD* BOOL

This object gives lower Object: 0x20C4-02 signalization level of the data input FIFO. This object gives the Object: 0x20C4-03 higher signalization level of the data input FIFO. This object provides the Object: 0x60C4-01 maximal buffer size Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

The function VCS_ClearIpmBuffer clears input buffer and enables the access to the input buffer for the drive functions.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, DWORD *pBufferSize, DWORD *pErrorCode) The function VCS_GetFreeIpmBufferSize read the actual free buffer size.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services.

pBufferSize pErrorCode

DWORD DWORD* BOOL

Actual free buffer size Object: 0x60C4-02 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, long Position, long Velocity, BYTE Time, DWORD *pErrorCode) The function VCS_AddPvtValueToIpmBuffer adds a new PVT reference point to the device.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services March 2013 Edition / Subject to change

56 maxon motor control

EPOS Command Library

EPOS Positioning Controller (LSS). Position of the reference point Velocity of the reference point Time of the reference point

Position Velocity Time

long long BYTE

Object: 0x20C1-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

The function VCS_StartIpmTrajectory starts the IPM trajectory.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD *pErrorCode)

The function VCS_StopIpmTrajectory stops the IPM trajectory.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, BOOL* pTrajectoryRunning, BOOL* pIsUnderflowWarning, BOOL* pIsOverflowWarning, BOOL* pIsVelocityWarning, BOOL* pIsAccelerationWarning, BOOL* pIsUnderflowError, BOOL* pIsOverflowError, BOOL* pIsVelocityError, BOOL* pIsAccelerationError, DWORD *pErrorCode) The function VCS_GetIpmStatus returns different warning and error states.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pTrajectoryRunning pIsUnderflowWarning March 2013 Edition / Subject to change

BOOL* BOOL*

State if IPM active State if buffer underflow level is

Object: 0x20C4-01

maxon motor control 57

EPOS Positioning Controller

EPOS Command Library reached State if buffer overflow level is reached State if IPM velocity greater than profile velocity State if IPM acceleration greater than profile acceleration State of underflow error State of overflow error State if IPM velocity greater than max. profile velocity State if IPM acceleration greater than max. profile acceleration Error information about the executed function Nonzero if successful; otherwise 0

pIsOverflowWarning pIsVelocityWarning pIsAccelerationWarning pIsUnderflowError pIsOverflowError pIsVelocityError pIsAccelerationError pErrorCode

BOOL* BOOL* BOOL* BOOL* BOOL* BOOL* BOOL* DWORD* BOOL

This group defines all required functions for position mode:

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivatePositionMode the device changes to position mode (PM).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

58 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long PositionMust,

VCS_SetPositionMust sets the position mode setting value.

KeyHandle NodeId

HANDLE WORD

PositionMust

long

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Position mode setting value Object: 0x2062-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long *pPositionMust,

VCS_GetPositionMust reads the position mode setting value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pPositionMust pErrorCode

long* DWORD* BOOL

Position mode setting value Object: 0x2062-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD AnalogInputNumber, float Scaling, long Offset, DWORD *pErrorCode) VCS_ActivateAnalogPositionSetpoint configures the selected analog input for analog position setpoint.

KeyHandle NodeId

HANDLE WORD

AnalogInputNumber Scaling

WORD float

Offset

long

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of the used analog Object: 0x207B-01 or input 0x207B-02 The scaling factor for Object: 0x2303-01 analog position setpoint functionality Offset for analog position Object: 0x2303-02 setpoint functionality

March 2013 Edition / Subject to change

maxon motor control 59

EPOS Positioning Controller

EPOS Command Library

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD AnalogInputNumber, DWORD *pErrorCode) VCS_DeactivateAnalogPositionSetpoint disable the selected analog input for analog position setpoint.

KeyHandle NodeId

HANDLE WORD

AnalogInputNumber

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of the used analog Object: 0x207B-01 or input 0x207B-02

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_EnableAnalogPositionSetpoint enable the execution mask for analog position setpoint.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_DisableAnalogPositionSetpoint disable the execution mask for analog position setpoint.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

60 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

This group defines all required functions for velocity mode:

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivateVelocityMode the device changes to velocity mode (VM).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long VelocityMust,

The function VCS_SetVelocityMust sets the velocity mode setting value.

KeyHandle NodeId

HANDLE WORD

VelocityMust

long

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Velocity mode setting value Object: 0x206B-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, long *pVelocityMust,

The function VCS_GetVelocityMust returns the velocity mode setting value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pVelocityMust pErrorCode

long* DWORD* BOOL

Velocity mode setting value Object: 0x206B-00 Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 61

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD AnalogInputNumber, float Scaling, long Offset, DWORD *pErrorCode) VCS_ActivateAnalogVelocitySetpoint configures the selected analog input for analog velocity setpoint.

KeyHandle NodeId

HANDLE WORD

AnalogInputNumber Scaling

WORD float

Offset

long

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of the used analog Object: 0x207B-01 or input 0x207B-02 The scaling factor for Object: 0x2302-01 analog velocity setpoint functionality Offset for analog velocity Object: 0x2302-02 setpoint functionality

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD AnalogInputNumber, DWORD *pErrorCode) VCS_DeactivateAnalogVelocitySetpoint disable the selected analog input for analog velocity setpoint.

KeyHandle NodeId

HANDLE WORD

AnalogInputNumber

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of the used analog Object: 0x207B-01 or input 0x207B-02

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_EnableAnalogVelocitySetpoint enable the execution mask for analog velocity setpoint.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). March 2013 Edition / Subject to change

62 maxon motor control

EPOS Command Library

EPOS Positioning Controller

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_DisableAnalogVelocitySetpoint disable the execution mask for analog velocity setpoint.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

This group defines all required functions for current mode:

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

Function VCS_ActivateCurrentMode changes operational mode to current mode.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, short *pCurrentMust,

With function VCS_GetCurrentMust it is possible to read the current mode setting value.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

March 2013 Edition / Subject to change

maxon motor control 63

EPOS Positioning Controller

EPOS Command Library

pCurrentMust pErrorCode

short* DWORD* BOOL

Current mode setting value Object: 0x2030-00 Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, short CurrentMust,

With function VCS_SetCurrentMust it is possible to write current mode setting value.

KeyHandle NodeId

HANDLE WORD

CurrentMust

short

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Current mode setting value Object: 0x2030-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD AnalogInputNumber, float Scaling, short Offset, DWORD *pErrorCode) VCS_ActivateAnalogCurrentSetpoint configures the selected analog input for analog current setpoint.

KeyHandle NodeId

HANDLE WORD

AnalogInputNumber Scaling

WORD float

Offset

short

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of the used analog Object: 0x207B-01 or input 0x207B-02 The scaling factor for Object: 0x2301-01 analog current setpoint functionality Offset for analog current Object: 0x2301-02 setpoint functionality

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL AnalogInputNumber, DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD

VCS_DeactivateAnalogCurrentSetpoint disable the selected analog input for analog current setpoint.

64 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

KeyHandle NodeId

HANDLE WORD

AnalogInputNumber

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Number of the used analog Object: 0x207B-01 or input 0x207B-02

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_EnableAnalogCurrentSetpoint enable the execution mask for analog current setpoint.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_DisableAnalogCurrentSetpoint disable the execution mask for analog current setpoint.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivateMasterEncoderMode the device changes to master encoder mode (MEM).

March 2013 Edition / Subject to change

maxon motor control 65

EPOS Positioning Controller

EPOS Command Library

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD ScalingNumerator, WORD ScalingDenominator, BYTE Polarity, DWORD MaxVelocity, DWORD MaxAcceleration, DWORD *pErrorCode) With function VCS_SetMasterEncoderParameter it is possible to write all parameters for master encoder mode.

KeyHandle NodeId

HANDLE WORD

ScalingNumerator ScalingDenominator Polarity

WORD WORD BYTE

MaxVelocity

DWORD

MaxAcceleration

DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Scaling numerator for Object: 0x2300-02 position calculation Scaling denominator for Object: 0x2300-03 position calculation Polarity of the direction Object: 0x2300-04 input. 0: Positive 1: Negative This parameter is the Object: 0x607F-01 maximal allowed speed during a profiled move. Defines the maximal Object: 0x60C5-01 allowed acceleration.

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pScalingNumerator, WORD* pScalingDenominator, BYTE* pPolarity, DWORD* pMaxVelocity, DWORD* pMaxAcceleration, DWORD *pErrorCode) With function VCS_GetMasterEncoderParameter it is possible to read all parameters for master encoder mode.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pScalingNumerator pScalingDenominator pPolarity

WORD* WORD* BYTE*

Scaling numerator for position calculation Scaling denominator for position calculation Polarity of the direction input. 0: Positive 1: Negative

Object: 0x2300-02 Object: 0x2300-03 Object: 0x2300-04

66 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library pMaxVelocity DWORD*

EPOS Positioning Controller This parameter is the Object: 0x607F-01 maximal allowed speed during a profiled move. Defines the maximal Object: 0x60C5-01 allowed acceleration. Error information about the executed function Nonzero if successful; otherwise 0

pMaxAcceleration pErrorCode

DWORD* DWORD* BOOL

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

With the function VCS_ActivateStepDirectionMode the device changes to step direction mode (SDM).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD ScalingNumerator, WORD ScalingDenominator, BYTE Polarity, DWORD MaxVelocity, DWORD MaxAcceleration, DWORD *pErrorCode) With function VCS_SetStepDirectionParameter it is possible to write all parameters for step direction mode.

KeyHandle NodeId

HANDLE WORD

ScalingNumerator ScalingDenominator Polarity

WORD WORD BYTE

MaxVelocity

DWORD

MaxAcceleration

DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Scaling numerator for Object: 0x2300-02 position calculation Scaling denominator for Object: 0x2300-03 position calculation Polarity of the direction Object: 0x2300-04 input. 0: Positive 1: Negative This parameter is the Object: 0x607F-01 maximal allowed speed during a profiled move. Defines the maximal Object: 0x60C5-01 allowed acceleration.

March 2013 Edition / Subject to change

maxon motor control 67

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pScalingNumerator, WORD* pScalingDenominator, BYTE* pPolarity, DWORD* pMaxVelocity, DWORD* pMaxAcceleration, DWORD *pErrorCode) With function VCS_GetStepDirectionParameter it is possible to read all parameters for step direction mode.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pScalingNumerator pScalingDenominator pPolarity

WORD* WORD* BYTE*

pMaxVelocity

DWORD*

pMaxAcceleration pErrorCode

DWORD* DWORD* BOOL

Scaling numerator for Object: 0x2300-02 position calculation Scaling denominator for Object: 0x2300-03 position calculation Polarity of the direction Object: 0x2300-04 input. 0: Positive 1: Negative This parameter is the Object: 0x607F-01 maximal allowed speed during a profiled move. Defines the maximal Object: 0x60C5-01 allowed acceleration. Error information about the executed function Nonzero if successful; otherwise 0

This group defines all required functions for inputs and outputs information: More information about the inputs from the other devices are available in the Firmware Specification documents!

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD *pInputs,

VCS_GetAllDigitalInputs returns state of all digital inputs.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pInputs

WORD*

pErrorCode

DWORD* BOOL

Display the state of the digital Object: 0x2071-01 input functionalities. If a bit is read as 1, the functionality is activated. Error information about the executed function Nonzero if successful; otherwise 0 March 2013 Edition / Subject to change

68 maxon motor control

EPOS Command Library

EPOS Positioning Controller

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD *pOutputs,

VCS_GetAllDigitalOutputs returns state of all digital outputs.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pOutputs

WORD*

pErrorCode

DWORD* BOOL

State of all digital outputs. If a Object: 0x2078-01 bit is read as 1, the state activated. Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId, WORD Outputs,

VCS_SetAllDigitalOutputs set state of all digital outputs.

KeyHandle NodeId

HANDLE WORD

Outputs

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). State of all digital outputs. If Object: 0x2078-01 a bit is written as 1, the state is activated.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD InputNumber, WORD *pAnalogValue, DWORD *pErrorCode) VCS_GetAnalogInput returns the value from an analog input.

KeyHandle NodeId

HANDLE WORD

InputNumber

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Analog input number

pAnalogValue pErrorCode

WORD* DWORD* BOOL

Analog value from input Object: 0x207C-0? Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 69

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD OutputNumber, WORD AnalogValue, DWORD *pErrorCode) VCS_SetAnalogOutput set the voltage level of an analog output.

KeyHandle NodeId

HANDLE WORD

OutputNumber pAnalogValue

WORD WORD*

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Analog output number Analog value for output Object: 0x207E-00

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE OperationalMode, BYTE IntervalMode, BYTE DirectionDependency, WORD IntervalWidth, WORD IntervalRepetitions, WORD PulseWidth, DWORD* pErrorCode) VCS_SetPositionCompareParameter write all parameters for position compare.

KeyHandle NodeId

HANDLE WORD

OperationalMode

BYTE

IntervalMode

BYTE

DirectionDependency

BYTE

IntervalWidth IntervalRepetitions

WORD WORD

PulseWidth

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Used operational mode in position sequence mode: (see Table 11) Used interval mode in position Object: sequence mode: 0x207A-01 (see Table 12) Used direction dependency in position sequence mode: (see Table 13) This object holds the width of the Object: position intervals 0x207A-03 This object allows to configure Object: the number of position intervals 0x207A-04 to be considered by position compare This object configures the pulse Object: width of the trigger output 0x207A-05

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

70 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

Description Single position mode Position sequence mode

Value 0 1

Constant name PCO_SINGLE_POSITION_MODE PCO_POSITION_SEQUENCE_MODE

Table 11: Position Compare - Operational mode Description Interval positions are set in negative direction relative to the position compare reference position Interval positions are set in positive direction relative to the position compare reference position Interval positions are set in positive and negative direction relative to the position compare reference position Table 12: Position Compare - Interval mode Description Positions are compared only if actual motor direction is negative Positions are compared only if actual motor direction is positive Positions are compared regardless of the actual motor direction Value 0 1 2 Constant name PCD_MOTOR_DIRECTION_NEGATIVE PCD_MOTOR_DIRECTION_POSITIVE PCD_MOTOR_DIRECTION_BOTH Value 0 Constant name PCI_NEGATIVE_DIR_TO_REFPOS

PCI_POSITIVE_DIR_TO_REFPOS

PCI_BOTH_DIR_TO_REFPOS

Table 13: Position Compare - Direction Dependency

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE* pOperationalMode, BYTE* pIntervalMode, BYTE* pDirectionDependency, WORD* pIntervalWidth, WORD* pIntervalRepetitions, WORD* pPulseWidth, DWORD* pErrorCode) VCS_GetPositionCompareParameter read all parameters for position compare.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pOperationalMode

BYTE*

pIntervalMode

BYTE*

pDirectionDependency

BYTE*

pIntervalWidth pIntervalRepetitions

WORD* WORD*

pPulseWidth pErrorCode

WORD* DWORD* BOOL

Used operational mode in position sequence mode: (see Table 11) Used interval mode in position Object: sequence mode: 0x207A-01 (see Table 12) Used direction dependency in position sequence mode: (see Table 13) This object holds the width of the Object: position intervals 0x207A-03 This object allows to configure the Object: number of position intervals to be 0x207A-04 considered by position compare This object configures the pulse Object: width of the trigger output 0x207A-05 Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 71

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD DigitalOutputNumber, BOOL Polarity, DWORD* pErrorCode) Function VCS_ActivatePositionCompare enables the output to position compare method.

KeyHandle NodeId

HANDLE WORD

DigitalOutputNumber Polarity

WORD BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Selected digital output Object: 0x2079 for position compare Polarity of the selected Object: 0x2078-03 output

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD DigitalOutputNumber, DWORD* pErrorCode) Function VCS_DeactivatePositionCompare disables the output to position compare method.

KeyHandle NodeId

HANDLE WORD

DigitalOutputNumber

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Selected digital output Object: 0x2079 for position compare

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL pErrorCode)

(HANDLE KeyHandle, WORD NodeId, DWORD*

Function VCS_EnablePositionCompare enables the output mask for position compare method.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

72 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL pErrorCode)

(HANDLE KeyHandle, WORD NodeId, DWORD*

Function VCS_DisablePositionCompare disables the output mask from position compare method.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL long ReferencePosition, DWORD* pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_SetPositionCompareReferencePosition writes the reference position for position compare method.

KeyHandle NodeId

HANDLE WORD

ReferencePosition

long

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). This object holds the Object: 0x207A-02 position that is compared with the position actual value

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE PositionMarkerEdgeType, BYTE PositionMarkerMode, DWORD* pErrorCode) VCS_SetPositionMarkerParameter write all parameters for position marker method.

KeyHandle NodeId

HANDLE WORD

PositionMarkerEdgeType

BYTE

PositionMarkerMode

BYTE

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). The value of this object defines on Object: what kind of edge the position 0x2074-02 should be captured: (see Table 14) This object defines the position Object: marker-capturing mode: 0x2074-03 maxon motor control 73

March 2013 Edition / Subject to change

EPOS Positioning Controller (see Table 15) pErrorCode DWORD* BOOL

EPOS Command Library

Error information about the executed function Nonzero if successful; otherwise 0

Description Both edges Rising edge Falling edge

Value 0 1 2

Constant name PET_BOTH_EDGES PET_RISING_EDGE PET_FALLING_EDGE

Table 14: Position marker edge types

Description Continuous Single Multiple

Value 0 1 2

Constant name PM_CONTINUOUS PM_SINGLE PM_MULTIPLE

Table 15: Position marker modes

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE* pPositionMarkerEdgeType, BYTE* pPositionMarkerMode, DWORD* pErrorCode) VCS_GetPositionMarkerParameter read all parameters for position marker method.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pPositionMarkerEdgeType

BYTE*

pPositionMarkerMode

BYTE*

pErrorCode

DWORD* BOOL

The value of this object Object: defines on what kind of edge 0x2074-02 the position should be captured: (see Table 14) This object defines the Object: position marker capturing 0x2074-03 mode: (see Table 15) Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD DigitalInputNumber, BOOL Polarity, DWORD* pErrorCode) Function VCS_ActivatePositionMarker enables the digital input to position marker method.

74 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

KeyHandle NodeId

HANDLE WORD

DigitalInputNumber Polarity

WORD BOOL

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Selected digital input for Object: 0x2070 position marker Polarity of the selected Object: 0x2071-03 input

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD DigitalInputNumber, DWORD* pErrorCode) Function VCS_DeactivatePositionMarker disables the digital input to position marker method.

KeyHandle NodeId

HANDLE WORD

DigitalInputNumber

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Selected digital input for Object: 0x2070 position marker

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL WORD *pCount, DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_ReadPositionMarkerCounter returns the number of the detected edges.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pCount

WORD*

pErrorCode

DWORD* BOOL

This object counts the Object: 0x2074-04 number of the detected edges. Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 75

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD CounterIndex, long* pCapturedPosition, DWORD *pErrorCode) VCS_ReadPositionMarkerCapturedPosition returns the last captured position or the position from the position marker history.

KeyHandle NodeId

HANDLE WORD

CounterIndex

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). 0: Read position marker Object: 0x2074-01 captured position 1 or 2: Read position Object: marker history 0x2074-05 or 06

pCapturedPosition

long*

pErrorCode

DWORD* BOOL

This object contains the Object: 0x2074-01 or captured position or the 0x2074-05/06 position marker history Error information about the executed function Nonzero if successful; otherwise 0

BOOL DWORD *pErrorCode)

(HANDLE KeyHandle, WORD NodeId,

VCS_ResetPositionMarkerCounter clears the counter and the captured positions by writing zero to object position marker counter (0x2074-04).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

76 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, WORD SamplingPeriod, WORD NbOfPrecedingSamples, WORD PulseWidth, DWORD* pErrorCode) VCS_SetRecorderParameter writes parameters for data recorder .

KeyHandle NodeId

HANDLE WORD

SamplingPeriod

WORD

NbOfPrecedingSamples

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Sampling Period as a Object: 0x2012-00 multiple of the current regulator cycle (n-times 0.1ms) Number of preceding Object: 0x2013-00 samples (data history).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, WORD* pSamplingPeriod, WORD* pNbOfPrecedingSamples, WORD PulseWidth, DWORD* pErrorCode) VCS_GetRecorderParameter reads parameters for data recorder .

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pSamplingPeriod

WORD*

pNbOfPrecedingSamples pErrorCode

WORD* DWORD* BOOL

Sampling Period as a Object: 0x2012-00 multiple of the current regulator cycle (n-times 0.1ms) Number of preceding Object: 0x2013-00 samples (data history). Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 77

EPOS Positioning Controller

EPOS Command Library

BOOL DWORD* pErrorCode)

(HANDLE KeyHandle, WORD NodeId, BYTE TriggerType,

VCS_EnableTrigger connects trigger(-s) for data recording.

KeyHandle NodeId TriggerType

HANDLE WORD BYTE

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Configuration of Auto Trigger functions. If a Object: 0x2011-00 bit is write as one the trigger is activated: (see Table 16) It is possible to activate more than one trigger at the same time.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Trigger Types Trigger movement start Error trigger Digital input trigger Trigger movement end Table 16: Data recorder trigger types 1 2 4 8 DR_MOVEMENT_START_TRIGGER DR_ERROR_TRIGGER DR_DIGITAL_INPUT_TRIGGER DR_MOVEMENT_END_TRIGGER

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD* pErrorCode)

VCS_DisableAllTrigger sets data recorder configuration (0x2011-00) for triggers to zero.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

78 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE ChannelNumber, WORD ObjectIndex, BYTE ObjectSubIndex, BYTE ObjectSize, DWORD* pErrorCode) VCS_ActivateChannel connects object for data recording. For every activated channel the number of sampling variables (Object 0x2014-00) will be incremented

KeyHandle NodeId ChannelNumber ObjectIndex ObjectSubIndex ObjectSize

HANDLE WORD BYTE WORD BYTE BYTE

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Channel number [1 4] Object index for data recording Object: 0x2015ChannelNumber Object sub index for data recording Object: 0x2016ChannelNumber Object size in bytes for data recording

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL pErrorCode)

(HANDLE KeyHandle, WORD NodeId, DWORD*

VCS_DeactivateAllChannel sets all data recording objects to zero (0x2014, 0x2015 and 0x2016).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 79

EPOS Positioning Controller

EPOS Command Library

Functions are not available in the Linux library!

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD* pErrorCode)

VCS_StartRecorder starts the data recording.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD* pErrorCode)

VCS_StopRecorder stops the data recording.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

BOOL

(HANDLE KeyHandle, WORD NodeId, DWORD* pErrorCode)

VCS_ForceTrigger forces the data recording triggers.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

80 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL DWORD* pErrorCode)

(HANDLE KeyHandle, WORD NodeId, BOOL* pRunning,

VCS_IsRecorderRunning returns data recorder status running.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pRunning pErrorCode

BOOL DWORD* BOOL

1: Data recorder running Object: 0x2017-00, 0: Data recorder stopped (bit 0) Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

BOOL DWORD* pErrorCode)

(HANDLE KeyHandle, WORD NodeId, BOOL* pTriggered,

VCS_IsRecorderTriggered returns data recorder status triggered.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pTriggered pErrorCode

BOOL DWORD* BOOL

1: Data recorder triggered Object: 0x2017-00 0: Data recorder not triggered (bit 1) Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

March 2013 Edition / Subject to change

maxon motor control 81

EPOS Positioning Controller

EPOS Command Library

BOOL pVectorSize, DWORD* pErrorCode)

(HANDLE KeyHandle, WORD NodeId, DWORD*

VCS_ReadChannelVectorSize returns the maximal number of samples per variable. This parameter is dynamically calculated by the data recorder.

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS).

pVectorSize pErrorCode

DWORD DWORD* BOOL

Maximal number of Object: 0x2018-00 samples per variable. Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE ChannelNumber, BYTE* pDataVector, DWORD VectorSize, DWORD* pErrorCode) VCS_ReadChannelDataVector returns the data points of a selected channel.

KeyHandle NodeId ChannelNumber VectorSize

HANDLE WORD BYTE DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Selected channel Size of data points Object: 0x2018-00

pDataVector pErrorCode

BYTE DWORD* BOOL

Data points of selected Object: 0x201B-00 channel Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

82 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

BOOL pErrorCode)

(HANDLE KeyHandle, WORD NodeId, DWORD*

VCS_ShowChannelDataDlg opens the dialog to show the data channel(-s).

KeyHandle NodeId

HANDLE WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Error information about the executed function Nonzero if successful; otherwise 0

pErrorCode

DWORD* BOOL

Function is not available in the Linux library

BOOL FileName, DWORD* pErrorCode)

(HANDLE KeyHandle, WORD NodeId, char*

VCS_ExportChannelDataToFile saves data point in a file.

KeyHandle NodeId FileName

HANDLE WORD char*

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Path and file name for save data points. File endings: *.csv, *.txt or *.rda.

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Function is not available in the Linux library

March 2013 Edition / Subject to change

maxon motor control 83

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE* pDataBuffer, DWORD BufferSizeToRead, DWORD* pBufferSizeRead, WORD* pVectorStartOffset, WORD* pMaxNbOfSamples, WORD* pNbOfRecordedSamples, DWORD* pErrorCode) VCS_ReadDataBuffer returns the buffer data points.

KeyHandle NodeId BufferSizeToRead

HANDLE WORD DWORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Buffer size

pDataBuffer pBufferSizeRead pVectorStartOffset

BYTE* DWORD* WORD*

pMaxNbOfSamples pNbOfRecordedSamples pErrorCode

WORD* WORD* DWORD* BOOL

Data points Object: 0x201B-00 Size of read data buffer Offset to the start of the Object: 0x201A-00 recorded data vector within the ring buffer. Maximal number of Object: 0x2018-00 samples per variable. Number of recorded Object: 0x2019-00 samples. Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD NodeId, BYTE ChannelNumber, BYTE* pDataBuffer, DWORD BufferSize, BYTE* pDataVector, DWORD VectorSize, WORD VectorStartOffset, WORD MaxNbOfSamples, WORD NbOfRecordedSamples, DWORD* pErrorCode) VCS_ExtractChannelDataVector returns the vector of one data channel.

KeyHandle NodeId

HANDLE WORD

ChannelNumber pDataBuffer BufferSize VectorSize VectorStartOffset

BYTE BYTE DWORD DWORD WORD

MaxNbOfSamples NbOfRecordedSamples

WORD WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). Selected channel Data points Object: 0x201B-00 Buffer size Vector size Offset to the start of the Object: 0x201A-00 recorded data vector within the ring buffer. Maximal number of Object: 0x2018-00 samples per variable. Number of recorded Object: 0x2019-00 samples.

pDataVector pErrorCode

BYTE* DWORD* BOOL

Data points of the channel Error information about the executed function Nonzero if successful; otherwise 0 March 2013 Edition / Subject to change

84 maxon motor control

EPOS Command Library

EPOS Positioning Controller

BOOL (HANDLE KeyHandle, WORD CobID, WORD Length, void *pData, DWORD *pErrorCode) VCS_SendCANFrame sends a general CAN frame to the CAN bus.

KeyHandle CobID Length pData

HANDLE WORD WORD void*

Handle for port access CAN frame 11-bit identifier CAN frame data length CAN frame data

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD CobID, WORD Length, void *pData, DWORD Timeout , DWORD *p ErrorCode) VCS_ReadCANFrame reads a general CAN frame from the CAN bus.

KeyHandle CobID Length Timeout

HANDLE WORD WORD WORD

Handle for port access CAN frame 11-bit identifier CAN frame data length Maximum waiting period

pData pErrorCode

void* DWORD* BOOL

CAN frame data Error information about the executed function Nonzero if successful; otherwise 0

BOOL (HANDLE KeyHandle, WORD CobID, WORD Length, void *pData, DWORD *pErrorCode) VCS_RequestCANFrame requests a general CAN frame from the CAN bus using Remote Transmit Request (RTR).

KeyHandle CobID Length

HANDLE WORD WORD

Handle for port access CAN frame 11-bit identifier CAN frame data length

pData pErrorCode

void* DWORD* BOOL

CAN frame data Error information about the executed function Nonzero if successful; otherwise 0

March 2013 Edition / Subject to change

maxon motor control 85

EPOS Positioning Controller

EPOS Command Library

BOOL (HANDLE KeyHandle, WORD NodeId, WORD CommandSpecifier, DWORD *pErrorCode) The function VCS_SendNMTService is used to send a NMT protocol from a master to a slave. It is a command without acknowledge.

KeyHandle NodeId

HANDLE WORD

CommandSpecifier

WORD

Handle for port access Node ID of the addressed device. ID is given from hardware switches or the layer setting services (LSS). NMT service (see Table 17)

pErrorCode

DWORD* BOOL

Error information about the executed function Nonzero if successful; otherwise 0

Command Specifier Start remote node Stop remote node Enter pre-operational Reset node Reset communication Table 17: Command specifier 1 2 128 129 130 NCS_START_REMOTE_NODE NCS_STOP_REMOTE_NODE NCS_ENTER_PRE_OPERATIONAL NCS_RESET_NODE NCS_RESET_COMMUNICATION

86 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

0x0000 0000 0x0503 0000 0x0504 0000 0x0504 0001 0x0504 0002 0x0504 0003 0x0504 0004 0x0504 0005 0x0601 0000 0x0601 0001 0x0601 0002 0x0602 0000 0x0604 0041 0x0604 0042 0x0604 0043 0x0604 0047 0x0606 0000 0x0607 0010 0x0607 0012 0x0607 0013 0x0609 0011 0x0609 0030 0x0609 0031 0x0609 0032 0x0609 0036 0x0800 0000 0x0800 0020 0x0800 0021 0x0800 0022 0x0F00 FFB9 0x0F00 FFBC 0x0F00 FFBE 0x0F00 FFBF 0x0F00 FFC0

No Communication Error Toggle Error SDO Time Out Client/server specifier Error Invalid block size Invalid sequence CrcError Out of Memory Error Access Error Write Only Read Only Object does not exist Error PDO mapping Error PDO length Error General parameter Error General Intern Incompatibility Error Hardware Error Service Parameter Error Service Parameter Error too High Error Service Parameter Error too Low Error Object Sub-index Error Value Range Error Value too High Error Value too Low Error Maximum less Minimum Error General Error Transfer or store Error Local control Error Wrong Device State Error CAN id Error Service Mode Password Error Illegal Command Error Wrong NMT State Error

The communication was successful Toggle bit not alternated SDO protocol timed out Client/server command specifier not valid or unknown Invalid block size (block mode only) Invalid sequence number (block mode only) CRC error (block mode only) Out of Memory Unsupported access to an object (e.g. write command to a read-only object) Read command to a write only object Write command to a read only object The last read or write command had a wrong object index or sub-index The object cannot be mapped to the PDO The number and length of the objects to be mapped would exceed PDO length General parameter incompatibility General internal incompatibility in device Access failed due to an hardware error Data type does not match, length or service parameter does not match Data type does not match, length or service parameter too high Data type does not match, length or service parameter too low The last read or write command had a wrong Object sub-index Value range of parameter exceeded Value of parameter written too high Value of parameter written too low Maximum value is less than minimum value General error Data cannot be transferred or stored Data cannot be transferred or stored to application because of local control Data cannot be transferred or stored to application because of the present device state Wrong CAN id The device is not in service mode The password is wrong The RS232 command is illegal (does not exist) The device is in wrong NMT state

Table 18: Communication errors

March 2013 Edition / Subject to change

maxon motor control 87

EPOS Positioning Controller

EPOS Command Library

0x0000 0000 0x1000 0001 0x1000 0002 0x1000 0003 0x1000 0004 0x1000 0005 0x1000 0006 0x1000 0007 0x1000 0008 0x1000 0009 0x1000 000A 0x1000 000B 0x1000 000C 0x1000 000D

No Error Internal Error Null Pointer Handle not Valid Bad Virtual Device Name Bad Device Name Bad ProtocolStack Name Bad Interface Name Bad Port Name Library not Loaded Executing Command Timeout Bad Parameter Command Aborted By User

The function was successful Internal Error Null Pointer passed to function Handle passed to function is not valid Virtual Device name is not valid Device name is not valid ProtocolStack name is not valid Interface name is not valid Port is not valid Could not load external library Command failed Timeout occurred during execution Bad Parameter passed to function Command aborted by user

Table 19: Command DLL specified general errors

0x2000 0001 0x2000 0002 0x2000 0003 0x2000 0004 0x2000 0005 0x2000 0006 0x2000 0007 0x2000 0008 0x2000 0009

Opening Interface Closing Interface Interface not Open Opening Port Closing Port Port not Open Reset Port Set Port Settings Set Port Mode

Error opening interface Error closing interface Interface is not open Error opening port Error closing port Port is not open Error resetting port Error configuring port settings Error configuring port mode

Table 20: Command DLL specified interface layer errors

0x2100 0001 0x2100 0002

Write Data Read Data

Error writing data Error reading data

Table 21: Command DLL specified interface layer RS232 errors

0x2200 0001 0x2200 0002

Receive CAN Frame Transmit CAN Frame

Error receiving CAN frame Error transmitting CAN frame

Table 22: Command DLL specified interface layer CAN errors

0x2300 0001 0x2300 0002

Write Data Read Data

Error writing data Error reading data

Table 23: Command DLL specified interface layer USB errors

88 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library

EPOS Positioning Controller

0x3100 0001 0x3100 0002 0x3100 0003

NegAckReceived BadCrcReceived BadDataSizeReceived

Negative acknowledge received Bad checksum received Bad data size received

Table 24: Command DLL specified protocol MaxonRS232 errors

0x3200 0001 0x3200 0002 0x3200 0003

SdoReceiveFrameNotReceived RequestedCanFrameNotReceived CanFrameNotReceived

CAN frame of SDO protocol not received Requested CAN frame not received Can frame not received

Table 25: Command DLL specified protocol CANopen errors

0x3300 0001 0x3300 0002 0x3300 0003 0x3300 0004

Stuffing Destuffing BadCrcReceived BadDataSizeReceived

Failed Stuffing Data Failed Destuffing Data Bad CRC received Bad Data received

Table 26: Command DLL specified protocol USB errors

March 2013 Edition / Subject to change

maxon motor control 89

EPOS Positioning Controller

EPOS Command Library

11.11.2003 01.12.2003

1.00 1.01

05.01.2004 06.04.2004

1.02 2.0.0.0

16.07.2004 01.03.2005 01.10.2005 03.02.2006 12.04.2006 12.04.2006 11.10.2006 16.10.2006 01.02.2007 10.08.2007 01.05.2008 04.09.2009

2.0.3.0 3.0.0.0 4.0.0.0 4.0.0.0 4.1.0.0 4.1.1.0 4.2.0.0 4.2.1.0 4.3.0.0 4.4.0.0 4.5.0.0 4.6.0.0

22.10.2009 30.08.2009

4.6.1.3 4.7.1.0

Edition November First library version 2003 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(..) Edition Insert IXXAT details January 2004 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(..) Edition Error correction documentation July 2004 Additional information about error codes Edition Insert from Vector CAN cards details March 2005 Edition Error correction documentation October 2005 Edition Additional information about error codes February 2006 Edition New error codes April 2006 Edition VCS_SendCANFrame bug fixed April 2006 Edition New function: VCS_GetErrorInfo(..) October 2006 Edition VCS_GetDriverInfo, VCS_SetHomingParameter bug fixed October 2006 Edition Support for National Instruments Interfaces January 2007 Edition Support for IXXAT VCI V3 August 2007 Edition New functions for read device errors (Get Device Error) April 2008 Adaption for EPOS2 Edition Support for EPOS2 functionality September 2009 Support for data recorder Support for parameter export and import VCS_ReadCANFrame Edition Multithreading bug fixed October 2009 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

90 maxon motor control

March 2013 Edition / Subject to change

EPOS Command Library 11.10.2010 28.10.2010 28.01.2011 02.02.2011 10.04.2012 08.10.2012 10.10.2012 4.7.2.0 4.7.3.0 4.8.1.0 4.8.2.0 4.8.5.0 4.8.6.0 4.8.7.0 Edition October 2010 Edition November 2010 Edition January 2011 Edition February 2011 Edition April 2012 Edition October 2012 Edition October 2012

EPOS Positioning Controller Deadlock when closing Application fixed Communication for IXXAT VCI V3.3 fixed Bugfix VCS_CloseDevice, VCS_CloseAllDevices Expand to 64-Bit Windows and 32-Bit Linux Bugfix Segmented Write Bugfix NI-LIN device Bugfix Sporadic CAN failure with IXXAT VCI V3.3 CANopen Vector Interface support for VN1600 series

04.01.2013

4.9.1.0

22.03.2013

4.9.2.0

Bugfix command Send NMT Service New Functions: VCS_GetVelocityRegulatorFeedForward, VCS_SetVelocityRegulatorFeedForward Edition December New Functions: VCS_GetHomingState, 2012 VCS_WaitForHomingAttained, VCS_GetVelocityIsAveraged, VCS_GetCurrentIsAveraged Edition March Function VCS_ExportParamter: Parameters renamed 2013

March 2013 Edition / Subject to change

maxon motor control 91

EPOS Positioning Controller

EPOS Command Library

Figure 1: Figure 2: Figure 3:

EPOS documentation hierarchy ......................................................................................................8 Example Windows communication structure ...................................................................................9 Example Linux communication structure .........................................................................................9

Table 1: Table 2: Table 3: Table 4: Table 5: Table 6: Table 7: Table 8: Table 9: Table 10: Table 11: Table 12: Table 13: Table 14: Table 15: Table 16: Table 17: Table 18: Table 19: Table 20: Table 21: Table 22: Table 23: Table 24: Table 25: Table 26:

Supported platforms ........................................................................................................................5 Data type definitions ...................................................................................................................... 10 Kind of motor ................................................................................................................................. 22 Position Sensor Type .................................................................................................................... 24 Digital Input Configuration ............................................................................................................. 34 Digital Output Configuration .......................................................................................................... 34 Analog Input Configuration ............................................................................................................ 35 Operational modes ........................................................................................................................ 37 State modes .................................................................................................................................. 38 Homing methods ........................................................................................................................... 53 Position Compare - Operational mode .......................................................................................... 71 Position Compare - Interval mode ................................................................................................. 71 Position Compare - Direction Dependency ................................................................................... 71 Position marker edge types ........................................................................................................... 74 Position marker modes.................................................................................................................. 74 Data recorder trigger types ............................................................................................................ 78 Command specifier ....................................................................................................................... 86 Communication errors ................................................................................................................... 87 Command DLL specified general errors ..................................................................................... 88 Command DLL specified interface layer errors ........................................................................... 88 Command DLL specified interface layer RS232 errors ............................................................. 88 Command DLL specified interface layer CAN errors ................................................................. 88 Command DLL specified interface layer USB errors ................................................................. 88 Command DLL specified protocol MaxonRS232 errors ............................................................ 89 Command DLL specified protocol CANopen errors................................................................... 89 Command DLL specified protocol USB errors ........................................................................... 89

92 maxon motor control

March 2013 Edition / Subject to change

You might also like