What's new
What's new

Create precheck alarm

garrettec2011

Plastic
Joined
Jan 3, 2012
Location
Centerville Ia
Hey everyone.
I would like for it to alarm out if it reads a G30. The machine I would like to do it on is the only machine here that uses G91 G28 Z0. To home out. If it reads G91 G30 Z0. It will run the pallet forward and crash.
I was wondering if I would be able to create a precheck alarm on a Fanuc 18i?
 
Personally, I'd fix the G30 position that is sending z in the negative direction. There is a parameter that sets the location of the G30 position. I don't have access to an 18 manual at the moment so can't tell you which one it is.

If you don't want to do it that way and want G30 to register an alarm then you need to register G30 as a macro call and inside the macro set a #3000 alarm.
 
If you want G30 to behave as G28, simply redefine G30. No need to alarm out. Both G28 and G30 would become equivalent.
 
If you use a new number, you define a new code. If you use an existing number, you redefine an existing code.
(Mischief is also possible!)
 
I wasn't aware that I could redefine it. Ill look into it tomorrow. Thanks for everything.
Hello garrettec2011,
I'm in Vancbiker's camp and would rectify the settings for G30 to coincide with the settings of the other machines where G30 is being used.

G30 is a Second Reference position, the coordinate for which are set, as Machtool points out, in parameter 1241. The coordinate registered for the respective axis is a Relative distance from the Machine Coordinate Zero for each axis. As G28 will move the specified axes to the Machine Coordinate Zero, then to have G30 function in the same manner as G28, you simply set the value for the specified axis to Zero in parameter 1241.

If you're only using G30 to move the Z axis to the Machine Coordinate Reference position, the same as G28, then its somewhat of a waste of a function. It would make more sense to use G28 on all machines and save G30 in case its required to establish a Second Reference Position and use the G30 function as it was intended.

Whether you use G30 to raise an alarm, or have G30 execute a G28 Reference Return, you would do so as Vancbiker and Sinha have suggested and create a User Macro that is called with G30. You do this as follows:

1. Parameters 6050 to 6059 are used to register a G Code to call a Macro Program Number from O9010 to O9019 receptively.

2. Select a parameter that has a Zero registered and register the number "30" therein.

3. If parameter 6051 was available and selected, then once "30" is registered, Macro Program Number O9011 will be called when G30 is executed.

4. The following two program examples are to raise and alarm, as suggested by Vancbiker and execute G28 as suggested by Sinha, respectively.

G30 Z0 (MACRO CALL BLOCK)

O9011 (RAISE AN ALARM MACRO)
#3000=1(ILLEGAL G30 FUNCTION)
M99
%

O9011 (G30 FUNCTION AS G28 MACRO)
G91 G28 Z#26
M99
%

The biggest drawback with using G30, is, as you have found, the parameter setting may not be correct for your current application and you need to find and change it. This can also be carried out programmatically, but it simply adds further complexity for no more than complexity sake. A simpler method is to use G53 instead. The coordinates set for G53 are exactly the same as those for G30, that is, they are a distance away from the Machine Coordinate Zero. For example, if the Z axis had to be positioned at Machine Zero in Z and, say, at -300mm in X, -250mm in Y from the Machine X/Y Zero for a tool change, then the Command lines would be as follows:

G90 G53 Z0
G53 X-300.0 Y-250.0

The advantage is that the coordinates can seen in the program and therefore, no surprises when G53 is executed, and can be altered directly in the program, rather than have to find and change a parameter setting.

Regards,

Bill
 
Last edited:








 
Back
Top