Topic:
I want to command an ESCON2 using a Windows PC and my own developed C++ code.
- What libraries does maxon offer for exchanging data with the ESCON2?
- Is there any sample code existing I can use as a starting point for my code implementation?
Solution:
The base: maxon's "Motion Library"
"Motion Library" (DLL) is a communication library that has to be installed using maxon's "Motion Installer" software package. Once successfully installed, this library is located in the following default directory:
-> C:\Program Files (x86)\maxon\Motor and Motion Control\Software\Motion Library
"Motion Library" provides function calls for opening and closing the device interface (USB, CANopen) as well as for accessing ESCON2 objects. These most important functions calls for all types of ESCON2 commanding and data retrieval are:
- Setting up the interface:
- VCS2_OpenDevice
- VCS2_SetNodeID
- VCS2_SetProtocolStackSettings
- VCS2_Close Device
- Exchanging data:
- VCS2_GetObject
- VCS2_SetObject
Additional function calls are also available for uploading and downloading parameters, as well as firmware updates. All function calls in the "Motion Library" are described in the "Motion Library Specification" (which is also installed on the local drive).
Cross reference 1: "ESCON2 Firmware Specification"
The VCS2_GetObject and VCS2_SetObject function calls allow to access any ESCON2 object. These two functions offer maximum flexibility when implementing your own PC application, which will be used to configure, control, and monitor the drive.
All objects are described in "ESCON2 Firmware Specification.pdf" which is located in the following default directory:
-> C:\Program Files (x86)\maxon\Motor and Motion Control\Manuals\ESCON2
Cross reference 2: "ESCON2 Application Notes.pdf"
Chapter "2 Device Programming" of the "ESCON2 Application Notes" gives a brief overview of the most relevant objects to configure and command each operating mode. This document is located in the following default directory:
-> C:\Program Files (x86)\maxon\Motor and Motion Control\Manuals\ESCON2
The sample code for Windows: "Motion Library Examples"
Prerequisites:
- "Motion Library" has to be installed (using maxon's "Motion Installer" software)
- Microsoft "Visual Studio 2022 or 2026" is required for the C++ build tools
Visual Studio can be downloaded here:
-> https://visualstudio.microsoft.com/downloads
Select the "Desktop development with C++" that brings the compiler CMake and Ninja. - Download and unpack the attached "MotionLibraryExamples.zip" file. The complete and most recent packages of "Motion Library Examples" is also available on maxon Github account soon.
MotionLibraryExamples.zip holds ...
- ... a sample code which connects to an ESCON2 and operates the motor in "PVM - Profile Velocity Mode".
- ... all documents (as *.html, *.pdf, *.md) explaining the details about the programming environment and sample code implementation.
Please follow the instructions given in document:
-> "maxon Motion Library - Cpp Example - Documentation 1.0.0.html"
(resp. its most up-to-date version which is part of "MotionLibraryExamples.zip" file provided on Github.
Cross reference:
- maxon "Motion Library"
-> C:\Program Files (x86)\maxon\Motor and Motion Control\Software\Motion Library - maxon "ESCON2 Firmware Specification"
-> C:\Program Files (x86)\maxon\Motor and Motion Control\Manuals\ESCON2 - maxon "ESCON2 Application Notes" / Chapter "2 Device Programming"
-> C:\Program Files (x86)\maxon\Motor and Motion Control\Manuals\ESCON2 - maxon "Motion Library Examples"
Please check maxon's Github account for the most up-to-date version - Support Center document: "CAN bus topology and bus termination"
This document is also valid for the ESCON2 although just EPOS controllers are mentioned or shown by the diagrams.
Comments
0 comments
Article is closed for comments.