24.01.2015 Views

PLC Programming

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6 - The Resources<br />

Please regard: For shortcuts which are defined as "fix" ones by the target file,<br />

the number of possible usage in the Tools folder is predetermined and the<br />

properties cannot be modified by the CoDeSys user (cognizable by a "" in<br />

the Object Organizer).<br />

Exe-Name:<br />

File name or full path of the executable file of the tool. If there is no entry, the<br />

file extension of the file, which is given in "Parameter Template", automatically<br />

will cause via Windows the start of the exe file of the according tool.<br />

Examples: "C:\programme\notapad.exe", "345.pdf"<br />

DefaultDisplayName: Name which is used to represent the tools in the Object Organizer. Possibly<br />

the template $(INSTANCE NUMBER) is used (see below 'Parameter<br />

Template').<br />

Parameter Template: Templates for determining the file which should be opened by the tool. The<br />

following templates can be used, connected by the appropriate special<br />

characters:<br />

$(PROJECT_NAME) Name of the currently opened project<br />

(File name without extension *.pro").<br />

$(PROJECT_PATH) Path of the directory where the project file is<br />

(without indication of the drive).<br />

$(PROJECT_DRIVE) Drive where the currently opened project is.<br />

$(COMPILE_DIR) Compile directory of the project (including indication of the<br />

drive)<br />

$(TOOL_EXE_NAME) Name of the exe-file of the tool.<br />

$(DISPLAY_NAME) Name of the current shortcut, as used in the 'Tools'<br />

folder.<br />

$(INSTANCE_NUMBER) Number of the shortcut<br />

(Instance number, running number, starting with "1")<br />

$(CODESYS_EXE_DIR) Path of the directory where the Codesys exe-file is<br />

(including indication of the drive).<br />

The conversion of a template you will see in the dialog for the Shortcut<br />

Properties (see below)<br />

Example:<br />

"$(PROJECT_NAME)_$(INSTANCE_NUMBER).cfg"<br />

⇒ The cfg-file with the name _.cfg will be opened in the tool.<br />

DownloadFile<br />

Templates:<br />

Files, file pathes resp. templates for file which will be copied to the <strong>PLC</strong> during<br />

download.. If option Editable is activated, the list of these files will be editable<br />

in the properties dialog of the shortcut. If a file name is entered without path,<br />

the file will be searched in the directory where the codesys-exe-file is.<br />

Example:<br />

"a.up;$(PROJECT_NAME).zaw;$(INSTANCE_NUMBER).upp"<br />

⇒ the files a.up, .pro and .upp<br />

will be copied to the <strong>PLC</strong> during the next download<br />

2. Shortcut Properties:<br />

Mark a shortcut entry in the 'Tools' tree in the Object Organizer and select the command 'Object<br />

Properties' in the context menu or in the 'Project' 'Object' menu. The dialog 'Shortcut Properties' will<br />

open, containing the following items:<br />

Command<br />

Calling the tool; paths of the exe-file and of the file which is named in 'Parameter'<br />

(predefined by the 'Paramet er Template', see above)<br />

e.g.: C:\programs\notepad.exe D:\listings\textfile.txt<br />

CoDeSys V2.3 6-63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!