ASCII Code Table

ASCII Code Table
ASCII Code Table
Character
Hex
Decimal
Character
Hex
Decimal
Character
Hex
Decimal
NUL
0
0
+
2B
43
V
56
86
SOH
1
1
,
2C
44
W
57
87
STX
2
2
-
2D
45
X
58
88
ETX
3
3
.
2E
46
Y
59
89
EOT
4
4
/
2F
47
Z
5A
90
ENQ
5
5
0
30
48
[
5B
91
ACK
6
6
1
31
49
╲
5C
92
BEL
7
7
2
32
50
]
5D
93
BS
8
8
3
33
51
^
5E
94
HT
9
9
4
34
52
_
5F
95
NL
A
10
5
35
53
`
60
96
VT
B
11
6
36
54
a
61
97
NP
C
12
7
37
55
b
62
98
CR
D
13
8
38
56
c
63
99
SO
E
14
9
39
57
d
64
100
SI
F
15
:
3A
58
e
65
101
DLE
10
16
;
3B
59
f
66
102
DC1
11
17
<
3C
60
g
67
103
DC2
12
18
=
3D
61
h
68
104
DC3
13
19
>
3E
62
i
69
105
DC4
14
20
?
3F
63
j
6A
106
NAK
15
21
@
40
64
k
6B
107
SYN
16
22
A
41
65
l
6C
108
ETB
17
23
B
42
66
m
6D
109
CAN
18
24
C
43
67
n
6E
110
EM
19
25
D
44
68
o
6F
111
SUB
1A
26
E
45
69
p
70
112
ESC
1B
27
F
46
70
q
71
113
FS
1C
28
G
47
71
r
72
114
GS
1D
29
H
48
72
s
73
115
RS
1E
30
I
49
73
t
74
116
US
1F
31
J
4A
74
u
75
117
SPACE
20
32
K
4B
75
v
76
118
!
21
33
L
4C
76
w
77
119
"
22
34
M
4D
77
x
78
120
#
23
35
N
4E
78
y
79
121
$
24
36
O
4F
79
z
7A
122
%
25
37
P
50
80
{
7B
123
&
26
38
Q
51
81
|
7C
124
'
27
39
R
52
82
}
7D
125
(
28
40
S
53
83
~
7E
126
)
29
41
T
54
84
DEL
7F
127
*
2A
42
U
55
85
20
Command Table 4 Data Buffer Function
Transmit without Command 3 in reading out, or with Command 3 in writing. (→ 5. Transmission
Data Format (Command))
The string of Command 3 is received as a response when reading out, ">" is received in writing
respectively.
(→ 6. Incoming Data Format (Response))
For the details of Data Buffer Function (→ 8. Data Buffer Function)
Setting / Operating Data Buffer
Command 1 Command 2 Command 3
OFF
AFTER
MODE
BEFORE
CENTER
A
B
DATA
CAL
A&B
1
2
4
8
16
32
64
128
RATE
256
512
1024
2048
4096
8192
16384
BUFFER
32768
100
200
300
400
500
600
700
800
900
1000
SIZE
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
TRIGGER
READ
(*4)
Description (For details, refer to the term of Data Buffer Function in this manual.)
Setting Trigger Mode
When not using the Data Buffer function, set to OFF.
Default
OFF
Data Setting for Buffer (*4)
A
Setting Buffer Rate
1
Setting Buffer Size
100
Control Command (Buffer Trigger)
Control Command (Buffer Reading out) (*4)
The digit of 1μm of read out data always remains "0" in the following condition:《For CD4A》
・A is selected in data for the buffer setting and HEAD A is the 350 mm type.
・B is selected in data for the buffer setting and HEAD B is the 350 mm type.
・CAL or A&B is selected in data for the buffer setting and HEAD A or HEAD B is the 350
mm type.
19
Command Table 3 Operating Control Input (Control Command)
For the details of command. (→ 5. Transmission Data Format (Command))
For the details of response (→ 6. Incoming Data Format (Response))
Hold Input Control
Command 1
Command 2
−
−
HOLD A Input ON
Sending this command makes the same status as that when the
HOLD A input on the terminal board is turned ON.
The ON status is maintained until the following OFF command is
transmitted.
HOLD B Input ON
Sending this command makes the same status as that when the
HOLD B input on the terminal board is turned ON.
The ON status is maintained until the following OFF command is
transmitted.
HOLD A Input OFF
Sending this command makes the same status as that when the
HOLD A input on the terminal board is turned OFF.
The OFF status is maintained until the following ON command is
transmitted.
HOLD B Input OFF
Sending this command makes the same status as that when the
HOLD B input on the terminal board is turned OFF.
The OFF status is maintained until the following ON command is
transmitted.
HOLD RST Input
Sending this command makes the same status as that when the
HOLD RST input on the terminal board is turned ON.
(There is no OFF command as the HOLD RST input is not the
level input but the edge input.)
ON_A
ON_B
HOLD_IN
Description (Be sure to refer to the Amplifier Instruction Manual as well.)
OFF_A
OFF_B
RESET
Zero Reset Input Control
Command 1
Command 2
A
B
ZERO
CAL
CAN_A
CAN_B
CAN_CAL
18
−
Description
Zero Reset (HEAD A)
Zero-resets the measurement value of HEAD A.
Zero Reset (HEAD B)
Zero-resets the measurement value of HEAD B.
Zero Reset (Calculation Result)
Zero-resets the calculation result.
Cancellation of Zero Reset (HEAD A)
Cancels the zero reset status of HEAD A measurement value.
Cancellation of Zero Reset (HEAD B)
Cancels the zero reset status of HEAD B measurement value.
Cancellation of Zero Reset (Calculation Result)
Cancels the zero reset status of calculation result.
−
Command Table 2 Reading out Measurement Value / Control Output
For the details of command. (→ 5. Transmission Data Format (Command))
For the details of response (→ 6. Incoming Data Format (Response))
Reading out of Measurement Value / Control Output
Command 1 Command 2
− Description (Be sure to refer to the Amplifier Instruction Manual as well.)
Reading out of HEAD A Measurement Value
The current measurement value of HEAD A is set as the
A
response. (only 1 data) (*1)
Reading out of HEAD B Measurement Value
The current measurement value of HEAD B is set as the
B
response. (only 1 data)(*1)
Reading out of Calculation Result
The current Calculation Result is set as the response. (only 1
CAL
data)(*2)
Reading out of Control Output (JDGE 1)
Reads out the state of current control output (JDGE 1).
Q1
Response will be "ON" or "OFF."
Reading out of Control Output (JDGE 2)
Reads out the state of current control output (JDGE 2).
Q2
Response will be "ON" or "OFF."
MEASURE
Reading out of Control Output (JDGE 3)
Reads out the state of current control output (JDGE 3).
Q3
Response will be "ON" or "OFF."
Reading out of Control Output (JDGE 4)
Reads out the state of current control output (JDGE 4).
Q4
Response will be "ON" or "OFF."
Reading out of Control Output (JDGE 5)
Reads out the state of current control output (JDGE 5).
Q5
Response will be "ON" or "OFF."
Reading out of Alarm Output (ALM A)
ALARM_A
Reads out the status of current HEAD A alarm output (ALM A).
Response will be "ON" or "OFF."
Reading out of Alarm Output (ALM B)
ALARM_B
Reads out the state of current HEAD B alarm output (ALM B).
Response will be "ON" or "OFF."
Continous Reading out of Measurement Value
Command 1 Command 2
− Description
Continuous Reading out of Measurement value of HEAD A
After accepting this command, CD4 transmits the HEAD A
START_A
measurement value to the PC continuously. (*3)
Continuous Reading out of Measurement value of HEAD B
START_B
After accepting this command, CD4 transmits the HEAD B
measurement value to the PC continuously. (*3)
MEASURE
Continuous Reading out of Calculation Result
START_CAL
After accepting this command, CD4 transmits the calculation
result to the PC continuously. (*3)
Stopping of Continuous Reading out
STOP
After accepting this command, CD4 stops the continuous
reading out.
−
−
(*1) When the 350 mm type is connected, the digit of 1 μm always remains "0."《For CD4A》
(*2) When the 350 mm type is connected to HEAD A or HEAD B, the digit of 1 μm always remains "0."《For
CD4A》
(*3) Transmission speed is 1 character per 5 - 10 ms, regardless the baud rate.
CR (0DH) is inserted between measurement values or calculation results.
To stop continuous reading out, be sure to use the "Continuous Reading out Stop" command
"MEASURE( )STOP." Even though the continuous reading out stops after accepting the command other
than the stop command, the response against it cannot be guaranteed.
17
Memory Setting
Command 1 Command 2
WRITE
MEMORY
RESET
Bank Setting
Command 1 Command 2
BANK
BANK
Command 3
ENABLE
DISABLE
NO
YES
Command 3
0
1
2
3
4
5
6
7
Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Memory Writing Setting
Sets whether or not to save the record to the memory ENA
BLE
when performing the Zero-reset.
All Setting Reset
Writing YES resets all settings to the factory defaults.
NO
Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Bank Setting
Switches the banks. (0 - 7). Either the bank switching
button or the bank input terminal is also available to
switch. The bank number set at the power rising is the
final bank set with the button or this command when
0
the bank input terminal is 0 (in the state that the
terminal is not connected), and becomes bank set in
the input terminal when the bank input terminal is
other than 0.
The value in ( ) of the initial value field is for CD4A-L.
16
Analog Output Setting
Command 1 Command 2
CAL_HI
CAL_LO
Description (Be sure to refer to the Amplifier Instruction Manual as well.)
Setting of Analog Output Range of Calculation
Result
《For CD4A》
To use this function, set the OUTPT setting on the
±9999.999
screen to [ ][CAL].
《For CD4A-L》
The analog output of calculation result is output
±999.9999
from ANALOG B terminal.
Command 3
AB
ANALOG
OUTPUT
CAL
SFT_A
±5.000
SFT_B
±5.000
SPN_A
0.100 to 1.000
SPN_B
0.100 to 1.000
Sensor Head Sensitivity Setting
Command 1 Command 2 Command 3
AUTO
MAX
9
8
7
6
A
5
4
3
2
1
MIN
SENS
AUTO
MAX
9
8
7
6
B
5
4
3
2
1
MIN
Time Setting
Command 1 Command 2
MODE
TIMER
TIMER
Command 3
OFF
OFF_DELAY
ON_DELAY
1SHOT
0.000 to
60.000
Analog Output Setting
Selects whether to analog-output the measurement
value of Sensor head A/B as they are or to analogoutput the calculation result. (They cannot be output
at the same time.)
Defalut
+5.000
(+1.0000)
-5.000
(-1.0000)
AB
Analog Output Shift Setting
Allows adding/subtracting any value to ANALOG A
output and ANALOG B output. This setting value can +0.000
be automatically set with the Zero-reset function. A
and B indicate HEAD A and HEAD B respectively.
Analog Output Span Setting
Enables to set slant of ANALOG A output and 1.000
ANALOG B output.
Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Sensor Head Sensitivity Setting
Sets the sensitivity of HEAD A and HEAD B. Normally
use AUTO.
Setting the sensitivity to AUTO allows automatic
switching from MIN to MAX
in accordance with the work. In this case, 2 sampling
cycles are required to switch the
sensitivity by 1 step. Thus, the time required for
switching from MIN to MAX is:
2 sampling cycles x 10 steps = 2 ms.
Measurement may fail while the sensitivity is
switching.
Fixing the sensitivity (setting to other than AUTO)
AUTO
prevents the sensitivity from switching.
However, measurement may fail due to shortage of
sensitivity if the work status
changes significantly.
When fixing the sensitivity, set to the following as a
standard:
Minimum measurable sensitivity + 4 (MAX when this
value exceeds 9)
Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Timer Mode Setting
Sets the delay mode for control output.
OFF
Delay Time Setting
0.000
15
Hold Setting
Command 1 Command 2
Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
HEAD A Hold Setting
Selects the Hold mode of HEAD A. The hold operation
SAMPLE
is to be performed with inputting HOLD A
and HOLD RST. (Operation can be performed with the
PEAK
operation command.)
BOTTOM
To use this function, set the INPUT setting on the OFF
screen to [A][B].
P-P
Selecting OFF (normal measurement) allows to laser
AUTOPEAK off HEAD A with HOLD A inputting
AUTOBOTOM (and the corresponding command).
Command 3
OFF
A
B
HEAD B Hold Setting
Selects the Hold mode of HEAD B. Operate the Hold
with the inputting HOLD B and
HOLD RST. (Operation can be performed with the
PEAK
operation command.)
BOTTOM
To use this function, set the INPUT setting on this OFF
screen to [A][B].
P-P
Selecting OFF (normal measurement) allows to laser
AUTOPEAK off HEAD B with HOLD B inputting
AUTOBOTOM (and the corresponding command).
CAL
OFF
SAMPLE
PEAK
BOTTOM
P-P
AUTOPEAK
AUTOBOTOM
OFF
SAMPLE
HOLD
AB
INPUT
CAL
ALARM
CLAMP
HOLD
Control (Judging) Output Setting
Command 1 Command 2 Command 3
Q1_HI
Q1_LO
Q2_HI
Q2_LO
Q3_HI
CONTROL
Q3_LO
Q4_HI
Calculation Result Hold Setting
Selects the Hold mode of calculation result. Operate
the Hold with inputting HOLD B
and HOLD RST. (Operation can be performed with the
OFF
operation command.)
To use this function, set the INPUT setting on the
screen to [ ][CAL].
Hold Input Setting
Selects whether to use the Hold function to the
measurement value of Sensor head A/B or to the
calculation result (CAL). (They cannot be used at the
same time.)
Measurement Value Setting in Alarm
Sets the state of measurement value when the CLAMP
measurement is impossible.
Description (Be sure to refer to the Amplifier Instruction Manual as well.)
Upper/Lower Limit Setting
Sets the upper/lower limit of five control outputs. (The
control output is performed against the calculation
results. Set the calculation expression setting to A (or
B) when using the Sensor head A (or B) alone.)
《For CD4A》
±9999.999
《For CD4A-L》
±999.9999
Q4_LO
Q5_HI
Q5_LO
HYSTE
14
AB
《For CD4A》 Hysteresis Setting
0 to 9999.999 Sets the hysterisis of Control output.
《For CD4A-L》 (Do not write a negative value.)
0 to 999.9999
Defalut
+3.000
(+0.6000)
+2.000
(+0.4000)
+2.000
(+0.4000)
+1.000
(+0.2000)
+1.000
(+0.2000)
-1.000
(-0.2000)
-1.000
(-0.2000)
-2.000
(-0.4000)
-2.000
(-0.4000)
-3.000
(-0.6000)
0.100
(0.0200)
Command Table 1 Reading out / Writing Setting
Transmit without Command 3 in reading out, or with Command 3 in writing.(→ 5. Transmission
Data Format (Command))
The string of Command 3 is received as a response when reading out, ">" is received in writing
respectively. (→ 6. Incoming Data Format (Response))
Filter Function Setting
Command 1 Command 2
AVERAGE
Command 3
OFF
4
16
64
256
1024
4096
OFF
FILTER
FILTER
HIPASS
FREQ
650/2000
350/800
200/400
100/200
50/100
25/50
15/20
10/10
LOPASS
Calculation Function Setting
Command 1 Command 2 Command 3
A
B
A+B
A-B
-A-B
FORMULA
K-A-B
K+A+B
K+A-B
K+A
K+B
CAL
K
SIGN_A
SIGN_B
SFT_A
SFT_B
SFT_CAL
Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Average Count Setting
Sets the average count of measured value.
Set this item to OFF when selecting HIPASS or
LOPASS in the filter setting.
256
Filter Setting
Select from OFF (Normal Measurement), HIPASS, or
LOPASS.
OFF
Set this item to OFF when selecting other than
OFF in the average count setting.
Frequency Setting
Sets the cut-off frequency of filter. The left side of
slash mark (/) is the frequency when selecting
HIPASS, the left side is the one when selecting
650/
LOPASS.
This item has no relationship with measurement when 2000
selecting OFF (normal measurement) in the filter
setting.
Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Calculation Expression Setting
Enables to set the calculation expression. The
operation result is displayed on the RUN mode
screen.
A is HEAD A, B is HEAD B, and K is the K-item as
described below.
A
K-item Setting
《For CD4A》
Sets the K-item contained in the set calculation
±9999.999
+0.000
expression.
《For CD4A-L》 This item has no relationship with measurement when (+0.0000)
±999.9999
the expression does not contain the K-item.
FARSIDE+
NEARSIDE+
FARSIDE+
NEARSIDE+
Setting of Measurement Value Increasing/
Decreasing Direction
Sets the relationship with distance of work and size of FAR
measurement value. SIGN_A corresponds to Sensor SIDE+
head A, SIGN_B corresponds to Sensor head B.
Shift Setting
《For CD4A》 Allows adding/subtracting any value to measurement
value and calculation value. This setting value can be +0.000
±9999.999
《For CD4A-L》 automatically set by the Zero-reset function. A, B, and (+0.0000)
CAL are HEAD A, HEAD B, the calculation result
±999.9999
respectively.
13
9. Communication Failure
(1)CD4 returns nothing after transmitting the command.
・Check the connection. (RS232C cable, straight, 9 pin female, −9 pin female)
・Set the same communication setting at CD4 and the PC. (Baud rate, data length, parity
check)
・Check if the ETX(03H) is added to the end of the command.
・It takes several seconds to perform all setting reset commands from transmitting to return
of ">."
(2)CD4 returns "?" after transmitting the command.
・Check if the command is correct. (Spelling, position of the space, addition of STX(02H),
ETX(03H))
・Set the same communication setting at CD4 and the PC. (Baud rate, data length, parity
check)
・Keep distance from the noise source as much as possible.
・Return all unused functions to the initial value.
・When using at 115200 bps, retry at 38400 bps.
12
(Example of Response 2)《CD4A》
For HEAD A: +99.999, +100.000, ・・・+104.999
HEAD B: +29.999, +30.000, ・・・+34.999,
02H
STX
・・・
・・・
2BH
+
39H
9
39H
9
2EH
.
39H
9
39H
9
39H
9
0DH
CR
2BH
+
31H
1
30H
0
30H
0
2EH
.
30H
0
30H
0
30H
0
0DH
CR
2BH
+
31H
1
30H
0
34H
4
2EH
.
39H
9
39H
9
39H
9
0DH
CR
2BH
+
32H
2
39H
9
2EH
.
39H
9
39H
9
39H
9
0DH
CR
2BH
+
33H
3
30H
0
2EH
.
30H
0
30H
0
30H
0
0DH
CR
・・・
2BH
+
33H
3
34H
4
2EH
.
39H
9
39H
9
39H
9
0DH
CR
03H
ETX
・・・
(Example of Response 2)《CD4A-L》
For HEAD A: +25.00000, +25.00005, ・・・+25.06002
HEAD B: +24.00000, +24.00005, ・・・+24.06002
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
30H
0
0DH
CR
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
35H
5
0DH
CR
2BH
+
32H
2
35H
5
2EH
.
30H
0
36H
6
30H
0
30H
0
32H
2
0DH
CR
2BH
+
32H
2
34H
4
2EH
.
30H
0
30H
0
30H
0
30H
0
30H
0
0DH
CR
2BH
+
32H
2
34H
4
2EH
.
30H
0
30H
0
30H
0
30H
0
35H
5
0DH
CR
・・・
2BH
・・・ +
32H
2
34H
4
2EH
.
30H
0
36H
6
30H
0
30H
0
32H
2
0DH
CR
03H
ETX
02H
STX
・・・
・・・
After all buffers are read out, the function starts reading out the measurement value to the
buffer, and changes to the standby state for the next trigger.
Be sure to read out the buffer before starting the next trigger. (The buffer is not overwritten
unless it is readout.)
In case of the following conditions, the digit of 1μm of readout data remains always "0."《For CD4A》
・When A is selected in the data setting for buffer and HEAD A is the 350 mm type.
・When B is selected in the data setting for buffer and HEAD A is the 350 mm type.
・When CAL or A&B is selected in the data setting for buffer and HEAD A or HEAD B is the 350
mm type.
(7) Other Operations
・When the reading out is performed before recording stops after triggering:
The number of buffers set in the buffer size is readout, which contains the last contents.
(When the trigger mode is BEFORE, recording stops at the time trigger is started and the
buffer is fixed.)
・When the next trigger is input before recording stops after triggering:
The first trigger after the buffer readout becomes valid.
11
After triggering and at the time of completion of data buffering, the PC receives the response ">"
from CD4.
(Example of command)
STX and ETX are omitted in this example. The space (20H) is shown as ( ) for conveniencw.
Transmission
Reception
Command
Meaning
Response
Meaning
BUFFER( )TRIGGER
Start trigger
>
Completion of triggering
>
Completion of buffering
(When the data buffer is completed)
(6) Reading out Buffer
Using the following command, the same number of buffers as set in the buffer size is readout.
BUFFER( )READ
STX and ETX are omitted in this example. The space (20H) is shown
as ( ) for conveniencw.
Transmitting this command reads out the data of CD4 sequentially from the old one as the
response.
The data format of a data is the same in reading out the measurement value.
CR(0DH) is inserted between data.
The example when selecting HEAD A, HEAD B, and the calculation result is displayed on
(Example of Response 1)
in the data for the buffer.
The example when selecting A&B is displayed on (Example of Response 2) in the data for the
buffer.
In the case of A&B, transmit all the buffer contents of HEAD A as the response.
Then the buffer content of HEAD B is responded.
(Example of Response 1) 《For CD4A》
For +99.999, +100.000, +100.001, ・・・ +104.999,
02H
STX
2BH
+
39H
9
39H
9
2EH
.
39H
9
39H
9
39H
9
0DH
CR
2BH
+
31H
1
30H
0
30H
0
2EH
.
30H
0
30H
0
30H
0
0DH
CR
2BH
+
31H
1
30H
0
30H
0
2EH
.
30H
0
30H
0
31H
1
0DH
CR
・・・
・・・
2BH
+
31H
1
30H
0
34H
4
2EH
.
39H
9
39H
9
39H
9
0DH
CR
03H
ETX
02H
STX
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
30H
0
0DH
CR
(Example of Response 1) 《For CD4A-L》
For +25.00000, +25.00005, +25.00009, ・・・ +25.06002,
・・・
10
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
35H
5
0DH
CR
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
39H
9
0DH
CR
・・・
2BH
+
32H
2
35H
5
2EH
.
30H
0
36H
6
30H
0
30H
0
32H
2
0DH
CR
03H
ETX
・CENTER Use to record the phenomenon before and after triggering.
Until the trigger occurs, the state keeps recording into the buffer. Once the trigger
occurs, another recording to the buffers of half size of buffer size is performed.
Then recording stops.
Thus, the following is the time from the trigger enters until the recording all buffer is
completed:
100[μsec] x Buffer Record Cycle x (Buffer Size [number] ÷ 2)
(However, in the case the data for buffer is A&B, the buffer size is 1/2.)
When recording all buffers is completed, the PC receives the response ">" from
CD4.
The buffer is held until the readout is completed.
The data is read out from the oldest one.
Trigger
Measurement Data
(In this figure,
the buffer rate is
1/2.)
Buffer
The number set in the buffer size
(Example of command)
Transmission
Command
BUFFER( )MODE( )OFF
BUFFER( )MODE( )AFTER
BUFFER( )MODE
Reception
Meaning
Select OFF.
Select AFTER.
Readout the trigger mode.
Response
>
>
AFTER
Meaning
Completion of setting
Completion of setting
Set to AFTER.
STX and ETX are omitted in this example. The space (20H) is shown as ( ) for conveniencw. (5) Selecting Trigger Factor
There are 2 types of triggers: One from the command and the one from the external terminal.
・Trigger from the command
Transmitting the following command enables to trigger the data buffer function:
The trigger from the command is useful when the data buffer function test or the strict trigger
timing is not necessary.
(For the case when Buffer Rate is low = Buffer Record Cycle is long)
BUFFER( )TRIGGER
STX and ETX are omitted in this example. The space (20H) is
shown as ( ) for conveniencw.
・Trigger from the external terminal
HOLD RST terminal of CD4 is the trigger input of data buffer function.
When using the trigger from the external terminal, be sure to turn OFF the hold settings
(HEAD A, HEAD B, and the calculation result).
(They cannot be used with the hold function at the same time.)
You can run on the CD4 main unit or by transmitting the following command.
HOLD( )A( )OFF
HOLD( )B( )OFF
HOLD( )CAL( )OFF
( All STX and ETX are omitted in this example. The space (20H) is
shown as ( ) for conveniencw.)
・Triggering is available by connecting the photoelectronic sensor or the programmable logic
controller (PLC) to the HOLD RST terminal.
In this case, connect the NPN type output to CD4A-N, the PNP type output to CD4A-P.
・The JDGE output or the ALM output of CD4 can be connected to the HOLD RST terminal.
When connecting the JDGE output, triggering starts when the measurement value reaches
the upper/lower limit of set control output.
Also when connecting the ALM output, triggering starts in the case the sensor head fails the
measurement.
9
(3) Setting Buffer Size
Set the number of buffer.
100 to 2000 buffers can be set in 100 units. Adjust to the necessary number.
When A&B is selected in the data setting for buffer, the each number of buffer to be assigned to
the measurement value of HEAD A and HEAD B becomes 1/2 of the number set here.
(Example of Command)
STX and ETX are omitted in this example. The space (20H) is shown as ( ) for conveniencw.
Transmission
Reception
Command
Meaning
Response
Meaning
BUFFER( )SIZE( )500
Select 500 buffers.
>
Completion of setting
BUFFER( )SIZE( )2000
Select 2000 buffers.
>
Completion of setting
BUFFER( )SIZE
Readout the buffer size.
2000
Set to 2000 buffers.
(4) Selecting Trigger Mode
The relationship of timing of trigger occurrence and the data to record in the buffer can be
selected from 3 types.
When not using the data buffer function, be sure to turn OFF.
The data buffer function does not work.
・OFF
・AFTER Use to record the phenomenon after triggering.
After the trigger occurred, recording to the same number of buffers as buffer size
record is performed
then the recording stops.
Thus, the time is as follows from the trigger is input until all buffers are completely
recorded:
100 [μ sec] x Buffer Record Cycle x Buffer Size [number]
(However, in case the data for the buffer is A&B, the buffer size is 1/2.)
After the record stops, the PC receives the response ">" from CD4.
The buffer is held until the readout is completed.
The data is read out from the oldest one.
Measurement Data
Trigger
(In this figure,
the buffer rate is
1/2.)
Buffer
The number set in the buffer size
・ BEFORE Use to record the phenomenon before triggering.
Until the trigger occurs, the state keeps recording into the buffer. Once the trigger
occurs the record to the buffer stops.
Thus, the buffer recording is completed just after the trigger enters.
Then the PC receives the response ">" from CD4.
Normally, the buffer becomes full before the trigger enters. In this case, the data is
overwritten from the old one.
The buffer is held until the readout is completed after the trigger enters.
The data is read out from the oldest one.
Measurement Data
Trigger
Buffer
The number set in the buffer size
8
(In this figure,
the buffer rate is
1/2.)
・The trigger mode can be selected from 3 types. When setting the buffer size to 2000,
2000 data are recorded from the time when a trigger occurs.
2000 data right before the trigger occurred are recorded.
1000 data right before the trigger occurred and the 1000 data after that are recorded.
Follow the following steps for setting and the operation test:
(1) Data Setting for Buffer
Select the data to record in the buffer.
Select from A, B, CAL, and A&B.
When A&B is selected, the measurement values of HEAD A and HEAD B are recorded in the
buffer simultaneously.
However, the buffer size described later becomes 1/2 each.
(Example of Command)
STX and ETX are omitted in this example. The space (20H) is shown as ( ) for conveniencw.
Transmission
Command
BUFFER( )DATA( )CAL
BUFFER( )DATA( )A&B
BUFFER( )DATA( )A
BUFFER( )DATA
Description
Select the calculated result.
Select the measurement value of HEAD A and B.
Select the measurement value of HEAD A.
Readout the data type to record.
Reception
Description
Completion of setting
Completion of setting
Completion of setting
Set to HEAD A.
Response
>
>
>
A
(2) Setting Buffer Rate
Select the frequency to record in the buffer (Buffer Record Cycle).
The CD4 measurement sampling cycle is 100 μ sec. Setting the buffer rate to 1/1 records all the
data in the buffer.
Setting to 1/4 records one data per 4 measurements in the buffer.
The relationship between Buffer Rate Setting and Buffer Record Cycle is as follows:
Command
Buffer Rate Setting
Buffer Record Cycle
1
1/1
100[μsec]
2
1/2
200[μsec]
4
1/4
400[μsec]
8
1/8
800[μsec]
16
1/16
1.6[msec]
32
1/32
64
1/64
6.4[msec]
128
1/128
12.8[msec]
256
1/256
3.2[msec]
25.6[msec]
512
1/512
51.2[msec]
1024
1/1024
102.4[msec]
2048
1/2048
204.8[msec]
4096
1/4096
409.6[msec]
8192
1/8192
819.2[msec]
16384
1/16384
1.6384[s]
32768
1/32768
3.2768[s]
(Example of Command)
STX and ETX are omitted in this example. The space (20H) is shown as ( ) for conveniencw.
Transmission
Reception
Command
Meaning
Response
Meaning
BUFFER( )RATE( )1
Select 1/1.
>
Completion of setting
BUFFER( )RATE( )128
Select 1/128.
>
Completion of setting
BUFFER( )RATE
Readout the buffer rate.
128
Set to 1/128.
7
・Example of reading out measurement value and control output
Transmission
Command
MEASURE( )A
MEASURE( )A
MEASURE( )Q1
MEASURE( )Q5
MEASURE( )ALARM_A
MEASURE( )ALARM
Reception
Meaning
Response
Reads out measurement value of HEAD A.《CD4A》 +34.123
Reads out measurement value of HEAD A.《CD4A-L》 +34.1230
Reads out control output Q1.
ON
Reads out control output Q5.
OFF
Reads out output A
ON
"ALARM" does not exist in the command list.
?
Transmission
Command
HOLD_IN( )ON_A
HOLD_IN( )OFF_A
ZERO( )A
ZERO( )CAN_A
HOLD( )ON_A
Meaning
Turn ON HOLD A input.
Turn OFF HOLD A input.
Perform Zero reset of measurement value of HEAD A.
Cancel Zero reset of measurement value of HEAD A.
The combination of "HOLD" and "ON_A" does not exist.
・Example of operating control input
Reception
Response
>
>
>
>
?
・Example of continuous readout of measurement value
Transmission
Command
MEASURE( )START_A
Meaning
+ 34.123 mm
+ 34.1230 mm
The output status is ON.
The output status is OFF.
The output status is ON.
Error
Meaning
The status became ON.
The status became OFF.
Completion of Zero reset
Completion of cancel of Zero reset
Error
Reception
Meaning
Response Meaning
Continuously performs readout of measurement value of HEAD A.
See below.
For + 99.999, + 100.000, + 100.001,《CD4A》
2BH
+
39H
9
39H
9
2EH
.
39H
9
39H
9
39H
9
0DH
CR
2BH
+
31H
1
30H
0
30H
0
2EH
.
30H
0
30H
0
30H
0
0DH
CR
2BH
+
31H
1
30H
0
30H
0
2EH
.
30H
0
30H
0
31H
1
0DH
CR
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
30H
0
0DH
CR
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
35H
5
0DH
CR
2BH
+
32H
2
35H
5
2EH
.
30H
0
30H
0
30H
0
30H
0
39H
9
0DH
CR
For + 25.00000, + 25.00005, + 25.00009,《CD4A-L》
・・・
・・・
Neither STX nor ETX exists.
The transmission speed is 1 character per 5 - 10 ms, regardless the baud rate.
CR(0DH) is inserted between the measurement values or calculation results.
To stop the continuous readout, be sure to use the continuous read out stops, however the
response to the command cannot be buaranteed.
8. Data Buffer Function
This function enables to temporally store the 2000 measurement data at maximum and readout
them sequentially.
Example of operation available with this function:
・Continuous data per 100 μ sec can be recorded (max for 0.2 sec.).
・Data up to for 109 minutes can be recorded (interval of 3.28 sec, 2000 data).
・Various trigger factors can be selected.
Starts (completes) the record when the measurement value enters the set upper/lower
limit.
Completes the record when sensor fails to measure.
Starts (completes) the record when the synchronous sensor turns ON.
Some commands can enable to trigger.
・Available to simultaneously record the both data of sensor head A and B.
(In this case, up to 1000 data can be recorded each.)
6
Therefore, the total is 7 - 10 characters.
MEASURE( )A
MEASURE( )B
MEASURE( )CAL
MEASURE( )START_A
MEASURE( )START_B
MEASURE( )START_CAL
BUFFER( )READ
(STX and ETX are omitted in this example. The space (20H) is shown as() for convenience.)
(Example)
25.00101
・For the case of numerical value ± 5.000:
The total is 6 characters composed of the sign, 1 digit of integer, decimal point, and 3
places of decimals.
(Example)
+5.000
5
→
・For the case of numerical value from 0.100 to 1.000:
The total is 5 characters composed of 1 digit of integer, decimal point, and 3 places of
decimals.
(Example)
0.100
0.1
→
・For the case of numerical value from 0.000 to 60.000,:
The total is 5 - 6 characters composed of 1 - 2 digit(s) of integer(s), decimal point, and 3
places of decimals.
(Example)
5.000
5
→
60.000
60
→
・When reading out the status of control output or alarm output:
Either "ON" or "OFF" is set.
7. Example of Command and Response
STX and ETX are omitted in this example. The space (20H) is shown as ( ) for conveniencw.
・Example of reading out setting
Transmission
Command
FILTER( )AVERAGE
CAL( )FORMULA
HOLD( )A
CONTROL( )Q1_HI
CONTROL( )Q1_HI
TIMER( )MODE
TIMER( )TIMER
BANK( )BANK
BANK( )BANC
Reception
Meaning
Response
Reading out the average count.
256
Reading out the arithmetic expression.
K-A-B
Reading out the HEAD A Hold setting.
SAMPLE
Reading out the upper limit of JDGE 1.《CD4A》 +10.000
Reading out the upper limit of JDGE 1.《CD4A-L》 +10.0000
Reading out the timer mode.
1SHOT
Reading out the delay time.
0.100
Reading out the bank number.
4
The spelling of "BANC" is incorrect.
?
・Example of writing setting
Transmission
Command
FILTER( )AVERAGE( )4
CAL( )FORMULA( )A+B
HOLD( )A( )P-P
CONTROL( )Q1_HI( )-3.5
TIMER( )MODE( )1SHOT
TIMER( )TIMER( )10
BANK( )BANK( )7
BANK( )BANK( )8
Meaning
Setting/Writing the average count to 4 times.
Setting/Writing the arithmetic expression to A+B.
Setting/Writing the HEAD A Hold setting to P-P.
Setting/Writing the upper limit of JDGE 1 to - 3.5 mm.
Setting/Writing the timer mode to 1SHOT.
Setting/Writing the delay time to 10 seconds.
Setting/Writing the bank number to 7.
"8" does not exist.
Reception
Response
>
>
>
>
>
>
>
?
Meaning
Set to 256 times.
Set to K-A-B.
Set to "Sample Hold."
Set to +10.000 mm.
Set to +10.0000 mm.
Set to 1 shot.
Set to 0.1 second.
Set to 4.
Error
Meaning
Completion of setting/writing to 4 times.
Completion of setting/writing to A+B.
Completion of setting to/writing P-P.
Completion of setting to/writing -3.5 mm.
Completion of setting to/writing 1SHOT.
Completion of setting to/writing 10 sec.
Completion of setting to/writing 7.
Error
5
・When 0.100 to 1.000 is written, set the value from 0.100 to 1.000.
(Valid example)
(Invalid example)
1
1.000
01
(integer digits are two or more.)
1.
+1
1.0000
(decimal places are four or more.)
1.0
+ 1.0
(space between the numerical values)
・When 0.000 to 60.000 is written, set the value from 0.000 to 60.000.
(Valid example)
(Invalid example)
60
60.0
060
(integer digits are three or more.)
+60
60.000
60.0000
(decimal places are four or more.)
60.
+ 60
(space between the numerical values)
・For others, set the command according to the command table.
6. Incoming Data Format (Response)
02H
STX
1
03H
ETX
3
RESPONSE
2
1 STX
2 RESPONSE
3 ETX
The code showing the head of incoming data (02H).
The response data is set to the transmitted command.
The code showing the completion of incoming data (03H).
・The following two responses are for the written command:
>
(3EH) Written properly.
?
(3FH) Failed to receive, such as the command was wrong.
・The following two responses are for the control command:
>
(3EH) Received successfully.
?
(3FH) Failed to receive, such as the command was wrong.
・For the continuous reading out of measurement value, refer to the next section
"Example of continuous reading out of measurement value."
Basically, for the response against the readout command, the string is set as shown in
Command 3 of the command table.
The followings are exceptions:
・For the case of numerical value ± 9999.999:《CD4A》
The total is 6 - 9 characters composed of the sign, 1-4 digit(s) of integer(s), decimal point,
and 3 places of decimals.
(Example)
1
→
100
→
-0.3
→
+1.000
+100.000
-0.300
・For the case of numerical value ± 999.9999:《CD4A-L》
The total is 6 - 9 characters composed of the sign, 1-3 digit(s) of integer(s), decimal point,
and 4 places of decimals.
(Example)
1
→
10
→
-0.3
→
+1.0000
+10.0000
-0.3000
Note that the decimal places are five when reading out the measurement value with the
commands below.
4
5. Transmission Data Format (Command)
・The transmission data (Command) format can be roughly divided into two types, depending
on the presence of Command 3.
The combination of Command 1 and 2 is the setting items. Command 3 is the setting value.
・When sending Command 1 or 2 only, the setting value of the setting item is returned as a
response. (Reading out)
・To read out (change) the setting item, add and send Command 3 as a setting value.
When written properly, the response ">"(3EH) is returned.
When the command is wrong, the response "?" (3FH) is returned.
・Command 3 does not exist in case of control command (operating the control input).
When accepted successfully, the response ">" (3EH) is returned.
When the command was wrong, the response "?" (3FH) is returned.
For Reading out Setting/Measurement Value/Output Status, and Control Command:
02H
STX
1
20H
SPACE 1
3
COMMAND 1
2
1
2
3
4
5
STX
COMMAND 1
SPACE 1
COMMAND 2
ETX
COMMAND 2
4
03H
ETX
5
The code showing the head of transmit data (02H).
Selects from the column of command 1 on the command table to set.
Shows the separation between Command 1 and 2 (20H).
Selects from the column of command 2 on the command table to set.
The code showing the completion of transmit data (03H).
For writing the setting:
02H
STX
1
COMMAND 1
2
1
2
3
4
5
6
7
STX
COMMAND 1
SPACE 1
COMMAND 2
SPACE 2
COMMAND 3
ETX
20H
SPACE 1
3
COMMAND 2
4
20H
SPACE 2
5
COMMAND 3
6
03H
ETX
7
The code showing the head of transmit data (02H).
Selects from the column of command 1 on the command table to set.
Shows the separation between Command 1 and 2 (20H).
Selects from the column of command 2 on the command table to set.
Shows the separation between Command 2 and 3 (20H).
Selects from the column of command 3 on the command table to set.
The code showing the completion of transmit data (03H).
To input the numerical value of Command 3, see the following examples:
・For the item with "±9999.999," set the value from -9999.999 to +9999.999.
For the item with "0 to 9999.999," set the value from 0 to 9999.999.《CD4A》
(Valid example)
(Invalid example)
+100
100.
00100
(integer digits are five or more.)
0100
100.0
100.0000
(decimal places are four or more.)
100
100.000
+ 100
(space between the numerical values)
・For the item with "±999.9999," set the value from -999.9999 to +999.9999.
For the item with "0 to 999.9999," set the value from 0 to 999.9999.《CD4A-L》
(Valid example)
(Invalid example)
+10
10.
0010
(integer digits are four or more)
010
10.0
10.00000
(decimal places are five or more)
10
10.0000
+ 10
(space between the numerical values)
・When ±5.000 is written, set the value from -5.000 to +5.000.
(Valid example)
(Invalid example)
+5
5
05
(integer digits are two or more.)
+5.0
5.
5.0000
(decimal places are four or more.)
+5.000
+5
(space between the numerical values)
3
1. Communication Function of CD4
Connecting the PC and CD4 allows following operations from the PC:
・Writing and reading out the setting value
・Reading out the measurement value
・Reading out the control output status
・Operating the control input
・Data buffer function
2. Communication Specification
Communication method
RS-232C
Synchro system
Asynchronous
Baud rate
9600/19200/38400/115200 bps
Transmission code
ASCII
Data length
7/8 bit
Stop bit length
1 bit
Parity check
Data classification
Nil/Even number/Odd number
STX・ETX
The underlined setting is the factory defaults of CD4.
Adjust the communication setting of PC and CD4 within the the range shown in the above table.
Set the CD4 setting at 14 .RS232C in the SET mode.
3. Communication Procedure
When the PC sends a command to CD4, CD4 sends a response to the PC.
Basically, there is one response per command.
When sending a command, be sure to send after receiving the response of the previous
command.
PC
Command
CD4
Command
Response
However,
・The stop command can be sent while performing the continuous reading out of
measurement value. (→7. Example of Commands and Responses)
・In the Data Buffer Function, receives the response ">" when the buffer record is completed.
(→8. Data Buffer Function)
For details, refer to the relevant item.
4. Connecting to PC
Use the RS232C cable (Straight, 9 pin female, −9 pin female).
PC
1
2
3
4
5
6
7
8
9
2
DCD
RXD
TXD
DTR
SG
DSR
RTS
CTS
RI
RS-232C D-sub9pin
Straight Cable
CD4
1
2
3
4
5
6
7
8
9
4 & 6, and 7 & 8 are
connected inside CD4.
Amplifier Instruction Manual
(Communication Version)
Displacement Sensor CD4 Series
CD4A-N/CD4A-P/CD4A-LN/CD4A-LP
Laser Type
1. Communication Function of CD4 ………………………
2. Communication Specification ……………………………
3. Communication Procedure ………………………………
4. Connecting to PC …………………………………………
5. Transmission Data Format (Command) …………………
6. Incoming Data Format (Response) ………………………
7. Example of Command and Response …………………
8. Data Buffer Function ………………………………………
(1) Data Setting for Buffer …………………………………
(2) Setting Buffer Rate ……………………………………
(3) Setting Buffer Size ……………………………………
(4) Selecting Trigger Mode ………………………………
(5) Selecting Trigger Factor ………………………………
(6) Reading out Buffer ……………………………………
(7) Other Operations ………………………………………
9. Communication Failure ……………………………………
Command Table 1 Reading out/Writing Setting …………
Command Table 2 Reading out Measurement Value/Control Output …
Command Table 3 Operating Control Input (Control Command) ………
Command Table 4 Data Buffer Function …………………
ASCII Code Table ……………………………………………
2
2
2
2
3
4
5
6
7
7
8
8
9
10
12
12
13
17
18
19
20
Manufactured and sold by
Manufactured
andYamashina,
sold by
607-8085
Kyoto,
Takehanadounomaecho 46-1, JAPAN
TEL: +81-(0)75-594-8123
FAX: +81-(0)75-594-8124
607-8085 Kyoto, Yamashina, Takehanadounomaecho 46-1, JAPAN
Shinjuku Green Tower Building 27F 6-14-1 Nishishinjuku Shinjuku
TEL: +81-(0)75-594-8123
160-0023
Tokyo
FAX: +81-3-3344-5770 FAX:
+81-(0)75-594-8124
TEL:
+81-3-3344-3367
Shinjuku
Green
Tower Building 27F 6-14-1 Nishishinjuku Shinjuku
Website : http://www.optex-fa.com
160-0023 Tokyo
TEL: +81-3-3344-5770 FAX: +81-3-3344-3367
0557062
Website : http://www.optex-fa.com
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising