Description

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Description

mapp Services V5.16

This function block can be used to export, import or delete a Structured Text or Ladder Diagram program. Any interaction with the storage medium must take place using this function block.

Macros can also be imported or exported when using Ladder Diagram programs.

A different MpLink must be used depending on the programming language used. When using Ladder Diagram, the MpLink of a MpCodeBoxCore configuration is used. With Structured Text, the MpLink of a MpCodeBoxFlexInstance configuration is specified.

Importing programs/macros

If a new program/macro should be used by mapp CodeBox, for example because a new program/macro has been created externally, the program/macro must be imported using command "Import". This is necessary for it to be used by mapp CodeBox.

To import programs or macros, command "Import = TRUE" is started. In order for the function block to know how to interpret the file to be imported, "ItemType" must be used to specify whether it is a program or a macro. The file to be imported must be stored on the specified storage medium ("DeviceName"). The name of the file to be imported is specified as "FileName".

If a Ladder Diagram program is imported, it can be called cyclically by MpCodeBoxCore. Command "Start" on MpCodeBoxProgramControl can be used for this.

If a Structured Text program is imported, it can be started by MpCodeBoxFlexControl. Programs already running do not have to be stopped during an import.

Exporting programs/macros

To export programs or macros, command "Export = TRUE" is started. Whether the export is a program or a macro is defined via "ItemType". The program or macro that should be exported to mapp CodeBox is specified on "ItemName". The name under which the file to be exported should be stored is defined under "FileName". The file is stored on the specified storage medium ("DeviceName"). Programs already running do not have to be stopped during an export.

Overwriting a program/macro

If a newer version of a program/macro was created externally, the new program/macro can be re-imported using "Overwrite = TRUE". The existing program/macro is replaced. Programs that are already running do not have to be stopped during the process, unless the file to be replaced is a program that is already running.

Deleting a program

If a program in mapp CodeBox is no longer needed, it can be removed from the storage medium using "Delete = TRUE". It is important to note that macros cannot be deleted.

General

Output "CommandDone = TRUE" determines whether a command (Import, Export, Delete) has been successfully executed. If a command fails because, for example, the specified program does not exist, this is indicated on the "Error" or "StatusID" outputs.

For additional information about macros, see section Macros.

The info structure contains information about the diagnostics of the function block.