Skip to content

CPS — Synchronous Copy File

Category
Move / Logical
Type
Output
Availability
All platforms

CPS instruction block: Source Live_Vals, Dest Snapshot, Length 4


CPS (Synchronous Copy File) copies Length elements from one array to another every scan its rung is true, exactly as COP does. In Logix 5000 the difference is that CPS cannot be interrupted by an I/O update or a higher-priority task, so a block of values is guaranteed to be captured from one instant. A LadderIDE controller runs a single scan loop with nothing to interrupt it, so every copy is already synchronous and CPS generates the same code as COP. It exists so a program that documents its intent, or one brought across from Logix, reads the same way here. Use CPS where the reader should know the block must be consistent; use COP everywhere else.


Operand Type Format Valid Range Required Description
Source Array tag, or an element of one Tag, Tag[n] Numeric or STRING array Yes Where copying starts.
Dest Array tag, or an element of one Tag, Tag[n] Same kind as Source Yes Where copying lands.
Length Whole number 4 1 up to what both arrays have room for Yes Elements copied.

The validation rules are COP’s.


Nothing.

The instruction does nothing. Dest holds.

Elements are copied in order, every scan the rung is true, within the scan.

Nothing.


Scenario: Four live readings are captured together into a snapshot array for a log record, so the record cannot mix values from two different scans.

Tags:

  • Snap — Take the snapshot, BOOL
  • Live_Vals — Live readings, INT[4], reading 5, 6, 7, 8
  • Snapshot — Captured readings, INT[4]

Rung 1:

—] [Snap———[CPS Live_Vals Snapshot 4]———

Scan 1 — Snap = 0. Live_Vals reads 5, 6, 7, 8 and Snapshot reads 0, 0, 0, 0.

Figure 1 — CPS rung false: Source Live_Vals 5 6 7 8, Dest Snapshot 0 0 0 0, Length 4, rung dark

Scan 2 — Snap = 1. Snapshot reads 5, 6, 7, 8.

Figure 2 — CPS rung true: Dest Snapshot 5 6 7 8, rung lit



Why it is the same here. Inputs are read once at the top of the scan and outputs written once at the bottom; the ladder in between sees one consistent set of values whichever copy instruction it uses.

The block never colours. Watch the rung wire and the Dest value list.

Applies to LadderIDE >=1.2.2 · Last reviewed 2026-09-11 · Screenshots verified 2026-09-11