IDEC High Performance Series User Manual

Page 174

Advertising
background image

5 User Communication

3-72

WindO/I-NV2 User’s Manual

Receive command: Command Settings dialog box settings

Operation for receive command

1

Change the trigger condition LM202 from 0 to 1 to be ready for receiving user communication.

2

Data is transmitted from the external device and the transmitted data is received and processed.
The receive data is as follows.

• The receive data is compared with the character data, and the value of the matching Index No. (10 (DEC)) is stored

in Index Device LDR230.

• The 2 bytes (specified with Skip) of the receive command data 43h and 44h are ignored.
• Since the Reference Device LDR 230 of Device of the receive command data is 10 (DEC), the data is stored in the

device LDR250 and LDR251, which is offset by +10.

[STX] ABCD1234 is calculated with BCC of receive command data and compared with 3032h.

- When Calculation Start Position is 1 and Calculation End Position is 0: Calculates the range STX ABCD1234.

- The BCC calculation type is XOR.

02h^41h^42h^43h^44h^31h^32h^33h^34h^=02h

Item

Setting

Comment

RXD command

Command Type

Receive

Completed Device

LM203

Not Clear Completed Device
automatically

No

Status Device

LDR260

Receiving Time Out

0 (No Receive Time Out)

Trigger Condition

While ON, Device: LM202

Command
Data Settings dialog box
settings

Constant

(Hexadecimal)

'02'

Registering

Constant

(Character)

10: "AB", 20: "CD", Index Device: LDR230

Skip

2 bytes

Device

Conversion Type: No Conversion, from Upper byte,

Number of bytes: 2, Words: 2

Device: LDR240, Reference Device: LDR230

BCC

Calculation Start Position: 1 Calculation End Position: 0, XOR

Binary (HEX) to ASCII, 2 bytes

Constant

(Hexadecimal)

'0D''0A'

3

(33h)

4

(34h)

1

(31h)

STX

(02h)

2

(32h)

A

(41h)

B

(42h)

C

(43h)

D

(44h)

Skip

CR

(0Dh)

LF

(0Ah)

0

(30h)

2

(32h)

BCC

Constant

(HEX)

Device

Constant

(HEX)

Command settings:

Registering

Constant (Character)

Receive data:

Received data

Compare

A

(41h)

B

(42h)

Order of reception

10

LDR230:

Value of the Index Device

AB

10:

CD

20:

Data

Index No.

Number of

Registering

Constants: 2

(DEC)

0000h

LDR240:

0000h

LDR241:

3132h

LDR250:

Value of Device

LDR230=10

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

Calculation Start Position:

(5)

(4)

(3)

(8)

(7)

(6)

(2)

(1)

(0)

Calculation End Position:

3

(33h)

4

(34h)

1

(31h)

STX

(02h)

2

(32h)

A

(41h)

B

(42h)

C

(43h)

D

(44h)

CR

(0Dh)

LF

(0Ah)

0

(30h)

2

(32h)

Data used for BCC calculation

Advertising
This manual is related to the following products: