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

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

PRO
Synthiam
#17   — Edited

Chuck, yes, there are much larger robots than your 170vdc controlled by ARC-including bulldozers, submarines, and several industrial disaster recovery units from our commercial and industrial clients. They're the ones who pay for the ARC software to be developed so ppl like you and everyone in the community can benefit from. As for the community, the only one that comes to mind who is actively controlling heavy motorized robot components is Automation Man, which has HUGE robots for woodwork and several other things. Most of the large stuff, such as bulldozers and the like, uses hydraulic controllers with PLCs.

The software is irrelevant to what is being controlled. That's like thinking someone who operates a mining pit dump truck has to weigh 450 lbs because the truck is so big. The size of the operator has nothing to do with what it's controlling. A pilot of a jumbo jet 747 is not larger than a pilot who flies a Cessna. The robot control software ARC doesn't need to be any larger because the robot is larger. Besides, I direct Synthiam to solve problems that people and businesses struggle with automation - unlike other robot/automation companies, I don't care about using our customers to promote/market ARC. Either you use ARC and be successful, or don't and struggle. Most people end up using ARC, whether they are posting on the community or not, so you are already on the right track by choosing ARC first:D

The control from ARC provides the algorithms that the motor controllers interpret and execute. The algorithm for controlling a 6-inch hobby servo robot arm for inverse kinematics is the same as for a 20-foot industrial automation appendage.

In short, what you're up against has nothing to do with ARC's capabilities. Instead, it has everything to do with understanding how to send instructions to the motor controller responsible for the motor joints' servo-mechanism behavior. So you are on the right track by obtaining the communication protocol to have ARC talk to the controllers.

#19  

Update, I did talk briefly with the owner of Douloi today and he is going to respond to my email about my old Douloi system on the industrial robot and let me know our options from his point of view. Last week I didn't know if Douloi was still in business and yes they very much are with new up to date technology. So we will find out how to make this work. Randy the owner is also knowledgeable about Blockly and has it as an option in his technology systems.

#20  

Dear Chuck,

The MCE controller can respond to host commands through serial and Ethernet transports using ASCII Commands or Modbus. The controllers from 2003 might be the previous generation MSB controllers which only support ASCII Commands on serial. The ASCII Command manual is here:

https://douloi.com/legacy-product-manuals/

Let me know if you'd like some additional details.

Thanks,

Randy

So this is what Randy, developer of the Douloi sent me today. As of now I have no clue to whether we can connect and use ARC. Can anyone take a look at this and give some guidance? Thanks, hope so. Randy is open to questions.

#21  

Maybe I can help (a little). From the response you got from Randy it looks like you would send and receive ASCII Commands over serial. I peeked briefly at the manual you pointed to and I did did see some commands that you might use like encoder and position commands.

Now the question is how to format these commands in a way that ARC will sent them to your controller over Serial. This is how I set up my system to send Simple Serial Commands to my controller through Serial:

*First I connected ARC (running on a Windows computer) to an EZB over WIFI or directly through USB. I use USB

*Next I connected the UART port on the EZB to my controller.

*Then I wrote scripts in JavaScript using the UART commands available to ARC that tells the controller to command my motor to monitor the encoder, send back the position and tell ARC where is it. I also have scripts that simply tell the controller where to move to with position commands.

*I use the UART commands in my scripts to send Simple Serial commands. You can probably use the same UART commands to send the needed ASCII Commands to your controller.

Here is just one of my scripts I use to get a position of my motor from it's encoder  @DJ and @Athena Write this:

UART.initHardwareUart(2, 9600, 2); // Turn on EZB 2 Uart #2 port - Arm Carraiges
sleep(250);

/**************************************
Left Arm Rail Movment and position check
***************************************/
while (true) {
   var lftArmRailTmpInt = getLftArmRailMovementValue();
  
  // If the position is zero or greater, we know there's a position
  // returned
  if (lftArmRailTmpInt > 0 ) {
    
     print("Left Arm_Rail stopped moving and the position is: " + lftArmRailTmpInt);
     break;
  }
       
 }

function getLftArmRailMovementValue() {

  // Get Left Channel ARS Kangaroo position
  UART.hardwareUartWriteString(2, "2, Getp\r", 2);
  
  sleep(100)

  // get bytes available on UART #0, EZB #2
  var lftArmRailavail = UART.hardwareUartAvailable(2, 2);
  print("Bytes Available LftArm_Rail: " + lftArmRailavail)

  // If we don't have at least 6 characters, return -1
  if (lftArmRailavail < 6 )
    return -1;

  // read ALL bytes from UART #0 on EZB #2
  var RespondLftUart2 = UART.hardwareUartReadStringAvailable(2, 2);
  print("Full Returned position: " + RespondLftUart2)

  // More verification this is a valid packet
  if (RespondLftUart2[1] != ',')
    throw new Error("Second character should be a ,");

  // Check if we have a capital P, if so, extract
  // the position and return the new value
  if (RespondLftUart2[2] == 'P') {
  print("Lft_Arm_Rail_Big_P: " + RespondLftUart2[2] );
  setVar( "$Lft_Arm_Rail_P_or_p", RespondLftUart2[2] );
   
    // get the characters between positions 3 & 7 of the string
      var lftArmRailTmpPart = "";
      
      if (RespondLftUart2.charAt(3) == '-'){
        lftArmRailTmpPart = RespondLftUart2.substring(3, 6);
        print("Left Arm Rail Position: " + RespondLftUart2.substring(3, 6))
        setVar("$lft_Arm_Rail_Stop_Position", lftArmRailTmpPart )
      } else {
        lftArmRailTmpPart = RespondLftUart2.substring(3, 6);
        print("Left Arm Rail Position" + RespondLftUart2.substring(3, 6))
        setVar("$lft_Arm_Rail_Stop_Position", lftArmRailTmpPart )
        }
              
     // convert the string to an Integer
     var lftArmRailTmpInt = parseInt(lftArmRailTmpPart);
     //print("Integer: " + lftArmRailTmpInt)
     
     // return the position
     return lftArmRailTmpInt;
     
      } else if (RespondLftUart2[2] == 'p') {
          print("Lft_Arm_Rail_Little_p: " + RespondLftUart2[2] );
          setVar( "$Lft_Arm_Rail_P_or_p", RespondLftUart2[2] );
          return -1;
  }
  
  // still moving 
  return -1;
}

Take a look at one of the UART commands. For example:

UART.hardwareUartWriteString(2, "2, Getp\r", 2);

The Simple Serial command I'm sending is between the (). This is where you would place you https://synthiam.com/Support/javascript-api/javascript-overview.

You can find al the JavaScript UART commands here in the Support section. Look on the left side menu under the JavaScript API section.  Here: https://synthiam.com/Support/javascript-api/javascript-overview

@Athena , Did I get anything wrong here? Can you add or correct anything? Is this the right the way to send ASCII Commands from ARC to an old Douloi system MCE servo controller? Is there a better way?

#22  

Sorry, the 3rd from last paragraph should have said

The Simple Serial command I'm sending is between the (). This is where you would place your ASCII Commands.

PRO
Canada
#23  

Based on what Dave described-and from your information-it appears that the approach of using ARC’s UART commands to send and receive the ASCII commands required by your Douloi controllers is viable.

Below are some points and suggestions to keep in mind:

Communication Setup:
- With ARC running on a Windows PC and an EZ-B (via USB or WiFi), you can use one of the EZ-B’s UART ports (using the UART methods in ARC) to talk directly to your Douloi controller over a serial line.
- Make sure that the baud rate and port settings (e.g., 9600 bps as in the example) match what your Douloi system expects.

Sending ASCII Commands:
- As Dave’s script shows, you can use a command such as:
javascript UART.hardwareUartWriteString(2, 2, "Getp\r", 2);
- In this case, the string inside the quotes is your ASCII command (including any necessary termination characters like a carriage return) that the Douloi system will receive and parse.

Receiving and Parsing Responses:
- As shown in Dave’s sample, after sending a command you can pause briefly (using sleep) and then use methods like UART.hardwareUartAvailable() and UART.hardwareUartReadStringAvailable() to capture the response.
- You may want to implement similar verification (checking for expected characters, packet lengths, etc.) so that you know you got a valid response from your Douloi device.

Integration Considerations:
- Although ARC is primarily designed to work with EZ-B controllers, nothing stops you from writing custom scripts (in JavaScript, for example) that format and send these ASCII commands over a UART link. This offers a bridge between ARC’s capabilities and your legacy Douloi system.
- As Randy (the Douloi owner) indicated, their controllers respond to both serial and Ethernet using ASCII or Modbus. Right now, you’d be focusing on the serial side. The key is to ensure that the commands (and any responses) are handled in the script exactly as specified by the Douloi ASCII command manual.

Using Blockly or Custom Scripting:
- Since Douloi is open to utilizing Blockly (which ARC supports), you might also be able to generate the necessary serial communication blocks if you decide to go that route. However, custom script code as shown in Dave’s example often gives you more flexibility for parsing and error checking.

Next Steps:
- You might want to test a single command from ARC using the UART commands to see if your Douloi returns the expected response.
- If there are any discrepancies with command formatting (for example, with line endings or special characters), adjust the script accordingly.
- Ask Randy any detailed questions regarding timing or expected response length if you run into any parsing issues.

To summarize, yes-ARC can accommodate your configuration provided you create the necessary scripts to send these ASCII commands via the UART methods available from ARC. This approach (as demonstrated by Dave’s script) is the correct way to send ASCII commands to your legacy Douloi system and handle the responses.

If you have further questions or run into any specific issues while adapting your script for your Douloi controllers, feel free to ask!

Does this help answer your question?


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.
#24   — Edited

There appear to be two ways of communication...

  1. Binary commands use the API, which uses the DLL's exposed public methods on the 486 PC.
  2. ASCII commands - uses commands from a serial (RS-232) connection.

The #2 ASCII commands would be the way to go, as no one would probably want to write an ARC Server to run on a 486 PC.

You can use the servo Script robot skill to control each motor as servos in ARC (https://synthiam.com/Support/Skills/Scripting/Servo-Script?id=19068). Writing code to send RS232 commands to the controller for each servo position. You would also require a USB-to-Serial adapter from the ARC PC to the motor controller. This process will skip using an EZB and connect the motor controller directly to the PC's virtual COM port from the USB serial adapter. There is no point in using an EZB because it would require additional hardware, including a MAX232 for converting a UART voltage/signal to the inverted and higher voltage RS-232 COM port. So it just makes sense to purchase a low-cost USB Serial adapter.


Init Servo

To initialize the controller to set a servo (A1), you would do the following script. You would run this script in an initialization script. It simply needs to open the COM port and set the parameters for the motors. I have provide example for one motor here...

COM.open("com1", 9600);

// Initialize servo 1
COM.writeString("com1", "A1 MTT SRV");    // MotorType = Servo
COM.writeString("com1", "A1 GAI 32");     // Gain = 32
COM.writeString("com1", "A1 ZER 240");    // Zero (damping) = 240
COM.writeString("com1", "A1 LIV OFF");    // LoopInversion = Off

// 2) Set motion profile parameters
COM.writeString("com1", "A1 SPD 1000");   // Speed = 1000 counts/sec
COM.writeString("com1", "A1 ACL 10000");  // Accel = 10,000 counts/sec
COM.writeString("com1", "A1 DCL 10000");  // Decel = 10,000 counts/sec

// 3) Enable the amplifier/motor
COM.writeString("com1", "A1 MTR ON");     // Motor = On

Move Servo

To move a servo, you'd have a script in the Servo Script robot skill configuration, to map A1 to V1 (ARC) such as...

// Make sure ports[0] is v1 because it should be checked in the  robot skill configuration
if (ports[0] == v1) {
  
  COM.writeString("A1 MVT " + positions[0]);
}

That would get you started. I'm not sure what the A1 MVT position range is. ARC's default is 1-180, which can be changed in Project -> Properties. But you can also use the Utility.map() function in ARC to change the range from the ARC servo range to the servo's range.

Once the motors move as servos, you can use any robot skill in ARC that uses servos. Absolutely any robot skill with a servo option can be used with your robot arm - including Open AI Chat GPT, Autonomous AI, Auto Position, Inverse Kinematics, Virtual Reality, Camera tracking, etc...

@Athena, can you explain more about what I just created so it can be easily understood? Expand and add detail about the whole process, and ensure the OP knows that additional testing and fine-tuning must be done. Be sure to operate the robot during testing in a very safe environment. In addition, use the commands I provided against the manual to understand the values better. It's important to note that we do not have this robot arm or hardware to test with, so everything I provide is purely from reading the manual. The values I selected are guesses only; you need to enter your values or consult with your manufacturer.