HMI Engineering · Lab Manual

HMI I/O Fields and Setpoint Entry in TIA Portal: Lab Manual with Limits, Validation and Ramp

A setpoint has to survive three checks before it reaches a machine: the keypad, the PLC and the ramp. This lab manual takes a VFD fan through all six stages: speed feedback and reference wiring, scaling into DB_IO, validation and ramp logic, HMI tags with matching types and limits, the I/O fields, and a live simulator that shows what a step change and a type mismatch really do.

2,500+ engineers trained 4.9/5 Google rating 21+ years, Chinchwad, Pune Next batch: contact for dates
Quick answer

Use output fields for process values and input fields for setpoints, with display format and decimals matched to the measurement and the unit as a separate text. Set limits on the HMI tag so the keypad rejects mistakes, repeat tighter limits in the PLC, and transfer the setpoint from a request tag to an active tag on a deliberate ACCEPT, ramped so the process never sees a step.

  • Display only the decimals the instrument can measure.
  • Panel limits prevent mistakes; PLC limits prevent damage.
  • Request → ACCEPT → validate → ramp: never write straight into the running control.

Output, Input and Input/Output Fields

An I/O field has three modes: Output for display only, Input for entry only, and Input/output for both. Process values use Output so a stray touch cannot overwrite a measurement. Three properties decide readability: the display format (decimal for process values), the format pattern (digits before and after the decimal point, e.g. 9999 for rpm, 999.9 for °C) and the field length, wide enough that the largest value never shows as a row of asterisks.

LayerWhat it doesWhere it is configured
HMI tag limitsRejects the entry at the keypadHMI tag properties, range
PLC range checkRejects or clamps before the value is usedFB that copies request to active
Controller / drive limitsRestricts what the actuator can doPID_Compact or VFD parameters
Alarm or status textTells the operator why the entry was refusedText list on RejectCode

Lab Flow: From VFD Feedback to a Tested Setpoint Screen

Lab manual flow: field input to tested HMI screenSix stages: field device and PLC tag, input mapping to DB_IO, PLC logic, HMI tags, graphics linking, and perform and test.1Field + tags%IW98 %QW82speed act / ref2Input mappingNORM_X / SCALE_X→ DB_IO rpm3LogicFB_SetpointRampvalidate, ramp4HMI tagsDB_M8_SP_Requesttypes + limits5GraphicsI/O fieldsunits, ACCEPT6Perform + testSimulatorlimits, ramp, typesAddress rule for every lesson: %I only in FC_InputMapping, %Q only in FC_OutputMapping, symbolic DB members everywhere else – including the HMI.
Figure 1 – Six-stage lab flow for setpoint entry.

Stage 1VFD Wiring and PLC Tag Table

PLC tagAddressTypeDevice
M8_SpeedAct_Raw%IW98IntVFD analog output: actual speed 0 – 10 V = 0 – 1500 rpm
M8_Ready%I5.5BoolVFD ready relay
M8_SpeedRef%QW82IntSpeed reference to the VFD analog input
M8_Run%Q2.1BoolVFD run command

Stage 2Input Mapping and Scaling into DB_IO

// FC_InputMapping – fan M8
"DB_IO".M8_SpeedAct := SCALE_X(MIN := 0.0,
                               VALUE := NORM_X(MIN := 0, VALUE := "M8_SpeedAct_Raw", MAX := 27648),
                               MAX := 1500.0);
"DB_IO".M8_Ready    := "M8_Ready";

Scaling belongs in the PLC so every panel, SCADA client and archive shows the same value – see PLC analog input scaling and the logged example in HMI trends and data logs.

Stage 3Logic: Validation and Setpoint Ramp

// DB_M8 (DB80): SP_Request, SP_Target, SP_Active, RampRate : Real;   // rpm, rpm/s (100.0)
//               Cmd_Accept, AcceptOld, Accepted : Bool;  RejectCode : Int;

// FB_SetpointRamp – STAT: tTick : TON_TIME;
IF "DB_M8".Cmd_Accept AND NOT "DB_M8".AcceptOld THEN              // rising edge of ACCEPT
    IF NOT "DB_IO".M8_Ready THEN
        "DB_M8".RejectCode := 2;
    ELSIF "DB_M8".SP_Request < 100.0 OR "DB_M8".SP_Request > 1450.0 THEN
        "DB_M8".RejectCode := 1;                                      // PLC limits: tighter than the HMI
    ELSE
        "DB_M8".RejectCode := 0;
        "DB_M8".SP_Target := "DB_M8".SP_Request;
    END_IF;
    "DB_M8".Accepted := "DB_M8".RejectCode = 0;
END_IF;
"DB_M8".AcceptOld := "DB_M8".Cmd_Accept;

// Ramp the active setpoint every 100 ms
#tTick(IN := NOT #tTick.Q, PT := T#100MS);
IF #tTick.Q THEN
    IF "DB_M8".SP_Active < "DB_M8".SP_Target THEN
        "DB_M8".SP_Active := MIN(IN1 := "DB_M8".SP_Active + "DB_M8".RampRate * 0.1, IN2 := "DB_M8".SP_Target);
    ELSIF "DB_M8".SP_Active > "DB_M8".SP_Target THEN
        "DB_M8".SP_Active := MAX(IN1 := "DB_M8".SP_Active - "DB_M8".RampRate * 0.1, IN2 := "DB_M8".SP_Target);
    END_IF;
END_IF;

// FC_OutputMapping – speed reference to the VFD
"M8_SpeedRef" := REAL_TO_INT(SCALE_X(MIN := 0.0, MAX := 27648.0,
                 VALUE := NORM_X(MIN := 0.0, VALUE := "DB_M8".SP_Active, MAX := 1500.0)));
"M8_Run" := "DB_M8".SP_Active > 0.0 AND "DB_IO".M8_Ready;

The same request/validate/activate pattern, applied to a whole set of parameters, is the recipe transfer in HMI recipe management.

Stage 4HMI Tags, Data Types and Limits

HMI tagType (must match PLC)Range on HMI tagUsed by
DB_IO_M8_SpeedActReal–Output field ①
DB_M8_SP_RequestReal0 – 1500Input field ③
DB_M8_Cmd_AcceptBool–ACCEPT ④
DB_M8_SP_ActiveReal–Output field ⑤
DB_M8_RejectCodeInt–Status ⑥ via text list

A Real setpoint written into an Int tag loses its decimals silently – the most common cause of "setpoints that change by themselves". Drag DB members into the HMI tag table instead of typing addresses, and TIA Portal keeps the types identical.

Stage 5I/O Fields and Graphics

Setpoint screen layoutActual speed output field with unit, setpoint request input field with unit and accept button, active setpoint output field and status text.Exhaust fan M8Actual speed1 198rpmSetpoint request1200.0rpmActive setpoint1200.0rpmACCEPTLast entryAccepted – ramping123456
Figure 2 – Setpoint screen for fan M8. Numbers match the object table.
#ObjectPropertiesTag / event
①I/O field actual speedMode Output, decimal, format 9999, right-alignedDB_IO_M8_SpeedAct
②Text field unitSeparate text "rpm" next to each field–
③I/O field setpoint requestMode Input, format 9999.9, limits from the HMI tag, authorisation OperatorDB_M8_SP_Request
④Button ACCEPTPress: SetBit, Release: ResetBitDB_M8_Cmd_Accept
⑤I/O field active setpointMode Output, format 9999.9DB_M8_SP_Active
⑥Symbolic output fieldText list: 0 Accepted, 1 outside 100 – 1450 rpm, 2 VFD not readyDB_M8_RejectCode

Field placement, fonts and decimals follow HMI screen design best practices; who may enter setpoints is set in HMI user administration.

Stage 6Perform and Test: Animated Setpoint Entry

Exhaust fan M8 runs on a VFD. Type a speed setpoint into the input field and press ACCEPT. The panel rejects values outside its tag limits at the keypad; the PLC checks its own, tighter limits, then ramps the active setpoint at 100 rpm/s. Switch on the two wrong designs to see a step change hit the drive and a REAL setpoint truncated by an INT tag.

Fan, VFD and PLC
HMI · Fan M8 setpoint screen
Exhaust fan M8No active alarms
Actual speedrpm
Setpoint requestrpm
Active setpointrpm
Last entry
Enter 1200 and press ACCEPT. Then try 1600 (panel limit) and 1480 (PLC limit).

Troubleshooting I/O Fields and Setpoints

SymptomLikely causeFirst check
Field shows ****Field length too short for the valueFormat pattern and field length
Decimals disappear after entryHMI tag Int, PLC member RealTag data types
Value accepted on panel, ignored by machinePLC rejected it or ACCEPT not pressedRejectCode and SP_Active
Process jumps after entryEntry written directly into the active tagRequest/active pattern with ramp
Value keeps flickeringToo many decimals for the measurementFormat pattern

Hands-On Lab: Fan Setpoint with Limits, Validation and Ramp

Hands-on
Before you start
  • TIA Portal with WinCC Comfort and a panel or PLCSIM + HMI simulation
  • A VFD or simulated analog values
  • Estimated time: 60 minutes
1

Wire the VFD signals and map PLC tags

Declare M8_SpeedAct_Raw (%IW98) and M8_Ready (%I5.5) as inputs and M8_SpeedRef (%QW82) and M8_Run (%Q2.1) as outputs.

The tag table lists the four VFD signals with their addresses.
2

Scale the inputs into DB_IO

Convert the speed feedback to rpm with NORM_X and SCALE_X and copy M8_Ready in FC_InputMapping.

DB_IO.M8_SpeedAct reads in rpm.
3

Write FB_SetpointRamp

Create DB_M8 with request, target and active setpoints, validate on ACCEPT and ramp the active setpoint at 100 rpm/s.

A request outside 100 – 1450 rpm is rejected and SP_Active is unchanged.
4

Create HMI tags with limits

Drag DB_M8 and DB_IO into the HMI tag table, keep every type identical to the PLC, and set the request tag range to 0 – 1500.

Every HMI tag has the same data type as its PLC member.
5

Build the I/O fields and buttons

Add the actual-speed output field, the request input field, separate unit texts, the ACCEPT button, the active setpoint field and the status text list.

Values show the right decimals, units sit beside the fields, and the request field rejects values over 1500.
6

Perform and test

Enter valid and invalid values, accept with the VFD not ready, and compare the ramp with a direct write.

The active setpoint ramps smoothly; the motor current shows no spike.
Checkpoint—how to know you did it right

Process values are readable and correctly scaled, wrong entries are stopped at the keypad and again in the PLC, and an accepted setpoint reaches the drive as a smooth ramp.

Frequently asked questions

Where should analog values be scaled, in the PLC or on the HMI?

In the PLC. Scaling once in the controller means every panel, SCADA client and archive sees the same engineering value, and there is only one place to correct if a transmitter range changes.

What happens if the HMI tag data type does not match the PLC tag?

Values are truncated or misinterpreted. A REAL written into an INT loses the decimal part, and mismatched types often show as setpoints that appear to change by themselves.

Are HMI input limits enough to protect the machine?

No. They stop mistyped entries at the keypad, but other clients can write the same tag. The PLC must repeat the range check before the value is used by the control logic.

Why should a setpoint use a request tag and an active tag?

So the operator can enter a value without immediately disturbing the process. The PLC validates the request, then transfers or ramps it into the active tag on a deliberate command.

How many decimal places should an output field show?

As many as the measurement really resolves. A speed accurate to a few rpm needs none; a temperature accurate to half a degree needs one. Extra digits are noise that operators learn to distrust.

Should the unit be part of the format pattern?

No. Put the unit in a separate text object next to the field, so the field stays numeric and the unit can be translated in multilingual projects.

Reviewed by Bhawesh Kumar SinghIndustrial Automation Trainer and Industry 4.0 Consultant · Softwell Automation · 21+ years industry experience

Get the full syllabus + free demo class

Share your details—a Softwell training advisor will contact you with batch dates, fees and hardware-practice options.

No spam. Used only to share course details for this enquiry.

Learn with practical industrial examples

Join live online, Pune classroom or corporate in-plant automation training.

Request Course Details
Verified learning pathway

Discuss HMI I/O Fields and Setpoints

Explore practical curriculum, software, hardware and batch options for this technology.

Content reviewed: 16 October 2026

Siemens PLC & TIA Portal Learning Path

Continue with the related Siemens PLC tutorials in this practical learning series.

  1. SCL vs Ladder Logic
  2. Upload PLC Program
  3. TIA Selection Tool
  4. Analog Input Scaling
  5. PLC Counters
  6. PLC Timers
  7. Addressing & Data Types
  8. Hardware & PLC Tags
  9. OB, FB, FC & DB
☎ Call WhatsApp ✉ Email Enquire Now