ID : 545
File Path and Task
There are commands which designate "file path", "task" or "task name" for argument.
Command which designates "file path" is like #Include and you designate a file path for motion. A header file, etc. can also be designated regardless of program files.
Command which designates "task" is like Run or Kill and you can operate tasks with these commands.
Command which designates "task name" is like GetPublicValue, you designate task name for the argument by string type data.
Designating File Path
File path designation should be done with strings including extensions.
#Include "Test.pcs" 'Example of designating file path
Designating Task
Task is the one which excludes extension from file name.
You cannot use formula like variables for task designation.
If no file exists in a command designating a task, an error occurs.
Run Test 'Example of designating task
Designating Task Name
Task designation can be done by string type data.
GetPublicValue aaa, "Pro1", "PubAAA" 'Example of designating task name
For n = 1 to 10
GetPublicValue F[10 + n], ("Pro" & n), "PubVal"
Next
Folder Configuration, File Path and Designating Task
Designation of file path and task in the examples above should be done by relative path designation (designation of file path/task based on own program).
"#Include "Test.pcs"
" and "Run Test
" in the examples above call "Test.pcs" exists in the same folder hierarchy of the program described.
Example of designating file in different folder hierarchy
We explain the example of file designation to be stated in TestProA1 using the following folder hierarchy as an example.
For designating the folder hierarchy, use " \ " (backslash).
If you use " ⁄ " (slash), you cannot designate the intended hierarchy.
Designate a file in an upper level folder
Upper level folder should be described as "..\".
#Include "..\TestPro1.pcs"
Run ..\TestPro1
PrintDbg Status(..\TestPro1)
Designate a file in a lower level folder
Lower level folder should be described as folder name + "\".
#Include "folderAA\TestProAA1.pcs"
Run folderAA\TestProAA1
PrintDbg Status(folderAA\TestProAA1)
Designate a file in another folder
It should be described with the combination of upper level folder and lower level folder.
#Include "..\folderB\TestProB1.pcs"
Run ..\folderB\TestProB1
PrintDbg Status(..\folderB\TestProB1)
Designate based on a route folder (Source Files)
If you start the designation with "\", you can designate a file based on the route folder.
#Include "\folderA\folderAATestProAA1.pcs"
Run \folderA\folderAATestProAA1
PrintDbg Status(\folderA\folderAATestProAA1)
ID : 545