Command Format - Fastus LS Series User Manual

2d displacement sensor
Table of Contents

Advertisement

6.1.3

Command Format

All sent and received commands are communicated in the following format.
Label
STX
Number of bytes
1
Number of bytes
STX
1
Data length
1
Command
2
Data part
0 to 510
ETX
1
Checksum
1
Tips
One response is always returned for each command. If communication is performed correctly, the same
command as that which was sent will be returned. If an error occurs during communication, the error code
will be returned.
Checksum calculation method
z
z
The checksum is calculated according to the following procedure.
Example) Camera mode acquisition command
Command
02
Description
STX
1
The XOR calculation is performed on the value of each byte excluding STX and
ETX.
00: 00000000
20: 10000000
1b: 00011011
— — — — —
10011011 → 0x3b
* XOR calculation: Each binary digit is compared. If the number of 1s is odd, the result is 1. If the
Tips
• You can even use Calculator in the Windows
perform this calculation.
• By changing Calculator to "Programmer" ("Scientific" in Windows
XP or Vista) mode, you can perform calculations in hexadecimal
and switch between hexadecimal and binary notations. You can also
perform "XOR" calculations.
Ramco National
Data length
Command
1
2
Data
Details
STX (02h)
-
The length of the data is written in units of words. (1 word
= 2 bytes)
Communication command
ETX (03h)
-
The value resulting from the XOR calculation of the values
from STX to ETX (excluding STX and ETX)
00
20
1b
Length
Command
number of 1s is even, the result is 0.
Accessories folder to
®
800-280-6933 | nsales@ramcoi.com
Communication Specifications
Data part
0 to 510
03
?
ETX
Sum
®
ETX
Checksum
1
1
www.Optex-Ramco.com
6-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ls-100cnLs-100cp

Table of Contents