Hi Bradley,
The KFLOP Axis Channel member variable last_vel is the current velocity of an axis in counts/sec.
So something like the attached program may work for you.
Regards
Hello, I've got a Plasma CNC system with a THC running with open loop stepper motors. I want to control my THC sensor based on the feedrate. In other words shut off the THC when the feedrate falls below a certain percentage. In order to do that, I believe, I would have to read or calculate the velocity in real time and activate or deactivate the output pin that turns on and off the THC depending if the feedrate has fallen below a certain percentage.
So what I am not sure is if there is a KFlop function that can read the velocity. Or calculate the velocity based on distance moved and time elapsed. Put all of this in a watchdog routine... any suggestions.
Thanks,
Bradley
Similar Threads:
Hi Bradley,
The KFLOP Axis Channel member variable last_vel is the current velocity of an axis in counts/sec.
So something like the attached program may work for you.
Regards
Regards
TK http://dynomotion.com
Hello Tom,
Thanks for the reply
I wanted to ask you a question. I'm using Mach3 so I am trying to find a way to pass the Overidden feedrate DRO from Mach3 since the feedrate on my plasma machine will vary depending on the thickness of the plate I'm cutting. I thought I could use Mach3 Plugin - Passing DROs
Mach3 Plugin Passing DROs
but the Overidden feedrate DRO has an OEM code 55. Not sure if I can use Mach3 plugin since I believe the Mach3 Plugin can pass 1-50 user code.
I edited the code you attached to include recieving the dro but its not passing the DRO values. Any ideas how I could pass the overidden feedrate.
thanks,
Bradley
Hi Bradley,
Can't you use Mach3 CBasic to copy the DRO from the Mach3 DRO to a User DRO and then download that to KFLOP?
Regards
Regards
TK http://dynomotion.com
Just wanted to post an update and thank Tom for his help. I'm a bit rusty on my programming skills. Ignore watch_velocity2.txt it has some programming mistakes.
The corner rounding routine seems to be working great. I don't have the problem of the torch tip diving into the metal plate when piercing and at the end of a cut... also when going around corners, so the life span of my torch tips has gone up considerably. Attached is the code I am using now.
I'm thinking it would be better if I could get the feedrate and feedrate override values from within KFLOP instead of having to pass it from Mach3. But not sure where it is stored.
thanks,
Bradley
Hi Bradley,
Thanks much for posting the code.
Is there a problem with downloading the Feedrate from Mach3? None of that is actually stored in KFLOP. That is all handled by Mach3 internals. All KFLOP receives is steps to move to at periodic times.
Regards
Regards
TK http://dynomotion.com