Robert Richter
Member
Is this a bug in RSLogix 5000, or is there something wrong. I cannot get the TONR command to work in a sequential function chart; I can get it to work in structured text, and even a stored action in an SFC (with attribute of "S"), but otherwise, the TONR command always clears the .ACC bit, even if I specifically set timer enable to true and reset to false before the TONR command.
For example, in a P1 action, I cannot do this
// tmr.TimerEnable:=1; Timer is already enabled earlier
// tmr.Preset:=100000; Preset already set earlier
TONR(tmr);
CycleTime:=tmr.ACC;
tmr.Reset=1;
TONR(tmr);
tmr.Reset:=0;
TONR(tmr);
For example, in a P1 action, I cannot do this
// tmr.TimerEnable:=1; Timer is already enabled earlier
// tmr.Preset:=100000; Preset already set earlier
TONR(tmr);
CycleTime:=tmr.ACC;
tmr.Reset=1;
TONR(tmr);
tmr.Reset:=0;
TONR(tmr);