The operations performed by this function are:
•Opening and analysis of the command file, where the analysis consists of:
oVerifying existence of the "[FileInfo]" section.
oVerifying existence of the "[OperationToDownloadParameters]" section.
oVerification of the existence of the "[NodeInfo ws]" section and possible assumption of its commands "ParameterFileName=filename" and/or "Description=text"
In the event that either of the first two points listed above are not met or an error is encountered, the function will fail and the error code will be returned.
•Identification of the file name from which to draw the parameters to be loaded according to the following criteria:
|
|
|
Present
|
Present
|
Same as the one specified in nameParFile
|
Present
|
Omitted
|
Same as the one specified in nameParFile
|
Omitted
|
Present
|
Same as the one specified in ParameterFileName
|
Omitted
|
Omitted
|
Same as the one specified in nameCmdFile
|
•Execution of the commands detected in the "[OperationToDownloadParameters]" section. Parameters are sent in the order in which the relevant objects were written to the file. The operational status of the command is returned in the predeclared variable sts_co_par_download, which of course can be used by the program after the execution of this step or viewed via the RDE tools even during execution. This variable can take the following values:
|
|
> 0
|
Line number of the file currently in use (command file or parameter file) in which the error causing the abnormal exit from the instruction was encountered
|
-1
|
Available executor wait
|
-2
|
Waiting for command execution
|
-3
|
Opening command file
|
-4
|
-
|
-5
|
-
|
-6
|
-
|
-7
|
Reading parameter files
|
-8
|
Parameter file command executions
|
-9
|
-
|
In the event that an error is encountered during parameter communication via SDO the error returned by the device is stored in the predeclared variable co_sdo_err (refer to device documentation for explanation of codes).
Note: The execution of this function may take a long time as it depends on the amount of data to be exchanged, the current traffic on the Can line, and the presence of other instructions being executed at the same level.
|