jhonansaro

Turning CW and CCw after a delay

27 posts in this topic

Hi there

I am trying to write a simple ladder program for my PLC in order to run CW for one second then CCW for another one second and a delay of 3 second and then start all

Over again. I was able to come up with some codes. which I just attached my file: 

The problem is as I am using a simple NO (Normally Open) push button in order to star the process, Every thing is fine as long as I hole the Button Down, but as I release it.

The system stops. I now I can solve the problem using a NC Push Button, But I want to be able to do it inside my PLC "SET" function or any other functions.

Any recommendation would be highly appreciated.

 

Regards

Jhonansaro

 

 

DvpDelay.dvp

Share this post


Link to post
Share on other sites

i would say state which PLC this is is but don't just post code in some proprietary format. you are limiting how many people can open it and help you. you can make a screenshot or post it in PDF so everyone can chime in. 

 

 

 

homework.png

Share this post


Link to post
Share on other sites
17 hours ago, panic mode said:

i would say state which PLC this is is but don't just post code in some proprietary format. you are limiting how many people can open it and help you. you can make a screenshot or post it in PDF so everyone can chime in. 

 

 

 

homework.png

17 hours ago, panic mode said:

i would say state which PLC this is is but don't just post code in some proprietary format. you are limiting how many people can open it and help you. you can make a screenshot or post it in PDF so everyone can chime in. 

 

 

 

homework.png

Hi panic mode

Thanks for the reply, I am new to plc programming, please bare with me.

Attached are my codes, My PLC is Delta Model 14ss2

My codes do what I want them to do, but as soon as I release my finger form the NO start button, the program stops. (I tried the NC Push Button in X0, but again no success)

I know I can use on and off switch to solve the problem, But I like to know if I could do it using the NO Push Button and modify my codes

In order to do the same job?

Regards

Jhonansaro

Delay.pdf

Share this post


Link to post
Share on other sites

Hi panic mode

Thanks for the reply, I am new to plc programming, please bare with me.

Attached are my codes, My PLC is Delta Model 14ss2

My codes do what I want them to do, but as soon as I release my finger form the NO start button, the program stops. (I tried the NC Push Button in X0, but again no success)

I know I can use on and off switch to solve the problem, But I like to know if I could do it using the NO Push Button and modify my codes

In order to do the same job?

Regards

Jhonansaro

Delay.pdf

Share this post


Link to post
Share on other sites
3 hours ago, jhonansaro said:

I release my finger form the NO start button, the program stops.

Then what you require is a Toggle circuit. Panic Mode has shown you in the first 2 rungs of his drawing.

When PB is pressed, Run will latch ON. Press PB again and Run will turn OFF.

Share this post


Link to post
Share on other sites

Hi IO_Rack

Thanks for the reply.

Attached are two versions of my code, that basically they do what I want them to do, Except that as soon as I release my finger from the PB ( In case I use PB), They stop working. I want them to go on like I am using a Switch. Or As you say I want to latch them. Please provide a sample similar to my scenario, I know how to do it for simple scenarios like starting a simple motor and so, but apparently with timers are a little different.

I using Delta 14ss2 PLC, and I am familiar with WPLSoft.

Also  I am trying to run a 3 Phase AC Elector motor CW and CCW, Is there a problem? please explain.

 

Delay1.jpg

Delay2.jpg

Share this post


Link to post
Share on other sites
On ‎9‎/‎18‎/‎2019 at 7:54 AM, IO_Rack said:

Panic Mode has shown you in the first 2 rungs of his drawing.

When PB is pressed, Run will latch ON. Press PB again and Run will turn OFF.

Mr_PLC_Latch.PNG.f5d0c8d6408c28384f411f2

PB will be X1. Run will go in place of X1 in your example.

I'm not familiar with the PLC you are using. Can you insert a simple output? I don't see any in your examples. Also, I don't see any internal memory being used except for timers. Do you know how to use (address) the internal memory in the Delta?

Share this post


Link to post
Share on other sites

Hi there

I managed to do the Job Following codes are the ones.( I basically added a Toggle  Circuit to my Program)

But I have another issue at the Moment, and that is:

My PB Button now starts the program(even after releasing the PB Button), and It can stop it as well.

I do not want it to stop it, I know I should be able to do it using some kind of IF Commands, Basically If it is in On Position then bypassing 

any other Push Action.

 

Any Help would be greatly appreciated

 

regards

jhonansaro

Delay3.png

Share this post


Link to post
Share on other sites

never seen that PLC brand but your screenshots are exactly what Mitsubishi FX instruction set looks like.

if you need toggle, there should be ready function ALT or FF

if you need PLC to remember button press, use either latch or seal...

 

seal_in.png

Share this post


Link to post
Share on other sites
Quote

Hi Panic Mode

Thanks a lot for the help/code it is working very fine.

As I said before this is Delta PLC and the software is WPLSoft.

Regards

Jhonansaro

 

 

Share this post


Link to post
Share on other sites
On 9/20/2019 at 10:43 AM, jhonansaro said:

My PB Button now starts the program(even after releasing the PB Button), and It can stop it as well.

I do not want it to stop it, I know I should be able to do it using some kind of IF Commands, Basically If it is in On Position then bypassing 

any other Push Action.

I cannot think of any application where you would want to logically start/run a motor without any logical means to stop it. However, if you are so determined then press the PB once to start the motor. Then disconnect the PB from the PLC. The state of Y2 can also be directly manipulated while online in the software. If you choose to do this then there is no need for the first rung of the logic.

Share this post


Link to post
Share on other sites

Hi there

The following codes work exactly what I want in the simulator, but it is not working in my actual PLC.

I should say it works once, but it doesn't Loop.

What could be the problem?

 

Regards

 

Delay4.png

Share this post


Link to post
Share on other sites

Hi there

I wonder what is going on the following codes works (I mean runs and cycles until I press x1 button) in simulator,

But It does not Cycles in Actual PLC it runs only once.

Regards

 

Delay5.png

Share this post


Link to post
Share on other sites

In Rung #2, when you release the button (X1), it will RST M1 which will stop your operation. I don't why it doesn't behave properly in the simulator.

Why won't you use the example that was given to you?

Edited by IO_Rack
My misunderstanding. See my follow up post.

Share this post


Link to post
Share on other sites

Hi IO_Rack

I should say that my last Code works in simulator, and every thing is as I want it including the X1 button.

But It does not work in Actual PLC, It runs only once, and it doesn't Cycle over and over again as I want it, till I use PB x1 button. 

Regarding the Panic mode code, I just do not what is going on there with that language

Share this post


Link to post
Share on other sites
33 minutes ago, jhonansaro said:

I should say that my last Code works in simulator, and every thing is as I want it including the X1 button.

Again, I don't know what is wrong with your simulator but it is wrong.

33 minutes ago, jhonansaro said:

But It does not work in Actual PLC, It runs only once, and it doesn't Cycle over and over again as I want it, till I use PB x1 button.

Again,

1 hour ago, IO_Rack said:

In Rung #2, when you release the button (X1), it will RST M1 which will stop your operation.

Sorry, I see now that X0 and X1 are two different push buttons.

Mr_PLC_Toggle.PNG

Edited by IO_Rack

Share this post


Link to post
Share on other sites

Does the PLC software have an online monitor function?

Share this post


Link to post
Share on other sites

Hi

Yes off course it has one.

I tried to upload the app. but as you know I am limited to about 3 mb.

if you require the app is available free of charge in net, just search for WPLSoft from Delta PLC.

 

 

Share this post


Link to post
Share on other sites

Is this what you are trying to do?

Mr_PLC_RunCiruit.PNG.423cf52acd1f0f2b65b

Share this post


Link to post
Share on other sites

Hi Io_Rack

What I want to do is simple

1: Run motor CW for 3 Sec
2: Wait- No action for 1 Sec
3: Run motor CCW for 3 Sec
4: Wait-No action for 3 Sec

5: Run the above 4 steps over and over again(cycle through) Until I press my X1 PB Stop button in order to terminate the program.

My last given code does exactly, as I want in off line simulation Run, But after I Upload it in my PLC
It runs once Once and the stops, It doesn't Cycle over and over again as I want it.


Regards

Share this post


Link to post
Share on other sites
36 minutes ago, jhonansaro said:

What I want to do is simple

Agreed.

36 minutes ago, jhonansaro said:

5: Run the above 4 steps over and over again(cycle through) Until I press my X1 PB Stop button in order to terminate the program.

This seems to be the only problem you are having. Try this modification. I'm not sure how you have the push buttons wired. That will make a difference. FYI... it's not very conventional to use an OUT with SET and RST so I wouldn't recommend this.  

MrPLC_ToggleRun.png.126fff69e5cec5ed8a02

Please use this instead.

MrPLC_ToggleRun2.png.04f424421d9ee711714

Edited by IO_Rack

Share this post


Link to post
Share on other sites
18 minutes ago, IO_Rack said:

Agreed.

This seems to be the only problem you are having. Try this modification. I'm not sure how you have the push buttons wired. That will make a difference. FYI... it's not very conventional to use an OUT with SET and RST so I wouldn't recommend this.  

MrPLC_ToggleRun.png.126fff69e5cec5ed8a02

Please use this instead.

MrPLC_ToggleRun2.png.04f424421d9ee711714

Hi IO_Rack

I tried your codes, again It Works Fine in OFF Line mode in Simulator and it Cycles, But in On Line mode It Runs Once and then Stops.

Attached are your code

Delay6.png

Share this post


Link to post
Share on other sites
Just now, jhonansaro said:

Hi IO_Rack

I tried your codes, again It Works Fine in OFF Line mode in Simulator and it Cycles, But in On Line mode It Runs Once and then Stops.

Attached are your code

Delay6.png

Attached are the actual WPLSoft Codes

ToggleDelay2.dvp

Share this post


Link to post
Share on other sites

With the PLC powered up and in Run mode and not pushing any buttons, what are the states of the LEDs X0 and X1 (ON or OFF)?

Share this post


Link to post
Share on other sites

With the PLC powered up and in Run mode and not pushing any buttons, what are the states of the LEDs X0 and X1 (ON or OFF)?

X0 is off

X1 is on

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