Ken Rychlik wrote: ↑Mon Apr 08, 2019 7:59 pm
Are you just using one output for opening and closing the chuck? Say for instance, it is output 4
Using Mick's method.....
Your macro could be something like
M64 (turns on ouput 4)
G4 P2 (2 second pause)
M84 (turns off output 4)
That's all I'm doing. I'm new to this and some of the macros looked pretty intimidating. If it's that simple, I'm a happy man.
Would that macro result in an auto off for the output? Right now my open/close sequence looks like this:
m35- output seven turns on (hydraulic solenoid activates to open chuck)
m36- output seven turns off (solenoid is inactive)
m33- output eight turns on (hydraulic solenoid activates to close chuck)
m34- output eight turns off (hydraulic solenoid inactive)
What I'd like to have happen and what the wizard says should happen is:
chuckopen m14- output seven turns on (hydraulic solenoid activates to open chuck)
The wizard instructs to go to parameter 992 to set the auto off timer for the m14 command. Since this isn't working, I'd like the result of the single M-code to be this:
OpenChuck M14: output turns on for 2 seconds and then turns off automatically.
CloseChuck M16: output turns on for 2 seconds and then turns off automatically.
If this is my starting macro...
;------------------------------------------------------------------------------
; Filename: mfunc64.mac
; Wizard OUTPUT4 M-code Macro: M64
; Description: User Customizable Macro
; Notes: Use Acorn Wizard i/o map to set Acorn Output 4 = to "OUTPUT4" then this macro (M64) will turn on that output
; Requires:
; 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
N100 ;Insert your code between N100 and N1000
M94 /64 ;Request OUTPUT4
N1000 ;End of Macro
Would this be what my finished macro would look like?
;------------------------------------------------------------------------------
; Filename: mfunc64.mac
; Wizard OUTPUT4 M-code Macro: M64
; Description: User Customizable Macro
; Notes: Use Acorn Wizard i/o map to set Acorn Output 4 = to "OUTPUT4" then this macro (M64) will turn on that output
; Requires:
; 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
N100 ;Insert your code between N100 and N1000
M94 /64 ;Request OUTPUT4
G04 P2
M95 /64
N1000 ;End of Macro
Thanks! My big concern is that during MDI operations I will forget to shutoff one of my open/close inputs before activating the opposite. Both sides of the solenoid would be receiving current.