Hello Guest it is May 22, 2019, 11:51:01 AM

Author Topic: GCode Velocity / Z axis Direction Dependent values  (Read 2960 times)

0 Members and 1 Guest are viewing this topic.

GCode Velocity / Z axis Direction Dependent values
« on: June 17, 2010, 10:29:10 AM »
I'm designing a laser system for a customer and one of the functions required is to vary the velocity and z axis depending upon the direction  of cut.....+X, -X, +Y, -Y, angles and rads.
To take it one step further, these variables may need to be changed during the cutting process.  Additionally, I will have a "database" of many different materials that will be cut and these materials will require completely different sets values.
Does anyone have any idea of the best way to implement this function, if possible?  Will Mach3 understand the different G-code commands that are required?
Thanks for any help.

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: GCode Velocity / Z axis Direction Dependent values
« Reply #1 on: June 17, 2010, 11:08:25 AM »
Dave I think what you are needing is one of the things that should be done from the CAM side.

 I don't know of any easy way to do what you need from Mach
Re: GCode Velocity / Z axis Direction Dependent values
« Reply #2 on: June 17, 2010, 03:51:10 PM »
I guess a better questions would be, what G-codes does Mach understand?  I can write a post processor but am unsure of what Mach will and won't accept.
Also, in using variables in the gcode for bi directional velocity...., is there a way to change those variables when an M01 is processed?

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: GCode Velocity / Z axis Direction Dependent values
« Reply #3 on: June 17, 2010, 05:25:10 PM »
Mach does most of the standard Gcodes . You can download a copy of the Mach manual for a general listing.

Mach does parametric Gcode ( variables)  BUT it does not do conditional gcode (If When Do while,etc)

Mach also has Brains (simple ladder logic) and can run a Macropump( VB loop running at 10hz).

ALSO I don't recall any function that can tell you the current direction of movement as MACH does not run in realtime, it runs a buffered system for the Gcode side.
Re: GCode Velocity / Z axis Direction Dependent values
« Reply #4 on: June 18, 2010, 07:24:36 AM »
Thanks for you help so far BR549.
Another couple of questions if you don't mind.
If Mach runs the g-code in a buffered manner, is this some sort of "look ahead" function which gives smooth transitions to the next block of code?
Also, if it is not running in real time, what is the polling interval of the I/O?  I ask this because I need to pulse the laser gate in 2 msec intervals.

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: GCode Velocity / Z axis Direction Dependent values
« Reply #5 on: June 18, 2010, 06:49:45 PM »
Mach does all themath to do the moves THEN sends it to a buffer that holds the preplanned moves and feed the pulses out the port.  The look ahead is basically how much data you want in the buffer.

As to I/O refresh rate it depends on what you are monitoring. The VB macropump refreshes at 10hz. Some of the other functions refresh at kernal speed. As to what is what there is no data in the manual for that info.