2.5 Order of "plcRun"
This function is major procedure of PLC, it takes care signal state procedure, alarm procedure, machine panel procedure, M code procedure, S code procedure and T code procedure. Usually, same procedures put in the one area and in order as below figure:
void PLCAPI plcRun(struct Status &sts, struct PlcBlock &plc){
.
signal state procedure
alarm procedure
machine panel procedure
M code procedure
S code procedure
T code procedure
emgency procedure
signal state save procedure
stage machine procedure
}