loadPLCFile.cmd

description

Script for adding a PLC from file.

details

Adds a PLC defined in FILE. Also adds PLC specific EPICS PVs, i.e. for enable/disable.

author

Niko Kivel, Anders Sandström


paramters

FILE PLC definition file, i.e. ./plc/homeSlit.plc
PLC_ID (optional) PLC number, default 0, or to next free PLC, the actual PLC Id is stored in ECMC_PLC_ID and can be used after this command
SAMPLE_RATE_MS (optional) excecution rate, default 1000/EC_RATE
PLC_MACROS (optional) Substitution macros for PLC code. The macros “SELF_ID”,“SELF”,M_ID, and M are reserved:
TMP_PATH (optional) directory to dump the temporary plc file after macro substitution
PRINT_PLC_FILE (optional) 1/0, printout msi parsed plc file (default enable(1)).
SUBST_FILE (optional) custom substitution file otherwise ecmccfg default will be loaded
INC (optional) List of directories for include files to pass to MSI (if several paths thendivide with ‘:').
DESC (optional) Description of PLC


Example call:

${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd, "PLC_ID=0, FILE=./plc/homeSlit.plc, SAMPLE_RATE_MS=100"