Skip to content
Contact Get Started

What Your Code Owns

A package ships to every machine of its kind and is updated after those machines are running. Your logic sits beside it in the same project and no update touches it. That holds while both halves stay on their own side of one line.

A package knows a condition. It does not know a mechanism.

A condition is true of any machine of this kind: the operator wants 80% feed, the tool is clamped, the guards are shut, the spindle is running. A mechanism is how your machine makes that true: which terminal, which valve, how many bits, how long the contact bounces.

The line runs through a capability, not around it

Section titled “The line runs through a capability, not around it”

Tool change is the worked example:

One capability split by a heavy vertical line. On its left, under the heading the package knows a condition, four blocks: the M06 dispatch, the claim and done handshake, the alarm when nobody answers, and the spindle interlock. On its right, under your code knows the mechanism, four more: the arm and the piston, the cover, the drawbar, and how long each step may take.

Four tests for a decision you are about to write

Section titled “Four tests for a decision you are about to write”

A decision belongs on your side when it does any of this:

The decisionWhy it is yours
reads a raw input and decides what it meansdecoding, debouncing, edge shaping, or combining several signals into one meaning
assumes a topology or a device countso many bits, one-hot, this many valves, a fixed polarity, this sensor exists
holds a time that is a mechanical propertya settle dwell, a brake engage time, a pump run-on, a line priming delay
names a devicea drive model, an I/O card, a terminal, a sensor part number

A protocol timeout against a stated heartbeat is not a mechanical property, and stays with the code that speaks the protocol.

Wherever a machine could need to insert itself, a package publishes a fact and consumes a fact rather than finishing the job inside itself. Those facts are the surfaces:

DirectionSurfaceWhat it carries
you writeGVL_Configthis machine’s structural values, written before any package program runs
you writeGVL_Machinethe conditions the packages gate on: clamped, guards shut, door shut, subsystem busy, M code claimed
you writeGVL_Machine.CoolantLevelLow, .ProbeOvertravel, .AirPressureLowtrouble the packages annunciate, named so that publishing nothing means nothing to report
you writeGVL_Machine.ToolPresent, .WorkpiecePresentannunciation only, so the panel can show them on any machine
you writeGVL_Iothe panel buttons and the handwheel count, mapped by your own PRG_IoMapping
you writeGVL_Channel.FeedOverride, GVL_Axes.Mpg*what the operator asked for, from the panel
you writeGVL_Machine.SpindleOrienteddrive-confirmed orient, read while GVL_Spindle.OrientConfirmEnabled
you declareST_PeripheralReadera scanner or a serial device on the control’s port. The control opens it while Connect is TRUE and delivers each reading to Text; what the reading means is yours. See External Program Selection
you callMC_ProgramSelectthe program this machine wants selected, by name. How it learned the name is yours; Done means the kernel loaded it
you readGVL_Spindle.Running, .DirCwCmd, .DirCcwCmd, .CommandedRpmthe drive-neutral spindle command. Wires, telegrams and analog scale are yours
you readGVL_Coolant.CoolantFloodOn, .CoolantMistOnwhat the program asked for. Valves, pumps and priming are yours

A sensor that is not wired yet is still your side

Section titled “A sensor that is not wired yet is still your side”

An unwired input reads whatever the terminal floats at, and a machine is not finished all at once. So the flag that says what is connected is yours, folded into the fact you publish, and the package cannot tell the difference:

GVL_Machine.GuardsClosed := GVL_PhyIo.Phy_DI_GuardClosed OR
NOT GVL_MachineConfig.GuardInterlockEnabled;

Machine configuration and IO mapping, the two starting files CNC Core hands over, are where those flags and these lines live. Keeping the flag on your side is also what lets you have one for a sensor no package ever imagined.

It will not read your terminals, name your devices, or hold your timings. A capability that looks half-finished from the outside is the seam: the package carries the part that is true of every machine of this kind, and stops where yours begins.

  • Modules: the starting files, and what happens to them when a package moves on.
  • PLC: how logic reaches motion.
  • HMI Project: the screens bound to these same variables.