PRO
Sproket
USA
Asked
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
Movement panels respond to movement commands.
read: synthiam.com/Support/ARC-Overview/movement-panels
here’s example for JavaScript: synthiam.com/Support/javascript-api/Movement/forward
And movement commands you’ll find in the manual for your selected scripting language. Support section is your friend.
also, view available ControlCommand by reading the manual. You can’t makeup your own control commands. You can’t guess them. There’s faculties to code available control commands.
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.
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: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.
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.
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.
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.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.
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.
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.
My bad got it to work. The code was in the EZ Script tab not JavaScript tab in settings. Geezz