I notice that on the previous platform timers were implemented as TONxx and TOFxx
where xx denoted the timebase 10ms 100ms 1s 10s etc.
on PNE there is some vague allusion to timers - but again no detail prototype examples in the help
ditto for f_trig and r_trig Again, these are simple concepts, it is bizarre that the implementation would be so non-portable
What is the WORD compatible equivalent to 65535 I tried the universal 0xFFFF but that was rejected.
Is this forum actually alive and active ? I have seen no response to any of my questions so far…
The help system gives good explanations of standard IEC 61131 function blocks like TON and TOF, e.g.
TON / TON_S, TON_LTIME ');\n mywindow.document.close(); \n mywindow.focus();\n setTimeout(function () {\n mywindow.print();\n mywindow.close();\n }, 1000)\n return true;\n}\r\n\r\n\r\n TOF / TOF_S, TOF_LTIME ');\n mywindow.document.close(); \n mywindow.focus();\n setTimeout(function () {\n mywindow.print();\n mywindow.close();\n }, 1000)\n return true;\n}\r\n\r\n\r\n Rising and falling edges can be detected using the edge detection function blocks:
Edge Detection ');\n mywindow.document.close(); \n mywindow.focus();\n setTimeout(function () {\n mywindow.print();\n mywindow.close();\n }, 1000)\n return true;\n}\r\n\r\n\r\n Some PLCs (like Siemens S7) include features that aren’t compliant with IEC 61131 standards, like the timer format you mentioned. That can make it more difficult to switch to IEC compliant software like PLCnext Engineer.
To assign a value to a WORD variable, a value in IEC 61131 standard format must be used:
Literals according to IEC 61131-3 ');\n mywindow.document.close(); \n mywindow.focus();\n setTimeout(function () {\n mywindow.print();\n mywindow.close();\n }, 1000)\n return true;\n}\r\n\r\n\r\n e.g. to assign a value of 65535 to a WORD variable, you can use the IEC standard formats WORD#16#FFFF or WORD#10#65535 for the value.
Thank you for the response.
I still do not comprehend the correct usage of either TON or R_Trig
i.e.
MB_D3X_RT(MB_Enable_D3X);
MB_D3X_RT is instantiated as r_trig local to this PoU
MB_Enable_D3X is BOOL external
**" invalid parameter expression" **when hovering at the front
If I hover near the back I see:
R_TRIG does not have an output parameter
Similarly:
MB_VCL_Down_ton(MB_VCL_Down.X5,MB_Dropout_time);
MB_VCL_Down_ton is instantiated from TON
Variables MB_VCL_Down, and MB_Dropout_time are OK
it complains about invalid parameter expression
