PLC is ignoring inputs (only sometimes). Kinco CPU506. Help me solve this please

RogueFab

Member
Join Date
Nov 2018
Location
Sandy, Oregon
Posts
6
Cliffnotes- My program has a problem (I think). Can you help me find it? The program is ignoring a microswitch sometimes.

I have a very simple project that is running off a PLC. The PLC is a Kinco CPU506. It is a 120v input PLC with a modest number of channels and speed (more than I need of both). It has little 24V DC power supply built into it. This machine runs a cycle and returns to a home position where it gets cycled again and again to make parts.

I'm attaching a screenshot of the program and linking to the video of the machine running. I highlighted the area in the program where the problem occurs. The problem is a micro switch input that gets ignored by the program. The microswitch has been tested and is working by itself. Every 5-20 cycles the machine will blow right past the microswitch even though the contacts are showing that the switch is doing it's job.

I can only assume there is some kind of overlap or data counting or reset of some kind that is preventing it from allowing that channel to be used. Otherwise how is this possible?

I have checked my voltage and its 23.4 volts when I close the switch in question. So I don't think the voltage is varying and dropping too low for the PLC to sense on the problem cycles.

I welcome feedback on this program of ANY kind. If you can think of ways to drastically simplify or clean up the logic, your comments are welcome. Even if they don't address the problem directly.

also, you may notice, network 5 is at the end of the program. I arranged them all in a sensible easy to follow order after I wrote the program, and the program stalls whenever I move Network 5 from the end. I didn't think the display order had any impact on the way the program executes, so this is another very slight issue I would like help resolving, though it likely will not have any impact on functionality. This is a house-keeping concern.


Video of the machine running with the program/PLC:
https://www.youtube.com/watch?v=o0jlt0uz9oY


Here is the image of the program. If you would like to have the program file (it is a .KPR file, if you can use those and want it, let me know).
PLC 003.jpg



Here is the wiring diagram for the machine (motor contactor details omitted).
Wiring Diagram PLC rev A.jpg
 
Questions
What is the scan time of the PL program
What is the on time of input 3 is it pulsed on
I ran into this a few times with some plc's this scan time is to slow to read a short duration input pulse.
Make sure that the input 3 remains on until the program recognizes it.

I know we don't think about the speed of the PLC or the pulse inputs in particularly with 120 v inputs but it is possible to not read an input.
Also you say that the input is 120V ac but the wiring shows a 24Vdc supply witch is it ?
 
*Disclamer* I´m a ME that does PLC programing part time.

Set reset coils have always ended up as a headache for me, if you want an input to trigger a coil, use pulse trigger. If it is a timed function, use the timers output to pulse a coil to trigger an output.

Best to use conventional latch/unlatch rungs to start with.

I always set up a POU for inputs & outputs to minimize the clutter.

that is my poor 2 cents for ladder, ST is my main tool.

good luck, the machine looks good :)
 
Questions
What is the scan time of the PL program
What is the on time of input 3 is it pulsed on
I ran into this a few times with some plc's this scan time is to slow to read a short duration input pulse.
Make sure that the input 3 remains on until the program recognizes it.

I know we don't think about the speed of the PLC or the pulse inputs in particularly with 120 v inputs but it is possible to not read an input.
Also you say that the input is 120V ac but the wiring shows a 24Vdc supply witch is it ?

I don't have answers to all your questions, but I will answer the ones I can right away. I will research and answer the rest as soon as I can. Your questions are below in bold.

What is the scan time of the PL program - I don't know yet. I will get back to you.

What is the on time of input 3 is it pulsed on - Input 3 stays on for 2.43 seconds when it works. Input 3 stops the travel of the machine. It waits for a programmed delay before unclamping the material, and then another delay, and then it returns home. As soon as it begins the movement to return home, it releases input 3. If input 3 is NOT recognized, it will get past the switch and input 3 will be off in about 3/4 of a second.

Also you say that the input is 120V ac but the wiring shows a 24Vdc supply witch is it ? - This PLC gets 120v AC wired to it and it outputs 24VDC for control circuits. The bottom right terminals "N" and "L" are Neutral and Line 120V. The output at the top right goes to a transformer, only necessary because I have 12V solenoid valves and 12V motor contactor relays. If this project was started with no parts on the shelf we would have it all done in 24V and there wouldn't be a transformer.
 
Last edited:
*Disclamer* I´m a ME that does PLC programing part time.

Set reset coils have always ended up as a headache for me, if you want an input to trigger a coil, use pulse trigger. If it is a timed function, use the timers output to pulse a coil to trigger an output.

Best to use conventional latch/unlatch rungs to start with.

I always set up a POU for inputs & outputs to minimize the clutter.

that is my poor 2 cents for ladder, ST is my main tool.

good luck, the machine looks good :)

Bill (can I call you Bill?),

This is the kind of feedback I was fishing for. I am also an ME, doing very very crude PLC programming. I hammered my way through this project until it ran, but with this bug. Your suggestions may clean this up and also alleviate the problem.

Unfortunately, the manual that came with my Kinco PLC is tough for me to interpret. It's somewhat lacking for relevant examples and seems to explain what I don't need and not explain what I need.

Can you shed any more light on the use of pulse trigger usage? I will start scouring the manual for explanations of pulse application as well.
 
I don't have time right now to run through all the logic, but this is a good indicator there's an issue with one of the elements in this line:


also, you may notice, network 5 is at the end of the program. I arranged them all in a sensible easy to follow order after I wrote the program, and the program stalls whenever I move Network 5 from the end. I didn't think the display order had any impact on the way the program executes, so this is another very slight issue I would like help resolving, though it likely will not have any impact on functionality. This is a house-keeping concern.
 
I think I know what’s going on here
Due to mechanical or scan update time or both, when the stroke reached the limit (input 3)
The plc dose not recognize the limit so the controls drives through the limit range
This could be due to travel speed of the stroke

2 things to do
Extend the activator for the limit switch, give it more area on the switch

Program input 3 to latch on a memory bit then have that memory bit control the timer
Reset the latched bit when travel is off the limit and the control returns the stroke to home.
If it is possible I would do both
I think this will solve your problem
 
I have worked on this off and on and researched how timers work in this PLC and found a solution that works perfectly on the software's simulator. The only problem so far is that when I download it to my PLC, it throws up an error code and won't do anything. I discovered through elimination that if I delete the pulse reset timers T34 (network 2, right side) and T54 (network 4, right side), the software uploads with no problems. But I need those pulse reset timers obviously.

Am I using them wrong? %I0.3 and %I0.4 are both limit switches on the machine. I should easily be able to use those for the trigger on a reset pulse timer, right?

Ladder diagram here:
Fast Ag 2 1 8 2019.jpg
 
Disclaimer: I have no experience with Kinco.
In network 5 you appear to be resetting Q0.2. In network 10 you are directly outputting that address. That would cause conflicts in the platforms I know. Usually addresses are set & reset or direct. If using direct conditional out, all conditions to energise that address would normally be on one rung.

Edit: You're resetting it in network 11...
 
Last edited:
Too late to edit the edit, should have said “setting”...
Anyway, I think network 10 is the conflict. It appears to me that you could delete M0.6 from network 9 and delete the entire network 10. Network 11 would then be more logical between networks 4 and 5.

If you need to rebend slightly to get off the home switch at the end of the cycle, add that as another latch unlatch step. The rest of the program seems fine.

Another disclaimer: I still don’t know Kinco and I don’t know your machine.
 
Last edited:
Too late to edit the edit, should have said “setting”...
Anyway, I think network 10 is the conflict. It appears to me that you could delete M0.6 from network 9 and delete the entire network 10. Network 11 would then be more logical between networks 4 and 5.

If you need to rebend slightly to get off the home switch at the end of the cycle, add that as another latch unlatch step. The rest of the program seems fine.

Another disclaimer: I still don’t know Kinco and I don’t know your machine.

The latching appeared to be causing problems. Guys were talking about scan times and voltages and one user said to avoid latching relays entirely. I rewrote the program from a different angle and eliminated all latching relays. The new program only has 6 networks. It appears you are replying to the old one, which I gave up on. Nobody (including the VAR) could figure out why it was bugging out.

Did you see the new program I posted 2 days ago?
 
I would not be using the 24VDC from the PLC for the outputs. The PLC 24VDC does not supply enough amps for everything you have wired to it. My guess would be that the voltage is being pulled down when the solenoids are being powered. The PLC 24VDC is mainly used for inputs only.
I would supply a separate 24VDC or even a 12VDC power supply to power the outputs.
 
Latching isn’t necessarily bad. Some people don’t like the style. Unlatch and latch can be poorly done with multiple scattered places in a horrible program for the same bit. This was simple and short enough I thought it was fine. Network 10 duplicating the output was the only problem.

I looked at instructions for a Kinco K5. I don’t see anything unusual about the timer operation. I didn’t see a reference to T*4 being a pulse reset. I decipher the three timers in network 2 to be equivalent to a single timer with a preset of 247. I could be wrong. My Kinco experience is a few minutes scanning a .pdf.

Are the valves center off? I thought so from the first program. The second program looks like valves would be two position maintained to cycle. The first program cycles after a momentary button push. The second program looks like the start button needs held. What’s your intention? Think safety.

The manual I found:
http://downloadold.kinco.cn/Download_En/User_manual/K5%20Software%20and%20Instruction%20manual1501.zip
 
Latching isn’t necessarily bad. Some people don’t like the style. Unlatch and latch can be poorly done with multiple scattered places in a horrible program for the same bit. This was simple and short enough I thought it was fine. Network 10 duplicating the output was the only problem.

I looked at instructions for a Kinco K5. I don’t see anything unusual about the timer operation. I didn’t see a reference to T*4 being a pulse reset. I decipher the three timers in network 2 to be equivalent to a single timer with a preset of 247. I could be wrong. My Kinco experience is a few minutes scanning a .pdf.

Are the valves center off? I thought so from the first program. The second program looks like valves would be two position maintained to cycle. The first program cycles after a momentary button push. The second program looks like the start button needs held. What’s your intention? Think safety.

The manual I found:
http://downloadold.kinco.cn/Download_En/User_manual/K5%20Software%20and%20Instruction%20manual1501.zip

You found the correct manual. Oddly enough, I can't find the TP_R (the timers I can't get to work) in the manual at all. I don't think they are supported by this PLC. The PLC gives an error code if I upload any program that contains them.

I replaced the TP_R timers with regular pulse timers, and then used normally closed coils to interrupt those networks. It depends on timers (so it is sensitive to total cycle time). It is not running and works ok. IT blew past that same limit switch again, which leads to believe this is a hardware problem, since I am using a completely different approach.

This program runs off one momentary button press and interrupts anywhere in the cycle with the e stop.

I think swimmy67 figured out a major problem. I am pulling way more current from this PLC's power supply than it was meant to provide. I have a 8.5A power supply and 6 relays on the way. I will install them between my PLC and the solenoid valves and motor contactor coils.
 

Similar Topics

Hello, I have an automation direct d2 262 plc and C-more HMI EA9T6CL-R. I need to prepare a program, scheduled to be performed on a future date. I...
Replies
1
Views
44
Hello, I'm trying to delve a little into rs-485 communications for a couple projects of mine. Until now I've been using a delta vfd and a delta...
Replies
2
Views
54
Greetings All, I recently decided to start freelancing in Controls and Automation part time, most of my experience has been with Rockwell...
Replies
2
Views
103
I am having a problem communicating my PLC with Drive via Modbus connection. I start by opening the port and there is no problem, but then when I...
Replies
5
Views
73
I have worked on small projects using AB Micrologix but now we want to take a photo, process it online, and sort based on returned variables...
Replies
1
Views
100
Back
Top Bottom