ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

#65  

Yes, you're right this will be a tedious operation. I moved the code to the cmd==1 and ran it. No leds turned on, not even the Rx. Ran a loop program to 5000 back to 1 and back to 5000 etc to observe it and no leds came on at all. Before I continue with each is this what you were looking for whereas it doesn't turn on?

User-inserted image

Am I supposed to hook up an led to pin 13 and ground side of led to ground?

PRO
Synthiam
#66  

When you read the comments of cmd 1, what does it say it does? I’m looking at your screenshot and it doesn’t say anything related to your test. :)

each cmd condition is a different function of the stepper controller. Hint: if you’re testing movement, you’ll want to put that code in the cmd condition for moving

PRO
Synthiam
#68   — Edited

I don’t believe there is a ControlCommand for speed. You’ll have to check the cheat sheet. I believe the speed is a servo function.

setspeed

or in advanced servo settings

or just move the led code to the cmd for where the position is moved. No point to test something you don’t use.

#69  

This was a very good exercise! I delved in to the speed cmd==2 with EZScript and see exactly what is happening with the debug light. It does toggle on and off each time it receives a script and works great! This speed script will come in handy and will save on script writing which I had to do to slow stepper down recently to very accurately find an edge. I moved the debug led code under the cmd==5 for calibrate and the script is definitely is not getting there and same is happening with Homing as the built in debug led is not turning on for V8 but I can see it is trying to transmit on V1 with the Tx light coming on. Since the servoSpeed( V8, 5) is working with EZScript is there a similar code for homing. I looked around on the cheatsheet and did not see anything.  On a side note tried to put speed script into the new Javascript block but the code is in EZScript so it doesn't go. An upgrade for future may be to add an EZScript block. I used the ControlCommand to get around this in my loop code in Blockly. Getting closer.

PRO
Synthiam
#70  

Your lesson isn’t done:) because you’re talking ezscript and trying to merge with Blockly which is JavaScript. So what you’re missing is the support section that has all the commands. Here’s the JavaScript command for setting speed: synthiam.com/Support/javascript-api/Servo/setSpeed

that being said, Blockly already has a speed block for servos. So you can just use that without typing the code.

#71  

Tried it and both of the items worked great. Looked up the setAsHome in Javascript and did not see any. What would the code be?