0% found this document useful (0 votes)
37 views32 pages

Ark 710 A

This document provides an interface manual for the NIDEK ARK-710A auto refractometer. It describes: 1. The basic specifications of the RS-232C interface for transmitting measurement data from the ARK-710A to an external PC, including transmission speed, bit length, and connector type. 2. The two transmission sequence options - "NIDEK" and "NCP10" - that can be selected via a setup parameter, and how they differ in features like DTR/DSR control and checksum inclusion. 3. Wiring diagrams and specifications for connecting the ARK-710A interface connector to a PC's serial port. 4. Examples of command formats

Uploaded by

cheng jimmy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views32 pages

Ark 710 A

This document provides an interface manual for the NIDEK ARK-710A auto refractometer. It describes: 1. The basic specifications of the RS-232C interface for transmitting measurement data from the ARK-710A to an external PC, including transmission speed, bit length, and connector type. 2. The two transmission sequence options - "NIDEK" and "NCP10" - that can be selected via a setup parameter, and how they differ in features like DTR/DSR control and checksum inclusion. 3. Wiring diagrams and specifications for connecting the ARK-710A interface connector to a PC's serial port. 4. Examples of command formats

Uploaded by

cheng jimmy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

NIDEK

AUTO REFRACTOMETER

ARK-710A
INTERFACE MANUAL

MRK4D*RTZ001B/E
TOTAL PAGE: 32
2005. 2. 8
NIDEK CO., LTD. : 34-14, Maehama, Hiroishi-cho, Gamagori, Aichi 443-0038, Japan
(Manufacturer) Telephone: (0533) 67-6611
Facsimile: (0533) 67-6610
NIDEK CO., LTD : 6th Floor, Takahashi Bldg., No.2, 3-chome, Kanda-jinboucho
(Tokyo Office) Chiyoda-ku, Tokyo 101-0051, Japan
Telephone: (03) 3288-0571
Facsimile: (03) 3288-0570
Telex: 2226647 NIDEK J
NIDEK INCORPORATED : 47651 Westinghouse Drive Fremont, California 94539, U. S. A.
(United States Agent) Telephone: (510) 226-5700
Facsimile: (510) 226-5750
NIDEK SOCIETE ANONYME : Europarc 13, rue Auguste Perret, 94042 CRETEIL, France
(Authorized Representative) Telephone: (01) 49 80 97 97
Facsimile: (01) 49 80 32 08
Table of Contents

§1 OUTLINE ...................................................................................................................... 1-1


1.1 Basic specifications of interface ................................................................................... 1-1
1.2 Single conductor connection ....................................................................................... 1-2

§2 TRANSMISSION SEQUENCE ................................................................................... 2-1


2.1 In the case of “NIDEK” ............................................................................................. 2-1
2.2 In the case of “NCP10” ............................................................................................. 2-2

§3 COMMAND FORMAT (FOR “NIDEK”) ................................................................. 3-1

§4 DATA FORMAT ........................................................................................................... 4-1

§5 “CR” (CARRIAGE RETURN) CODE ....................................................................... 5-1

§6 TRANSMISSION OF SAGITTAL MEASURED DATA ............................................ 6-1

§7 PREPARATION OF INTERFACE ARK-710A ↔ EXTERNAL PC .............................................. 7-1

§8 INTERFACE PROGRAM ARK-710A ↔ EXTERNAL PC .............................................................. 8-1


8.1 Flow of the sample program ....................................................................................... 8-1
8.1.1 When “I/F Mode” is set to NIDEK: .................................................................. 8-1
8.1.2 When “I/F Mode” is set to NCP10: ................................................................... 8-2
8.2 Sample program ......................................................................................................... 8-3
8.2.1 When “I/F Mode” is set to NIDEK: .................................................................. 8-3
8.2.2 When “I/F Mode” is set to NCP10: ................................................................... 8-5

§9 EXAMPLE OF DATA TRANSMISSION ................................................................... 9-1


9.1 Printed data and transmission data .............................................................................. 9-1
9.2 Sample of KM output data when “I/F Format” is set to Short ...................................... 9-5

§10 ERROR MESSAGE ON INTERFACE ................................................................... 10-1


§1 OUTLINE
In order to transmit the measurement data with ARK-710A to an external computer, ARK-710A is
provided with RS-232C interface as the standard function. This manual provides the way to receive the
measurement data from ARK-710A utilizing this interface.

This section introduces the specifications of interface for transmission between ARK-710A and a
personal computer, etc.

1.1 Basic specifications of interface


1) Basic specifications : Conform to RS232C specifications
2) Connector : DIN 8 pin
3) Transmission form : Asynchronous (start-stop)
4) Transmission mode : Half duplex
5) Transmission speed : 9600/4800/2400/1200 bit/sec
6) Bit length : 8/7 bit
7) Parity check : Odd parity
8) Stop bit length : 1 bit
9) Data code : ASC II code
10) CR code : YES/NO

*As Transmission mode, Parity check, and Stop bit length are fixed as above, it is necessary for
the external computer to uniform these conditions.
1-2

1.2 Signal conductor connection

㧝 㧝
4'& 4'&
4:& 㧞 㧞 6:&
140 140
6:& 㧟 㧟 4:&
$.7 ;'.
&64 㧠 㧠 465

㧡 $.74'& 㧡 %65
5)0&
External computer
&54 㧢 )4; $.7
㧢 &54
ARK-710A
Serial transmission port
465 㧣 ;'. $.74'&
㧣 5)0&
Interface connector side
(RS-232C)
)4;
%65 㧤 㧤 &64

㧥 㧱 ()0&

()0& 㧱

Dsub 9P (female) DIN 8P

㪈 㪌 㪉
㪌 㪋

㪊 㪈

㪍 㪎 㪍

Connect side of ARK-710A interface connector with serial transmission port (RS-232C) of the
external computer by using the above interface cable (model:OPIF-11)
The interface cable can be used with either “Nidek” or “NCP10”of the I/F mode (transmission sequence).

If the connector of the external computer side is different from the above (Dsub 9P), a conversion
adapter is needed.
§2 TRANSMISSION SEQUENCE
Two kinds of the transmission sequences, “NIDEK” and “NCP10”, can be selected by setup of the
“I/F Mode” of the parameter.

Communication sequence NIDEK NCP10


DTR/DSR control Yes No
RS/SD command control Yes No
Data transmission Not
Available
by the demand from a PC available
Checksum data No Yes

A setup of "NIDEK" is the same as the conventional transmission sequence.


Pressing button performs data transmission in the setup of “NCP10”. Since complicated controls
of DTR/DSR control, and RS/SD command control, etc., are not needed, “NCP10” can communicate
easily compared with "NIDEK". However, it does not correspond to data transmission by the demand
from a personal computer side. Please use the transmission sequence suitable for the purpose.
* Set the parameter «58: Eye Care C (LM)» to “NO” to send the data demanded by an external
computer with the parameter «51: I/F Mode» set to “NIDEK”.

2.1 In the case of “NIDEK”


DTR/DSR control is as follows.

Transmitter
Same timing

Same timing

Receiver

T1, T2 ≤ 0.1 sec.


(Time limit: T1, T2 > 0.1 sec.)
Take down DTR as soon as possible after sent and received EOT.
2-2
RS/SD command control is as follows.
[When the print button is pressed:]

ARK-710A External computer


Print button

RS command

SD command

Data

[When the data is demanded from an external computer:]

ARK-710A External computer

SD command

Data

CL command

2.2 In the case of “NCP10”


DTR/DSR control is not performed. DTR signal of the ARK-710A is always low on the circuit. DTR
signal of the external computer side does not affect the transmission in either condition.
Moreover since RS/SD command control is not performed, pressing the print button sends the
data directly.

ARK-710A External computer


Print button

Data
§3 COMMAND FORMAT (FOR “NIDEK”)
All characters for the transmitting and receiving data are adapted for ASCII code.

1) RS command (Demands 2) SD command to the external computer from the ARK-710A)

SOH C * * STX R S ETB EOT


H: HEX (16 radix)
01H 43H 2AH 2AH 02H 52H 53H 17H 04H

2) SD command (Demands measured data transmission to the ARK-710A from the external
computer)

1) When the AR measured data is demanded:

SOH C R M STX S D ETB EOT

2) When the KM measured data is demanded:

SOH C K M STX S D ETB EOT

3) When the AR and KM measured data are demanded:

SOH C R K STX S D ETB EOT

3) CL command (Demands to clear the measurement data to the ARK-710A from the external
computer)

SOH C R M STX C L ETB EOT

SOH C K M STX C L ETB EOT

SOH C R K STX C L ETB EOT

The all clear processing performs to the above header. When the all clear processing performs,
the next measurement is prepared such as the time of pressing the print button .
When the measurement is started after preparation, previous data is all cleared and the next
patient’s data is measured.
§4 DATA FORMAT

1) Basic format
1) AR measured data
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○

SOH D R M STX ETB ETB ETB EOT


○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○

Data ƒ fData
•[ƒ^ ƒData
f•[ƒ^

2) KM measured data
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○

SOH D K M STX ETB ETB ETB EOT


○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○

ƒ fData
•[ƒ^ ƒ f Data
•[ƒ^ ƒ fData
•[ƒ^

3) AR and KM measured data


○ ○ ○ ○ ○ ○ ○ ○ ○

SOH D R M STX ETB ETB


○ ○ ○ ○ ○ ○ ○ ○ ○

ƒ fData
•[ƒ^ ƒ fData
•[ƒ^ ƒ fData
•[ƒ^
○ ○ ○ ○ ○ ○ ○ ○

SOH D K M STX ETB ETB EOT


○ ○ ○ ○ ○ ○ ○ ○

ƒf•[ƒ^
Data ƒData
f•[ƒ^
After the ARK-710A receives SD command, it will start the transmission of the measured data in
this format.
When the transmission sequence (I/F Mode) is set to “NCP10”, four digits of checksum are
inserted after “EOT” of each data format.

2) Transmission data of the ARK-710A


a ) Company name / Model name b) Patient number
c ) Patient ID d) Date and time of measurement
e ) Vertex distance f) Working distance
g ) Objective measured data h) Contact lens conversion data
i ) Trial lens data j) Pupil distance
k ) KM measured data l) Corneal size measured data
m) Pupil size measured data n) Checksum

3) Data
The number inside the parentheses indicates the number of transmission character.
a) Company name / Model name

7 1

ID code Company name Model name


* When the parameter item No.52 “I/F Format” is set to Short and the only KM data is
demanded (refer to 2) of the section 3), company name and model name are not transmitted.
4-2

b) Patient number

No. code Patient number (4)


c) Patient ID
Transfer the data when the patient ID is inputted by the bar code reader.

IP code Patient ID Transfer the number of inputted letters (maximum 31 letters).


(20 letters for printing)
d) Data and time of measurement
1) When “Date Format” is set to “Y.M.D” :

Date code Year (4) Month (2) Date (2) Hour (2) Minute (2) AM/PM (2)

2) When “Date Format” is set to “M.D.Y” :

Date code Month (3) Date (2) Year (4) Hour (2) Minute (2) AM/PM (2)

3) When “Date Format” is set to “D.M.Y” :

Date code Date (2) Month (3) Year (4) Hour (2) Minute (2) AM/PM (2)

e) Vertex distance

VD code Vertex distance (5)


4-3
f) Working distance

3 5

WD code Working distance (2)

g) Objective measured data


When selected value is taken after three or more measurements, the order of transmission is
from the selected value to each value (from the last value to former ones). The order of R/L is
from L to R. If “IOL ( * ) Mark” is set to YES, IOL measured mark “*” is inserted on the
data that was measured by AR in the condition of indicating the IOL ON mark.

1) Left eye data

R/L code (2) SPH (6) CYL(6) AXIS (3) Confidence IOL
code (1) measured
2) Right eye data mark (1)

R/L code (2) SPH (6) CYL(6) AXIS (3) Confidence IOL
code (1) measured

3) Reference value (Confidence index is “E”.) mark (1)

If “Error Data” is set to YES, the data whose Confidence index (indicates the degree of
reliance) is under 5, can be measure as a reference value. In this case, “E” is inserted to the
end of the transmitted data.

R/L code (2) SPH (6) CYL(6) AXIS (3) Confidence E IOL
code (1) code measured
(1) mark (1)
4-4
4) Error data
If “Error Print” is set to YES, the Error is stored in memory and transmitted together with the
measured AR values.
Kind of error Contents
+0 +SPH range over
-0 -SPH range over
C0 CYL over
Err. code Kind of error (2)

* If the parameter “I/F format” is set to Short;


1) Only the selected value as objective measured data is transmitted.
2) When the selected value could not be obtained, only the last one in the values whose
confidence index is not under 5 is transmitted.
3) When only reference values could be obtained, the last value is transmitted simply.
4) The “Error” data is not transmitted.
h) Contact lens conversion data
1) Left eye data

R/L code (2) SPH (6) CYL(6) AXIS (3)

2) Right eye data

R/L code (2) SPH (6) CYL(6) AXIS (3)

i) Trial lens data


1) Left eye data

R/L code (2) SPH (6) CYL(6) AXIS (3)

2) Right eye data

R/L code (2) SPH (6) CYL(6) AXIS (3)

* If the parameter “TL Print” is set to NO, the trial lens data is not transmitted.
Also, if the selected value could not be obtained, no data is transmitted.
4-5
j) Pupil distance
1) When both right and left PD values are measured:

PD code PD (2) R.PD (2) L.PD (2) N.PD (Near point PD) (2)

2) When Far point PD value only:

PD code PD (2) R.PD (2) L.PD (2) N.PD (Near point PD) (2)

* If the parameter “Near PD” is set to NO, only ”??” is transmitted.


* If the PD values are measured more than one time, the measured data is transmitted in new
order. However, if the parameter “I/F format” is set to Short, only the last PD value is transmitted.
k) KM measured data
When the selected valued is taken after three or more measurements, the order of transmission
is from the selected value to each value ( from the last value to former ones). The order of R/
L is from L to R.

* If the parameter item No. 52 “I/F Format” is set to Short:


1) Only the selected value as KM measured data is transmitted.
2) When the selected value could not be obtained, only the last one among the measured
data is transmitted.
3) Data (D) (unit of data is Diopter) is not transmitted.

1) Left eye (mm) data

R/L code (2)

2) Left eye (D) data

R/L code (2)


4-6
3) Right eye (mm) data

R/L code (2)

R/L code (2)

l) CS (Corneal size) measured data


* If the parameter item No. 52 “I/F Format” is set to Short, this data is not transmitted.

1) Left eye data 2) Right eye data

R/L code (2) R/L code (2)

m) PS (Pupil size) measured data


* If the parameter item No. 52 ”I/F Format” is set to Short, the data is not transmitted.

1) Left eye data 2) Right eye data

R/L code (2) Target lamp (1) R/L code (2) Target lamp (1)

“ Target lamp” transfers the state of the target lamp during PS measuring.

N: Target lamp ON
F: Target lamp OFF
4-7

n) Checksum
If the parameter “I/F Mode” is set to NCP10, checksum is inserted on the data format. It is
inserted after “EOT” of each data format.

Data Checksum (4)

The checksum is indicated with the hexadecimal numeral of 4 digits. The value of the checksum
is the simple sum from "SOH" to "EOT" of the data format. However, the "CR" code is not
obtained in calculation of the checksum when the "CR" code is inserted.
§5 “CR” (CARRIAGE RETURN) CODE

When the personal computer is used as the external computer for receiving the data, it may be
necessary to insert “CR” code into the end of transmitting data for one line. It is possible for ARK-
710A to insert “CR” code into the end of the data or not. (Refer to 3) of the section 6 )
The transmitting data are as follows when “CR” code is inserted.

1) RS command with “CR” code

“CR” code is inserted into the end of data.

2) Data with “CR” code (When “I/F Mode” is set to NIDEK)

Data Data Data

“CR” code is inserted into both positions after the “ETB” code and the end of data.

3) Data with “CR” code (When “I/F Mode” is set to NCP10)

Data Data Data

Checksum
“CR” code is inserted into both positions after the “ETB” code and the end of data.
§6 TRANSMISSION OF SAGITTAL MEASURED DATA

The transmission format of each data of Sagittal measurement is described hereunder.


Sagittal measurement data are shown in the print out sample as below from following
to KM measured data. Basic transmitting and receiving sequences are stipulated in the
aforementioned§ 2.

Printed data by ARK-710A Transmission format

DKM
NO.0001
DADEC/18/2002.10:50AM
L08.5107.8410008.18
DL39.6643.0510041.36-03.39
FA25
LS07.8608.53+0.16A
LI07.8608.53+0.16A
LT08.5507.87+0.24A
LN08.5507.87+0.24A
LE+0.24+0.16+0.20
LR07.8708.5208.18+0.67
LA-03.39-03.26-00.13

= 01H SOH
= 02H STX
= 17H ETB
1 = 04H EOT
= 0DH is added in
accodance with setting.
6-2

Header : This signifies KM measured data to be transmitted.


Patient number
Measured date and time
KM measured (mm) data : R1(5), RS(5), AXIS(3), AVE(5)
KM measured (D) data : R1(5), AXIS(3), AVE(5), CYL(6)
Fixed angle in Sagittal measurement : FIXED ANGLE(2)
Sagittal value for SUP. direction : SAGIT1(5), SAGIT2(5), ECC(5), A/F(1)
Sagittal value for INF. direction : SAGIT1(5), SAGIT2(5), ECC(5), A/F(1)
Sagittal value for TEM. direction : SAGIT1(5), SAGIT2(5), ECC(5), A/F(1)
Sagittal value for NAS. direction : SAGIT1(5), SAGIT2(5), ECC(5), A/F(1)

Among the each Sagittal values from to their meanings are :


SAGIT1 : Measured value
SAGIT2 : Measured value including dRO
ECC : Each eccentricity
A/F : Whether calculation for conversion axis is made or not.
(A : Conversion of axis is made.)
Horizontal, Vertical and Total eccentricity : eh(5), ev(5), E(5)
Each corneal radius values : Rh(5), Rv(5), Ro(t), dRo(5)
Horizontal corneal radius average value : (Rh)
Vertical corneal radius average value : (Rv)
Central corneal radius average value : (Ro)
Central corneal radius differences : (dRo)

Cylindrical diopters and its differences at center and peripheral


: ASTc(6), ASTp(6), dAST(6)
Central corneal cylinder diopter : (ASTc)
Peripheral corneal cylinder diopter : (ASTp)
Difference of corneal cylinder diopter
between center and peripheral : (dAST)

* Values in the parentheses ( ) show the data length.

* When data are output, all data are printed out with the above format
regardless the Sagittal printing format.
§7 PREPARATION OF INTERFACE ARK-710A EXTERNAL PC

Actual transmission method is explained with attached sample program in this section. The external
computer uses the IBM PC compatible (IBM100% COMPATIBLE).

1) Connect side of ARK-710A interface connector with serial transmission port (RS-232C) of
the external computer by using the interface cable (OPIF-11).

2) Input the sample program of one of transmission sequences into the external computer.
BASIC application uses Visual Basic.

3) Set up ARK-710A as follows.

“I/F Mode” : Depending of the sample program.


“Baud-Rate” : 9600
“Bit Length” : 8
“CR Code” : YES
Refer to the operator’s manual “8.1 Setting parameters” for the setting method of the
parameter.

4) Perform the measurement by the ARK-710A and press the print button in the condition that
the sample program is operating.
If the transmission performs normally, measured data is displayed on the monitor of the computer.

When “I/F Mode” is set to NIDEK When “I/F Mode” is set to NCP10
§8 INTERFACE PROGRAM ARK-710A EXTERNAL PC

8.1 Flow of the sample program

8.1.1 When ”I/F Mode” is set to NIDEK:


[External PC]

[ARK-710A]
8-2

8.1.2 When “I/F Mode” is set to NCP10:

[External PC]

[ARK-710A]
8-3

8.2 Sample program

8.2.1 When “I/F Mode” is set to NIDEK:


'**********************************************
'* Input DATA from ARK/AR for IBM PC-AT *
'* Sample Program for I/F Mode = NIDEK *
'* (Visual Basic) *
'**********************************************
' Setting of ARK/AR
' I/F Mode = NIDEK
' Baud-Rate = 9600
' Bit Length = 8
' CR Code = NO
'
Dim TimeupFlag, RecEotFlag As Integer
Dim Buf, L_Buf As String
Private Sub Form_Load()
' Initialize Display Messages
Text1.Text = ""
Label1.Caption = "Receive Data"
Label3.Caption = "Communication with AR/ARK"
Label4.Caption = "Push Start Button"
Command1.Caption = "Start"
' Initialize MSComm Control
MSComm1.CommPort = 1
MSComm1.Settings = "9600,o,8,1"
MSComm1.RThreshold = 1
End Sub
Private Sub Command1_Click()
CRM_SD = Chr(1) + "CRM" + Chr(2) + "SD" + Chr(23) + Chr(4) ' SD command for AR
CRK_SD = Chr(1) + "CRK" + Chr(2) + "SD" + Chr(23) + Chr(4) ' SD command for ARK
CXX_RS = Chr(1) + "C**" + Chr(2) + "RS" + Chr(23) + Chr(4) ' RS command
Text1.Text = ""
Label4.Caption = "Initializing... "
' Open COM1 port
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True ' Serial Port open
MSComm1.DTREnable = False ' DTR off
Timer1.Enabled = False
Timer1.Interval = 2000
Timer1.Enabled = True: TimeupFlag = False
Do ' Waiting for DSR turn off
DoEvents
Loop Until TimeupFlag = True
End If
Label4.Caption = "Waiting for RS command (DSR)"
L_Buf = "": RecEotFlag = False
Do ' Check DSR
DoEvents
Loop Until MSComm1.DSRHolding = True
Label4.Caption = "Waiting for RS command (Text)"
Timer1.Interval = 5000
Timer1.Enabled = True: TimeupFlag = False
MSComm1.DTREnable = True ' DTR on
Do ' Waiting for RS command
DoEvents
If TimeupFlag = True Then
Exit Do
End If
Loop Until RecEotFlag = True
If L_Buf = CXX_RS Then
8-4
Label4.Caption = "Waiting for SD command transmitting (DSR)"
L_Buf = "": RecEotFlag = False
Do ' Check DSR
DoEvents
Loop Until MSComm1.DSRHolding = True
MSComm1.Output = CRM_SD ' Send SD command for AR
Label4.Caption = "Waiting for DATA (Text)"
Timer1.Interval = 5000
Timer1.Enabled = True: TimeupFlag = False
Do ' Waiting for Data
DoEvents
If TimeupFlag = True Then
Exit Do
End If
Loop Until RecEotFlag = True
If RecEotFlag = True Then
Label4.Caption = "Finished DATA receiving" & vbNewLine & "Push Start Button"
Else
Label4.Caption = "EOT error !!!" & vbNewLine & "Push Start Button"
End If
Else
Label4.Caption = "RS Command Error (Terminated)" & vbNewLine & "Push Start Button"
End If
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
End Sub

Private Sub MSComm1_OnComm()


Select Case MSComm1.CommEvent
Case comEvReceive ' Receive
Buf = MSComm1.Input
L_Buf = L_Buf + Buf
Text1.Text = Text1.Text + Buf
If Right$(L_Buf, 1) = Chr(4) Then ' Check end of data
RecEotFlag = True
Text1.Text = Text1.Text + vbNewLine
End If
Case comEvCTS
Case comEvDSR
Case comEvCD
Case comEvRing
Case comEvEOF
Case Else
MsgBox "Error", vbCritical
End Select
End Sub
Private Sub Form_Unload(Cancel As Integer)
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
End Sub

Private Sub Timer1_Timer()


TimeupFlag = True
Timer1.Enabled = False
End Sub
8-5

8.2.2 When “I/F Mode” is set to NCP10:


'**********************************************
'* Input DATA from ARK/AR for IBM PC-AT *
'* Sample Program for I/F Mode = NCP10 *
'* (Visual Basic) *
'**********************************************
' Setting of ARK/AR
' I/F Mode = NCP10
' Baud-Rate = 9600
' Bit Length = 8
' CR Code = NO
'
Dim TimeupFlag, RecEotFlag As Integer
Dim Buf, L_Buf As String
Private Sub Form_Load()
' Initialize Display Messages
Text1.Text = ""
Label1.Caption = "Receive Data"
Label3.Caption = "Communication with AR/ARK"
Label4.Caption = "Push Start Button"
Command1.Caption = "Start"
' Initialize MSComm Control
MSComm1.CommPort = 1
MSComm1.Settings = "9600,o,8,1"
MSComm1.RThreshold = 1
End Sub
Private Sub Command1_Click()
Text1.Text = ""
' Open COM1 port
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True ' Serial Port open
End If
L_Buf = ""
RecEotFlag = False
TimeupFlag = False
Timer1.Enabled = False
Label4.Caption = "Waiting for DATA receiving"
Do ' Waiting for Data
DoEvents
If RecEotFlag = True Then
Exit Do
End If
Loop Until TimeupFlag = True
If RecEotFlag = True Then
Label4.Caption = "Finished Data Recieving" & vbNewLine & "Push Start Button"
Else
Label4.Caption = "EOT error !!!" & vbNewLine & "Push Start Button"
End If
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
End Sub
Private Sub MSComm1_OnComm()
Dim s As Integer
Select Case MSComm1.CommEvent
Case comEvReceive ' Receive Data
Buf = MSComm1.Input
L_Buf = L_Buf + Buf
Text1.Text = Text1.Text + Buf
If TimerFlag = False Then
Timer1.Enabled = True ' Timer Start
8-6
End If
Timer1.Interval = 1000 ' Set interval time
s = Len(L_Buf)
If s > 4 Then
If Mid$(L_Buf, s - 4, 1) = Chr(4) Then
RecEotFlag = True
Timer1.Enabled = False
End If
End If
Case comEvCTS
Case comEvDSR
Case comEvCD
Case comEvRing
Case comEvEOF
Case Else
MsgBox "Error", vbCritical
End Select
End Sub
Private Sub Form_Unload(Cancel As Integer)
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
End Sub

Private Sub Timer1_Timer()


TimeupFlag = True
Timer1.Enabled = False
End Sub
§9 EXAMPLE OF DATA TRANSMISSION

9.1 Printed data and Transmission data


a. Printed data

---Patient No.
---Patient ID
---Name, Sex
---Measured date and time
---Pupil distance
---Working distance

---Right eye: 1st, Normal data


---Right eye: 2nd, Error (CYL over)
---Right eye: 3rd, Normal data
---Right eye: 4th, Reference value data
---Right eye: 5th, Normal data
---Right eye: Selected data
---Right eye: Trial lens data

---Right eye: Contact lens data


---Right eye: SE value data for contact lens

---Right eye: 1st, KM data

---Right eye: 2nd, KM data

---Right eye: 3rd, KM data

---Right eye: KM selected data

---Right eye: Corneal size data and Pupil size data

---Right eye: Contact lens brand,


Lens size, Base curve
9-2

---Left eye: 1st, Normal data


---Left eye: 2nd, Normal data
---Left eye: 3rd, Error (SPH-over)
---Left eye: 4th, Normal data
---Left eye: Selected data

---Left eye: Trial lens data

---Left eye: Contact lens data


---Left eye: SE value data for contact lens

---Left eye: 1st, KM data

---Left eye: 2nd, KM data

---Left eye: 3rd, KM data

---Left eye: KM selected data

---Left eye: Corneal size data and Pupil size data

---Left eye: Contact lens brand,


Lens size, Base curve
---Pupil distance: Far and near point
---Pupil distance: Far point (with single data) and near point

---Comment
9-3
b. Transmission data against example printed data

DRM .................................................. Header for AR data


IDNIDEK/ARK-710A .........................
Company name and Model name
NO0006 .................................................
Patient number
IP012345678901234567890 ................... Patient ID
DA2003/01/09.10:50AM ....................... Measured date and time
VD12.00 ................................................ Vertex distance
WD35 .................................................... Working distance
OL-04.25-00.25093 ............................... Left eye: AR selected data
OL-04.37-00.370909 ............................. 4th, Normal data
EL-O ...................................................... 3rd, Error (SPH-over)
OL-04.25-00.250939 ............................. 2nd, Normal data
OL-04.12-00.000008 ............................. 1st, Normal data
OR+00.25-00.37084 .............................. Right eye: AR selected data
OR+00.25-00.370869 ............................ 5th, Normal data
OR+00.75-00.75095E ............................ 4th, Reference value data
OR+00.25-00.500848 ............................ 3rd, Normal data
ERCO .................................................... 2nd, Error (CYL over)
OR+00.25-00.370839 ............................ 1st, Normal data
CL-04.00-00.75095 ............................... Left eye: Contact lens data
CR+00.25-00.25085 .............................. Right eye: Contact lens data
TL-04.00-00.75095 ................................ Left eye: Trial lens data
TR+00.00+00.25175 .............................. Right eye: Trial lens data
PD68353363 .......................................... Pupil distance: Far point (with single data) and near point
PD67????62 .......................................... Pupil distance: Far and near point
DKM .................................................. Header for KM data
L07.9507.7117607.83 ......................... Left eye: KM selected data (mm)
DL42.4543.7717643.11-01.32 ............... KM selected data (D)
L07.9507.7117607.83 ......................... 3rd, KM data (mm)
DL42.4543.7717643.11-01.32 ............... KM data (D)
L07.9507.7117607.83 ......................... 2nd, KM data (mm)
DL42.4543.7717643.11-01.32 ............... KM data (D)
L07.9607.7417707.85 ......................... 1st, KM data (mm)
DL42.4043.6017743.00-01.20 ............... KM data (D)
R07.8607.5317507.70 ......................... Right eye: KM selected data (mm)
DR42.9444.8217543.88-01.88 ............... KM selected data (D)
R07.8707.5317407.70 ......................... 3rd, KM data (mm)
DR42.8844.8217443.85-01.94 ............... KM data (D)
R07.8607.5317507.70 ......................... 2nd, KM data (mm)
DL42.9444.8217543.88-01.88 ............... KM data (D)
L07.8607.5317507.70 ......................... 1st, KM data (mm)
DL42.9444.8217543.88-01.88 ............... KM data (D)
SL11.5 .................................................... Left eye: Corneal size data
PL06.0F ................................................. Left eye: Pupil size data
SR11.0 ................................................... Right eye: Corneal size data
PR06.0N ................................................ Right eye: Pupil size data
BLNIDEK HARD 8.9 0.785 ...... Left eye: Contact lens brand, Lens size, Base curve
BRNIDEK HARD 8.9 0.770 . Right eye: Contact lens brand, Lens size, Base curve
9-4
* The following marks designate the control code.

= SOH 01H = ETB 17H = STX 02H = EOT 04H


* When “CR Code” is set to YES, CR is inserted after ETB.
* When the parameter “I/F Mode” is set to NCP10, four digits of checksum are inserted on the data
format after .
9-5

9.2 Sample of KM output data when “I/F” Format is set to Short


a. Print data sample

---Patient No.
---Name, Sex
---Measured date and time

---Right eye: KM selected data

---Right eye: Corneal size data and Pupil size data

---Right eye: Contact lens brand,


Lens size, Base curve

---Left eye: KM selected data

---Left eye: Corneal size data and Pupil size data

---Left eye: Contact lens brand,


Lens size, Base curve
---Comment

b. Transmission data against above example printed data

DKM .................................................. Header for KM data


NO0006 ................................................. Patient No.
DA2003/01/09.10:50AM ....................... Measured date and time
L07.9507.7117607.83 ......................... Left eye: KM selected data (mm)
R07.8607.5317507.70 .................... Right eye: KM selected data (mm)

Above are samples of transmitting data in the case SD command is CKM.(refer to 2) of the
section 3) As the “I/F Format” is set to Short, KM data is transmitted only for selected (mm)
data. Company name, model name, CS (Corneal size) and PS (Pupil size) measured data, and
CL select data are not transmitted.
§10 ERROR MESSAGE ON INTERFACE
If any error happens during communication between ARK-710A and the external computer, the
ERROR MESSAGE will be displayed on the display pannel.
If the parameter “Error code” is set to YES, the error code number will be displayed as follows.

Error code Table

Error code Parameter Content Symptom


NO YES
Activation of DSR does not become high
11 Err IF ERR 11 DSR Error 1
at receiving sequence of SD command.

Activation of DSR does not become high


12 Err IF ERR 12 DSR Error 2
at transmission of measured data.

13 Err IF ERR 13 Data Error Data to be received is not transmitted.

14 Err IF ERR 14 Overflow Too much buffer store of receiving data.

15 Err IF ERR 15 Command Error Received incorrect command.

16 no dAt. ERR 16 Data Empty No data to be transmitted.

You might also like