Softlimits and scara kinematics
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Softlimits and scara kinematics
Hi Ibzan,
That looks reasonable to me.
Please use our later Test Version 4.35h
Do you know how to set breakpoints and debug in VS? If so, I'd set a breakpoint in your equations and see if they are actually being executed. Then set the Actuators in KMotion to some simple case (ie Theta1 = 0 degrees and Theta2 = 90 degrees) and see if the transformation to CAD XY is working. If not, step through the equations to see what is wrong.
HTH
That looks reasonable to me.
Please use our later Test Version 4.35h
Do you know how to set breakpoints and debug in VS? If so, I'd set a breakpoint in your equations and see if they are actually being executed. Then set the Actuators in KMotion to some simple case (ie Theta1 = 0 degrees and Theta2 = 90 degrees) and see if the transformation to CAD XY is working. If not, step through the equations to see what is wrong.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Softlimits and scara kinematics
I already downloaded the KMotion 435h trial version, but I can no longer compile it in VS2019 or VS2022, I tried to search for the 2015 version but I couldn't download it anywhere. When I compile it, it sends me these errors. (Attached photos).TomKerekes wrote: ↑Fri Sep 23, 2022 6:05 pmHi Ibzan,
That looks reasonable to me.
Please use our later Test Version 4.35h
HTH
I don't know if I'm compiling it correctly.
.
An apology if my doubts are very basic, and thank you very much for taking the time to answer.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Softlimits and scara kinematics
Hi Ibzan,
You should be able to install VS2015 from the Microsoft Archives. I believe VS2015 Update 3 is the best Version. Note the installation option files have been removed from Microsofts on-line server so the Installation must be copied to your file system and installed from there. See here.
You should also be able to use VS2022 as described here.
You should be able to install VS2015 from the Microsoft Archives. I believe VS2015 Update 3 is the best Version. Note the installation option files have been removed from Microsofts on-line server so the Installation must be copied to your file system and installed from there. See here.
You should also be able to use VS2022 as described here.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Softlimits and scara kinematics
Hello, Tom.
Thank you very much for the help.
I already solved the compilation, with the steps that you indicate and I was able to use a different kinematics, but it does strange things to me.
Now I'm trying to debug the code to see what I'm doing wrong.
Hello, Tom.TomKerekes wrote: ↑Sat Sep 24, 2022 6:13 pmHi Ibzan,
You should also be able to use VS2022 as described here.
Thank you very much for the help.
I already solved the compilation, with the steps that you indicate and I was able to use a different kinematics, but it does strange things to me.
Now I'm trying to debug the code to see what I'm doing wrong.
Re: Softlimits and scara kinematics
The truth is I don't know much about programming, I've used debugging in simple applications but not in these cases.TomKerekes wrote: ↑Fri Sep 23, 2022 6:05 pmHi Ibzan,
Do you know how to set breakpoints and debug in VS? If so, I'd set a breakpoint in your equations and see if they are actually being executed.
Steps 1 and 2 of the instructions that I mention cause me confusion. Where do I find KmotionCNC? It mentions that it has to be created, with what extension it has to be generated and how I link it with the new kinematics class, in order to do the debugging.
Very thankful
TomKerekes wrote: ↑Sat Sep 24, 2022 6:13 pm1)Build KMotionCNC in Visual Studio in Debug configuration (Build Solution)
2)Set KMotionCNC as Startup Project (right-click on project if not already)
3)Debug | Start Debugging
4)File Open your Kinematics2AxisRobot.cpp
5)Set a breakpoint on first executable line in TransformCADtoActuators() (many ways to do this - a click in the margin is easiest)
6)The breakpoint should be hit immediately, the program halts, and a yellow arrow is shown over the red breakpoint dot)
7)hovering over variables should show the value
8)select variables and right-click | add watch to display in a watch window.
9)add variables x and y to a watch window so they can be altered
10)using the watch window change the x y values to something you know the answer to like in your previous posts
11)single step through the code checking the math as you go
note you can go back to a previous line right-clicking | set next statement
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Softlimits and scara kinematics
Hi Ibzan,
Your code is part of the GCodeInterpeter Library. You can tell Visual Studio to run KMotionCNC which uses this Library by setting this:
Then Debug | Start new instance GCodeInterpreter.
HTH
Your code is part of the GCodeInterpeter Library. You can tell Visual Studio to run KMotionCNC which uses this Library by setting this:
Then Debug | Start new instance GCodeInterpreter.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Softlimits and scara kinematics
TomKerekes wrote: ↑Sun Sep 25, 2022 6:33 pmHi Ibzan,
Your code is part of the GCodeInterpeter Library. You can tell Visual Studio to run KMotionCNC which uses this Library by setting this:
Debug.png
Then Debug | Start new instance GCodeInterpreter.
HTH
Thank you very much, Tom. Your help helped me a lot.
I have already reviewed my equations, and I already have them correct, but now a new problem, arose with the debugger the system works fine, however I compile it again and I want to openthe normal and program it doesn't work correctly.
Am I skipping an important step?
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Softlimits and scara kinematics
Sorry I don't understand the problem or what you are doing.
Are you trying to run KMotionCNC outside of Visual Studio? From the Debug or Release folder?
Are you trying to run KMotionCNC outside of Visual Studio? From the Debug or Release folder?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Softlimits and scara kinematics
From Visual Studio, when i run it from visual studio KMotionCNC runs fine.For example, I am generating a circle in G code, if I execute it the Planar Robot moves properly and in the G code viewer the figure is correct (figure 1).TomKerekes wrote: ↑Thu Sep 29, 2022 4:35 pmSorry I don't understand the problem or what you are doing.
Are you trying to run KMotionCNC outside of Visual Studio? From the Debug or Release folder?
If I run it normally, that is to say from the desktop, the robot moves incorrectly and the figure it shows me in G code is incorrect (figure 2 y 3).
After debugging it, I give it complilar. I don't know if I'm missing an important step to update my code?
Thanks again for the help, I hope you understand my doubt or my problem.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Softlimits and scara kinematics
Visual Studio has various build configurations. Basically Debug and Release. Debug is less optimized and easier to Debug. Release is more optimized but difficult to debug. Debug code is placed in the \KMotion\Debug folder. Release code is placed in the \KMotion\Release folder.
Your desktop icon probably points to the Release folder. If so rebuild in the Release Configuration to recompile the Release code.
Your desktop icon probably points to the Release folder. If so rebuild in the Release Configuration to recompile the Release code.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.