12.07.2015 Views

PLCHandler Programming Guide - Esco Drives & Automation

PLCHandler Programming Guide - Esco Drives & Automation

PLCHandler Programming Guide - Esco Drives & Automation

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PLCHandler</strong> <strong>Programming</strong> <strong>Guide</strong>RESULT_FAILED: common error in the underlying interfaces. A specific error code can beretrieved by GetStatus() resp. GetLastError().RESULT_PLC_NOT_CONNECTED: lost connection to the PLC.RESULT_EXCEPTION: an exception occurred in the underlying interface.2.10 General data transferMethods:long ::UploadFile(char *pszPlc, char *pszHost = NULL)long ::DownloadFile(char *pszHost, char *pszPlc = NULL)The method UploadFile() can be used to transfer files from the PLC to the client. pszPlc specifies thename of the file on the PLC, pszHost specifies the name of the file on the client.The method DownloadFile() can be used to transfer files from the client to the PLC. pszHost specifiesthe name of the file on the client, pszPlc specifies the name of the file on the PLC.The methods RenameFile() and DeleteFile() can be used to rename resp. delete files on the PLC.Return value: If no error occurs, the function returns RESULT_OK. Otherwise, it returns …RESULT_FAILED: common error in the underlying interfaces. A specific error code can beretrieved by GetStatus() resp. GetLastError().RESULT_PLC_NOT_CONNECTED: lost connection to the PLC.2.11 Reading the directory structure on the PLCMethod: long ::ReadDirectory(CDirInfo **ppdi, char *pszBaseDir = NULL)This method can be used to read the directory structure on the PLC. You can specify a basic folder inpszBaseDir.In object ppdi the complete directory structure is stored (including files and sub-directories).Return value: If no error occurs, the function returns RESULT_OK. Otherwise, it returns …RESULT_FAILED: common error in the underlying interfaces. A specific error code can beretrieved by GetStatus() resp. GetLastError().RESULT_PLC_NOT_CONNECTED: lost connection to the PLC.2.12 Protected method for sending and receiving any services to/from thePLCMethod: long ::SyncSendService(unsigned char *pbySend, unsigned long ulSendSize,unsigned char **ppbyRecv, unsigned long *pulRecvSize)This method can be used to transfer any runtime system service to the PLC.Return value: If no error occurs, the function returns RESULT_OK. Otherwise, it returns …RESULT_FAILED: common error in the underlying interfaces. A specific error code can beretrieved by GetStatus() resp. GetLastError().RESULT_PLC_NOT_CONNECTED: lost connection to the PLC.RESULT_EXCEPTION: an exception occurred in the underlying interface.ATTENTION: The structure of the service must be known in detail! An erroneous service might causea crash of the PLC! Due to this reason the method is only accessible in derivative classes and has notbeen published straightly. 3S - Smart Software Solutions GmbH<strong>PLCHandler</strong> Programmming <strong>Guide</strong>.doc Page 9 of 17

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

Saved successfully!

Ooh no, something went wrong!