Libraries
A library is a package of ready code the PLC project compiles in. PLC Libraries lists what
is installed with a tick against each one, and the tick is the whole of adding it: there is no
file to import and no path to name. What the tree does not say is what follows.
The CNC packages are not in this tree
Section titled “The CNC packages are not in this tree”A package that belongs to a product is a module, and modules are listed on Modules. So
PLC Libraries holds the plain libraries: motion, standard, system, and the Built-in row,
which is the compiler’s own functions and type conversions and is available to every project.
| Package | What you call from it |
|---|---|
Motion_Core | one axis: power, home, the moves, the reads, parameters |
Motion_Channel | the channel: select a program, cycle start, feed hold, override, mode, block search |
Motion_Coordinated | the group as one: enable, linear moves, halt, stop, reset |
Motion_Group | building the group: adding and removing an axis |
Motion_Camming | cam table select, cam in, cam out |
Motion_Applications | MC_Jog |
Standard | timers, counters, triggers, PID, signal shaping, and the blocks that raise an alarm or a message |
System | the real-time clock and the time functions, and ST_PeripheralReader, the type a scanner or a serial device on the control’s port is declared with |
Each block’s own declaration face is in the tree under its package, which is where its inputs, outputs and their types are read.
Ticking a package does not tick what it needs
Section titled “Ticking a package does not tick what it needs”Library Info states what a package depends on under Depends on:, and the tick is left to
you. Motion_Channel compiled without Motion_Core fails at build rather than at the tick.
A module is the exception: adding one on Modules brings the plain libraries it needs with
it, because they are not a choice about what the machine is.
A package’s code is read-only
Section titled “A package’s code is read-only”Every object a package ships is listed in its own folder and is fully readable, and none of it can be edited. That is what lets a package be updated on a machine in the field. The files you edit are the starting files a module hands over, and they are yours from the moment they land.
Every program needs a place in the cycle
Section titled “Every program needs a place in the cycle”A package declares the slot each of its own programs runs in, so an update to a growing package
never touches your ordering. Your own programs are placed on Call Order, where package rows
are read-only and this machine’s rows move with the arrows.
A program with no slot is not scheduled at the end. The build stops:
This program has no place in the cycle:
PRG_Yours. Open PLC Task and give it a place in the call order.
Where to go next
Section titled “Where to go next”- Modules: the packages that make up a machine, and the files they hand over.
- What Your Code Owns: the line between a package and your logic.
- PLC: how logic reaches motion.