Hello
Guest
it is
May 06, 2025, 04:33:05 PM
Guest
Login
Register
Menu
Home
Help
Search
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
Mach SDK plugin questions and answers.
/
How to set Actual/Current Velocities from Plugin
« previous
next »
Print
Pages:
1
Go Down
Author
Topic: How to set Actual/Current Velocities from Plugin (Read 9057 times)
0 Members and 1 Guest are viewing this topic.
TomKerekes
13
How to set Actual/Current Velocities from Plugin
«
on:
September 21, 2011, 07:27:53 PM »
Can anyone tell me how to set the current measured velocities from our controller Plugin into Mach3?
These would be the OEMDROs numbered 806 - 811 and 813 (Blended).
I've tried setting almost every variable in the Engine and MainPlanner that could possibly refer to a "Vel" with no effect. I've also tried setting the DROs directly.
Any help GREATLY appreciated.
Thanks
TK
Logged
BR549
6,965
Re: How to set Actual/Current Velocities from Plugin
«
Reply #1 on:
September 21, 2011, 11:27:43 PM »
TOm , not all DROs can be written to from script. The general rule is IF you can type in a number hit enter and it does not stick THEN you cannot write to it from script either.
Hope that helps, (;-) TP
Logged
TomKerekes
13
Re: How to set Actual/Current Velocities from Plugin
«
Reply #2 on:
September 22, 2011, 12:11:24 AM »
Yes I noticed those were read only from VB so I didn't expect SetOEMDRO would work from a Plugin, but I thought it was worth a try.
I assume some variable needs to be set but for the life of me I can't find it. I tried all these:
m_Engine->Axis[0].CurVelocity=10000;
m_Engine->Axis[0].MasterVelocity=10000;
m_MainPlanner -> XVel = 1000;
m_MainPlanner ->BlendVel = 1000;
MainPlanner->DiffX = 1000;
MainPlanner->VelStore[0] = 1000;
MainPlanner->Vels[0] = 1000;
MainPlanner->m_RealVelocity[0] = 1000;
But no luck.
Any help please?
TK
Logged
BR549
6,965
Re: How to set Actual/Current Velocities from Plugin
«
Reply #3 on:
September 22, 2011, 01:33:33 AM »
Tom I will dive into to it and see what I can find. This may be something that Brian only knows. Or Art but he is on vacation(;-) luckydog.
(;-) TP
Logged
Brian Barker
3,860
Re: How to set Actual/Current Velocities from Plugin
«
Reply #4 on:
September 28, 2011, 01:57:14 PM »
the best way to read the data would be to look at the DRO but if you would like you can read the MainPlanner->XVel var This is an output not something that you can write too. Is that any help
thanks
Brian
Logged
Fixing problems one post at a time
www.newfangledsolutions.com
www.machsupport.com
TomKerekes
13
Re: How to set Actual/Current Velocities from Plugin
«
Reply #5 on:
September 28, 2011, 02:07:55 PM »
Hi Brian,
No I'm trying to set the Velocity that Mach3 reports on the screens. Our controller/plugin knows the current velocities and actual feedrate. Our customer has current screen sets that just always report zero. He says other plugins are able to do this correctly. You are right I think I tried writing to that XVel variable and it just always gets reset back to zero so there must be some other source.
Thanks
TK
Logged
ART
1,702
Tough as soggy paper.
Re: How to set Actual/Current Velocities from Plugin
«
Reply #6 on:
September 28, 2011, 03:57:19 PM »
Hi:
Off the top of my head, I believe you set m_Engine->StatLast[axis] to an integer number of steps taken in the last 200ms..
Art
Logged
TomKerekes
13
Re: How to set Actual/Current Velocities from Plugin
«
Reply #7 on:
September 29, 2011, 10:31:55 AM »
Art,
Exactly.
THANKS!
TK
Logged
Print
Pages:
1
Go Up
« previous
next »