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>3 Configuration of the particular interfacesThe <strong>PLCHandler</strong> allows to communicate with a PLC via two different interfaces (ARTI or Gateway)and it makes possible a simulation of the PLC variables if no PLC is connected.See In the following how the <strong>PLCHandler</strong> must be configured in order to be able to communicate viathe particular interfaces.3.1 Simulationwill be supplied in a future version of the document3.2 ARTIwill be supplied in a future version of the document3.3 Gatewaywill be supplied in a future version of the document3.4 Simplified configuration with the CEasy<strong>PLCHandler</strong> ClassThe <strong>PLCHandler</strong> contains a derived class CEasy<strong>PLCHandler</strong>. This class encapsulates the mostimportant and popular communication channels and applies the appropriate correct settings.The following methods are available in addition to the <strong>PLCHandler</strong> methods:Method: long ::ConnectTcpipViaGateway(char *pszGatewayIP, char *pszPlcIP,char *pszProtocol = PLCC_DN_TCPIP_L2ROUTE,int bMotorola = 0, int bLoadSymbols = 1,unsigned long ulTimeout = PLCHANDLER_USE_DEFAULT)This method can be used to set up a connection to a PLC via TCPIP and the Gateway on a Windowssystem. For this purpose only the IP address of the gateway as well as the IP address of the PLCmust be passed on. Default setting: Tcpip L2 Route Protocol.Method: long ::ConnectTcpipViaArti(char *pszPlcIP,char *pszProtocol = PLCC_DN_TCPIP_L2ROUTE,int bMotorola = 0, int bLoadSymbols = 1,unsigned long ulTimeout = PLCHANDLER_USE_DEFAULT);This method can be used to set up a connection to a PLC via TCPIP and ARTI. For this purpose onlythe IP address of the PLC must be passed on. Default setting: Tcpip L2 Route Protocol.Method: long ::ConnectRs232ViaArti(short sPort, unsigned long ulBaudrate,int bMotorola = 0, int bLoadSymbols = 1,unsigned long ulTimeout = PLCHANDLER_USE_DEFAULT);This method can be used to set up a connection to a PLC via ARTI and the serial interface. sPort = 1corresponds to COM1, etc.Method: long ::ConnectToSimulation(char *pszSdbFile, int bLoadSymbols = 1,unsigned long ulTimeout = PLCHANDLER_USE_DEFAULT);This method can be used to set up a connection to a simulation and to a SDB file. Only the name ofthe SDB file must be given. For this purpose also a complete path can be specified.Return value: These methods return same error values like the ::Connect() method. 3S - Smart Software Solutions GmbH<strong>PLCHandler</strong> Programmming <strong>Guide</strong>.doc Page 10 of 17

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

Saved successfully!

Ooh no, something went wrong!