Asked

Calling Custom Movement Panel In Script

Hello All,

How do I call motor movement in a script using the custom Movement Panel for 2 motors? The motors respond and work as desired in the custom Movement Panel by using the arrows. I do have a Dual Hbridge with no PWM(4 wire) but motors run to fast that is why Im using a custom movement panel.

I have tried this with no success- ControlCommand("Movement Script Config", "Forward")

ControlCommand("Custom Movement", "Forward")

My forward config looks like- Set(D2, Off) Set(D0, Off) PWM(D2, 65) PWM(D1, 62)

Thank you for looking.


Related Hardware EZ-B IoTiny

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
Synthiam
#1   — Edited
PRO
USA
#2   — Edited

This executes clean but no movement.

"Movement.forward(50, 1000)" also tried "Movement.forward()"

I have been reading before ever posting just so you know.

PRO
Canada
#3  

It seems like you're on the right track with using the Movement.forward() command. However, if the motors are not responding, there might be a few things to check:

  1. Ensure the Custom Movement Panel is Configured Correctly: Double-check that the Custom Movement Panel v2 is set up correctly and that the script commands within it are functioning as expected when you use the panel's interface.

  2. Check the Movement Panel Configuration: Make sure that the Custom Movement Panel v2 is set as the default Movement Panel in your project. Only one Movement Panel can be active at a time, and it must be configured to be the one that responds to movement commands.

  3. Verify Connections and Power: Ensure that the IoTiny is properly connected to the Dual HBridge and that the motors are receiving power. If the motors run too fast when directly connected to the HBridge, it could be an issue with the power supply or motor configuration.

  4. Script Syntax: The script syntax you provided seems to be a mix of EZ-Script and JavaScript. Make sure you are using the correct syntax for the scripting language you have chosen. For JavaScript, the syntax you used (Movement.forward(50,1000)) is correct, but it might not be executing as expected due to other configuration issues.

  5. Check for Conflicts: If you have both the Dual HBridge and Custom Movement Panel v2 in your project, there might be a conflict. You should use one or the other, not both, to control the same motors.

  6. Review ARC Documentation: Go through the ARC documentation for the Custom Movement Panel v2 and ensure that you are using the correct ControlCommand syntax. The ControlCommand should match the commands available in the Cheat Sheet within ARC.

  7. Debugging: Use the debug feature in ARC to see if there are any errors or messages that could give you a clue as to why the motors are not moving.

If you've checked all of the above and the issue persists, you may want to reach out on the Synthiam community forum with detailed information about your setup, including screenshots of your configuration, so that other users and the Synthiam team can assist you further.


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
USA
#4  

My bad got it to work. The code was in the EZ Script tab not JavaScript tab in settings. Geezz