Jump to content

Samba ladder sequence logic


Recommended Posts

Hey everyone!

I need a little bit of help with my ladder logic program 😅

So the thing is, I am controlling three valves with Samba 43. The whole process is about opening and closing valves:

To start the cycle I need to set all my outputs to low state. This is the condition that allows me to start the process. Then I press the START button on the HMI. The first valve opens by going into the high state. After two seconds, the second and the third valve open. They wait in that state for another two seconds then they close. As soon as they close, the first valve closes as well. The last step is to open first and second valve again. They wait there until the initial condition button is pressed.  That's it!

I'm not quite good in ladder logic so I tried to simplify it as much as I could, but it doesn't work..

Any ideas?

Thank you so much, KR

 

 

222.png

Link to comment
Share on other sites

  • MVP 2023

You seem to be mixing up contact and coils. Also in your second ladder rung you have two separate logic threads. Do not do that. Further, that second logic thread is screwing everything else up - you are forcing MB 3, O 2, and TD 1 on all the time.

58 minutes ago, MrEngineer said:

To start the cycle I need to set all my outputs to low state. This is the condition that allows me to start the process. Then I press the START button on the HMI. The first valve opens by going into the high state. After two seconds, the second and the third valve open. They wait in that state for another two seconds then they close. As soon as they close, the first valve closes as well.

I would do that part this way:

image.png.b4722425ece86bbce43e9bd3fbef32e8.png

58 minutes ago, MrEngineer said:

The last step is to open first and second valve again. They wait there until the initial condition button is pressed.

This is not clear to me. It looks like you've left out a step as you state that the first valve closes then you immediately say it opens again.

  • Like 1
Link to comment
Share on other sites

Thank you @Flex727!

The combination of Positive Transition Contact and Set Coil made the thing much clearer and easier!

45 minutes ago, Flex727 said:

This is not clear to me. It looks like you've left out a step as you state that the first valve closes then you immediately say it opens again.

Here's the visual representation of the state in the 3rd net (according to your image)

The 2nd and the 3rd valve need to make space for the main cylinder (1st valve) and then as soon as it is enough space for both (2nd and 3rd valves) cylinders they get back to "high" state. And that's the whole cycle... 

Thank you very much

 

test.jpg

Link to comment
Share on other sites

  • MVP 2023

Maybe fastest way to build this type of application is using FB Drum sequencer.

Please read help topic about this FB and  try to run this idea in Samba. Simple place checkbox for needed MB and run outputs via this MB.

Please open Drum example projects in visilogic Help menu - you can easly implement one of them for your hardware.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...