Example 2, Communic ation – IDEC High Performance Series User Manual

Page 173

Advertising
background image

WindO/I-NV2 User’s Manual

3-71

5 User Communication

3

Communic

ation

Example 2

This section describes an example of user communication protocol settings for creating the following commands and
command operations.

• Transmission command for transmitting data using Constant (Hexadecimal), Registering Constant (Character),

Device, BCC, Constant (Hexadecimal) command settings when the trigger condition device changes to 1

• Receive command for receiving, processing, and storing data in devices, using Constant (Hexadecimal), Registering

Constant (Character), Skip, Device, BCC, Constant (Hexadecimal) command settings, for data transmitted from an
external device, when the trigger condition device is 1

User Communication Settings dialog box settings

Transmission command: Command Settings dialog box settings

Operation for transmission command

1

Write a value of 10 (DEC) to LDR200 for Registering Constant (Character) for transmission command data.
AB is selected.

2

Write a value of 3132h to LDR210 and 3334h to LDR211 for Device for transmission command data.

3

Change the trigger condition LM200 from 0 to 1 to start command transmission.
The transmission data is as follows.

• When data transmission is successfully completed, the Completed Device LM201 changes to 1.
• When the value of each bit of address+0 for Status Device LDR220 is 0, transmission is completed without an error.

Item

Setting

Protocol Name

Sample 2

Receiving Character Time Out

30 (×100 msec)

Item

Setting

Comment

TXD command

Command Type

Transmit

Completed Device

LM201

Status Device

LDR220

Transmission Wait

0 (×100 msec)

Trigger Condition

While ON, LM200

Command
Data Settings dialog box settings

Constant

(Hexadecimal)

'05'

Registering

Constant

(Character)

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

Device

No Conversion, from Upper byte, Number of bytes: 2,

Words: 2

Device: LDR210

BCC

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

XOR, Binary (HEX) to ASCII, 2 bytes

Constant

(Hexadecimal)

'0D0A'

AB

10:

CD

20:

Index Device

LDR200=10

Data

Index No.

Number of Registering Constants: 2

Transmission data

A

(41h)

B

(42h)

Order of transmission

3

(33h)

4

(34h)

1

(31h)

EQN

(05h)

2

(32h)

CR

(0Dh)

LF

(0Ah)

A

(41h)

B

(42h)

0

(30h)

2

(32h)

BCC

Transmission data:

Constant

(HEX)

Registering

Constant (Character)

Device

Command settings:

Constant

(HEX)

Advertising
This manual is related to the following products: