Asked — Edited

Using Douloi With ARC Compatibility?

Can I Use a Douloi Device as an EZ-B Controller for Inverse Kinematics in ARC?

I would like to know if the Synthiam ARC platform can support the use of Douloi devices as replacements for EZ-B controllers in an inverse kinematics setup. I have developed an industrial robot, as depicted in the provided images, utilizing two Douloi units connected through a fiber optic card to a Windows 486 desktop computer. This computer is presently running custom software developed in Pascal to manage the robot and log its movement paths.

I am considering migrating the robot control to Synthiam ARC, using the two Douloi units as my EZ-B controllers. Can ARC accommodate this configuration, and if so, what would I need to do to integrate these components effectively?

![Industrial Robot]

User-inserted image

Diagram Fiber Optic Connection


Related Hardware EZ-B v4
Related Controls Dynamixel Inverse Kinematic Arm

ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

PRO
Canada
#25  

Below is an expanded explanation of what you’ve set up along with important points, so you understand the entire process. This writeup assumes that you are choosing to use ASCII commands over a serial (RS232) connection, rather than trying to run your legacy controller through an EZB and its radio protocols. Instead, you’ll run your robot arm directly from ARC running on your PC by connecting a USBtoSerial adapter to your controller. This avoids extra hardware (and voltage level converters such as a MAX232) because you are using the PC’s virtual COM port. Use this approach only after reviewing and testing everything in a very safe environment.

Overview of Communication Methods

There are two ways to communicate with your Douloi (or similar) motor controllers:

  1. Binary commands using an API by calling methods from a DLL on the PC (not preferred here).
  2. ASCII commands sent over an RS232 serial connection.

For your setup, you’re using the ASCII command method. This will require you to write ARC scripts (using the servo Script robot skill, for example) that send the proper ASCII commands over the serial port to control every servo (or motor) in your arm.

What This Setup Does

  1. Direct Serial Connection:

    • You connect a lowcost USBtoSerial adapter to your Windows PC.
    • The USB adapter appears as a virtual COM port (for example, COM1).
    • The serial adapter connects directly to your motor controller.
    • In ARC, you bypass using an EZB entirely (which avoids extra circuitry like a MAX232).
  2. Initialization Script:
    The following steps (with sample commands) initialize one servo motor on your controller. This would normally be placed in an initialization script that runs when you start the project:

    // Open the COM port on, for example, COM1 at 9600 bps
    COM.open(com1, 9600);
    
    // Initialize servo 1:
    // Set Motor Type to "Servo"
    COM.writeString(com1, "A1 MTT SRV");
    
    // Set Gain for servo 1 to 32 counts (this value is a guess; adjust as needed)
    COM.writeString(com1, "A1 GAI 32");
    
    // Set Zero (damping, or neutral position) to 240 counts-again a guess value
    COM.writeString(com1, "A1 ZER 240");
    
    // Set LoopInversion to Off
    COM.writeString(com1, "A1 LIV OFF");
    
    // Set motion profile parameters:
    // Speed = 1000 counts/second
    COM.writeString(com1, "A1 SPD 1000");
    // Acceleration = 10000 counts/second
    COM.writeString(com1, "A1 ACL 10000");
    // Deceleration = 10000 counts/second
    COM.writeString(com1, "A1 DCL 10000");
    
    // Enable the amplifier/motor
    COM.writeString(com1, "A1 MTR ON");
    

    What Each Command Does:
    A1 MTT SRV - Tells the controller that motor A1 is a servo type.
    A1 GAI 32 - Sets the gain (control sensitivity) for the motor.
    A1 ZER 240 - Sets the zero or neutral point for the servo movement.
    A1 LIV OFF - Disables any loop inversion feature if available.
    In addition, commands like A1 SPD, A1 ACL, and A1 DCL set the speed, acceleration, and deceleration profiles.
    Finally, A1 MTR ON turns on the motor amplifier, enabling movement.

  3. Motion Control (Moving a Servo):
    Once the motor is initialized and the parameters are set, you control its movement from within the servo Script skill. For example, you might map the virtual servo (say, V1 in ARC) to a particular motor command, something like:

    // Make sure ports[0] is v1 as configured in the robot skill
    if (ports[0] == v1) {
        // In this sample, positions[0] is the target position coming from ARC.
        // You send the command "A1 MVT XXX" where XXX is the position value.
        COM.writeString(com1, "A1 MVT " + positions[0]);
    }
    

    Here, the command A1 MVT is used to move the servo to the specified position. Note that the range for the position (the counts value) might be different from ARC’s default 1-180 degrees. You can either adjust your project’s servo range (via Project Properties) or use ARC’s Utility.map() function to convert between ranges.

Key Considerations and Testing

Command Formatting:

  • Consult the Douloi ASCII command manual (for example, Douloi Legacy Products Manual) to verify the syntax and acceptable value ranges for each command.
  • Ensure that each command sends the proper termination characters (for example, a carriage return \r) if required by the controller.

Mapping and Range Conversions:

  • ARC’s default servo range is 1-180. However, your motor controller might have a different range (e.g., counts for position).

  • Use the Utility.map() function in ARC to convert from the ARC range to your motor’s expected range. For example:

    var motorPosition = Utility.map(positions[0], 1, 180, motorMin, motorMax);
    COM.writeString(com1, "A1 MVT " + motorPosition);
    

Safe Testing:

  • Test each command one at a time and run the robot in a very safe environment to ensure there is no unexpected behavior.
  • Be especially careful during initial testing; ensure the robot’s mechanical elements are clear of obstructions.

Further FineTuning:

  • The values for gain, zero, speed, acceleration, etc., are guess values taken from the manual or by your best estimate. You must adjust them based on tests as well as your manufacturer’s recommendations.
  • If you encounter irregularities or failures to move correctly, review both your script logs (using the print() statements in ARC) and the Douloi manual for expected responses.

Hardware Integration:

  • Make sure that your virtual COM port (from the USBtoSerial adapter) is properly set up and that the cable connections are correct.
  • There is no need for an EZB controller in this configuration, since using it would add hardware (like a MAX232) that serves to convert from a UART’s voltage level to RS232 levels-this conversion is already handled (or can be bypassed) with a USBtoSerial adapter.

Summary

You are effectively replacing an EZB with a lowcost USBtoSerial adapter. Your ARC project will:

  1. Open and configure a COM port using the COM.open() command.
  2. Send initialization commands to your motor controller to set up each servo’s parameters (type, gain, zero, motion profile, etc.).
  3. In your servo Script robot skill, send motion commands (like A1 MVT ) using COM.writeString() methods to move the servo.
  4. Map the values from the virtual servos (V1, V2 etc. in ARC) to the motor controller’s expected value range using Utility.map() if necessary.

Remember:
This entire process is based solely on the information from the Douloi manual and our experience with ARC’s scripting. We do not have this robot arm or hardware to test with on our end, so always exercise extreme care when testing.
Additional testing and finetuning are required to calibrate the motor positions, speeds, and other dynamic parameters before full operation.
Ensure that you are operating the robot in a safe environment during testing to prevent any injury or damage.

By following these guidelines and scripts, you should be able to integrate your Douloi controllers with Synthiam ARC. If you have any questions or need further clarification as you test the setup, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#26  

Wow, Ok! It looks like there is a better way. Outstanding help from Synthiam's CS. I learned something here. Thanks!

#27  

Thanks to everyone, will start digesting all this info ASAP. Going to be exciting to see what we can do!

#28  

Dear Everyone, Randy from Douloi reviewed your guidance and made this response I have posted below. Can I get some more instructions on the point being brought by Randy considering part missing in communication between ARC and the Douloi as to responding to commands sent to Douloi and then the error message etc. that needs to be addressed?

Thanks,

Chuck

Dear Chuck,

The tech support response is large correct but it is ignoring how to handle command response. When you send a command there's a response including an error and value. The error number confirms that the command was properly handled. It's also necessary to query the controller for status and position related information which is not mentioned.

The support was recommending the use of a USB to Serial converter such as this one we often use:

Thanks,

Randy

PRO
Synthiam
#29  

Oh, that's great that you're in contact with the manufacturer. I just updated the Dynamixel robot skill source code, which is probably the closest as a framework for them to create a robot skill for their product. Here's the source code you can give to them: https://github.com/synthiam/Behavior_Control_Dynamixel

And here's the step-by-step guide that gets them started: https://synthiam.com/Support/Create-Robot-Skill/Overview

Great to hear they're working with you on that.

If they encounter any challenges building their robot skill for their product, they can post here or use the Contact Us form directly.

#30  

Great, thanks again. I will see if we can get Randy to do a skill. He is getting old  but still working. No rest for the wicked like me .

#31  

Dear DJ, Randy at Douloi has to many things to do. He recommended finding an existing control compatible with ARC and that can handle the industrial arm robot motors and drives. All the motors (6) in total are 170 volt DC with encoders. Can you suggest a controller?

Thanks,

Chuck