SoMachine M221 Analog Routing: Configuring ATV32 and SEREL I/O

Claire Rousseau2 min read
PLC HardwarePLC ProgrammingSchneider Electric
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Analog I/O Map Between the M221, ATV32, and SEREL

The application uses a Modicon M221 programmed in SoMachine as the routing point between an Altivar ATV32 drive and a SEREL controller. Four analog channels carry all signals; the ATV32 output channel is described as a 0/10 V signal, and the discussion applies the same convention to the remaining channels, though each channel's configured range should be verified in the SoMachine I/O configuration before commissioning.

Address Direction (from M221) Connected signal
%IW4.5 Analog input ATV32 analog output (0/10 V feedback)
%QW6.1 Analog output ATV32 analog input (speed reference)
%IW0.100 Analog input SEREL analog output (speed reference)
%QW0.200 Analog output SEREL analog input (receives ATV32 feedback)

Wiring Prerequisite: No Communication Path to the SEREL

The HMI communicates only with the M221, and the SEREL has no communication link to the M221. The only data path between the SEREL and the M221 is the physical analog wiring on %IW0.100 and %QW0.200. If the SEREL analog channels are not wired to the M221, no program logic can route its reference; the wiring must exist before any of the assignments below have meaning.

Pass-Through Assignment Logic

With both devices wired to the M221, two assignment statements pass the SEREL reference to the ATV32 and the ATV32 feedback back to the SEREL. Direct word-to-word assignment is valid only when the value ranges on both ends are identical; if the ranges differ, insert a scaling (linear adaptation) calculation between input and output.

(* SEREL reference forwarded to the ATV32 speed input *)
%QW6.1   := %IW0.100;

(* ATV32 analog output forwarded back to the SEREL *)
%QW0.200 := %IW4.5;

Selecting the HMI or SEREL as Reference Source

The operational requirement is to send either the HMI speed reference or the SEREL reference to %QW6.1, and to direct the ATV32 output either to the HMI or to the SEREL. Implement the source selection with a boolean selector written from the HMI; the variable names below are placeholders you define in the SoMachine project, since only the I/O addresses are fixed by the wiring:


Because the HMI already communicates with the M221, it reads the ATV32 feedback directly from %IW4.5 without extra logic; routing the same feedback to the SEREL is the %QW0.200 assignment shown above. Apply the same range-matching rule to the HMI reference path: if the HMI entry range differs from the ATV32 input range, scale wHmiRef before writing it to %QW6.1.

FAQ

How do I send a SEREL speed reference to an ATV32 through a Modicon M221?

Wire the SEREL analog output to M221 input %IW0.100 and the M221 analog output %QW6.1 to the ATV32 analog input, then program %QW6.1 := %IW0.100 in SoMachine. This works only if both analog ranges are identical; otherwise add a scaling calculation.

Can the M221 get the SEREL reference over a network instead of analog wiring?

No communication link exists between the SEREL and the M221 in this setup, so the only path is the physical analog wiring on %IW0.100 and %QW0.200. Without that wiring, the reference cannot be routed by any program logic.

How do I switch the ATV32 reference between the HMI and the SEREL?

Use a boolean selector written from the HMI in an IF/ELSE statement: when true, write %IW0.100 (SEREL) to %QW6.1; when false, write the HMI reference variable. The HMI reads ATV32 feedback directly from %IW4.5 because it communicates with the M221.

Back to blog