Laststate (readonly), 4 laststate (readonly), Manual eks activex – EUCHNER ActiveX Module serial/USB User Manual

Page 11: Module serial / usb

Advertising
background image

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 (0

hex

to 7F

hex

) are generated by the EKS and are documented in the

manual for the EKS Electronic-Key adapter. Status numbers between 128 and 255
(80

hex

to FF

hex

) are generated by the ActiveX

®

module.

 Data

type

long

 List of status numbers for the ActiveX

®

module:

Attention!
Immediately after a method has been called or an event has been triggered you should poll the value
in the property LastState. Otherwise the property LastState could be overwritten by another method,
as only the status message from the last method run is given in the property LastState. This warning
also applies to internal methods that run in the background and that are not started by you.

Value

Description

hex

dec

0x88 136 Timeout

The timeout of approx. 2 s for the 3964R protocol after sending the STX command has been exceeded, the
protocol is repeated up to 6 x.

0x89 137 NAKReceived

NAK (15

hex

) received from EKS -> protocol error

0x8A 138 Collision

Collision in the 3964R protocol.

0x8B 139 WrongBaudrate

Probably the wrong baud rate has been selected on the EKS or in the ActiveX

®

module.

0xA0 160 DeviceNotOpened

The connection to the EKS has not been opened, please run the method Open.

0xA1 161 DeviceNotAvailable

The serial interface selected is not available.

0xA2 162 DeviceInUse

The serial interface selected is in use by another application and is not available.

0xB0 176 ReadTimeOut

It was not possible to correctly complete the method Read, the method has timed out.

0xB1 177 WriteTimeOut

It was not possible to correctly complete the method Write, the method has timed out.

0xB2 178 TimeOut

An internal method in the ActiveX

®

module has timed out.

0xC0 192 NothingToRead

The number of bytes of data to be read, as defined by the property CountData, is 0.

0xC1 193 NothingToWrite

The number of bytes of data to be written, as defined by the property CountData, is 0.

0xD0 208 PortNotOpened

The serial interface is not open, please check the setting for the property Port and run the method Open.

0xE0 224 OpenFailed

The method Open failed.

0xE1 225 OpenActive

The method Open is still active.

0xE6 230 USBReConnected

The connection to the EKS USB has been re-established.

0xE7 231 USBDisConnected

The connection to the EKS USB has been disconnected.

0xE8 232 Suspend

The computer will be placed in the suspend mode.

0xE9 233 ResumeSuspend

The suspend mode has been terminated.

0xFF 255 Busy

The ActiveX

®

module is busy processing a method, the request cannot be run.

098655-03-10/12

Subject to technical modifications

Page 11

/

20

Advertising