ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

PRO
Synthiam
#1  

@athena, to add context to this question, the poster is referring to the Stepper servo robot skill (https://synthiam.com/Support/Skills/Servo/Stepper-Servo?id=21134)

Automation, man, you need to provide information about your question; otherwise, Athena will not know what you're asking. Even I didn't understand at first:). Maybe forget Athena exists and pretend you're talking to humans. Ask the question by providing information so people (or athena) know what the question is.

PRO
Canada
#2  

To set a home position for a stepper motor using the Stepper servo robot skill in ARC, you would typically use the ControlCommand() function in JavaScript to send a command to the robot skill that controls the stepper motor. The ControlCommand() function allows you to execute specific commands within a robot skill, such as setting a home position.

Here's an example of how you might use JavaScript in ARC to set a home position for a stepper motor connected to V21:

// Send a  ControlCommand to the Stepper servo skill to set the home position for V21
ControlCommand("Stepper Servo", "SetHome", "V21");

And to calibrate the stepper motor connected to V22, you might use:

// Send a  ControlCommand to the Stepper servo skill to calibrate the stepper motor on V22
ControlCommand("Stepper Servo", "Calibrate", "V22");

Please note that the actual command names ("SetHome" and "Calibrate") are placeholders. You will need to use the actual command names as defined by the Stepper servo robot skill documentation or the custom commands you have set up in your Arduino code.

If you are using an Arduino to control the stepper motor and it's connected to ARC through a serial connection, you would need to ensure that the Arduino is programmed to interpret the commands sent from ARC and perform the appropriate actions (set home or calibrate) on the stepper motor.

Make sure to consult the Stepper servo robot skill documentation for the correct ControlCommand() syntax and the list of available commands. Additionally, ensure that your Arduino code is set up to listen for these commands over the serial connection and control the stepper motor accordingly.


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.
PRO
Synthiam
#3  

*Note: I have removed the previous comments from Athena as the conversation did not make enough sense to be useful to anyone in the future:).

#4  

Ok will try to ask the questions better. The issue is if you set the middle position as SetHome it will make it position 1. Steppers can only go in positive direction so I am losing the lower half of 32k positions. I think there is an added feature or script that could be added to the map so I can tell it to be at 16k without actually moving.

#5  

@Athena explain in detail what the SetAsHome ControlCommand for the stepper servo robot skill does. Also, it suggests that automation man may benefit from a limit switch to auto-calibrate on power-on. Be very detailed for him, please.

Steppers can move in either direction. If your stepper is only moving in one direction, check the wiring.

PRO
Synthiam
#6  

Funny I was about to say the same thing:). Looks like you got it covered. Happy holidays!

PRO
Canada
#7  

The SetAsHome ControlCommand for the Stepper servo robot skill in ARC is used to define the current position of the stepper motor as the "home" position (position 1). When you issue this command, the stepper motor's current position is recorded as the reference point for all future movements. This means that any subsequent movement commands will be calculated relative to this newly set home position.

Here's how the SetAsHome command works in detail:

  1. When you send the SetAsHome ControlCommand to the Stepper servo robot skill, it communicates with the Arduino that controls the stepper motor.
  2. The Arduino firmware, which is running the Stepper servo code, receives the command and updates its internal position tracking to mark the current position of the stepper motor as position 1.
  3. This does not physically move the stepper motor; it simply redefines the current position as the home position in the firmware's memory.
  4. After setting the home position, any movement commands that specify a position will be based on this new home position. For example, if you then command the stepper to move to position 100, it will move to what it considers to be 100 steps away from the newly defined home position.

Regarding the use of a limit switch for auto-calibration, here's how it can be beneficial:

  1. A limit switch can be installed at one end of the stepper motor's range of motion, typically at the starting or zero position.
  2. When the robot or system is powered on, the Arduino can be programmed to slowly move the stepper motor towards the limit switch.
  3. Once the limit switch is triggered, the Arduino knows that the stepper motor has reached its physical limit.
  4. The Arduino can then set this limit position as the home position automatically, ensuring that the stepper motor has a consistent starting point every time the system is powered on.

This auto-calibration process is particularly useful for systems where the stepper motor needs to know its exact position before starting operation, such as in CNC machines, 3D printers, or robots that perform precise movements.

If you're experiencing that your stepper motor only moves in one direction, it's important to check the wiring and the configuration of your stepper motor driver. Stepper motors are designed to move in both directions, and the ability to do so is controlled by the signals sent from the driver. Incorrect wiring or configuration settings could prevent the motor from moving in both directions.

To implement the SetAsHome ControlCommand in JavaScript within ARC, you would use the following script:

// Send a  ControlCommand to the Stepper servo skill to set the current position as home for V21
ControlCommand("Stepper Servo", "SetAsHome", "V21");

Replace "V21" with the appropriate Virtual servo Port that corresponds to your stepper motor. Make sure that the Virtual servo Port matches the BUS ID you've set in your Arduino firmware for the stepper motor you wish to calibrate.


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.
#8  

Happy Holidays to you as well!! I will try these scenarios and am familiar with pin 6 homing at startup but it is dangerous if it is not sequenced properly through the different steppers one at a time. I think that may be the ticket. Thanks