PLC5 Structured Text Programming


Thread Starter


I am just beginning with ST. I would very much appreciate it if someone could point me in the right direction to find some good examples. Or if anyone could email me some I would appreciate that too.

I also have in particular one issue right now.

What is the proper syntax for an ONS?

I put in, for example:

IF B3:0/6 ONS B3:0/7 THEN (Compile Error)
IF B3:0/6 AND ONS B3:0/7 THEN (No error but it doesn't fire for one cycle when B3:0/6 goes true)

How do I do this properly?

I've looked through the PLC5 ST manual, but I'm not finding it there.

Friedrich Haase

Moin Mr. lxman2000,
moin all,

I doubt you can use ONS this way. At least it is not part of the IEC 61131 standard Structured Text language. From the AB docs I assume ONS is restricted to be used with ladder. Try to detect the edge by yourself.

For examples in ST you use or some other 61131 compliant software.

Hope this helps
Friedrich Haase

Ing.-Büro Dr. Friedrich Haase
Consulting - Automatisierungstechnik
Meliesallee 42
D 40597 Düsseldorf
phone +49 (211) 716026
fax +49 (211) 7182045
email [email protected]
email [email protected]