Chapter 8 Communication Functions

BCC setting: set BCC when it is needed.

 

Item

Contents

 

Data Type

ASCII adds 2 bytes BCC value in ASCII type to frame. Hex adds 1 byte BCC value in Hex type to

 

frame. For the detailed setting BCC, refer to 8.1.6 “Execution of Commands”.

 

 

 

 

 

 

Default

It is that sum all the data from 2nd data to the data before the data marked as [BCC] and input the

 

result to the [BCC] area

 

 

 

SUM 1

BCC method uses sum like defaults, but the user can set the BCC area.

 

 

 

 

SUM 2

BCC method is the same with SUM 1, but it’s used when the user masks any value to the last BCC

Rule

value.

 

XOR 1

BCC method is OR (Exclusive OR).

Check

 

 

XOR 2

BCC method is the same with XOR 1, but it’s used when the user masks any value to the last BCC

 

 

value.

 

 

 

MUL 1

BCC method is MULTIPLY that is, multiplication.

 

 

 

 

MUL 2

BCC method is the same with MUL 1, but it’s used when the user masks any value to the last BCC

 

value.

 

 

 

 

H signifies header, S is for segment, and T is for tail.

 

Range

Ex1) When header is set as [ENQ][STX], tail is set as [EOT][ETX], and the range of setting

 

 

BCC is to be from [STX] to [ETX], then set as H [1]~T [1].

 

 

It is to set whether not to take complement number or to take the complement number of 1 or 2 at

Complement

[BCC] value. If mask setting is done after taking a complement number, the user can set any value to

 

 

do masking.

 

 

Sets any value and method of masking.

 

Mask

Ex1) When masking by XOR method, using a value, HFF : ^FF

 

Ex2) When masking by OR method, using a value, HFF : FF

 

 

 

 

When masking by AND method, using a value, HFF : &FF

8-43

Page 233
Image 233
LG Electronics 120S user manual Sum, Xor, Mul