"Writer's" Block

I didn't have time to read through the latest posting. maybe later in the day... however, now seeing the graph and read your OP again. I'm confused on WHY you wouldn't run the conveyor when there's no product on it. We (or just me) need a complete IO list otherwise there's just too much guessing.

Also, a personal rule: never use a TOF (Time Off Delay), EVER! It's difficult for my (and most people's) brain to wrap around it and there's nothing you couldn't do with a regular TON-Timer on Delay timer.
 
I didn't have time to read through the latest posting. maybe later in the day... however, now seeing the graph and read your OP again. I'm confused on WHY you wouldn't run the conveyor when there's no product on it. We (or just me) need a complete IO list otherwise there's just too much guessing.

Also, a personal rule: never use a TOF (Time Off Delay), EVER! It's difficult for my (and most people's) brain to wrap around it and there's nothing you couldn't do with a regular TON-Timer on Delay timer.

The conveyor comes on and stays on as part of the start sequence. It does not shut off until the operator presses the Auto Cycle STOP button.

I am a beginner to PLC programming (1.5 yrs) but I don't believe a TOF is too difficult to understand. The TOF will turn on when everything to the left is HIGH and when one goes LOW is when the timer starts...
 
This is what I did not understand: raising the part is separate from the release of the part, and what normally triggers each.

Yes, please send your code, I have the two versions you posted, but I am not yet sure where the raise and release triggers are.

I'm not at all an expert in process control or programming, and according to my brother I did a no-no in my code (using the result of the one-shot), but this is very interesting.

The main thing to remember is what the Keyence sensor is bringing to the equation. It has a WINDOWED OUTPUT meaning I can have the output come on at, for example, 500mm from the face of the sensor and then have the same output turn off 750mm from the face of the sensor. IN ADDITION, to this DIGITALl output it also has an ANALOG output that i am using to monitor the location of the part.

The WINDOWED DIGITAL OUTPUT is what I am using to cause the pneumatic cylinder to raise after a 200ms delay once the output goes HIGH. Once the output goes LOW is when the pneumatic cylinder will lower. THe problem was when there was no part on the conveyor the system was depending on the ANALOG output of the laser to raise the cylinder and then LOWER the cylinder....


....But what would cause the cylinder to lower? I don't like timer's as much as the next, but in this instance, it is working and is working reliably and has corrected several problems we were having with parts being loaded on top of parts.
 
Updated program II

[Whoops, we crossed posts; I will read yours and fix this later;-]

Hi again,

Summary

A lot of this is guesswork because the process is still not well understood by me. But I still think the fundamental problem is caused by the use of timers, which timers can expire in the PLC while the process is shutdown, resulting in the PLC mis-modeling the process. That said,

Anway, I attach an updated version of my code; either this or something similar should be able to handle a process re-start without a PLC re-start or manually putting a part on the conveyor to restart the logic.

My guess is that:
  • your existing code uses the expiration of a timer or series of timers to trigger the drop, which expiration assumes the part is in place to be dropped;
  • if the PLC timer(s) has(have) started and and not expired when the process is shutdown, and then that PLC expiration occurs while the process is shutdown, then the action triggered by that expiration does nothing;
  • so at this point the PLC has mis-modeled the process, in that the PLC "thinks" the part has dropped, because the PLC sent the trigger to drop the part;
  • and the actual process has not dropped the part, because the process was shut off when PLC sent the trigger to drop;
  • so the PLC is waiting to detect that dropped part via the laser, which detection will not happen because the part has not, and will not, drop,
    ]*]while the process is probably waiting for the PLC trigger the drop, because it missed the trigger while it was shutdown.

My code senses a process re-start and modifies the basic logic that should eventually restore, to within the PLC, a correct model for the process state; the basic idea is to detect a process restart as a backup proxy for the [Part present on conveyor] bit, which bit is (I think) the laser's digital output that is True/1 when the part is in the window.

I am still not sure about the drop triggers, and I have used a generic [Platform fully raised] bit as a proxy for the transition between raising and dropping the part. Maybe that bit could be the expiration of a timer that is started either in normal operation or as a result of a process restart. However, if I am right that it is the timers that are causing the problem, then a better approach might be to eliminate all timers, or at least eliminate all timers that could cause the PLC to mis-model the process when a shutdown occurs.

Details

I misunderstood how an [ONS] works: I thought the bit address assigned to it was the bit used to detect the rising edge; I now realize it is the incoming RUNG's rising edge that is detected (I told you I was a newbie;)); the bit address assigned to the [ONS] stores the internal state of the [ONS] between scans. We still need more information about the process, and the difference between raising the part and dropping the part.

The [ONS] instruction implements the following logic:

Code:
 Bit with           One-shot
  rising            internal   One-shot
   edge              state      output
----| |-----------+---|/|--------( )----+---
                  |                     |
                  |                     |
                  |            One-shot |
                  |            internal |
                  |             state   |
                  +--------------( )----+


----
Semper in doctrina
 
As best as I can tell, you have 2 output and 1 (?) input in play here:

Loader Output - That when energized, get the product ready to be dropped, when de-energized, drop the product onto the conveyor.

Conveyor Output - when energized, run the conveyor.

Laser Measure Analog Input: If # > 8, no product on conveyor

Right?

I'm confused still on the bit "Product on Conveyor" vs the Laser measure which should tell if you if have any product on conveyor. This is why precise description is critical.

As to the opinion on the use of TOF, that's just my opinion. However, I need to emphasize that for control programming, the most important customer is the maintenance department, or whoever will be troubleshooting your code at 2AM (I can't take credit for this, it was said by someone else here)
 
[The timer approach] is working and is working reliably and has corrected several problems we were having with parts being loaded on top of parts.

Is the recently modified cascading timers approach now working reliably in all cases where the process is shutdown and then restarted?

Also, how do you ensure the cylinder is energized long enough to raise the platform fully, such that, when the cylinder is de-energized, the part is dropped onto the conveyor?
 
Last edited:

Similar Topics

To commemorate my 500th post, I have a question for everyone. What do you do when you just don't feel 'creative?' Like many of you, I write a...
Replies
19
Views
11,930
Looking to see if someone can suggest one of these for me, something ideally compact, and not insanely expensive. I'll end up buying probably 4 of...
Replies
5
Views
1,915
Hello everyone, I am a student at Humber College and I ran into an issue regarding the communication between 1756 ControlLogix Allen-Bradley PLC...
Replies
7
Views
3,706
I need schematic or hardware that can read fanuc PLC program from EPROMs. Please help to solve the problem .
Replies
0
Views
2,812
Need a simple definition of what a PLC is and what it does. Need info to use in intro to proposals. Thanks
Replies
28
Views
5,255
Back
Top Bottom