Hello Guest it is June 01, 2023, 01:03:37 AM

Author Topic: G96/G97 Command Structure  (Read 7880 times)

0 Members and 1 Guest are viewing this topic.

G96/G97 Command Structure
« on: October 17, 2011, 06:41:35 PM »

I have been having random results with my G96 (CSS) and G97 (RPM Mode) calls.  I use mixed CSS and RPM routines in my programs.  Sometimes it works well as programmed and sometimes it drives me nuts.  The symptoms vary but, as an example, when I switch from CSS mode to RPM mode, the spindle will run at either max or min RPM and nothing will fix it.  The general fix has been to shutdown everything and start again.

Yesterday I stumbled on the Startup Modals Check Box" Use Init string on ALL resets" for Initialization Strings and setting the string to contain "G97 S500" helped to get Mach3 out of CSS mode without shutting down.

I carried out further investigations of the structure of the G96/G97 commands in Smid's CNC Programming Handbook and on the Internet in general.  Smid's G96 example is structured G96 S45 M03 and G97 S500 M03.  Programming like this seems to have fixed my lathe's random behaviours.  My coding included the M03 (or M04) command for the first G96 call but I had assumed that the M03 was modal and subsequent M03 commands were not necessary in C97 CSS cancellations.  It appears not to be case.

I have tried to find out why the inclusion of the Spindle On (M03 or M04) in G96 and G97 calls appear to be mandatory but with out absolute clarity.

Can anyone confirm my suspicions regarding the necessity to include a Spindle On command with every G96 and G97 block?



Offline BR549

  •  6,965 6,965
    • View Profile
Re: G96/G97 Command Structure
« Reply #1 on: October 17, 2011, 09:38:51 PM »
When you make a change in function as drastic as css to rpm or reverse it is logical that the internal mechanismes HAVE to be reset and restarted even more so with a buffered system such as Mach3.

Are you saying that you cannot properly close the CSS and restart RPM with the proper commands and code sequence?? IF you can do so with the init routine (all it does is run the Gcode sequence) you should be able to do so anytime.

NOW if memeory serves me there may still be problems with CSS mode. Hood would be the one to answer that part.

ASA to the fanuc references please remember that MACH3 is NOT fanuc. Many things were changed over the years for various reasons that only Art would know(;-). Many simply because it work not work any other way in windows.

(;-) TP