If the start of the program generator is to be dependent on the actual value, the start condition of the program generator must first be set in the smartWARE Setup.
Under
The actual actual value to which the configuration refers must be transferred in the PLC code for the corresponding program generator. In the following example, the fixed value 20 is specified to program generator 1 for the actual value. However, the value for the actual value can also come from a variable such as from the analogue input module.
// Example to set actual value
stOem.astProgramGenerator[1].stIN.stToleranceBand.rActualValue := 20; // fix value or variable
If the program generator is now started, the program generator starts the program at the point where the actual value and setpoint 1 cross.