M07 - Mist Coolant ON
Normally M07 function is the simplest PLC procedure. It should just turn ON 1 relay and exit. PLC source code will look like -
Output #5 is used as coolant pin.
According to smart programming books it is a good style to avoid direct numbers in source code (portset(5)) and use variable or define names instead.
In this case source code will be
name “OUT_COOLANT is defined in “vars.h” file which is included in the first line.
#define OUT_COOLANT 5