2 Instruction Descriptions
2-416
NJ-series Instructions Reference Manual (W502)
Inline ST
1 PulseOnTime:=MULTIME(PulseCycTime, MV1/REAL#100.0);
2 TOF_instance(In:=BOOL#FALSE, PT:=PulseOnTime, Q=>DO1);
3 TON_instance(In:=BOOL#TRUE, PT:=PulseCycTime, Q=>ResetPulse);
4 IF (ResetPulse=BOOL#TRUE) THEN
5 TOF_instance(In:=BOOL#TRUE);
6 TON_instance(In:=BOOL#FALSE);
7 END_IF;
8 IF ( (ATBusy1=BOOL#TRUE) & (MV1=REAL#100.0) ) THEN
9 DO1:=BOOL#TRUE;
10 END_IF;
Time-proportional output
// Calculate ON time output control value.
// Switch between ON and OFF with TOF instruction.
// Measure timer reset time with TON instruction.
// Reset timer.
// If MV1 = 100% for autotuning...
// Turn ON the output immediately.