# Need help with some ladder logic.

## Recommended Posts

I am needing some help figuring out some ladder logic. It should be simple but I just cant get it.

This is the situation. I have a normally open switch and and normally closed switch in series with each other. These switches are controlling a relay that in turn controls a solenoid valve. The NO switch goes to pin 7 on the relay and the NC switch to pin 8.

I can't figure how to do this in the PLC and its the last thing to complete my project.

Any help would be appreciated.

Thanks!

##### Share on other sites

• MVP 2014

---| |--- ---|\|--- ---( )---

That is the logic you describe. As for pin numbers on the specific relay, you would need to draw the electrical circuit to confirm that matches your description.

##### Share on other sites

I have tried that, but cant make it work.

##### Share on other sites

• MVP 2014

Can you draw up a physical wiring diagram of the old relay connection as well as the new PLC connection?

When it seems too simple to be wrong, sometimes the only way is to go right back to basics.

##### Share on other sites

Here is a shot from the wiring diagram for the circuit in reference. Its not a great diagram, but its what my electrician provided me.

clamp.pdf

##### Share on other sites

The way Simon first suggested doesn´t work because you have momentary pushbuttons.

Try this:

N.O.

---| |--- ---(S)---

N.C

---|/|--- ---®---

##### Share on other sites

That logic didnt work either. This has got me stumped!

##### Share on other sites

HI Nick,

The Electricians drawing is crystal clear to me. The clamp is a NO push button, then a NC most likely a stop button. CR8 (control relay is sealing or maintaining contact the circuit) This is common for a start stop circuit if manually wired with buttons and physical control relays. It is a traditional way of defining the sequence, an electrians way of thinking. You are very close, please try the below.

If 1 is the start,and it is pressed and 2, the stop is not set then set the coil,

1 2

--[ ]-- --[/]--(S)-

If 2, the stop goes high reset the coil

2

--[ ]---®--

##### Share on other sites

NickB, Post your code so we can take a look.

##### Share on other sites

Do have the logic correct?

##### Share on other sites

I just posted the logic, but I dont think its right.

##### Share on other sites

Hi Nick,

That looks great. That is exactly what I would do.

The start condition can use a 'one shot' or positive transition, However your reset condition should have the NO contact as you have shown. This is going to perform exactly like the electricians diagram unless further logic in the ladder is giving it other commands.

##### Share on other sites

Hi Nick

I would use a positive transition contact on MB17.

The way you show it there is a chance that the output will cycle on and off rapidly.

Regards

Denis

##### Share on other sites

Looking at you two lines of logic. What you have is not exactly correct.

In the first line you are fine with MB17 and Mb18 and your set relay but in your second line you have MB17 being true as the reset. It needs to be MB18 being true as the reset to make this work like a hold circuit.

MB17 MB18

---I I---------------I/I----------(S)

MB18

---I I---------------------------®

Or if your physical switches were to be reused where the one is normally open and the other is normally closed you can use the original switches, but the logic needs to change.

Lets say you bring your normally open switch into input "I0" on the PLC and the normally closed switch into input "I1" then your logic would be:

I0 I1

---I I---------------I I----------(S)

I1

---I/I---------------------------®

Good luck

Keith

##### Share on other sites

Ok, I tried that and it still isnt there yet. It will energize the relay, but wont drop it out. MB 17 and MB 18 do not appear any where else in the program, so thats not an issue. I dont know if it will help but Ive attached a sketch of the way the electrician actually wired this up.

Thanks for all the help!

clamp sketch.pdf

##### Share on other sites

Dear NickB,

According to your sketch, it does not seem that the Push Buttons are connected to the PLC in the right way, or may not be connected at all. Pl check if you can see the status of both the Inputs on line.

Ron

##### Share on other sites

Hi Nick,

I agree with Ron, It appears the electrician wired the circuit as a mechanical stop start. If you are intending to use the controller to drive the relay the buttons should be wired to separate PLC inputs. YOu then use the logic to monitor the conditions and an output coil will be used to drive the CR.

##### Share on other sites

Yall are correct. The buttons are not wired into the PLC. As you said, the electrician wired it as a mechanical stop start, but he knew I would be also controlling it with the PLC. I want to be able to use the physical buttons on the panel as well as control it with the PLC. Does the PLC require inputs from the buttons? If so how do I accomplish this since they are 110 volt butttons?

##### Share on other sites

HI Nick,

If the relay will have a supply voltage of 110V and the buttons are 110V, you should not connect them to the PLC, as the inputs on the PLC are 24V. The stop start circuit currently wired will run independently of the PLC application. You can make this implementation however if you connect a 110V relay from the PLC if available to the CR. The mechanical operation will run completely independent of the PLC operation. If you are intending to run the application with the buttons conditions being monitored and controlled by the PLC you will then be required to connect the appropriately rated buttons to the inputs of the PLC. and again use a relay output to drive the 110V CR.

##### Share on other sites

Ok, I think I understand what to do now. I am not concerned about monitoring the status of the buttons with the PLC. So, to make this work I will need to add another relay in that will be controlled by the PLC, and this relay will in turn drive the control relay. Am I correct in thinking that?

##### Share on other sites

HI Nick,

You can control the CR with a relay. Either an external relay rated for 110V that is triggered by a 24V output from the PLC. Or you can use a Relay output contained within the PLC (if equipped) to trigger the CR with 110V. Again both methods will work independently of each other.

##### Share on other sites

I was thinking the whole time that I should probably go straight from the PLC to the CR. I still have some relay outputs available on the PLC. I think I will use that method so I won't have to add another relay.

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×
×