MpCodeBoxFlexGeneral configuration

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

MpCodeBoxFlexGeneral configuration

mapp Services V5.16

The MpCodeBoxFlexGeneral configuration is used for Structured Text programs.

For information about how the configuration can be adjusted at runtime, see here in section "Changing the configuration at runtime".

Show advanced parameter

Name



General




Supported libraries





#1-N




PV Access





#1-N:






Name






Access Right





#1-N:






Name






Block




Function access





#1-N:






Name





#1-N:






Name




All parameters in this configuration apply to all MpCodeBoxFlex instances being used in the project.

Supported libraries

Automation Studio version4.9 is required to use this function.

To use functions and function blocks from Automation Studio libraries in Structured Text programs, the desired library must be specified in the configuration under "Supported libraries". This ensures that the required library declaration files are loaded to the target system so that the function or function block can be used. Only libraries that are also located in the software configuration of the target system can be specified in the configuration. For information about how to call a function or function block in a Structured Text program, see here in section "Functions" or "Function blocks".

codeboxflexgeneral_supportedlibraries

software_configuration_fileio

If a switch-on delay is required in the Structured Text program, for example, function TON can be used. The function is provided using library "STANDARD" in Automation Studio. To use the function in the Structured Text program, the library is specified under "Supported libraries":

codeboxflexgeneral_supportedlibraries_standard

Accessing process variables

Access to process variables can be allowed or blocked under "PV access".

In an application, most process variables are for internal use only and should not be changed externally. To ensure this when using Structured Text programs, option "Restrict to" or "Block" can be used. "Restrict to" allows access to defined process variables. "Block" is used to block access to defined process variables. "Allow all" allows access to all process variables.

Wildcard symbol "*" can also be used when specifying the process variable. If "Test*" is specified as the process variable, process variables "Test01" and "TestVar", for example, are enabled or blocked for access. If "*" is specified, all process variables of the application receive the desired access right. Due to "::*", the access right refers to all global process variables.

codeboxflexgeneral_supportedpv

When using "Restrict to", it can be specified whether read-only ("ReadOnly") or read and write access ("ReadWrite") is permitted.

It is important to note that the access right defined first is applied. If the same process variable is defined twice, for example, the access rule that was specified first wins. In the example below, two different access rights have been defined for process variable "Material". The "ReadOnly" rule defined first is applied.

configuration_rules

Accessing functions and function blocks

Access to functions or function blocks can be allowed or blocked under "Function access". The specified functions or function blocks should be located in the libraries that are specified in configuration section "Supported libraries".

If functions and function blocks are used in a Structured Text program, it is important to note that the FUN file and VAR file must be included. For additional information, see use case Creating a text file.

Example:

To allow a user to create and edit files and folders in a Structured Text program, library FileIO was specified under "Supported libraries".

To ensure that the user cannot delete files, functions "FileDelete" and "DirDelete" were blocked.

codeboxflexgeneral_supportedfunctions

Wildcard symbol "*" can also be used when specifying functions or function blocks. If "File*" is specified as the name, all functions and function blocks that start with "File" are enabled or blocked for access.