Electronic-Key-System Manual Software ActiveX® Module serial / USB Order No.
Manual EKS ActiveX® Module serial / USB Table of contents 1 General notes...............................................................................................................................................4 1.1 Use of the manual..................................................................................................................................4 1.2 Explanation of symbols..................................................................................................................
Manual EKS ActiveX® Module serial / USB 3.7 Events ..................................................................................................................................................16 3.7.1 OnKey ......................................................................................................................................16 3.7.2 OnRead....................................................................................................................................16 3.7.
Manual EKS ActiveX® Module serial / USB 1 General notes This ActiveX® module supports the integration of the Electronic-Key-System (EKS) Electronic-Key adapter with serial and USB interface into your PC application. EKS can thus be used, e. g., in conjunction with process visualization software. Data communication is in accordance with transfer protocol 3964R. The ActiveX® module is used here as a protocol driver.
Manual EKS ActiveX® Module serial / USB 2 Support information, installing and uninstalling To be able to use the EUCHNER EKS serial ActiveX® module, you must first install it. Execute the corresponding installation file, depending on the 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 serial / USB 3 The EKS ActiveX® module 3.1 EKS type library Description EUCHNER EKS ActiveX module Library EKSLib File name eks.ocx GUID { 62A51CD4-76C1-453D-B258-804D12988851 } Control EKS 3.2 EKS control Control name EKS File name eks.ocx GUID { 64CAE8A8-3CB8-4929-A90F-57499A6E83F3 } Properties 15 Events 3 Methods 4 Before you can use the EKS ActiveX® module in your application, you must add the file eks.ocx to your project.
Manual EKS ActiveX® Module serial / USB 3.3 Overview of the methods, properties and events in the EKS ActiveX® module The EKS 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 serial / USB 3.4 Methods 3.4.1 Open Description Opens the serial interface to the EKS with the properties set (BaudRate, 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 serial / USB 3.4.5 getData Description Reading access to the internal memory area of the ActiveX module, in which the read data of the method Read or the event OnKey are stored. Syntax short = 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 serial / USB 3.5 Properties 3.5.1 BaudRate Description Sets the baud rate Syntax object.BaudRate = BaudRateConstants Value; Comments Using this property the same baud rate must be set as was selected on the EKS using the DIP switches. Possible values are: EKS_BAUD_9600 = 9600 EKS_BAUD_28800 = 28800 This property is applied by calling the method Open. Data type BaudRateConstants (Enumeration) Default value EKS_BAUD_9600 3.5.
Manual EKS ActiveX® Module serial / USB 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 serial / USB 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 serial / USB 3.5.7 BlockSize Description Defines the block size for the data transfer. Syntax object.BlockSize = short Value; Comments Defines the block size for the data packets in the 3964R protocol. The default value can be left unchanged in this property if no older devices of the EKS series are used. Data type short Default value 124 3.5.
Manual EKS ActiveX® Module serial / USB 3.5.11 Writing Description State of the method Write Syntax bool = object.Writing; Comments If the property Writing returns the value True, the method Write is currently active. The write request is still active and the data have not yet been completely written to the Electronic-Key. As long as this method is active it is not possible to call any other methods. Data type bool Default value false 3.5.
Manual EKS ActiveX® Module serial / USB 3.5.15 Debug Description If the property Debug is set to the value true, the COM port is closed at the end of a debug session in a programming environment. Syntax bool = object.Debug; Comments The ActiveX® module is not correctly destructed at the end of the debug session in some programming environments. The property Debug must, e. g.
Manual EKS ActiveX® Module serial / USB 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 serial / USB 4 Examples Information! The installation CD contains examples for the integration of the EKS ActiveX® module in various programming environments. 4.1 Establishing connection with the 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 serial / USB 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 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 +49 711 / 75 97 - 0 Fax +49 711 / 75 33 16 www.euchner.de . info@euchner.