WinCNC gcode, 'define=var,value' in gcode

I’m writing a post processor with custom parameters to make use of existing WinCNC macro files such as M61 torchON.

Question: In the gcode that produce, can I use a ‘define=var,value’ stmt format to set either unique or internally defined variables before invoking such macros as M61 ? Internally defined vars such as THQ and others in the Internally Defined Variables list on page 132+ of WinCNC V3.1 manual.

If not, then how are such Internally Defined Variables set in gcode prior to invoking a macro command, other than from the WinCNC Operator Console via pre-defined material / cut params selection ?

I’m writing this pp for a mutual client, I don’t have access to a WinCNC physical controller otherwise. I tried downloading their demo version of WinCNC but the download is blocked by an errant php web form. I have an email into WinCNC support desk so perhaps an answer on Monday unless someone here as done this already.

I have since received email and had a phone call with WinCNC customer support. In the current release of their v3.1, define=var,value is not supported from within the gcode file, only from CNC.MAC file. However, based on our inquiry and related use cases, WinCNC will consider adding this feature or something similar in the future. That’s encouraging.

The use case we have at Sheetcam for such a feature is to offer our customer base, and as such mutual customers with WinCNC, the option to use Sheetcam as the single and ‘master copy’ of all cut parameters, as these parameters and gcode would be defined in Toolsets, Operations, and Path Rules. This is how the rest of our customer base operates. As it is now with WinCNC, there are two copies of cut parameters, one copy in WinCNC material selection file(s), and a second copy of most parameters in Sheetcam Tools, Operations, and some limited Path Rules as is normally the case. Also, not all Path Rule conditions and desired gcodes can be used in the current interface with WinCNC, that limitation would be removed also.

This is important to us and our mutual customer base since keeping two separate copies of cut parameters can lead to them easily and mistakenly getting out of sync with each other, which leads to wasted material cuts and potential damage to the CNC machine via collision.

I’ll update this thread if the Sheetcam / WinCNC interface changes as expected.

As for the WinCNC demo install not being available for download, they are fixing that as well.