PLC5 Structured Text

lxman

Member
Join Date
Sep 2004
Location
Morganton, NC
Posts
9
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.
 
ons

Hi lxman
Not sure about PLC 5 but in rslogix 500 it would look like this
XIC B3:0/6 OSR B3:0/7 OTE B3:0/8
and you would use the contact off of B3:0/8 as your one shot. Hope this helps? đź“š
 
Structured text does not have an ONS instruction, but you can achieve the same results using an IF…THEN construct.

IF BOOL_expression AND NOT storage_bit THEN

<statement>;

END_IF;
storage_bit := BOOL_expression
The above quote is from the RSLogix 5000 help file. I think the PLC5 would be similar.
 

Similar Topics

Hello, I am working on a project in which I need to use some spare analog inputs on a 1771 IFE card in a PLC5/20. The BTR is set up using...
Replies
4
Views
4,704
I am using the following formula and I am getting error, Invalid Expression - too many closing parenthesis. when i copy the formula to notepad or...
Replies
4
Views
160
Preface: Kinda long, so I made section titles Intro: I just want to see if anyone here has seen anything similar. A PLC5-40 series C enhanced...
Replies
3
Views
378
Hi, can anyone help me get a pdf file for this RSP files. They are from a PLC5. Thanks
Replies
5
Views
532
Back
Top Bottom