Structured text - start/stop

HereForBeer

Member
Join Date
May 2017
Location
Canton, Ohio
Posts
17
I'm toying around with converting a few things to structured text and have a question.

I'm using a 2 momentary PB's on the HMI to Start and Stop the process..

Right now I'm just simply branching the active bit to bypass the Start_PB to allow the active output to be energized. The stop_pb in the middle to de-energize...


I'm not quite sure how to simulate and use momentary PB bits in structured text? Or is the a better way to do start/stop logic in ST?
 
You could try some of these

This one is set/reset arrangement:
Code:
If #Startpb then
        #runbit:= true;
elseif not #Stoppb then
        #runbit:= false;
end_if;

This one is more like a ladder arrangement but in the opposite order:
Code:
#runbit:= #stoppb and (#startpb or #runbit);
 

Similar Topics

I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
374
Good evening. I display the step number of a SFC on a display. Sometimes, on a trip, it goes quickly through many steps and I need to prove to...
Replies
1
Views
113
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
67
Good morning. I'm doing a rehab and I need to recycle some part of the old code that won't change and that I need. This is a calculation that...
Replies
22
Views
1,342
I'm writing some structured text that's handling a data structure that comes from a PC. The PC structure is in the "new" LREAL 64-bit floating...
Replies
3
Views
481
Back
Top Bottom