IEC checks are used to check compatibility. You can set more or fewer conditions for compatibility testing. If IEC check is activated, the system applies stricter conditions.
In the Portal software, IEC checks can be set up uniformly for all new blocks of the project or individually for individual blocks.
1. Procedure to set up IEC checks for all new blocks in the project
1. In the Options menu, select the Settings command. The Settings window appears in the workspace.
2. Select [PLC programming] ----- [General] in the area navigation.
3、在【新块的默认设置 (Default settings for new blocks)】组中,选中或取消选中【代码块的IEC检查 (IEC Check)】 复选框。
Follow the steps above to enable or disable IEC checks for all new blocks in the program.
2. Set up the operation steps for IEC inspection for a block
1. Open the block.
2. Open the Properties tab in the tour window, or select a block in the project book, right-click and select Properties.
3. Select the "General" group in the area navigation.
4、选中或清除“IEC 检查”(IEC Check) 复选框。
Following the above steps will enable or disable IEC checks for this block. Settings are stored with the project.
3. Set the difference between IEC inspection and not.
1. Do not activate IEC check (default)
- Implicit conversion of bit-type data to other numeric data;
- Implicit conversion from bit-class data to floating-point numbers is not supported;
- When the length is the same, you can convert from bit class data to TIME, TOD, DATE, and CHAR data classes.
- The bit length of the source data type cannot exceed the bit length of the target data type;
- For input/output parameters, the bit length of the specified operand must match the bit length of the corresponding parameter.
2. Activate the IEC check
- Implicit conversion between bit data types is supported;
- Implicit conversion from bitwise data types to other data types is not possible;
- The bit length of the source data type cannot exceed the bit length of the target data type.
IEC check: Compatibility tests for operands in comparison and arithmetic operations according to IEC 61131. For incompatible operands, an explicit conversion is required.
Example: