@Athena, could you help me develop an ARC JavaScript program using the Sketch Pad robot skill to plot the movements of a large gantry machine that I have constructed?
The machine operates with the following axes:
- X-axis: Controlled by servo V1, with a range from 1 to 130,000.
- Y-axis: Controlled by servo V60, with a range from 1 to 100,000.
- Z-axis: This axis manages the up and down movement, with a range from 1 to 140,000.
I would like the program to utilize the Sketch Pad robot skill to visually represent the movements of servos V1 and V60. Specifically, I want the Sketch Pad plot to display in blue when the Z-axis value is less than 42,000, indicating that the machine is moving to the next location without cutting. When the Z-axis value is greater than 42,000, the plot should be in green, signifying that the machine has lowered and started cutting. Additionally, I would like the lines representing these movements to be wide enough to be easily visible.
Thank you for your assistance!
We have moved your comment into its own thread to get the attention it deserves from the Athena AI. We also edited your question to add specifics which will help Athena with details, such as using servos functions and using the sketch pad robot skill.
@athena please perform the request.
To create a JavaScript program in ARC that uses the Sketch Pad robot skill to plot the movements of your gantry machine, we can follow these steps:
Here's a sample JavaScript program to achieve this:
Explanation:
CanvasDrawLine
command draws a line between two points with a specified thickness and color.updateSketchPad
every 100 milliseconds to update the drawing based on the servo positions.Notes:
CanvasDrawLine
command's parameters include the line thickness and color, which you can adjust as needed.Feel free to modify the code to suit your specific requirements or let me know if you need further assistance!
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.
@Athena I think you may have forgot something you taught me about 6 months ago. The canvas is only 2 to the 16th power so these numbers that I wanted to use will not work for it. A simple solution is to just scale it to half size and it will be ok. Here is what you wrote. I had a problem with it because it did not accept the ControlCommand for some reason, I think it may have been a negative number or something. I could not shut it off and had to delete it.
*Note: Above Post edited to add code tags for correct formatting.
@athena please answer the question
Thank you for pointing that out! Let's address the issue with scaling and ensure the control commands are correctly implemented. We'll also add error handling to prevent negative values.
Here's an updated version of the JavaScript program:
Key Changes:
scalePosition
function now takes the maximum position as a parameter to accommodate different ranges for X and Y axes.x
andy
are within the valid range of 0 to 32767 before plotting.Notes:
controlCommand
function should be used with the correct skill name, which is"Sketch Pad"
in this case.Feel free to adjust the code further or let me know if you need additional assistance!
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.
I follow what you are doing and understand it, just haven't had a chance to experiment and verify it yet but it looks like it should work nicely. Thanks.
You can also use servo Sketch 3d robot skill: https://synthiam.com/Support/Skills/Graphs/Servo-Sketch-3d?id=22646
@athena explain how he can use the servo sketch 3d robot skill.
Certainly! The Servo Sketch 3D robot skill is a fantastic tool for visualizing servo movements in a 3D space. It can help you track the positions of your servos in real-time, providing a dynamic view of your gantry machine's operations. Here's how you can use it:
Setting Up servo Sketch 3D
Add the Skill to Your Project:
Configure the servo Ports:
Adjust the Global Max servo Positions:
Visualize the Movements:
Interactive Controls:
Control Commands:
controlCommand("Servo Sketch 3D", "Clear")
to clear the current scene.controlCommand("Servo Sketch 3D", "TopView")
to move the camera to look at the scene from the top.Benefits
Feel free to experiment with the Servo Sketch 3D skill and let me know if you have any questions or need further assistance!
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.
I like this 3d feature and was kinda hoping/poking around to see if this was available within ARC. Will be spending some needed time on this skill this weekend and getting real good at it. This has many beneficial attributes that I can already envision using. 3d compared to 2d now we're talkin, thanks.
I was trying to calibrate my gantry this morning

but could not because servo sketch 3d already owns it. I had to delete the skill for now so that it would let go. It worked as usual after that. I think you may need a pause button to disable it when you're not using it.That’s not what the error means. Without seeing the code it’s impossible to diagnose
DJ is correct. That error message is not what you think it is. It's an internal error from the Microsoft Windows thread pooling design. It appears some code is not correctly invoking on the main thread in one of the robot skills. Without seeing the code that you used or understanding what it was that you were doing, it's impossible to diagnose. Provide as much information as possible, including the code, what robot skills were used in the project, etc.
It may have had something to do with updating ARC and then Windows wanted to do an update at the same time and I clicked on it without thinking about it. I did try shutting down the whole computer and tried to calibrate V60, V63, V1, V61. For V60 V63 it calibrated just fine but on V1 and V61 it gave me this error. I had a lot of things that I wanted to accomplish today so tried different things then deleted the skill temporarily and then it calibrated properly. I was using the Stepper servo skill. It may work properly tomorrow when I bring servo sketchpad 3d back up just didn't have time keep working on it today.
I noticed an update was done to the servo sketch 3d. I think there was a fix in there for a cross-thread call. If you update the robot skill when you load arc, it shouldn't happen again.
Today's project was to cut 9 stringers for stairs. I tried to get 3 at a time on the table but one of variables didn't want to play nice and made things tougher. Will get 3 at a time in the near future. The programing was about 1 1/2 pages with over 20 variables and it worked nicely and was very precise. It takes about 13 minutes per stringer
Woo that's awesome! Thanks for sharing. Those do look cut really good. You'll be able to build a stairway to heaven with that many stringers! You can definitely get in the business of selling stringers.
Thanks DJ, have thought about that and making Ipe spindles with the automated lathe. This is just a starting point for this gantry machine. Now that I've done somewhat of a deepdive on programing on this how about cutting up full sheet of plywood to various sizes and many other things. I want to take this 16' gantry and see if I can make an automated food fulfilling system like chipotle. Just get the recipe and then just fill the order, seems pretty straightforward to me. Many different things like that, it just goes on and on. I guess I just like the challenge of it all. It's Sunday after 4 been partaking of some drinks...
As far as the accuracy, the motors are very accurate with 20k pulses for 1 inch of movement. I used a dial indicator to fine tune the squareness of the blade to the cut. I started with a laser attached to the blade which got me close so I set it at 31k but when I used a dial indicator to get it within a couple thousands had to change the setting to 30785. Some things boil down to backlash within the gears. On this one didn't want to get to carried away by the minor backlash, just get it working then can get higher precision items later. I did get it programmed for 3 locations on the table so now just set it up sit in living room with camera on phone and then change them 39 minutes later (which will be automated later).