Home

mlamp

Download IO_Mapping_Tool.zip

IO Mapping Tool

With the IEC library "IO Mapping Tool", the inputs and outputs of a program can be
remapped via a visualization in runtime mode.

Product description

The inputs and outputs are mapped via function blocks and the corresponding visualizations.
In doing so, the function blocks are simply activated between the desired inputs our outputs.

The library contains the following function blocks.

  • Function blocks with eight inputs and outputs:

  • Basic function block

    • Function block for BOOL inputs and outputs
    • Function block for BYTE inputs and outputs
    • Function block for WORD inputs and outputs
  • Function blocks with a variable number of inputs and outputs:

  • Basic function block

    • Function block for BOOL inputs and outputs
    • Function block for BYTE inputs and outputs
    • Function block for WORD inputs and outputs

Function blocks with eight inputs and outputs

In the function blocks IOMappingBool, IOMappingByte, and IOMappingWord, eight variables
each of the corresponding type are used for the inputs and outputs.

Function blocks with variable inputs and outputs

In the function blocks VarIOMappingBool, VarIOMappingByte, and VarIOMappingWord, the inputs
and outputs are mapped via arrays of length g_iMaxIOs. The parameter g_iMaxIOs can be edited via
the parameter list Param and it can be maximum 256.

Basic function blocks

In the function blocks IOMappingBaseFB and VarIOMappingBaseFB, an array of integer values is
created for each. The indices of the array represent the inputs and the values at the corresponding
positions represent the outputs for these inputs. Only one input can ever point to an output.
When changing the mapping of inputs and outputs, it is checked if the output has already been mapped to an input.
If this is the case, then the value of the earlier input is set to -1.
The array that saves the mapping of inputs to outputs is stored with the PersistenceManager.

More information

The package contains the library "IO Mapping Tool" and the sample project "IOMappingExample.project".

Visualization

Two visualizations are included in the library. One is for the fixed number of inputs and outputs
and the other is for the variable number of inputs and outputs.

The eight inputs and outputs in the visualization IOMappingVisu are each represented by eight radio buttons.
When a radio button is selected on the left side, the corresponding output is selected automatically on the
right side. By default, the outputs are ordered according to the inputs. After changing the mapping, the new
mapping is saved by clicking the "Set" button. Clicking the "Reset" button discards all changes after the last save.

In the visualization VarIOMappingVisu, the mapping is represented and editable by means of combo boxes.
The left box represents the inputs and the right box represents the outputs. The current mapping is displayed
clearly in the adjacent table.

The "Set" and "Reset" buttons function in the same way as for IOMappingVisu.

Sample project

The sample project "IOMappingExample" demonstrates how to use the function blocks IOMappingBoolFB and
VarIOMappingBoolFB. the mapping of values is saved by means of the PersistenceManager.
For this purpose, the library AC_Persistence has to be linked in the POU pool and added as a module
instance (see also: "Persistence Manager" in the CODESYS help).

System requirements and restrictions

System requirements and restrictions Info
Programming System CODESYS Development System Version 3.5.14.0 or higher
Runtime System CODESYS Control Version 3.5.14.0
Required Accessories -

Screenshot thumbnail
Visualization with eight inputs and outputs
Screenshot thumbnail
Visualization for a variable number of inputs and outputs