Editorial help

J

Jocelyn Boily

Hey List!

> > how do the commercial PLC guys handle this? If you want predictable
> > output ordering for motion control, etc,. we need some synchronism. Iwas
> > thinking we could let the solver ignore equates that are waiting on slowI/O.
> > I'm very open to other suggestions on maintaining PC speed whileallowing
> > very diverse I/O. If we do completely separate tasks, there's a lot ofIPC to
> > keeping coherent. I don't know, maybe PLC's simply ignore timing
> > differences and hope for the best or chain everything (slow).

There is many different way to approach the problem, and commercial PLC usually have option.
Usually, ALL the Inputs are scanned first. Then the logic is Executed using and Image Register in memory (not going directly to the I/O, but merely
looking at what the were the last time they have been updated). And then the Outputs are written to the Hardwire I/O, strictly copying the Output
registers to the Output Drivers. Some PLC would also handle the communication in a synchronously to the scan.

Some function Are allowing a Immediate Access to some of the I/O (Only the one that the processor has a fast access to), to allow a controlled sequence or more then one I/O scan per logic scan. These functions are seldom required, but I had to use them often to solve some particular problems over the past 20 or so years.

Most of the time the application do not require a predictable sequence of the inputs. You usually have logic that sound like this:if PB1 is PRESSED
and if MotorPermissive1 is ONand if Overload1 is OKthen Start Motor1 The PB1 will be pressed by the operator for at least 1/2 a second, If the
I/O are updated within that time, the logic will work. It does not matter if on input or the other happen first. Actually, creating a logic that requires a certain timing is bad design, after all you interface with mechanical hardware that work within second timeframe while the logic can act in uSeconds. There is usually a way to make the logic work perfectly without to worry about timing.

However, It is sometime not possible and we then have to be careful how the various rungs are entered and executed. Most PLC (but not all!) allow you to control the sequence of the logic execution. Timing problems are often at the heart of costly project start-ups and are not always understood be the programmer, technician or engineers that work on the projects.

Sometime, I have seen logic that work perfectly by sheer luck of the draw, with logic entered at random by an unwise programmer. I also seen machines work 10 time slower for these same random timing reasons. Too often the technician would not care about the logic timing, in this is because it work OK most of the time without carring.

Mr Jocelyn Boily, P. Eng.

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Top