How to use the Ingenia Servo Drive Library for Arduino

How to use the Ingenia Servo Drive Library for Arduino

In this How-to guide, we will go through how to use the Ingenia Servo Drive Library for Arduino with an Ingenia servo drive. This library will abstract users from the servo drive communication protocol layer. This will allow the Arduino to interface with the Ingenia Servo Drives through serial communications and easily prototype a simple master for the Ingenia servo drive with Arduino.

Project Properties configuration

This is a step by step guide to set the Ingenia Servo Drive Library for Arduino:

  1. Open any Arduino sketch that you have or create a new one.
  2. To install the library into your Arduino IDE you can use the Library Manager (available from IDE version 1.6.2). 
    1. Open the IDE and click to the Sketch menu and then Include Library > Manage Libraries

    2. Then you should find the library called: Ingenia Serial Servo Driver Library.

    1. The new folder will have a name like Ingenia_SerialServoDrive-1.0.0. Rename it to just Ingenia_SerialServoDrive. Then, following the instructions from the Arduino libraries guide, except using the renamed folder rather the zip:
      1. In the Arduino IDE, navigate to Sketch > Include Library. At the top of the drop-down list, select the option to Add Library
      2. Navigate to the folder's location and open it. 
      3. Return to the Sketch > Include Library menu. You should now see the library at the bottom of the drop-down menu. It is ready to be used in your sketch.

Main features of the library

  • enableMotor and disableMotor functions that allows the user to enable and disable the motor using a single line function.
  • Set function for the position, velocity and torque actual or target values and for modes of operation.
  • Get function for the position, velocity and torque actual or target values.
  • Easily read the statusword state with several functions like statuswordIsReadyToSwitchOn() or statuswordIsFault().
  • Be able to know the status of any homing procedure with functions like homingStatusIsInProgress() or homingStatusNotStarted().
  • read and write functions to allow modify the drive registers with a simple call.

    • Related Articles

    • Recovering the Ingenia servo drive

      Problem After a failed firmware update procedure, I am unable to get the MotionLab software to recognize the Ingenia drive anymore. Every time I power up the device, I get a blinking error code and it repeats until I remove power.  When I apply ...
    • How to dimension a power supply for an Ingenia drive

      In this How-to guide we will show you how to properly dimension the power supply that you need in your system. Choosing an appropriate power supply is an important step for a successful motion control system solution. The choice of a power supply is ...
    • How to calculate the output power of a Servo Drive

      Power in a Y-wired motor The following diagram shows the electrical model of a Y-wired BLAC motor: The power in any motor can be calculated as the sum of each phase power (product of RMS current and RMS voltage). In the case of a phase-balanced ...
    • How to update the firmware of my drive

      Problem I have an Ingenia servo drive connected to my MotionLab software and I don't know how to update its firmware. What do I need to do? Steps Every time that you connect an Ingenia servo drive and it is detected by MotionLab, you will notice a ...
    • How to access macros stored in the drive using registers

      In this How to article we will explain how we can access/run/stop (and many other functionalities) macros that are stored in the drive by the use of registers of the EMCL dictionary. Problem It is quite common to have applications in which the ...