gepponline

Hi,
  I'm trying to use a TON block but whatever I connect to the PT input give me error.

"error: Initial value has incompatible data type.
In section: PROGRAM program0
0104: PT0 : TIME := 2000;"

Which is correct format for a TIME variable or a time constant? There's no reference on the site about it.

thank you!

Geppo!

Reply 0 0
thiagoralves
Check IEC 61131-3 documentation. OpenPLC follows that standard. In IEC 61131-3 you define time constants as T#2000ms (where 'ms' can be changed to different time measurements like s, ns, us, etc)
Reply 0 0
Reply