Resolving MP277 to TP1200 Migration Char Data Type and FB125

David Krause13 min read
SiemensTIA PortalTroubleshooting
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

Overview of the MP277 to TP1200 Migration

The Siemens MP277 Touch (10-inch) was a Multi Panel from the 270 series that ran WinCC Flexible 2008 SP2. It is replaced by the TP1200 Comfort (12-inch, 6AV2 124-1MC01-0AX0) configured in TIA Portal V11 SP2 / V13 / V15 with WinCC Comfort/Advanced. The migration is performed using the TIA Portal project converter, but several runtime semantic differences between the WinCC Flexible 2008 and WinCC (TIA Portal) tag model cause compile errors that did not exist in the source project.

This article documents the three recurring faults reported during a real MP277 -> TP1200 Comfort migration:

  1. IO Field "OBJECT_274" with an "invalid visibility parameter" error caused by a negative value in a Char tag.
  2. Compile warnings on every script that referenced the affected tag.
  3. Silent tag data type downgrade from Char to Byte after the conversion, breaking the signed semantics used by the ET200S diagnostics block FB125.

Each fault is rooted in the same root cause: the WinCC Flexible 2008 Char data type was signed 8-bit (-128 to +127), whereas the TIA Portal Char type follows IEC 61131-3 and is treated as unsigned (0 to 255) for HMI tag purposes, and is silently re-mapped to Byte during project conversion.

Affected Hardware, Software, and Firmware

Item Source (MP277) Target (TP1200)
Article number 6AV6 643-0CD01-1AX1 (MP277 10" Touch) 6AV2 124-1MC01-0AX0 (TP1200 Comfort)
Configuration software WinCC Flexible 2008 SP2 TIA Portal V11 SP2 / V13 SP1 / V15 / V16 / V17
Runtime software WinCC Flexible RT WinCC Comfort / Advanced RT
Image database *.fwx *.hmi (compiled to *.fwx internally)
Recommended firmware (TP1200) N/A >= V15.1 (update via ProSave / TIA Portal)
PLC side (typical) STEP 7 V5.5 + S7-300/S7-400 STEP 7 V5.5 (kept classic) or S7-1500

The Siemens migration manual is available at Migration_Comfort_Panel_V15_en.pdf (Siemens Support, attachment 54695062). It lists the exact panel substitutions (MP277 10" -> TP1200 Comfort) and the converter settings required to preserve tags, screens, and alarms.

Data Type Compatibility Matrix

WinCC Flexible 2008 Range (Flexible) TIA Portal WinCC Range (TIA) Notes
Char -128 ... +127 (signed 8-bit) Byte / Char (unsigned 8-bit) 0 ... 255 Signed semantics LOST during migration
Byte 0 ... 255 Byte 0 ... 255 No change
Int -32768 ... +32767 Int -32768 ... +32767 No change
Word 0 ... 65535 Word 0 ... 65535 No change
Real +/- 3.4e38 Real +/- 3.4e38 No change
String 0 ... 255 chars String / WString 0 ... 254 / 0 ... 16382 Encoding switched to UTF-16 in TIA
DateTime 8 bytes BCD Date_And_Time / DTL 8 / 12 bytes Layout differs

The asymmetry in row one is the root cause of the migration fault. In WinCC Flexible 2008, a tag of type Char could legally hold -1 (0xFF) and was widely used to display ET200S channel diagnostics, where a negative diagnostic code indicates a specific fault class. The TIA Portal converter preserves the tag but remaps the type to Byte, which cannot legally contain a negative value. The compiler then refuses to compile a visibility expression that uses that value, and the IO field that references the tag is flagged with "invalid visibility parameter".

Root Cause of the OBJECT_274 Visibility Error

The error "OBJECT_274 invalid visibility parameter" is reported by the TIA Portal compiler when an animation on a screen object (typically an IO field, but also bar graphs or symbolic IO fields) is bound to an expression that evaluates to a value outside the legal range of the HMI tag it references. The classic trigger is a visibility animation bound to:

!="-1" or < 0 or == -1

After the migration, the underlying HMI tag DB125.DBB8 (an ET200S diagnostic return value from FB125) was converted from Char to Byte. Because a Byte cannot represent -1, the compiler treats the constant -1 as out-of-range, breaks the animation, and surfaces the OBJECT_274 error to point to the offending object on the screen.

Why the same value worked in WinCC Flexible 2008

WinCC Flexible 2008 defined Char as a signed 8-bit integer, identical to the S7 data type CHAR per IEC 61131-3. The HMI runtime accepted negative literals in visibility expressions. In TIA Portal, the HMI tag Char is internally a Byte; the type is preserved at the PLC point (S7-300/400 DB) but the HMI side cannot perform signed comparisons on it. This is documented in the TIA Portal information system under "HMI tags > Data types > Char" and is the cause of the second warning ("All the tags with the Char data type modified into Byte in the TIA program").

Root Cause: Script Warnings After Migration

The second symptom, a warning on every script that touches the affected tag, is a knock-on effect. The TIA Portal script engine (VBScript within WinCC Comfort/Advanced) performs a strict type check on constant assignments. A script line such as

SmartTags("DB125_DBB8") = -1

compiles in WinCC Flexible 2008 because the tag is Char (signed). In TIA Portal, the tag is Byte and the literal -1 is rejected. The compiler emits a warning of the form:

Warning: Type mismatch. The value -1 cannot be assigned to a Byte tag.

Even when the warning is non-fatal, the runtime truncates the write, the IO field shows 255 (0xFF) instead of -1, and any logic that branches on the diagnostic value is broken.

Root Cause: FB125 / FB126 ET200S Diagnostics Is No Longer Supported

The user's tag originates from FB125 (DP diagnostics for ET200S) or FB126 (PN diagnostics for ET200S). These function blocks were delivered with the STEP 7 V5.5 standard library and wrote channel error codes into a configured instance DB at offsets such as DB125.DBB8. A value such as 16#00 meant "no error", negative values such as -1 or 16#FF carried a "module/channel faulty" semantic that the operator was supposed to see on the HMI.

The TIA Portal converter does not touch the PLC program (the user kept a classic S7-300 with STEP 7 V5.5), but the HMI side must be adapted. There are three strategies, listed from least to most invasive.

Strategy 1 - Keep FB125, change the HMI side only

Do not modify the PLC. Convert the HMI tag from Byte back to a 16-bit signed Int so the negative value can be displayed:

  1. Open the HMI tag list in TIA Portal.
  2. Change the data type of DB125_DBB8 from Byte to Word (placeholder, step 3) and the connection from DB125.DBB8 (byte access) to DB125.DBW8 (word access).
  3. Immediately change the type to Int so the HMI tag is interpreted as signed 16-bit. The PLC writes the diagnostic byte at the low byte of DBW8 and the high byte DBW9 is reserved for the next tag, but on ET200S FB125 outputs single-byte diagnostics so DBW9 is normally unused by this block.
  4. Add a script that masks the high byte: intValue = SmartTags("DB125_DBW8") And &h00FF and use a separate display tag for the operator screen.

Strategy 1 is appropriate when the FB125 instance DB layout must not be changed (for example, the FB125 was generated with the SFC configurator and the byte layout is fixed).

Strategy 2 - Replace FB125 with the TIA Portal library version

Siemens ships the successor blocks as part of the "ET200S Diagnostic Blocks" library for STEP 7 V5.5 and as integrated blocks in the TIA Portal library "Libraries > Documentation > ET200S". The replacements use the same data layout but expose the diagnostic as a Word at the same offset. Because the user kept the PLC classic, the recommended path is to re-import the FB125 from the latest STEP 7 V5.5 SPx library and recompile. After this, the HMI tag is naturally a signed 16-bit Word and the visibility expression < 0 is legal.

Strategy 3 - Move the HMI to a 1500 + TIA Portal PLC

If the project is migrated to a S7-1500, the ET200S diagnostics are handled by the system diagnostics of the S7-1500 and the user program no longer needs FB125. The diagnostic bits are visible in the standard online view and in the HMI via the "System diagnostics" screen template that ships with TIA Portal. This is the long-term recommendation; for the immediate migration it is too invasive.

Step-by-Step Resolution Procedure

  1. Open the migrated project in TIA Portal (target: V15 or later for stable migration of older V11 SP2 projects).
  2. Run a full compile of the HMI. Note the list of errors and warnings. Locate OBJECT_274 in the "Screens > Overview" tree.
  3. Inspect the visibility animation on the object flagged by OBJECT_274. Note the tag name and the constant value used (typically -1).
  4. Open the HMI tag table and locate the tag. Confirm the data type has been changed from Char to Byte.
  5. Decide on Strategy 1, 2, or 3 above. For minimum impact, choose Strategy 1 (HMI-side only).
  6. Re-point the tag to a word-length PLC address: DB125.DBW8 instead of DB125.DBB8, and change the HMI tag type to Int.
  7. Verify the layout: confirm that the high byte of DBW9 is not used by another tag in the FB125 instance DB. If it is, fall back to a separate display tag with a scaling factor.
  8. Update the visibility animation to use the legal signed literal: != -1 still works because the HMI tag is now Int.
  9. Re-run the compile. The OBJECT_274 error and the related script warnings should clear.
  10. Download to the TP1200 Comfort with the correct firmware version. Recommended image: TP1200 Comfort firmware >= V15.1.
  11. Verify on the panel by forcing a faulty ET200S channel and checking that the IO field displays the expected negative diagnostic value.

Workaround: Deactivating the Visibility Check

If a quick recovery is required and the visibility logic itself is non-critical (the operator can still see the diagnostic value, just not the hide/show animation), the error can be suppressed as follows. This is a workaround only, not a fix.

  1. Open the screen with the IO field, right-click the object, choose "Properties > Animations > Visibility".
  2. Change the operator-visible literal from -1 to 255 (the unsigned equivalent of 0xFF). The expression becomes != 255 or == 0.
  3. Alternatively, set the visibility mode to "Permanent - Visible" and remove the animation. The IO field will then always be visible regardless of the diagnostic value.

The diagnostic value 255 on the HMI is functionally equivalent to -1 on the PLC side for an operator who interprets the field as a hex value, but the diagnostic semantics from the FB125 manual are lost. Document the change in the HMI change log so that future migration steps do not silently introduce a regression.

Handling the Script Warnings

For every VBScript line that was rejected by the compiler, apply the corresponding fix:

WinCC Flexible 2008 (Char, signed) TIA Portal (Byte, unsigned) Migration note
SmartTags("x") = -1 SmartTags("x") = 255 Use unsigned equivalent, or migrate tag to Int (Strategy 1).
If SmartTags("x") < 0 Then If SmartTags("x") > 127 Then Logic preserves the original negative branch.
SmartTags("x") = CByte(-1) SmartTags("x") = CByte(255) Explicit cast, no warning.

After the fix, recompile and verify that no warning of class "Type mismatch" remains in the HMI compile output.

Verification and Commissioning

Check Expected result
Compile of TIA Portal project 0 errors, 0 warnings on the affected tag
Download to TP1200 Comfort Successful, transfer log reports 0 inconsistencies
Force ET200S channel error (wire break) IO field displays negative diagnostic value if Int tag, or 0xFF (255) if Byte tag
Visibility animation Object shows/hides correctly when diagnostic value crosses the threshold
Online watch on FB125 instance DB Byte at DBB8 contains the raw diagnostic, matches HMI display
Tag consistency check (TIA Portal > Tools > Consistency check) No HMI / PLC type mismatch reported

Long-Term Migration Recommendations

  • Move to TIA Portal V17 or later. V11 SP2 and V13 are out of mainstream support; the converter behavior has been fixed in V15 and later. The Comfort Panel firmware must be compatible with the TIA Portal version used to compile the HMI image.
  • Replace FB125 / FB126 with the TIA Portal diagnostic blocks. The classic blocks are still installable on a S7-300/400, but new projects should use the S7-1500 system diagnostics path.
  • Avoid the HMI Char type for signed data. Use Int or Word with explicit masking. The TIA Portal help text "HMI tags > Data types" notes that Char is a single ASCII character, not a signed byte.
  • Document the byte/word layout of every instance DB used for diagnostics. When FB125 writes at DBB8 and a neighbouring tag is at DBB9, promoting to DBW8 is unsafe.
  • Run the migration in a sandbox project with the target TIA Portal version, fix the errors, then apply the fixes to the production project. This avoids locking the production PLC into an unsupported state.

Troubleshooting Matrix

Symptom Likely cause Fix
OBJECT_274 "invalid visibility parameter" Visibility expression references a negative value on a Byte tag Re-type tag to Int and re-point to word address, or change literal to unsigned 0..255
Warning: Char data type modified into Byte Converter remaps Char to Byte because TIA Char is unsigned Accept the remap, change the HMI logic, or re-point to a word tag
Script warning: type mismatch on assignment of -1 Same root cause as above; HMI tag is now Byte Use 255 instead of -1, or migrate tag to Int
IO field shows 255 instead of -1 on runtime Byte tag truncates the negative PLC value to its unsigned equivalent Use Int tag with word-length PLC address
FB125 compile error after importing into TIA Portal PLC project FB125/FB126 are STEP 7 V5.5 classic blocks, not in TIA Portal library by default Re-import FB125 from STEP 7 V5.5 SPx, or use ET200S system diagnostics of S7-1500
Neighbour tag at DBB9 conflicts with promoted DBW8 Word access overwrites the next byte in the instance DB Use a separate display tag and a script to mask, do not promote to word

FAQ

Why does my Char tag become a Byte after migrating WinCC Flexible 2008 to TIA Portal?

WinCC Flexible 2008 used a signed 8-bit Char (-128 to +127). TIA Portal follows IEC 61131-3 and treats the HMI Char as an unsigned single character (0 to 255), so the converter silently re-maps the type to Byte. To keep the signed range, change the HMI tag to Int and re-point the connection to a word-length PLC address (e.g. DBW8 instead of DBB8).

What does the OBJECT_274 "invalid visibility parameter" error mean?

The TIA Portal compiler flags OBJECT_274 when a screen object animation (visibility, appearance, motion) references a constant that is out of range for the HMI tag it is bound to. The most common trigger in a migration is a negative literal assigned to a Byte tag, e.g. !=-1. Either change the literal to its unsigned equivalent (255) or re-type the tag to Int.

Is FB125 (ET200S diagnostics) still supported in TIA Portal?

FB125 and FB126 are STEP 7 V5.5 classic library blocks. They can be re-imported into a TIA Portal project from the latest STEP 7 V5.5 SPx installation, but there is no native TIA Portal version. For new projects on a S7-1500, use the system diagnostics that the CPU provides natively, and display the diagnostic screen via the HMI template.

Can I migrate only the HMI from MP277 to TP1200 and keep my S7-300 with STEP 7 V5.5?

Yes. The TIA Portal converter handles an HMI-only migration by re-creating the project, the screens, the tags, the alarms and the scripts. The PLC program and the connection to the HMI are preserved, but the HMI tag types and the animation expressions must be reviewed because the Char/Byte semantics changed. This is the case in the scenario above and is the typical approach for retrofit projects.

What is the recommended TIA Portal version for migrating from WinCC Flexible 2008 to a Comfort Panel?

Use TIA Portal V15 or later. The converter was substantially improved in V15, and a Comfort Panel running firmware V15.1 or later provides the best compatibility. Avoid TIA Portal V11 SP2 / V13 for production migrations because the converter behavior on legacy Char tags is more restrictive. Refer to the official migration manual at Siemens Support attachment 54695062.

Back to blog