en-us_guide:hmi_connection:studio2:timer_preset

MPINO STUDIO2 · Changing a Timer Preset from the HMI

HMI Connection · Finding and Testing Modbus Addresses

An operator changes a delay on the touch panel, and the machine uses the new value at once, without a new upload. In MPINO STUDIO2 V2.2.0 and later, a timer can take its preset from a memory address such as D10, and the HMI writes the preset to D10 over Modbus RTU. This page sets up the rung, the HMI elements, and the scaling, and lists what to check before commissioning. The timer rules themselves are in Phase 4-1 · Set the Preset from Memory.

Earlier versions accept only a number or a time as a preset. The examples use an MPINO-⁠8A8R-⁠S with a channel set to Modbus RTU Slave, as in Connecting an HMI with Modbus RTU.

1. Build the rung

Row Condition Output
1 NO contact M0 Box function TON T0 D10
2 NO contact T0 Output coil P32
  • While M0 is ON, timer T0 counts.
  • When the elapsed count reaches the value in D10, the T0 contact closes and output P32 turns on.
  • The HMI writes the preset into D10. The ladder does not change, and nothing is uploaded again.

Select Use for P32 under Settings → Ladder Pin Map Settings, and check under Settings → Memory Area Settings that the D area covers D10.

The same form works for all ten timers and for counters, for example CTU C12 D20. On the MPINO-⁠8A8R-⁠S, C0 to C11 are mapped to board functions, so the counter example starts at C12.

2. Connect the HMI elements

HMI element Memory Modbus area and function 0-based address
Preset input D10 Holding register, write with 06 2010
Elapsed count display T0 current value Holding register, read with 03 4000
Run switch and run lamp M0 Coil, write with 05 and read with 01 1000
Done lamp T0 done contact Coil, read with 01 4000

Holding register 4000 and coil 4000 are different values: the register is the elapsed count, and the coil is the done contact. The elapsed count is in the same units as the preset, so an “elapsed / preset” display uses the same scaling for both. For 1-based and 4xxxx address forms, see Enter the number your HMI driver expects.

3. Scale the value

The timer reads D10 as a count of timer units, not as a time.

Timer family Default unit D10 = 300 means
T* (TON, TOFF, TPL, TMON, TMR) 10 ms 3 s
TA* (TAON, TAOFF, TAPL, TAMON, TAMR) 100 ms 30 s

To let the operator enter seconds with one decimal place, scale the HMI numeric input before it writes: ×100 for a T* timer at 10 ms (3.0 s is written as 300), or ×10 for a TA* timer at 100 ms (3.0 s is written as 30). Scaling options differ between HMI makers, so check the HMI manual.

The units are a project setting (Timer Unit Settings). If the unit changes later, the value in D10 keeps its count and the time changes. The Change timer units window does not convert memory presets, so update the HMI scaling as well.

4. Check before commissioning

  • Limit the input range. The timer reads the preset as unsigned, so a D10 shown as −1 is 65,535 counts. With a signed 16-bit HMI object, limit the input to 0 to 32,767.
  • Keep the value through a power cycle. D10 is 0 after power-up until the HMI writes it, and with 0 the TON completes as soon as M0 turns on. Register D10 in EEPROM Retain (Ctrl+Shift+E).
  • Expect changes on the next scan. Raising the value while T0 runs extends the count. Lowering it below the elapsed count ends the timer on the next scan.

5. Update an existing project

  1. Start MPINO STUDIO2 with an internet connection. It checks for updates at start-up; select Update Now, or use Help → Check for Updates.
  2. Open the project and replace the numeric preset with the register, for example TMON T0 300 becomes TMON T0 D10.
  3. Build and upload again. The board needs the new program before the memory preset works.
  4. Press Ctrl+M, write a test value such as 300 to D10 with Write Value to Arduino or from the HMI, and watch T0 count.

A project saved with a timer unit other than the defaults does not open in versions older than V2.2.0. Projects left at the default units still do.

en-us_guide/hmi_connection/studio2/timer_preset.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki