We use cookies to personalize content, interact with our analytics companies, advertising networks and cooperatives, and demographic companies, provide social media features, and to analyze our traffic. Our social media, advertising and analytics partners may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services. Learn more.
I am using the Xcarve unit for a test tool where I work. I reviewed the G-code commands but didn’t find what I’d hopped for. I have two RS232 devices, the Xcarve and a load cell. I am polling the load cell as fast as I can and also polling the Xcarve using the “?” which returns a string that says it busy or not. In doing so, I lose data from the load cell. Is there a command that will have the G-code side send a “in position” type output? That way I can use an Event trap on the the serial line and have it trigger so I know to stop collecting sensor data… I programming in VB6 and doesn’t have the ability to multi-thread.
And yes, I should move on to a more up-to-date language…
I hope there is some hidden features in the G-code instruction set…
Try sending a “G04 P.1” after each move, and poll for “ok” and a CR in a loop, and when you get it the X-Carve should be in position. May be faster then the “?” command.
John
The Px is the dwell time. The syntax for the dwell is “G4 Px” where G4 is the dwell g-code, P is the command input prefix and x is the variable for time in seconds to dwell. So, to dwell for 0.1 seconds you would send “G4 P0.1”