<< Click to Display Table of Contents >> Navigation: »No topics above this level« Description |
mapp Services V5.16
The MpLink of an MpCodeBoxFlexInstance configuration is used for this function block.
This function block is used to manage a Structured Text program. The program can be started, stopped, paused or resumed. It is important to note that the function block executes only one Structured Text program, not many at the same time. If a new program is started even though a program is already running, error "Program active" is displayed on the function block.
Input parameter "Name" defines which program should be managed. The desired program must be located on the storage medium, which is specified in the MpCodeBoxFlexInstance configuration).
If the Structured Text program is not yet on the storage medium, it can be imported using MpCodeBoxManager. The program can also be exported or deleted using function block MpCodeBoxManager. As soon as a new program is available on the storage medium, it can be used immediately by MpCodeBoxFlexControl.
Commands
Various commands can then be executed for the Structured Text program:
•Start: Command "Start" starts the specified program. If the program was previously stopped by command "Stop = TRUE", it can be restarted with "Start = TRUE". If changes were made to the program in the meantime and the program is saved, then these changes will be applied and executed.
•Suspend: Pauses the currently running program. It can be resumed with command "Resume".
•Resume: Continues the program that was paused by "Suspend". Changes to the program that were made previously are not applied. For this, the program would have to be reloaded, i.e. the program must be stopped (command "Stop") and then restarted (command "Start").
•Stop: Stops the currently executed program. The program is uninstalled and can only be reloaded and executed with command "Start".
If "CommandDone = TRUE", the command has been executed. To start a new command, the previous command must be set to FALSE. The function block is now ready to execute a new command.
Info structure
Additional information about the function block, such as the name or state of the program, can be displayed via the information structure. A running program is identified by state mpCODEBOX_STATE_RUNNING.
If the Structured Text program has been executed completely, state mpCODEBOX_STATE_FINISHED is indicated. The program can be executed again by setting command "Start" again. If a new program should be executed, a new name is defined at "Name" and command "Start = TRUE" is set.