intentionally slowing scan time

If you want a specific command to execute slower you could make it a cyclic task, not continuous.

One way to slow the scan would be create a loop in a subroutine that jumped back to itself for a period of time, or a number of scans.

Personally I wouldn't try to slow the scan rate.
 
Make a periodic task that runs every second, or 10 seconds, or whatever.
There is absolutely no reason to artificially slow the scant time in the cyclic task.
 
I have had numerous problems with latches

Its kind of hard to explain

But to fill in the gaps ill give it a shot

Say you have several rungs that simply unlatch and latch the same bit.

So rung 1 latches it

Rung 2 unlatches it

rung 3 latches it etc

No pretend the bit that is being latched and unlatches is the trigger for some other operation

The issue i have found is that the scan time is so fast that the trigger never actually occurs because it cant unlatch itself quick enough before the next rung is latching it again.

So the trigger never changes state essentially

So if you could slow down the scan time you could actually get the trigger to move.

No i dont like this method or style of triggering things but unfortunately sometimes ijust have to do what im told and make something work which im sure you all have seen before.
 
I have had numerous problems with latches


No pretend the bit that is being latched and unlatches is the trigger for some other operation

Its hard to figure why you would do anything this way - but why not get that operation to unlatch when it completes.

Then get the bit latched if it is unlatched.
 
Last edited:
Its hard to figure why you would do anything this way - but why not get that operation to unlatch when it completes.

Then get the bit latched if it is unlatched.

Like i said its just an example to give a scenario that would require slower scan time

Why dont i do it a different way? as i said the answer is simple. Im not allowed to
 
For what you state, the first rung latches then the next rung unlatches, slowing the scan rate wouldn't make any difference. To make sure the unlatch and relatch are noticed in other rungs I would set a It_Was_Unlatched bit and watch that, then if relatched when it WAS OFF set a It_Was_Off_And_Relatched bit.
 
You could simply use a time on-delay, or even a one-shot to prevent it from re-latching right away.

Intentionally slowing down the scan time to fix a timing issue is ridiculous. That would be analogous to adding weight to your car to slow it down instead of just easing off the gas pedal.

I'm not sure what you mean by you are "not allowed to" do it a different way. Did someone tell you that you must slow down the scan time? If so I would not consider them qualified to allow or not allow anything.
 
Last edited:
You are not allowed to? But can make the scan time slower?

Something is missing in the translation here. btw. You are always allowed to walked off the job. Really.
 
Thanks anyway, forget i asked.

Always easy to point fingers instead of offering suggestions.

If i said i cant fill you in as to why it needs to be done this way dont you think there is a REASON. Perhaps im bound by law to not discuss it?
Instead of just giving me a hard time how about just not comment?
 
Last edited:
The issue i have found is that the scan time is so fast that the trigger never actually occurs because it cant unlatch itself quick enough before the next rung is latching it again.
Your reasoning is flawed. That's not the way a real PLC works. When the CPU evaluates a rung, any Boolean variables that are set or cleared by the rung are in that state at the start of the next rung. If the Boolean variable is tied to a physical output, it is true that the state of the physical output won't match that of the Boolean variable until the physical outputs are serviced.
 
Last edited:
You are not allowed to? But can make the scan time slower?

Something is missing in the translation here. btw. You are always allowed to walked off the job. Really.

Is that how you solve tough engineering problems?

Just walk off the job? You must be independently wealthy

Me on the other hand, i reach out to my peers for suggestions on how to fix a problem.
99% of the time this forum is a great resource for that.
Although today i seem to be getting berated.

as i said above, forget i asked
 
Your reasoning is flawed. That's not the way a real PLC works. When the CPU evaluates a rung, any Boolean variables that are set or cleared by the rung are in that state at the start of the next rung.

I wish this were true but in fact that is only in principal how its suppose to work.

There are many many cases when this is not true.

Any operation that takes multiple scans to complete for example
An A- synchronous modbus read for example
 
For what you state, the first rung latches then the next rung unlatches, slowing the scan rate wouldn't make any difference. To make sure the unlatch and relatch are noticed in other rungs I would set a It_Was_Unlatched bit and watch that, then if relatched when it WAS OFF set a It_Was_Off_And_Relatched bit.

I have often thought about trying to right a utility block for a monitoring of change of state.

It would be pretty useful. I have not gotten around to it.
Any AB built in functions you know of that monitor a state change of a variable?
 

Similar Topics

Hello all, I was wondering if there is a way to turn on the SF LED using an instruction in the program. i.e. My PLC has no HMI and it has modbus...
Replies
12
Views
2,941
Hi, this is a problem that has been dogging me for months and I thought I'd ask here. I have a Direct Logic 05 PLC that I am using to interface...
Replies
9
Views
3,082
I have a powerflex 753 22 amp drive running a 15 hp motor, powering a short conveyor. At a commanded speed of 60 hz the conveyor is running 1200...
Replies
2
Views
1,291
Hello everyone, I have a question in my mind. I am working on bag-filling process. Now i have a motor that brings goods and a loadcell. My...
Replies
36
Views
20,681
Usually we want to do the opposite, but I'm actually looking for opposite, I need to slowdown my Siemens S7-1518 OB1 execution time, to say, 20...
Replies
6
Views
1,811
Back
Top Bottom