IMDTouchKnowledge BaseShop main store

How-to

Displaying Motor Operating Modes on an OP270 With WinCC Flexible

HMI and touchscreens Published 8 min read By IMDTouch engineering team

Short answer

Evaluate each contactor's command and feedback bits into one status word in the S7-300, display the mode on the OP270 with a text list on a Symbolic I/O field, command the drive with momentary SetBit and ResetBit buttons on DB tags, and raise bit-triggered discrete alarms for no-feedback or welded contacts. The panel never owns the contactor; the PLC and hardwired protection do.

On this page
  1. How the panel gets its numbers
  2. Encode the operating mode in the S7-300
  3. Create the tags on the panel
  4. Show the mode with a text list and a Symbolic I/O field
  5. Command the motors with momentary buttons
  6. Alarm the faults and acknowledge them
  7. Test on the bench before the motor runs
  8. The decision for each case
  9. Questions asked

An OP270 has no object that can see a motor. Everything on the panel reads or writes a tag, so the job splits into three tag routes: one status word per drive that the S7-300 evaluates from the contactor's command and its auxiliary feedback, buttons that write request bits into a data block, and a fault word whose bits trigger discrete alarms. Build them in that order — connection, tags, screen objects, alarms — and each step stays short. Do the state evaluation in the PLC, not on the panel: only the PLC sees the output coil and the feedback contact at scan speed. The finished panel shows Stopped, Running, Fault and Not ready for every contactor, starts and stops motors with momentary buttons, and puts a no-feedback or welded-contact fault into the alarm window where an operator acknowledges it.

How the panel gets its numbers #

A WinCC flexible tag is a named reference to a PLC address, read over the connection you configure between the panel and the CPU. For an S7-300 that link runs over MPI or PROFIBUS DP, with the panel address and the CPU address set to match the hardware configuration. Nothing on a screen shows or writes anything that is not mapped to a tag first, so the work order is fixed: connection, tags, screen objects, alarms.

One rule keeps the project debuggable: the panel writes only to DB or flag bits that the PLC program reads on purpose. A button aimed straight at the process image lands its write between scans, and the logic never sees it — the mechanism behind why WinCC start and stop buttons do not control an S7-300 output. Give the panel its own bytes in a DB, and every coil stays owned by the PLC.

Encode the operating mode in the S7-300 #

Evaluate each drive once per scan into one integer in a DB, combining the command to the coil with the auxiliary contact so the panel receives a single unambiguous number:

Code Text the panel shows Condition
0 Stopped command off, feedback open
1 Running command on, feedback closed
2 Fault: no feedback command on, feedback still open when the timer expires
3 Fault: welded contactor command off, feedback still closed
4 Not ready protection tripped or machine not in manual

Example STL for one drive — the symbol names are illustrative and the addresses follow the example layout used through this article:

// One drive; build the not-ready condition upstream
A   "KM1_NotReady"      // protection tripped OR mode interlock
JC  NOTRDY
A   "KM1_Cmd"           // command to the coil
A   "KM1_Feedback"      // auxiliary contact input
JC  RUN
A   "KM1_Cmd"
AN  "KM1_Feedback"
A   "T_KM1_NoFb"        // on-delay, sized in the worked example
JC  NOFB
AN  "KM1_Cmd"
A   "KM1_Feedback"
JC  WELD
L   0                   // command off, feedback open
T   DB10.DBW2           // example status word, first drive
JU  DONE
RUN:  L 1
      T   DB10.DBW2
      JU  DONE
NOFB: L 2
      T   DB10.DBW2
      JU  DONE
WELD: L 3
      T   DB10.DBW2
      JU  DONE
NOTRDY: L 4
      T   DB10.DBW2
DONE: NOP 0

The feedback timer is the only number in this scheme you have to size. Worked example with example figures: the contactor datasheet lists a 30 ms pull-in time and the measured CPU scan is 10 ms, so the timer may not declare state 2 before 30 ms + 10 ms = 40 ms have elapsed — set it to 1 s so a sluggish contactor at low temperature cannot trip it falsely. A larger contactor moves the pull-in figure, a longer program moves the scan, and the pull-in dominates. With the status tag's acquisition cycle at 100 ms, the panel then shows the new text within one cycle of the PLC writing it: the panel lags, the PLC decides.

Create the tags on the panel #

  1. In the project's connection editor, confirm the link: the bus the panel is physically wired to, plus the panel address, CPU address, rack and slot from the hardware configuration.
  2. Create one Bool tag per request bit — a start request and a stop request for each drive — grouped together in one DB, for example DB10.
  3. Create one Word or Int tag per status word, pointed at the drive's status word from the previous section, and one Word tag for the alarm word (example DB10.DBW10). Keep all of the panel's data contiguous in that one DB: the panel then collects a screen's values in fewer read requests, which you feel directly as screen responsiveness on MPI.
  4. Set each tag's acquisition cycle, the rate at which the panel polls that address. Sensible first settings: 500 ms to 1 s for the status words an operator reads, 100 ms for the alarm word so a short fault pulse cannot fall between two polls. Faster cycles cost bus time; widen them once the screens feel responsive.
  5. Match the data type to the PLC exactly — a signed and unsigned mismatch between Int and Word raises no error, it shows absurd values.

The tag's address in an S7 project stays absolute, a byte and bit inside a DB, while the symbol is a label the logic uses; that split is the subject of tag-based addressing versus symbolic S7 addressing.

Show the mode with a text list and a Symbolic I/O field #

  1. Create a text list — one per distinct state set, example name Motor_States — with selection by value and entries 0 to 4 carrying the five texts from the table above.
  2. Place a Symbolic I/O field on the screen and set it to output mode. The object is a selection list for input and output of texts in runtime; here an operator must not be able to select a state into a live drive, so output only.
  3. Link the field to the drive's status tag and to the text list. At runtime it shows the text whose value matches the tag's current value.
  4. Copy the field for each further drive and change only the tag; the list itself is reused. The same reuse is what lets one screen pattern serve an entire machine, on the principle of controlling 100 motors from one reusable WinCC flexible screen.
  5. Optionally add an appearance animation on the same tag, one color per value — for example grey, green, red, red, yellow — with flashing only on the two fault codes, so a flashing screen still means something.

Command the motors with momentary buttons #

  1. Place one button per direction and label it with the drive and the action.
  2. On the press event run SetBit on the start-request tag; on the release event run ResetBit on the same tag. The pair gives a true momentary request: the bit exists only while the operator holds the button. Some button variants hold the bit while pressed and clear it themselves when the screen changes or the connection drops; if you prefer one event instead of two, look for that while-key-pressed variant in the function list.
  3. Point both events at DB request bits, never at I or Q.
  4. In the PLC, seal the request in with the feedback and break the rung on the stop request, any fault bit, the safety chain and the manual-mode bit. Reset the request bit once the scan has consumed it, so a bit left set by a closed screen cannot restart the drive after a fault reset.
  5. Grey the button out with an enabling animation tied to the mode bit, and put start buttons behind an authorization group.

One boundary to keep: an HMI button is a request path, not a safety function. Emergency stop, motor protection and everything the machine's risk assessment requires stay hardwired or in a safety-rated system; the panel asks, and the PLC logic together with the hardwired chain decides.

Alarm the faults and acknowledge them #

Give every fault its own bit in the alarm word and trigger one discrete alarm per bit: in the example layout, bit 0 is the first drive's no-feedback fault, bit 1 its welded contactor, bit 2 its tripped protection, and the next drive takes the following group of bits. The alarm text names the drive and the fault. Bit-triggered discrete alarms are the right mechanism here; a numeric fault code written into a word is only a display value and raises no alarm line — why numeric message codes do not map to discrete alarm bits covers that distinction.

For acknowledgment, the alarm's additional settings include the Acknowledgement HMI category, where you select the tag and the bit that the acknowledgment sets at runtime. Mirror that bit back into the DB and let the PLC logic re-arm the drive only through it: the fault stays latched until a person has acknowledged it.

Test on the bench before the motor runs #

With the drive electrically isolated or on a bench rig, work through the chain end to end. Write each code from 0 to 4 into the status word from the programming device and watch the field text step through all five entries. Press a start button and watch the request bit set on press and clear on release. Open the feedback signal on the bench drive and confirm the no-feedback alarm appears once the timer expires, acknowledges, and its acknowledgment bit arrives in the DB. Those are commissioning observations, not pass limits. One trap: a runtime simulation on the engineering PC checks screens only, and a simulator writes no PLC tags — why HMI simulation buttons do not change PLC tags — so the contactor logic can only be proven against the real CPU.

The decision for each case #

  • Status as text: a text list on a Symbolic I/O field, output mode, one shared list per state set.
  • Color on a mimic: an appearance animation per value, flashing reserved for the fault codes.
  • Commands: SetBit on press and ResetBit on release into DB request bits, with the PLC sealing and interlocking every coil.
  • Faults: one bit per fault in the alarm word, one discrete alarm per bit, the acknowledgment bit mirrored to the PLC, and the no-feedback timer sized from pull-in time plus scan time.
  • Protection: emergency stop and motor protection hardwired or safety-rated, outside the panel, always.

That is the build: evaluate in the PLC, display through the list, command through DB bits, alarm bit by bit — and let the hardwired chain keep the final word.

Questions asked

Can the OP270 show motor states without touching the PLC program?

Not honestly. A tag aimed at the output bit can show On and Off text, but that is the command, not the state: it cannot tell a running contactor from a welded one, and it stays green while the feedback wire is broken. The status word logic is a few rungs per drive and it is what makes the fault states possible.

Does the same build work over MPI and over PROFIBUS?

Yes. Both are supported links from the panel to an S7-300; pick the bus the panel is physically wired to and set the panel and CPU addresses to match the hardware configuration. MPI carries less traffic, so keep the tag cycles wide on MPI and reserve fast cycles for the drive you are commissioning; PROFIBUS tolerates the faster alarm-word polling more comfortably.

Does every motor need its own text list?

No. Build the list once for the shared state set and point every field at it; only the tag differs per field. The exception is a drive with an extra state: give that one its own list rather than shifting the numbering the other screens already rely on. That single-list reuse is what keeps a multi-drive screen auditable.

The button sets the request bit, but the contactor stays open. What is missing?

The bit is only a request until the logic acts on it. Check, live in STEP 7, that the DB bit actually changes when you press; if it does, follow the rung: the seal-in needs the feedback, and the rung breaks on the stop request, any fault bit, the safety chain and the manual-mode bit. The first one of those that is false is your answer.

After the operator acknowledges a fault, why must the PLC still see the feedback healthy?

Because acknowledgment only closes the message, not the cause. The acknowledgment bit you mirror into the DB lets the logic re-arm the drive, but the rung that re-enables the start request should also require the feedback contact to read open with the command off. Otherwise a welded contactor acknowledges cleanly and the panel invites a start into a shorted power circuit.

Keep reading

  • How-to

    How to Make Arrow Bitmap Buttons in WinCC Touch Panels

    Export each arrow as a 24-bit BMP at the button's exact pixel size, 64×64 px on a 320×240 TP177B, put it on a Button or an invisible button over a Graphic, and wire Press to SetBit and Release to ResetBit on discrete bits V100.0 to V100.3. The dot you see is a bitmap much larger than the button being clipped, not a broken import.

    HMI and touchscreens

  • Explainer

    Why numeric message codes do not map to discrete alarm bits

    The old panel's byte is a numeric selector: the full value picks one text-list entry, and bit 0 has the value 1, so a set trigger bit 0 shows the entry stored under value 1. Keep the value-driven text list for indication; decode each message code into its own discrete alarm condition when you need acknowledgment and alarm history.

    HMI and touchscreens

  • Troubleshooting

    Why a Text List Shows Overlapping Text After a Value Change

    Stacked entries on a text list mean the panel painted the new value without erasing the old one. Prove it by reading the same tag in a numeric field on the same screen, check every layer and the template for a second field bound to that tag, then stop feeding the panel one giant list: split an 8-bit status word into eight two-state bit indicators and give the tag an acquisition cycle shorter than the screen's update cycle.

    HMI and touchscreens

Fixing Vijeo Designer Error 1850 Secondary Drive Not Found