omron — MCS program instruction

MCS program instruction MCS program instruction Syntax MCS string Function Invoke a monitor command from an application program. Parameter string String value, variable, or expression that defines one of the eV+ monitor commands listed below. Details Normally, monitor commands can be invoked only from the system terminal or from command programs (which contain only monitor commands). The MCS instruction can be used to invoke the following monitor commands from an application program:

DELETE DELETEL DELETEM DELETEP DELETER DELETES FCOPY LOAD STORE STOREL STOREM STOREP STORER STORES VRENAME Using these commands, an application program can store, load, and copy programs to and from disk, and also delete programs from memory to make room for other programs. Similarly, variables can be deleted from memory when they are no longer needed. Also, vision prototypes can be renamed.Loading, storing, and deleting programs and global variables is not interlocked for multi-task access in eV+. Therefore, if you are incorporating multiple MCS instructions in a program, you will need to use TAS interlocks to prevent multiple tasks from issuing the instructions.

For details, see the TAS program instruction. NOTE: If the monitor command specified in the string parameter contains a blank program context (that is, it contains @), any variables listed in the command are treated as though they are referenced within the program containing the MCS instruction. (See the eV+ Language User's Guide for more information on program context.) Program execution is not stopped if an error occurs while processing the monitor command. The ERROR real-valued function can be used after the MCS instruction to check for the occurrence of an error. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 337