Electronic-Key-System Manual Software ActiveX Module Ethernet TCP/IP ® Order No.
Manual EKS ActiveX® Module Ethernet TCP/IP Table of contents 1 General notes...............................................................................................................................................4 1.1 Use of the manual..................................................................................................................................4 1.2 Explanation of symbols...............................................................................................................
Manual EKS ActiveX® Module Ethernet TCP/IP 3.7.2 OnRead....................................................................................................................................16 3.7.3 OnWrite ....................................................................................................................................16 4 Examples ....................................................................................................................................................17 4.
Manual EKS ActiveX® Module Ethernet TCP/IP 1 General notes This ActiveX® module supports the integration of the Electronic-Key-System (EKS) Electronic-Key adapter with Ethernet interface into your PC application. EKS can thus be used, e. g., in conjunction with process visualization software. Data communication takes place using the TCP/IP protocol. The ActiveX® module is used here as a protocol driver.
Manual EKS ActiveX® Module Ethernet TCP/IP 2 Support information, installing and uninstalling To be able to use the EUCHNER EKS Ethernet ActiveX® module, you must first install it. Execute the corresponding installation file, depending on the present operating system. For Windows® 32-Bit: EKS_ActiveX_Module.msi For Windows® 64-Bit: EKS_ActiveX_Module_x64.msi Information! During the installation you will be prompted to enter an installation folder.
Manual EKS ActiveX® Module Ethernet TCP/IP 3 The EKS Ethernet ActiveX® module 3.1 EKS type library Description EUCHNER EKS Ethernet ActiveX module Library EKSEthLib File name ekseth.ocx GUID { 36B62232-F5C4-4b46-BA4A-4B1F3F2C7974 } Control EKSETH 3.2 EKS control Control name EKSETH File name ekseth.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.3 Overview of the methods, properties and events in the EKS Ethernet ActiveX® module The EKS Ethernet ActiveX® module contains methods, properties and events that can be integrated into your programming environment. Methods are used for establishing the connection and transferring data between the user program and the EKS Electronic-Key adapter.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.4 Methods 3.4.1 Open Description Opens the connection to the EKS with the properties set (IPAddress, Port, KeyType, StartAdress, CountData ...). Syntax Boolean = object.EKS.Open; Comments The EKS must be connected and ready for operation before this method is used. The method returns the value True (error-free execution) or False (status message has been generated).
Manual EKS ActiveX® Module Ethernet TCP/IP 3.4.5 getData Description Reading access to the internal memory area of the ActiveX® module in which data read by the method Read or the event OnKey are stored. Syntax short = object.getData (short ByteIndex); Comments With the method getData, the internal memory area of the ActiveX® module can be read. Upon triggering the events OnRead or OnKey, the key data are available in the internal memory and can be read using getData.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.5 Properties 3.5.1 Port Description Selects the port for the TCP connection Syntax object.Port = String Value; Comments Possible values are: 2444 2445 … This property is applied by calling the method Open. The value must match the setting on the EKS. Data type String Default value 2444 3.5.2 IPAddress Description Selects the IP address for the TCP connection Syntax object.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.5.4 LastState (ReadOnly) Description Status of the last method called (0=OK or status number) Syntax long = object.LastState; Comments After a method is run (Read, Write, …) or after an event (OnKey, OnRead, ...), you can determine here whether the method was run correctly. Status numbers in the range from 0 to 127 (0hex to 7Fhex) are generated by the EKS and are documented in the manual for the EKS Electronic-Key adapter.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.5.5 StartAdress Description The start address for the memory area on the Electronic-Key from which data are to be read (Read) respectively from which data are to be written (Write). Syntax object.StartAdress = short Value; Comments Defines the start address for the data to be read using the method Read as well as the start address for the data to be written using the method Write.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.5.7 Opening Description State of the method Open Syntax bool = object.Opening; Comments If the property Opening returns the value True, the method Open is currently active. As long as this method is active it is not possible to call any other methods Data type bool Default value false 3.5.8 Reading Description State of the method Read Syntax bool = object.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.5.12 Data Description Memory area in which data read by the method Read or the event OnKey, or data to be written using the method Write, are stored. Syntax short = object.Data (short ByteIndex); Comments The property Data represents a cache for all data that are read from the Electronic-Key and that are to be written to the Electronic-Key. The data for the key are provided or assigned in bytes.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.6 Constants This section lists all constants that are used in the properties for the EKS Ethernet ActiveX® module. The constants are also listed in the description of the properties and methods in which they are used.
Manual EKS ActiveX® Module Ethernet TCP/IP 3.7 Events 3.7.1 OnKey Description This event must be defined in the user program and is called by the ActiveX® module. Syntax Private Sub object_OnKey () Comments To use this event, a method with the name OnKey must be defined in the user program. This method is called by the ActiveX® module as soon as there is a change in the EKS (Electronic-Key inserted /Electronic-Key removed, etc.).
Manual EKS ActiveX® Module Ethernet TCP/IP 4 Examples Information! The installation CD contains examples for the integration of the EKS Ethernet ActiveX® module in various programming environments. 4.1 Establishing connection with EKS Electronic-Key adapter The following example shows how the method Open can be used. The values shown correspond to the default settings for the properties. It may be necessary to change these values for your application. 1. Set required values in the properties.
Manual EKS ActiveX® Module Ethernet TCP/IP 4.2 Example event call in Visual Basic® Private Sub EKS_OnKey( ) Select Case KeyState Case EKS_EVENT_KEYIN User functions KeyIn ' e. g. Read key data from the EKS Electronic-Key ' Attention! It is not necessary to call the Read method! for i=0 to 123 KeyData = KeyData & EKS.Data(i) Next i Case EKS_EVENT_KEYOUT User functions KeyOut ' e. g. Delete Electronic-Key data in the user software KeyData = "-" Case EKS_EVENT_OTHER User functions Other ' e. g.
® ® Microsoft Windows , Excel , ActiveX ® and Visual Basic are registered trademarks of Microsoft Corporation EUCHNER GmbH + Co. KG Kohlhammerstraße 16 D-70771 Leinfelden-Echterdingen Telephone Fax +49 711 / 75 97 - 0 +49 711 / 75 33 16 www.euchner.de . info@euchner.