Checking Parameter 800 in a Macro File (Answered)

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
tblough
Community Expert
Posts: 3542
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Checking Parameter 800 in a Macro File (Answered)

Post by tblough »

I'd like to check P800 (Fourth Axis Installed) in my CHCM.HOM file to skip the fourth axis homing routine if the rotary table is not currently installed. Unfortunately, it looks like the #800 series parameters are not mapped to the macro user system variables according to the 4.12 mill documentation.

Code: Select all

9000-9399 Parameter values 0 - 399
9900-9999 Parameter values 900 - 999
Can I assume that #9800 - #9899 does actually have parameters 800-899 in them?

Code: Select all

M92/Z
G91 G1 G20 Z0.120 F10.0
M26/Z
M91/X
G91 G1 G20 X-0.120 F10.0
M26/X
M92/Y
G91 G1 G20 Y0.100 F10.0
M26/Y

IF #50010 ; Prevent lookahead from parsing past here
IF NOT #9800 GOTO 1000

M92/A
G91 G20 G1 A30.596 F1800.0
M26/A

N1000
Last edited by tblough on Wed Jan 16, 2019 10:14 am, edited 1 time in total.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.


cnc_smith
Posts: 241
Joined: Mon Nov 20, 2017 10:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes
Location: Frenchville, PA

Re: Checking Parameter 800 in a Macro File

Post by cnc_smith »

tblough wrote: Mon Jan 14, 2019 5:43 pm I'd like to check P800 (Fourth Axis Installed) in my CHCM.HOM file to skip the fourth axis homing routine if the rotary table is not currently installed. Unfortunately, it looks like the #800 series parameters are not mapped to the macro user system variables according to the 4.12 mill documentation.
I have attached a modified home program that I use to check to see if the 4th axis is turned on. I call my forth axis A. At M92 and the M26 all you have to do is change the axis label if you are not calling it A axis. Rename the file to CNCM.hom. This file was used on a mill and at the end it gives you the option to center the X axis. If is commented out.

This homing program looks to check the system variable for the 4th axis to see if it is turned on. If not it skips the homing of the 4th axis.
Attachments
cncm 4th axis.hom
4th axis homing.
(575 Bytes) Downloaded 101 times
Dana

When requesting support, please ALWAYS post a current report.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61


tblough
Community Expert
Posts: 3542
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Checking Parameter 800 in a Macro File

Post by tblough »

Thanks cnc_smith. I made one small change to your code. I used the axis variable name in the actual homing routines in case the axis label was not "A".

Code: Select all

; Check for rotary table homing
IF #50010 ; Prevent lookahead from parsing past here
IF [#20104 == 78] GOTO 1000 ; "N" for 4th axis turned off

M92/$[#20104]
G91 G20 G1 $[#20104]30.596 F1800.0
M26/$[#20104]

N1000
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.


tblough
Community Expert
Posts: 3542
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Checking Parameter 800 in a Macro File (Answered)

Post by tblough »

Answering my own original question here. Parameter 800 can be used in a macro file as evidenced by the mfunc10.mac file that ships with V4.12

Code: Select all

;M10 Clamp rotary 

IF #4201 || #4202 THEN GOTO 1000
IF #50001                         ;Prevent parsing
IF #9800 == 0 THEN M94 /88        ;Disable cfg timeout timer if configuring axis
IF #50001                         ;Prevent parsing    
IF #9800 == 0 THEN M224 #100 "The 4th axis is not configured for clamping.\nEnter 1 to configure for clamping.\nEnter 2 to configure the 4th axis without clamping.\nEnter 0 to exit without configuring the 4th axis.\nPress Cycle Start to continue when done"
IF #50001                         ;Prevent parsing
IF #9800 == 0 THEN G10 P800 R#100 ;Write to 4th axis config parm
IF #50001                         ;Prevent parsing
IF #9800 == 1 THEN M94 /4         ;Request clamp
IF #50001                         ;Prevent parsing
IF #9800 == 1 THEN G4 P1          ;Wait for clamp
 

 
N1000
That said, CNC_Smith's response was actually a better solution to my problem as parameter 800 can be set to signify that the rotary axis has been CONFIGURED, but it does not guarantee that it is currently enabled. Checking the axis label does do that.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.


Post Reply