Hello Guest it is May 13, 2021, 02:59:32 AM

Author Topic: Mach4 script  (Read 819 times)

0 Members and 1 Guest are viewing this topic.

Mach4 script
« on: December 10, 2017, 04:48:04 PM »
Hello !

I am new there. Need your help.

So. If i call code M311 for example, this code activate OUTPUT5 and wait time in DRO. When this time go out deactivate OUTPUT5.

Can anyone do script for me. please
Re: Mach4 script
« Reply #1 on: December 10, 2017, 09:31:25 PM »
not sure exactly what you are looking for, but this will get you started.
Code: [Select]
    function m311()

  local hReg = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)

  local rc = mc.mcSignalSetState(hReg, true)


if (mc.mcInEditor() == 1) then
I started you off by putting the above code in a text file and changed the extension to .mcs (attached) and which you can put it in your profile's "macro" folder.
it will turn on output5 when you call M311

You can than refer to the "Scripting Manual" in your Mach4 Docs folder to edit and refine the script to do what you want it to.