Sign in to follow this  
Followers 0
simen

KEEP in ST

3 posts in this topic

Hi,

I have a fairly easy assignment for a school project that has the following components:

 -1 impuls start switch
 -1 impuls stop switch
 -2 El-motors

When you push start one motor is suppose to run. Then you push stop and it stops. The next time you start the other should run. Only one motor shoud run at the time. 

I solved this using a KEEP function in ladder logic.

But I want to be abel to do the same thing in structured text. So my problem is that I cant fint anything to replace the KEEP function.

Any help would be much appriciated.

 

Share this post


Link to post
Share on other sites

Something like this. ST is basically harder to do the usual On/Off logic. I mainly use it only for Maths or repetitions

IF Start AND NOT Motor_On THEN
    Motor_On := TRUE;
END_IF;

IF Stop AND Motor_On THEN
    Motor_On := FALSE;
END_IF;

Share this post


Link to post
Share on other sites

It was my understanding you had two different pumps that you would like to change between every time it starts. Made a little example in case you didn't solve it yet.

Skjermbilde.PNG

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0