1. Home
  2. /
  3. Melsec-fx-extensions
  4. /
  5. Sum Array Elements

Sum Array Elements - Melsec-fx-extensions Typing CST Test

Loading…

Sum Array Elements — Melsec-fx-extensions Code

Calculate the sum of elements in an array using MELSEC FX structured text.

Sum := 0;
FOR i := 0 TO ArraySize-1 DO
	Sum := Sum + DataArray[i];
END_FOR;

Melsec-fx-extensions Language Guide

MELSEC FX Extensions are specialized function blocks, instructions, and libraries for Mitsubishi Electric's MELSEC FX series PLCs. They extend the standard FX PLC instruction set to support advanced control, communication, and automation capabilities.

Primary Use Cases

  • ▸Advanced motion control and positioning
  • ▸High-speed counting and timers
  • ▸Communication via Modbus, CC-Link, or Ethernet
  • ▸Arithmetic and logic processing beyond basic PLC instructions
  • ▸Modular function block implementation for repeated logic

Notable Features

  • ▸Extended instructions for math, logic, and control
  • ▸High-speed counter and pulse output support
  • ▸Positioning and motion control for stepper/servo devices
  • ▸Communication protocols support (Modbus, Ethernet, CC-Link)
  • ▸Function block libraries for structured programming

Origin & Creator

Developed by Mitsubishi Electric to enhance the FX series PLC functionality and allow automation engineers to implement more sophisticated control solutions without upgrading to larger PLC models.

Industrial Note

Essential for automation engineers working with small to mid-sized industrial systems who need FX PLCs to perform advanced tasks, communicate with other devices, or integrate specialized I/O.

More Melsec-fx-extensions Typing Exercises

Start/Stop Motor ControlTimer-Based Conveyor

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher