Asked — Edited

Changing The Max And Min Pulse Width Values

Hello, I'm using the ARC system to control a servos with a standard Arduino Uno. I having problems with the my servo not achieving the full desired range of motion. I believe the problem is the Max and Min Pulse Width Values for controlling servo motors. I came to this conclusion after using servo library for regular servo. After changing the Min Pulse Width Values with "servo.attach(9, min, max)" I got full range of motion. Is there something similar to  "servo.attach(9, min, max)" for ARC?


Related Hardware Arduino Genuino Uno
Related Control Stepper Servo

ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

PRO
Canada
#1  

In ARC, adjusting the maximum and minimum pulse width values for servo control, similar to the servo.attach(9, min, max) function in the Arduino environment, can be achieved through the use of scripting and the servo control settings within the ARC software. However, it's important to note that ARC abstracts many of the lower-level details to simplify robot programming, so the approach is slightly different.

For controlling servos with an Arduino Uno within ARC, you're likely using the "Stepper Servo" skill or another servo-related skill. While ARC provides a high-level interface for controlling servos, including setting positions and speeds, it doesn't expose direct functions for setting pulse width values in the same way as the Arduino Servo library.

However, you can achieve a similar effect by adjusting the servo limits within the ARC software. Here's how you can optimize the servo range:

  1. Open the servo Skill Settings: In your ARC project, locate the servo control skill (e.g., "Stepper Servo") you're using to control your servo. Click on the gear icon to open the skill's configuration settings.

  2. Adjust servo Limits: Look for settings related to servo limits, such as "Min Position" and "Max Position." These settings determine the range of motion that ARC will use when sending commands to the servo. Adjusting these values can help you achieve the full desired range of motion for your servo. Note that these settings may not directly correspond to pulse width but rather to position limits within ARC's framework.

  3. Use Scripting for Fine Control: If you need more precise control over the servo beyond what the skill settings allow, you can use ARC's scripting capabilities (EZ-Script, JavaScript, or Python within ARC) to send custom commands to your Arduino. This approach requires a bit more setup, as you'll need to ensure your Arduino code can interpret and act on these commands.

  4. Arduino Code Modification: Ensure your Arduino code (running on the Uno) is prepared to receive and interpret commands from ARC for servo control. You might need to write custom Arduino code that listens for serial commands from ARC and adjusts the servo pulse width accordingly.

Remember, the "Stepper Servo" skill is designed for controlling stepper motors as servos and might not directly expose pulse width adjustments for traditional RC servos. If you're working with RC servos and need precise pulse width control, consider using a different skill or approach within ARC that better suits RC servo control, or directly interfacing with the Arduino code for low-level control.

If your project's requirements extend beyond the capabilities provided by the existing ARC skills, you might consider creating a custom skill or using the "Script" skill to implement more complex logic and control strategies.


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.