IDEC MICRO/I HG4G-CJT22 F-B Series User Manual page 188

Micro/i operator interfaces for windo/i-nv4
Table of Contents

Advertisement

5 User Communication
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 Address, BCC, Constant (Hexadecimal) command settings when the trigger condition device address
changes to 1
• Receive command for receiving, processing, and storing data in device addresses, using Constant (Hexadecimal),
Registering Constant (Character), Skip, Device Address, BCC, Constant (Hexadecimal) command settings, for data
transmitted from an external device, when the trigger condition device address is 1
Settings in the User Communication tab on the Project Settings dialog box
Item
Protocol Name
Receiving Character Time Out
Transmission command: Command Settings dialog box settings
Item
Type
Trigger Condition
Completed Device Address
Status Device Address
Transmission Wait
Comment
Command
Data 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.
Number of Registering Constants: 2
2
Write a value of 3132h to LDR210 and 3334h to LDR211 for Device Address for transmission command data.
3
Change the value of the trigger condition LM200 from 0 to 1 to send the command.
The transmission data is as follows.
Constant
(Hexadecimal)
Command settings:
Transmission data:
(05h)
• When data transmission is successfully completed, the Completed Device Address LM201 changes to 1.
• When the value of each bit of address number+0 for Status Device Address LDR220 is 0, transmission is completed
without an error.
3-82
Sample 2
30 (×100 msec)
TXD
Rising-edge, LM200
LM201
LDR220
0 (×100 msec)
TXD command
Constant
(Hexadecimal)
Registering
Constant
(Character)
Device Address
BCC
Constant
(Hexadecimal)
Data
Index No.
10:
AB
20:
CD
Registering
Constant (Character)
EQN
A
B
1
(41h)
(42h)
(31h)
WindO/I-NV4 User's Manual
'05'
10: "AB", 20: "CD", Index Device Address: LDR200
No conversion, from Upper byte, Number of bytes: 2,
Words: 2, Device Address: LDR210
Start Calculation Position: 1, End Calculation Position: 0,
XOR, Hexadecimal to ASCII, 2 bytes
'0D''0A'
Transmission data
Index Device Address
LDR200=10
Order of transmission
Device Address
BCC
2
3
4
0
(32h)
(33h)
(34h)
(30h)
Setting
Setting
A
B
(41h)
(42h)
Constant
(Hexadecimal)
2
CR
LF
(32h)
(0Dh)
(0Ah)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents