Wiresplus - 2024-01-26

Hello,

I have a simple TON timer. It is watching prime loss for a pump.
The operator can set the delay via the HMI, it is an integer (seconds)

As the TON uses milliseconds, we then multiply the entry by 1000 to get seconds. Seems simple, but...
VAR
PrimeTimer : TON;
primetime : INT;
END_VAR

PrimeTimer(in:=State>0 AND FlowRate<MinimumFlow,pt:=INT_TO_TIME(primetime *1000));

For an entered 15 seconds (VAR primetime:=15;) the timer reads 49d17h2m26s760ms !!!!

What am I doing wrong?