PLCopen Motion Control LowIdx : This parameter is used to transfer the lower index of the ARRAY, whose address is transferred as pTable . HighIdx : This parameter is used to transfer the upper index of the ARRAY, whose address is transferred as pTable . FileName : This parameter can be used to specify a file name. Busy : Indicates that a command is being processed. Done : Successful processing of the reference travel is indicated here. Error : The occurrence of an error is indicated here. ErrorID : An encoded indication of the cause of the error is provided here. Axis : Here, the address of a variable of type Axis_Ref_BkPlcMc [ } 67] should be transferred.
Behaviour of the function block A rising edge at Execute causes the function block to examine the transferred parameters. A number of problems can be detected and reported during this process: If LowIdx is negative, the system responds with Error and ErrorID =dwTcHydErrCdTblEntryCount. If pTable =0, the system responds with Error and ErrorID =dwTcHydErrCdTblEntryCount. If LowIdx and HighIdx describe a table with fewer than five rows, the system responds with Error and ErrorID =dwTcHydErrCdTblEntryCount. If these checks were performed without problems, the write operation is started. Busy is TRUE for the duration of the operation.
This can lead to some further problems, which are indicated by various error codes. Successful writing of the file is indicated with Done . A falling edge at Execute clears all the pending output signals. If Execute is set to FALSE while the operation is still active, the initiated operation continues unaffected. The signals at the end of the operation ( Error , ErrorID, Done ) apply for one cycle. If a FileName is specified, it must be complete (including the drive letter and the path, if applicable, always including the file type), since it is used by function block without any further modification or amendment.
If no FileName is specified, the function block uses the path and the file name, which were specified through the MC_AxUtiStandardInit_BkPlcMc [ } 182] function block. File type TBL is used here, to distinguish from the parameter file with file type DAT. NOTE! The file contents cannot be read or modified with an ASCII editor. 4.4.5.2 MC_AxTableToAsciFile_BkPlcMc (from V3.0) The function block writes the contents of a table to a text file. VAR_INPUT Execute: BOOL:=FALSE; pTable: POINTER TO LREAL:=0; LowIdx: INT:=0; HighIdx: INT:=0; FileName: STRING(255):=''; END_VAR PLC Library Hydraulics 162 Version: 1.4