Events, Onkey, Onread – EUCHNER ActiveX Module serial/USB User Manual

Page 16: Onwrite, 1 onkey, 2 onread, 3 onwrite, Manual eks activex, Module serial / usb 3.7 events

Advertising
background image

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.). The user can then poll which
event has occurred in the user program (EKS_KEY_IN, EKS_KEY_OUT,
EKS_KEY_OTHER). The event OnKey with the property
KeyState=EKS_EVENT_KEYIN is triggered when there is a new Electronic-Key in the
EKS. The user can then read the data on the key from the property Data without
calling the method Read
. The event OnKey with the property
KeyState=EKS_KEY_OUT is triggered on the removal of the Electronic-Key. The event
OnKey with the property KeyState=EKS_KEY_OTHER is triggered when the ActiveX

®

module detects a status. The related status number can be read in the property
LastState.

Information!
Whether an Electronic-Key has been inserted or removed is detected from the state of the CTS signal
(see manual for EKS Electronic-Key adapter).

3.7.2 OnRead

 Description

This event must be defined in the user program and is called by the ActiveX

®

module.

 Syntax

Private Sub object_OnRead ()

 Comments

To use this event a method with the name OnRead must be defined in the user
program. This method is called by the ActiveX

®

module as soon as the method Read is

completed in the ActiveX

®

module. The related status number can be read in the

property LastState.

3.7.3 OnWrite

 Description

This event must be defined in the user program and is called by the ActiveX

®

module.

 Syntax

Private Sub object_OnWrite ()

 Comments

To use this event a method with the name OnWrite must be defined in the user
program. This method is called by the ActiveX

®

module as soon as the method Write is

completed in the ActiveX

®

module. The related status number can be read in the

property LastState.

Page 16

/

20

Subject to technical modifications

098655-03-10/12

Advertising