GCode not getting it for M58 macro <resolved>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
tcrist
Posts: 16
Joined: Mon Jul 15, 2024 6:15 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

GCode not getting it for M58 macro <resolved>

Post by tcrist »

I am just trying to assign CNC12 macros to functions such as "raise the dust hood" on my output relay board. I wrote this test macro. Fired everything up, homed the machine, but I don't see Relay 5 changing state. What am I doing wrong? (note: I tried M95/5 also just in case my logic was swapped - no result).

;------------------------------------------------------------------------------
; Filename: mfunc58.mac - To run from VCP AUX 15 key, set CNC12 p294 = 5811
; M58 macro
; Description: User Customizable Macro
; Notes:
; Requires: Machine home must be set prior to use.
; Please see TB300 for tips on writing custom macros.
;------------------------------------------------------------------------------

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

;M225 #100 "This is an example macro named mfunc58.mac and can be found in ..\cncm or ..\cnct\nEdit it to include the desired functionality. Press Cycle Cancel/ESC to Exit"

N100 ;Insert your code between N100 and N1000
M94/5 ;turn o Relay 5 for output control test

;------------------Example Macro for DustFootActivate Output---------------------------
;Use Aux 10 and Aux 11 to Turn on and Off DustFootActivate Output
;M94 is used to Turn on a variable in PLC which in turn activates logic in the PLC
;M95 is used to Turn Off the variable
;Remove the ";" infront of code below in mfunc57 and mfunc58 to use

;M95 /28 ;Turn Off DustFootActivate

;------------------------------End of Example-------------------------------------------

N1000 ;End of Macro
Attachments
report_E06234435DC6-0506248223_2024-09-06_16-07-59.zip
(921.76 KiB) Downloaded 2 times


Sword
Posts: 836
Joined: Fri Nov 30, 2018 1:04 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Thorp WI

Re: GCode not getting it for M58 macro

Post by Sword »

By the looks of your report, I believe you have relay #2 set for "DustFootActivate", which is toggled on/off with M94/28 and M95/28. The M94/# M95/# does not reference the relay #.
Scott


tcrist
Posts: 16
Joined: Mon Jul 15, 2024 6:15 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: GCode not getting it for M58 macro

Post by tcrist »

I was working off the wrong set of G-Codes. I now see outputs are controlled by M6x/M8x where ON for output 1 is M61 and OFF is M81, etc. Seems to be working now and makes sense. Thanks @sword.


Post Reply