![background image](http://html1.mh-extra.com/html/omron/stc-apb503pcl/stc-apb503pcl_product-specifications-and-users-manual_743289023.webp)
No.19S019-01
1
20
STC-APB503PCL / STC-APC503PCL
Product Specifications and Use’s Guide
9.3
Communication format
A. The sending data format from the PC to the camera is as follows:
SOF
(8bits)
Device code
(6bits)
Read / write
(1bit)
Page selection
(1bit)
Command code
(8bits)
Data length
(8bits)
Data
(Write: Data length )
(Read: 1 byte)
EOF
(8bits)
B. The receiving data format from the camera is as follows:
a. After sent the read command
SOF
(8bits)
Data length
(8bits)
Data
(Data length byte)
EOF
(8bits)
b. After sent the write command
SOF
(8bits)
Data length
(00H) (8bits)
Receiving code
(8bits)
EOF
(8bits)
C. Descriptions of the format
SOF
Start of the frame.
Sets (or obtains) the value is as “02H” always.
Device code
Sets the device code of the camera.
Sets the value is as “000000” always.
Read / Write
Sets “0” when sending read command.
Sets “1” when sending write command.
Page
selection
Sets “0” when accessing to the register of the camera.
Obtains the current data from the register when sending read command.
Replaces the data in the register by sending data when sending write command.
The data in the EEPROM does not replace.
Sets “1” when accessing to the EEPROM of the camera.
Obtains the data from the EEPROM when sending read command.
Replaces the data in the EEPROM by sending data when sending write command.
The camera uses the data in the EEPROM when the power on the camera.
The camera sends the receiving code as “01H” to the PC after the data in the EEPROM is replaced.
The camera rejects any commands while the data in the EEPROM is replacing. (Approximately 5 mseconds / byte)
Command
code
Sets the command code.
Please refer “The camera control commands” for more details.
Data length
Sets (or obtains) the data length. (unit: byte)
For receiving data:
The data length is based on the command after sent read command.
The data length is “00H” after sent write command.
For sending data:
The data length is 1 byte when sending read command.
The data length is based on the command when sending write command.
Data
Sets (or obtains) the data based on the command.
EOF
End of the frame
Sets (or obtains) the value is as “03H” always.
Receiving
code
Obtains the result of the sending command.
01H: The command proceeded correctly (ACK)
10H: The command could not process correctly (NAC)
11H: The communication issue
D. Command example
Send the read command to read the 00H address data of the register
02, 00, 00, 01, 00, 03
SOF, (Device code / Read / Register), Command code, Data length, Data, EOF
The return command
02, 01, 00, 03