L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 549

Advertising
background image

L-force | PLC Designer

Command Line-/Command File



DMS 3.2 EN 02/2011 TD29

547

Keywords for the command parameters:

The following keywords, enclosed in "$", can be used in command parameters:

$PROJECT_NAME$

Name of the current PLC Designer project (file name without
extension ".pro", e.g. "project_2.pro")

$PROJECT_PATH$

Path of the directory, where the current PLC Designer project file is
(without indication of the drive and without a backslash at the end,

e.g. "projects\sub1").

$PROJECT_DRIVE$

Drive, where the current PLC Designer project is (without backslash at
the end, e.g. "D:")

$COMPILE_DIR$

Compile directory of the current PLC Designer project (with

indiciation of the drive and without backslash at the end, e.g.
"D:\plcdesigner\compile")

$EXE_DIR$

Directory where the plcdesigner.exe file is (with indication of the
drive and without backslash at the end, e.g. D:\plcdesigner)

Example of a command file:

A command file like shown below will open the project file ampel.pro, will then load a
watch list, which was stored as w.wtc, will then start the application program and
write after 1 second delay - the values of the variables into the watch list watch.wtc
(which will be saved) and will finally close the project.

file open C:\projects\plcdesigner_test\ampel.pro
query off ok
watchlist load c:\work\w.wtc
online login
online run
delay 1000
watchlist read
watchlist save $PROJECT_DRIVE$\$PROJECT_PATH$\w_update.wtc
online logout
file close

This command file will open the project ampel.pro, will load an existing watchlist
w.wtc, will start the application program, after 1 second will write the variables values
to the watch list w_update.wtc, which will be saved in the directory
"C:\projects\plcdesigner_test" and then will close the project again.

A command file is called in a command line like shown here:

"<path of plcdesigner.exe>" /cmd "<path of cmd file>"

Advertising