Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: smallpoul on January 10, 2020, 09:02:51 PM

Title: Link script to m8 and m9 command
Post by: smallpoul on January 10, 2020, 09:02:51 PM
I have create a m1000 and m1001 command to send http command to a smart switch for my dust collector. Everything work good but i will like to use the flood command so i was thinking to add m8 and m9 to the macro folder with my script but it does not work, what could i do to trigger m1000 when m8 is activate and m9 to m1001 when it desactivate.
Thanks
Title: Re: Link script to m8 and m9 command
Post by: TPS on January 11, 2020, 11:17:37 AM
you can not "customize" M8/M9 macro, but
you can use macropump and GETOEMDRO(13) (Floot ON) to send your http commands.
Title: Re: Link script to m8 and m9 command
Post by: joeaverage on January 11, 2020, 07:25:27 PM
Hi,
in Mach4 you can overwrite an existing m8/m9 with your own version, but not in Mach3.

Craig
Title: Re: Link script to m8 and m9 command
Post by: smallpoul on January 12, 2020, 02:52:55 PM
I came with this code for the macro pump:
Code: [Select]
Dust_status = GetOEMLed(13)
Dust_Var = GetVar(500)

If Dust_status = -1 Then
If Dust_Var = 0 Then
message "Dust collector change to ON"
SetVar(500, 1)
Else
message "No change"
End If
End If

If Dust_status = 0 Then
If Dust_Var = 1 Then
message "Dust collector change to OFF"
SetVar(500, 0)
Else
message "No change"
End If
End If

Now how from the macropump i could execute the m1000 and m1001 command

Thanks
Title: Re: Link script to m8 and m9 command
Post by: TPS on January 13, 2020, 08:27:20 AM
do not call a macro from a macro, yust copy yout code from M1000/M1001 into macropump.