MICRO CONTROLLER X
COMMUNICATION
FUNCTIONS
(RS-485 Z-ASCII)
TYPE:PXR
INP-TN512644c-E
Note: GW-BASIC, Windows 95 and MS-DOS are registered trademarks of Microsoft Corporation.
NOTICE
1. Exemption items from responsibility
The contents of this document may be changed in the future without prior notice.
We paid the utmost care for the accuracy of the contents. However, we are not liable for direct and
indirect damages resulting from incorrect descriptions, omission of information, and use of
information in this document.
CONTENTS
1. COMMUNICATION FUNCTIONS····································································································· 1
4. SETTING OF COMMUNICATION CONDITION··············································································5
4.1 Set Items ········································································································································· 5
When using the RS-232C ⇔ RS-485 converter, pay attention to cable connection between the converter and
master station. If the cable is not connected correctly, the master station and slave station cannot communicate.
In addition, be careful about communication settings such as baud rate and parity set for the converter.
-1-
2. SPECIFICATIONS
2.1 Communication Specifications
Item Specification
Electrical specification Based on ETA RS-485
Transmission system 2-wire, semi-duplicate
Synchronizing system Start-stop synchronous system
Connection format 1:N
Number connectable units Up to 31 units
Transmission distance 500m max. (total extension distance)
Transmission speed 9600bps
Data format
Data length 8 bits
Stop bit 1 bit
Parity none, even, odd (selectable)
and others (withstand voltage : 500V AC)
-2-
3. CONNECTION
WARNING
For avoiding electric shock and malfunctions, do not turn on the power supply untill all wiring
have been completed.
3.1 Communication Terminal Allocation
PXR3
Terminal number
Signal name
PXR4
Terminal number
Signal name
PXR5,PXR9
⑮⑭
RS485
+
⑦ ⑧
RS485
+
RS485
-
RS485
-
Terminal number
Signal name
①②
RS485
+
RS485
-
-3-
3.2 Wiring
・Use twisted pair cables with shield.
・The total extension length of the cable is up to 500 m. A master station and up to 31 units of the PXR can be
connected per line.
・Both ends of the cable should be terminate with terminating resistors 100Ω 1/2W.
・The shield wire of the cable should be grounded at one place on the master station unit side.
・If the PXR is to be installed where the level of noise applied to the PXR may exceed 1000 V, it is recommended
to install a noise filter in the master station side as below.
Recommended noise filter: ZRAC2203-11/TDK
Master station
(PC, etc.)
RS-232C RS-485
Master station side
Noise filter PXR
Transmission
cable
Slave station (PXR)
Twisted pair cable with shield
+
−
FG
Terminating resistor
100Ω(1/2W)
RS-485 interface
or
RS-485 side of the RS-232CRS-485 converter
+
−
Slave station (PXR)
+
−
Slave station (PXR)
+
−
Terminating resistor
100Ω(1/2W)
-4-
4.
SETTING OF COMMUNICATION CONDITION
In order that the master station and instrument (PXR) can correctly communicate, following settings are required.
・ All communication condition settings of the master station are the same as those of instruments (PXR).
・All instruments (PXR) connected on a line are set to "Station Nos. (STno)" which are different from each other.
(Any "Station No." is not shared by more than one instrument.)
4.1 Set Items
The parameters to be set are shown in the following table. Set them by operating the front panel keys.
Parameter
symbol
―――
―――
―――
CoM Parity setting0
STno Station No.1 0 to 255
PCoL
Transmission speed 9600bps Fixed (can not be changed)
Data length 8 bits Fixed (can not be changed)
Stop bit 1 bit Fixed (can not be changed)
Communication
protocol
Item
Value at
delivery
As
specified
in order
Setting range Remarks
0: odd parity
1: even parity
2: none parity
0: Z-ASCII
1: Modbus
Set the same
communication
condition to the master
station and all slave
stations.
Set a different value to
each station.
Set the parameter to “0”.
(The parameter is not
displayed depending on
models).
-5-
4.2 Setting Operation Method
The following example shows how to set the communication conditions.
Example: Selecting an even parity and “STno=18” on a station.
Key
operation
SEL
(6 seconds)
∨
SEL
∧∨
SEL
∨
SEL
∧∨
SEL
∨
SEL
(3 seconds)
Indication Description
200
200
P-n1
STno
STno
STno
18
STno
18
CoM
CoM
CoM
CoM
PCoL
200
200
Running state (PV/SV indication)
Press the SEL key for approximately 6 seconds. P-n1 appears and
0
No. 3 block parameter is selected.
Operate the ∨ key repeatedly until STno parameter appears. (If past
0
over, operate the ∧ key to return.)
Press the SEL key. The numeric value on the lower indicator
0
blinks and the setting mode is selected.
Operate the ∧ or ∨ key to change the numeric value to 18.
Press the SEL key again. The numeric value stops blinking and
the setting is registered.
Press the ∨ key to display the CoM parameter.
0
Press the SEL key. The numeric value on the lower indicator
0
blinks and the setting mode is selected.
Operate the ∧ or ∨ key until the numeric value changes to 1 (even
1
parity).
Press the SEL key again. The numeric value stops blinking and
1
the setting is registered.
Press the ∨ key to display the PCoL parameter.
Make sure that the set value is set to “0”.
0
Press the SEL key for 3 seconds to resume the running indication
(PV/SV indication).
(If the set value is set to another one, set it to “0”).
-6-
5.1 General
Transmission procedures according to the Z-ASCII protocol is as shown below
1) The master station sends a command frame in a pre-determined format to a slave station.
2) The slave station checks if the station No. in the received frame matches with the own station No. or not.
3) If matched, the slave station executes the command and sends back the result in a pre-determined format.
4) If mismatched, the slave station stops receiving the command frame and wait for the next command
frame.
a) In case when the station No. in the received command frame matches with the own slave station No.
5. Z-ASCII PROTOCOL
Master to slave
Slave to master
b) In case when the station No. in the received command message mismatches with the own slave station
No.
Master to slave
Slave to master
The master station can individually communicate with any one of slave stations connected on the same line
upon setting the station No. in the command message.
Command frame
Command frame
Response frame
(Not respond)
Data on
the line
Data on
the line
-7-
5.2 Composition of the Command Frame
The communication frames (Command Frame & Response Frame) consist of the following 6 fields, and these 6
fields are always sent in order.
①③⑤⑥
ead code Station No. Command codeParameterEnd codeBCC
The details of each fields are as described in the foliowings.
②④
Fig. 5-1 Composition of message
(1) Head code [1 digit]
This code means "Head of Frame". One of the following code can be used.
":"(3AH) or STX(02H)
Depending on the code used, the End code automatically selected according to the below shown table.
Head code
End code
Whenever the slave (PXR) receives the Head Code, it starts receiving new command frame.
In other words, the previously received command frame is automatically cancelled even not completed