Jiri Toman
Member
- Join Date
- Jun 2002
- Posts
- 498
As a side note to buffering, the Logix 5000 programming environment has an additional copy instruction called a synchronous copy (CPS). This instruction will guarantee that data being copied will copy in a continuous block.
Keith,
Thanks for pointing out this instruction, I have never used it and wasn't even aware of it. One thing I would like to point out though, this instruction actually guarantees that while it is being executed no other source can modify the data being copied. This is analogous to multithreaded programming in .NET where you "lock" the instruction being executed, preventing other threads to access it.
Going back to the original question, in my designs I always buffer the I/O data by copying all I/O to holding buffers in the beginning of the scan i.e. first task in the main program and then use the bits of the holding buffers to do my I/O. This way you have de-facto preserved the familiar functionality of SLC500/PLC5. The CPS instruction is the way to go.