KEMBAR78
Codigos Ascii | PDF | Amplifier | Filter (Signal Processing)
0% found this document useful (0 votes)
36 views20 pages

Codigos Ascii

Listado de Codigos Ascii

Uploaded by

Val Nat Heredia
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)
36 views20 pages

Codigos Ascii

Listado de Codigos Ascii

Uploaded by

Val Nat Heredia
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/ 20

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
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 Description (For details, refer to the term of Data Buffer Function in this manual.) Default
OFF Setting Trigger Mode
AFTER When not using the Data Buffer function, set to OFF.
MODE OFF
BEFORE
CENTER
A Data Setting for Buffer (*4)
B
DATA A
CAL
A&B
1 Setting Buffer Rate
2
4
8
16
32
64
128
RATE 1
256
512
1024
2048
4096
8192
16384
BUFFER
32768
100 Setting Buffer Size
200
300
400
500
600
700
800
900
1000
SIZE 100
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
TRIGGER Control Command (Buffer Trigger)
READ Control Command (Buffer Reading out) (*4)
(*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.
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 Description (Be sure to refer to the Amplifier Instruction Manual as well.)
HOLD A Input ON
Sending this command makes the same status as that when the
ON_A 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
ON_B 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_IN OFF_A 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
OFF_B 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
RESET 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.)

Zero Reset Input Control


Command 1 Command 2 Description
Zero Reset (HEAD A)
A
Zero-resets the measurement value of HEAD A.
Zero Reset (HEAD B)
B
Zero-resets the measurement value of HEAD B.
Zero Reset (Calculation Result)
CAL
Zero-resets the calculation result.
ZERO
Cancellation of Zero Reset (HEAD A)
CAN_A
Cancels the zero reset status of HEAD A measurement value.
Cancellation of Zero Reset (HEAD B)
CAN_B
Cancels the zero reset status of HEAD B measurement value.
Cancellation of Zero Reset (Calculation Result)
CAN_CAL
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
A The current measurement value of HEAD A is set as the
response. (only 1 data) (*1)
Reading out of HEAD B Measurement Value
B The current measurement value of HEAD B is set as the
response. (only 1 data)(*1)
Reading out of Calculation Result
CAL The current Calculation Result is set as the response. (only 1
data)(*2)
Reading out of Control Output (JDGE 1)
Q1 Reads out the state of current control output (JDGE 1).
Response will be "ON" or "OFF."
Reading out of Control Output (JDGE 2)
Q2 Reads out the state of current control output (JDGE 2).
Response will be "ON" or "OFF."
MEASURE
Reading out of Control Output (JDGE 3)
Q3 Reads out the state of current control output (JDGE 3).
Response will be "ON" or "OFF."
Reading out of Control Output (JDGE 4)
Q4 Reads out the state of current control output (JDGE 4).
Response will be "ON" or "OFF."
Reading out of Control Output (JDGE 5)
Q5 Reads out the state of current control output (JDGE 5).
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
START_A After accepting this command, CD4 transmits the HEAD 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.
Memory Setting
Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
ENABLE Memory Writing Setting
WRITE Sets whether or not to save the record to the memory ENA
DISABLE when performing the Zero-reset. BLE
MEMORY All Setting Reset
NO
Writing YES resets all settings to the factory defaults.
RESET NO
YES

Bank Setting
Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
0 Bank Setting
1 Switches the banks. (0 - 7). Either the bank switching
button or the bank input terminal is also available to
2 switch. The bank number set at the power rising is the
3 final bank set with the button or this command when
BANK BANK 0
4 the bank input terminal is 0 (in the state that the
5 terminal is not connected), and becomes bank set in
the input terminal when the bank input terminal is
6 other than 0.
7
The value in ( ) of the initial value field is for CD4A-L.
Analog Output Setting
Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Setting of Analog Output Range of Calculation
Result +5.000
CAL_HI For CD4A
To use this function, set the OUTPT setting on the (+1.0000)
±9999.999
For CD4A-L screen to [ ][CAL].
The analog output of calculation result is output -5.000
CAL_LO ±999.9999
from ANALOG B terminal. (-1.0000)

Analog Output Setting


AB Selects whether to analog-output the measurement
OUTPUT value of Sensor head A/B as they are or to analog- AB
ANALOG output the calculation result. (They cannot be output
CAL
at the same time.)
Analog Output Shift Setting
SFT_A ±5.000 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
SFT_B ±5.000 and B indicate HEAD A and HEAD B respectively.

SPN_A 0.100 to 1.000 Analog Output Span Setting


Enables to set slant of ANALOG A output and 1.000
SPN_B 0.100 to 1.000 ANALOG B output.

Sensor Head Sensitivity Setting


Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
AUTO Sensor Head Sensitivity Setting
MAX Sets the sensitivity of HEAD A and HEAD B. Normally
9 use AUTO.
8 Setting the sensitivity to AUTO allows automatic
switching from MIN to MAX
7
in accordance with the work. In this case, 2 sampling
6 cycles are required to switch the
A
5 sensitivity by 1 step. Thus, the time required for
4 switching from MIN to MAX is:
3 2 sampling cycles x 10 steps = 2 ms.
2 Measurement may fail while the sensitivity is
1 switching.
MIN Fixing the sensitivity (setting to other than AUTO)
SENS prevents the sensitivity from switching. AUTO
AUTO
However, measurement may fail due to shortage of
MAX sensitivity if the work status
9 changes significantly.
8 When fixing the sensitivity, set to the following as a
7 standard:
6 Minimum measurable sensitivity + 4 (MAX when this
B value exceeds 9)
5
4
3
2
1
MIN
Time Setting
Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
OFF Timer Mode Setting
OFF_DELAY Sets the delay mode for control output.
MODE OFF
ON_DELAY
TIMER
1SHOT
0.000 to Delay Time Setting
TIMER 0.000
60.000
Hold Setting
Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
OFF HEAD A Hold Setting
Selects the Hold mode of HEAD A. The hold operation
SAMPLE is to be performed with inputting HOLD A
PEAK and HOLD RST. (Operation can be performed with the
operation command.)
A BOTTOM To use this function, set the INPUT setting on the OFF
P-P screen to [A][B].
Selecting OFF (normal measurement) allows to laser
AUTOPEAK off HEAD A with HOLD A inputting
AUTOBOTOM (and the corresponding command).
OFF HEAD B Hold Setting
Selects the Hold mode of HEAD B. Operate the Hold
SAMPLE with the inputting HOLD B and
PEAK HOLD RST. (Operation can be performed with the
operation command.)
B BOTTOM To use this function, set the INPUT setting on this OFF
P-P screen to [A][B].
Selecting OFF (normal measurement) allows to laser
AUTOPEAK off HEAD B with HOLD B inputting
HOLD
AUTOBOTOM (and the corresponding command).
OFF Calculation Result Hold Setting
SAMPLE Selects the Hold mode of calculation result. Operate
the Hold with inputting HOLD B
PEAK and HOLD RST. (Operation can be performed with the
CAL BOTTOM operation command.) OFF
P-P To use this function, set the INPUT setting on the
screen to [ ][CAL].
AUTOPEAK
AUTOBOTOM
Hold Input Setting
AB Selects whether to use the Hold function to the
INPUT measurement value of Sensor head A/B or to the AB
calculation result (CAL). (They cannot be used at the
CAL
same time.)

CLAMP Measurement Value Setting in Alarm


ALARM Sets the state of measurement value when the CLAMP
HOLD measurement is impossible.

Control (Judging) Output Setting


Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
Upper/Lower Limit Setting +3.000
Q1_HI (+0.6000)
Sets the upper/lower limit of five control outputs. (The
control output is performed against the calculation +2.000
Q1_LO (+0.4000)
results. Set the calculation expression setting to A (or
+2.000
Q2_HI B) when using the Sensor head A (or B) alone.) (+0.4000)
+1.000
Q2_LO (+0.2000)
For CD4A
±9999.999 +1.000
Q3_HI (+0.2000)
-1.000
Q3_LO For CD4A-L (-0.2000)
CONTROL ±999.9999 -1.000
Q4_HI (-0.2000)
-2.000
Q4_LO (-0.4000)
-2.000
Q5_HI (-0.4000)
-3.000
Q5_LO (-0.6000)
For CD4A Hysteresis Setting
HYSTE 0 to 9999.999 Sets the hysterisis of Control output. 0.100
For CD4A-L (Do not write a negative value.) (0.0200)
0 to 999.9999
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 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
OFF Average Count Setting
4 Sets the average count of measured value.
Set this item to OFF when selecting HIPASS or
16 LOPASS in the filter setting.
AVERAGE 64 256
256
1024
4096
OFF Filter Setting
Select from OFF (Normal Measurement), HIPASS, or
FILTER HIPASS LOPASS. OFF
FILTER Set this item to OFF when selecting other than
LOPASS OFF in the average count setting.
650/2000 Frequency Setting
350/800 Sets the cut-off frequency of filter. The left side of
slash mark (/) is the frequency when selecting
200/400 HIPASS, the left side is the one when selecting
100/200 LOPASS. 650/
FREQ
50/100 This item has no relationship with measurement when 2000
25/50 selecting OFF (normal measurement) in the filter
setting.
15/20
10/10

Calculation Function Setting


Command 1 Command 2 Command 3 Description (Be sure to refer to the Amplifier Instruction Manual as well.) Defalut
A Calculation Expression Setting
B Enables to set the calculation expression. The
operation result is displayed on the RUN mode
A+B screen.
A-B A is HEAD A, B is HEAD B, and K is the K-item as
-A-B described below.
FORMULA A
K-A-B
K+A+B
K+A-B
K+A
K+B
For CD4A K-item Setting
Sets the K-item contained in the set calculation
CAL ±9999.999 expression. +0.000
K
For CD4A-L This item has no relationship with measurement when (+0.0000)
±999.9999 the expression does not contain the K-item.
FARSIDE+ Setting of Measurement Value Increasing/
SIGN_A Decreasing Direction
NEARSIDE+ Sets the relationship with distance of work and size of FAR
FARSIDE+ measurement value. SIGN_A corresponds to Sensor SIDE+
SIGN_B head A, SIGN_B corresponds to Sensor head B.
NEARSIDE+
SFT_A Shift Setting
For CD4A Allows adding/subtracting any value to measurement
±9999.999 value and calculation value. This setting value can be +0.000
SFT_B automatically set by the Zero-reset function. A, B, and (+0.0000)
For CD4A-L
±999.9999 CAL are HEAD A, HEAD B, the calculation result
SFT_CAL respectively.
9. Communication Failure
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 ">."

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.
(Example of Response 2) CD4A
For HEAD A +99.999, +100.000, +104.999
HEAD B +29.999, +30.000, +34.999,
02H 2BH 39H 39H 2EH 39H 39H 39H 0DH
STX + 9 9 . 9 9 9 CR

2BH 31H 30H 30H 2EH 30H 30H 30H 0DH


+ 1 0 0 . 0 0 0 CR

2BH 31H 30H 34H 2EH 39H 39H 39H 0DH


+ 1 0 4 . 9 9 9 CR

2BH 32H 39H 2EH 39H 39H 39H 0DH


+ 2 9 . 9 9 9 CR

2BH 33H 30H 2EH 30H 30H 30H 0DH


+ 3 0 . 0 0 0 CR

2BH 33H 34H 2EH 39H 39H 39H 0DH 03H


+ 3 4 . 9 9 9 CR ETX
(Example of Response 2) CD4A-L
For HEAD A +25.00000, +25.00005, +25.06002
HEAD B +24.00000, +24.00005, +24.0600 2
02H 2BH 32H 35H 2EH 30H 30H 30H 30H 30H 0DH
STX + 2 5 . 0 0 0 0 0 CR

2BH 32H 35H 2EH 30H 30H 30H 30H 35H 0DH
+ 2 5 . 0 0 0 0 5 CR

2BH 32H 35H 2EH 30H 36H 30H 30H 32H 0DH
+ 2 5 . 0 6 0 0 2 CR

2BH 32H 34H 2EH 30H 30H 30H 30H 30H 0DH
+ 2 4 . 0 0 0 0 0 CR

2BH 32H 34H 2EH 30H 30H 30H 30H 35H 0DH
+ 2 4 . 0 0 0 0 5 CR

2BH 32H 34H 2EH 30H 36H 30H 30H 32H 0DH 03H
+ 2 4 . 0 6 0 0 2 CR ETX
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.
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
(When the data buffer is completed) > Completion of buffering

(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 2BH 39H 39H 2EH 39H 39H 39H 0DH
STX + 9 9 . 9 9 9 CR

2BH 31H 30H 30H 2EH 30H 30H 30H 0DH


+ 1 0 0 . 0 0 0 CR

2BH 31H 30H 30H 2EH 30H 30H 31H 0DH


+ 1 0 0 . 0 0 1 CR

2BH 31H 30H 34H 2EH 39H 39H 39H 0DH 03H
+ 1 0 4 . 9 9 9 CR ETX
(Example of Response 1) For CD4A-L
For +25.00000, +25.00005, +25.00009, +25.06002,
02H 2BH 32H 35H 2EH 30H 30H 30H 30H 30H 0DH
STX + 2 5 . 0 0 0 0 0 CR

2BH 32H 35H 2EH 30H 30H 30H 30H 35H 0DH
+ 2 5 . 0 0 0 0 5 CR

2BH 32H 35H 2EH 30H 30H 30H 30H 39H 0DH
+ 2 5 . 0 0 0 0 9 CR

2BH 32H 35H 2EH 30H 36H 30H 30H 32H 0DH 03H
+ 2 5 . 0 6 0 0 2 CR 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 Reception
Command Meaning Response Meaning
BUFFER( )MODE( )OFF Select OFF. > Completion of setting
BUFFER( )MODE( )AFTER Select AFTER. > Completion of setting
BUFFER( )MODE Readout the trigger mode. AFTER 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.
(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.
OFF The data buffer function does not work.
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
Buffer
1/2.)
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
(In this figure,
Buffer
the buffer rate is
1/2.)
The number set in the buffer size
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 Reception
Command Description Response Description
BUFFER( )DATA( )CAL Select the calculated result. > Completion of setting
BUFFER( )DATA( )A&B Select the measurement value of HEAD A and B. > Completion of setting
BUFFER( )DATA( )A Select the measurement value of HEAD A. > Completion of setting
BUFFER( )DATA Readout the data type to record. A Set to HEAD 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 3.2[msec]
64 1/64 6.4[msec]
128 1/128 12.8[msec]
256 1/256 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.
Example of reading out measurement value and control output
Transmission Reception
Command Meaning Response Meaning
MEASURE( )A Reads out measurement value of HEAD A. CD4A +34.123 + 34.123 mm
MEASURE( )A Reads out measurement value of HEAD A. CD4A-L +34.1230 + 34.1230 mm
MEASURE( )Q1 Reads out control output Q1. ON The output status is ON.
MEASURE( )Q5 Reads out control output Q5. OFF The output status is OFF.
MEASURE( )ALARM_A Reads out output A ON The output status is ON.
MEASURE( )ALARM "ALARM" does not exist in the command list. ? Error
Example of operating control input
Transmission Reception
Command Meaning Response Meaning
HOLD_IN( )ON_A Turn ON HOLD A input. > The status became ON.
HOLD_IN( )OFF_A Turn OFF HOLD A input. > The status became OFF.
ZERO( )A Perform Zero reset of measurement value of HEAD A. > Completion of Zero reset
ZERO( )CAN_A Cancel Zero reset of measurement value of HEAD A. > Completion of cancel of Zero reset
HOLD( )ON_A The combination of "HOLD" and "ON_A" does not exist. ? Error
Example of continuous readout of measurement value
Transmission Reception
Command Meaning Response Meaning
Continuously performs readout of measurement value of HEAD A.
MEASURE( )START_A
See below.
For + 99.999, + 100.000, + 100.001, CD4A
2BH 39H 39H 2EH 39H 39H 39H 0DH
+ 9 9 . 9 9 9 CR

2BH 31H 30H 30H 2EH 30H 30H 30H 0DH


+ 1 0 0 . 0 0 0 CR

2BH 31H 30H 30H 2EH 30H 30H 31H 0DH


+ 1 0 0 . 0 0 1 CR
For + 25.00000, + 25.00005, + 25.00009, CD4A-L
2BH 32H 35H 2EH 30H 30H 30H 30H 30H 0DH
+ 2 5 . 0 0 0 0 0 CR

2BH 32H 35H 2EH 30H 30H 30H 30H 35H 0DH
+ 2 5 . 0 0 0 0 5 CR

2BH 32H 35H 2EH 30H 30H 30H 30H 39H 0DH
+ 2 5 . 0 0 0 0 9 CR
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.)
Therefore, the total is 7 - 10 characters.

MEASURE( )A MEASURE( )START_A


MEASURE( )B MEASURE( )START_B
MEASURE( )CAL 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 +5.000

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.1 0.100

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 5.000
60 60.000

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 Reception
Command Meaning Response Meaning
FILTER( )AVERAGE Reading out the average count. 256 Set to 256 times.
CAL( )FORMULA Reading out the arithmetic expression. K-A-B Set to K-A-B.
HOLD( )A Reading out the HEAD A Hold setting. SAMPLE Set to "Sample Hold."
CONTROL( )Q1_HI Reading out the upper limit of JDGE 1. CD4A +10.000 Set to +10.000 mm.
CONTROL( )Q1_HI Reading out the upper limit of JDGE 1. CD4A-L +10.0000 Set to +10.0000 mm.
TIMER( )MODE Reading out the timer mode. 1SHOT Set to 1 shot.
TIMER( )TIMER Reading out the delay time. 0.100 Set to 0.1 second.
BANK( )BANK Reading out the bank number. 4 Set to 4.
BANK( )BANC The spelling of "BANC" is incorrect. ? Error
Example of writing setting
Transmission Reception
Command Meaning Response Meaning
FILTER( )AVERAGE( )4 Setting/Writing the average count to 4 times. > Completion of setting/writing to 4 times.
CAL( )FORMULA( )A+B Setting/Writing the arithmetic expression to A+B. > Completion of setting/writing to A+B.
HOLD( )A( )P-P Setting/Writing the HEAD A Hold setting to P-P. > Completion of setting to/writing P-P.
CONTROL( )Q1_HI( )-3.5 Setting/Writing the upper limit of JDGE 1 to - 3.5 mm. > Completion of setting to/writing -3.5 mm.
TIMER( )MODE( )1SHOT Setting/Writing the timer mode to 1SHOT. > Completion of setting to/writing 1SHOT.
TIMER( )TIMER( )10 Setting/Writing the delay time to 10 seconds. > Completion of setting to/writing 10 sec.
BANK( )BANK( )7 Setting/Writing the bank number to 7. > Completion of setting to/writing 7.
BANK( )BANK( )8 "8" does not exist. ? Error
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 03H
STX RESPONSE ETX
1 2 3

1 STX The code showing the head of incoming data (02H).


2 RESPONSE The response data is set to the transmitted command.
3 ETX 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 +1.000
100 +100.000
-0.3 -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 +1.0000
10 +10.0000
-0.3 -0.3000

Note that the decimal places are five when reading out the measurement value with the
commands below.
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 20H 03H
STX COMMAND 1 SPACE 1 COMMAND 2 ETX
1 2 3 4 5

1 STX The code showing the head of transmit data (02H).


2 COMMAND 1 Selects from the column of command 1 on the command table to set.
3 SPACE 1 Shows the separation between Command 1 and 2 (20H).
4 COMMAND 2 Selects from the column of command 2 on the command table to set.
5 ETX The code showing the completion of transmit data (03H).
For writing the setting:
02H 20H 20H 03H
STX COMMAND 1 SPACE 1 COMMAND 2 SPACE 2 COMMAND 3 ETX
1 2 3 4 5 6 7
1 STX The code showing the head of transmit data (02H).
2 COMMAND 1 Selects from the column of command 1 on the command table to set.
3 SPACE 1 Shows the separation between Command 1 and 2 (20H).
4 COMMAND 2 Selects from the column of command 2 on the command table to set.
5 SPACE 2 Shows the separation between Command 2 and 3 (20H).
6 COMMAND 3 Selects from the column of command 3 on the command table to set.
7 ETX 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)
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 Nil/Even number/Odd number
Data classification 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 Command

CD4
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 RS-232C D-sub9pin CD4
Straight Cable
1 DCD 1
2 RXD 2
3 TXD 3
4 DTR 4 4 & 6, and 7 & 8 are
5 SG 5 connected inside CD4.
6 DSR 6
7 RTS 7
8 CTS 8
9 RI 9
Amplifier Instruction Manual
(Communication Version)
Displacement Sensor CD4 Series
CD4A-N/CD4A-P/CD4A-LN/CD4A-LP
Laser Type

Manufactured and sold by

Manufactured
607-8085 andYamashina,
Kyoto, sold by 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
TEL: +81-(0)75-594-8124 FAX: +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
Website : http://www.optex-fa.com

You might also like