Hello Guest it is March 28, 2024, 06:37:08 PM

Author Topic: How to set Actual/Current Velocities from Plugin  (Read 5364 times)

0 Members and 1 Guest are viewing this topic.

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

 

Offline BR549

*
  •  6,965 6,965
    • View Profile
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
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

Offline BR549

*
  •  6,965 6,965
    • View Profile
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
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
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
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

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
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
Re: How to set Actual/Current Velocities from Plugin
« Reply #7 on: September 29, 2011, 10:31:55 AM »
Art,

Exactly.

THANKS!
TK