PLC controlling DC motor for fwd\reverse stress test

ah, this makes more sense to me. I was as you say focusing on the outputs at first before I got the sequence squared away. Thanks for everyone's help I'll be trying this again today!
 
Hi All,

I got back to this program again, I had other projects in between that i needed to finish first. I have the cycle working properly now, but i want there to be a delay between Y1, Y2, and Y0 turning off... Instead of them all turning off at the same time. I fixed the "on" portion of this by putting a .3s delay (R7) into the Y0 rung, but can't figure out how to do the other part. I sense it's because my timing sequence is a bit askew.. Let me know if you have any ideas.

actuator test.jpg
 
Comments and descriptions,

Where are they?

It's not like you are commenting for someone else to look at your program. You do this for yourself. A year from now if you had to go back and make some changes. You won't be able to remember why you did something unless there are comments and descriptions.

but i want there to be a delay between Y1, Y2, and Y0 turning off... Instead of them all turning off at the same time. I fixed the "on" portion of this by putting a .3s delay (R7) into the Y0 rung, but can't figure out how to do the other part. Let me know if you have any ideas.

Instead of an idea how about a question, then see if you can figure it out from there.

Are you wanting Y1 and Y2 to be on after Y0 turns off?
 
Yes i want them to stay on for about .3 seconds before they turn off. I tried adding a timer in line with Y2 & Y1, but R2 is being triggered by Y0, so I'm kinda stuck right?
 
littlej040,

A couple of questions.

Does your controller / software package have inline compares?
compare.jpg
If not. can you put more than one timer on a rung? I notice on line 17 in your pic there is a timer in the last column. Can you branch down and put another one there? Like this
multimer.jpg

Edit: Just trying to understand the limitations of your platform.
 
Last edited:
Don't be afraid to start again from scratch. Trying to modify your existing program will likely be more frustrating (as you're finding out... ;)). Take all of the knowledge you've learned from your first attempt, and use that to your advantage. Write down your new sequence. It's the same thing, but with a few more steps:

Select FWD
Pause for 0.3 seconds
Motor ON for 2 seconds
Pause for 6 seconds
Select REV
Pause for 0.3 seconds
Motor ON for 2 seconds
Pause for 6 seconds

Again, none of this involves the actual outputs. You will use the FWD, REV, and ON states to drive the outputs. FWD will turn on Y1 and Y2, and ON will turn on Y0. Notice that REV does not drive ANY outputs.

On a side note... You may want to avoid putting coils after the timers. Not all PLCs support this method. I would prefer to see the timer as the final instruction on a rung. If you want that timer to turn on a coil, then just do it on a separate rung.

Keep in mind that this method of sequencing is only one of MANY different ways to do this. Everyone has their favorite. Personally, this is NOT my favorite, but it's pretty simple to understand.

🍻

-Eric
 
Don't be afraid to start again from scratch.

Eric has some good advice.


Keep in mind that this method of sequencing is only one of MANY different ways to do this.

Eric gave you his take on how to do it. Here is mine.

You have a process to test a motor, it has a duty cycle of 25%. You have determined that a run time of two seconds and an off time of 6 seconds will do this. 8 seconds total.

You also have discovered that you need time for your switch gear to settle down. .3 seconds seems to work. You need this to happen on both ends of the run period.

All of this timer stuff is getting complicated. So I tried to reduce it to a "timeline" to make easier for me to digest.


At "zero" time an event needs to happen. = Y1 and Y2 on
At .3 seconds an event needs to happen. = Y0 (run?)
At 2.3 seconds an event needs to happen. = Y0 off
At 2.6 seconds an event needs to happen. = Y1 and Y2 off
At 8 seconds an event needs to happen. = change direction

All I need to do now is put all these timers in a rung so this timing sequence happens over and over.

Then take the "timer done bits" and combine them with direction bits. To make them act as permissives to the outputs Y0, Y1, Y2.

Oh! We now have to add the counter. Piece of cake, just use a direction bit to increment the counter. And use the counter output as a permissive for every rung that needs it.
 
Last edited:
Hi guys,

Thanks for all your help. I took advice given here, and rewrote the program from scratch (probably the best thing i did in my toils with this from the start). It's running fine now and I have ran the motor through about 25,000 cycles so far :)

On another note, I have moved to Panasonics FP-Win Pro v. 5.2 in attempts to learn the newer format. I'm having some issues with the F118_UDC UP\Down Counter. In the old FP-GR version the output was simply placed in a data register and showed the count of how many cycles I've run through. V5.2 however has an Output that i need to place and I'm not sure what to put there. I simply want to see the count (whether it comes up in a data register or not).

I'll post some pics when i get a chance
 
Heres the pics i was talking about, orange layout is FP-pro which I'm having problems with.

Grey is FP-GR Up\Down counter that is working as we speak.

What do i need to put on the output "D" in FP-Pro to get this to work??

FP_pro.JPG FP_gr.JPG
 
I figured out my own question. But figured I'd post it if anyone else runs into this problem (probably not ;)..)

I had to make the preset value and "d" declared variables, and then simply name that output leg the variables identifier. Output "D" is now counting up my cycles properly.

Thanks again for everyone's help here! I'm sure ill be back with more difficult issues in the future.

FP_pro fix.jpg
 

Similar Topics

Hello. I am using the following: Eaton E4-AC-12RXP PLC I am trying to control the CL86T which controls a Closed-Loop Stepper motor. I am using...
Replies
3
Views
983
Hi, I need to be able to control the DC motor with below details; I need a power supply with variable output = 8VDC to 18 VDC and be able to vary...
Replies
8
Views
1,822
hi all,, how precise movement of servo motor can be control through PLC(delta), any suggestion ?? and which is more Suitable...using servo motor...
Replies
15
Views
5,497
All, I need to assemble a device for my trade that will count down a number array while controlling the rotation and direction of a stepper...
Replies
8
Views
7,292
Hi All, I am facing one issue with the SEW MDX61B drive. Issue- I want to run a conveyor with this drive in two directions but it runs in...
Replies
0
Views
351
Back
Top Bottom