Fuji Electric PXR Service Manual

Instruction Manual
MICRO CONTROLLER X COMMUNICATION FUNCTIONS (RS-485 Z-ASCII)
TYPEPXR
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
1.1 General············································································································································1
2. SPECIFICATIONS······························································································································· 2
2.1 Communication Specifications········································································································ 2
3. CONNECTION···································································································································· 3
3.1 Communication Terminal Allocation ······························································································ 3
3.2 Wiring············································································································································· 4
4. SETTING OF COMMUNICATION CONDITION··············································································5
4.1 Set Items ········································································································································· 5
4.2 Setting Operation Method ··············································································································· 6
5. Z-ASCII PROTOCOL·························································································································· 7
5.1 General············································································································································7
5.2 Composition of the Command Frame······························································································ 8
5.3 Response of Slave Station ············································································································· 10
5.4 Transmission Control Procedure ··································································································· 11
5.5 Precautions when Writing Data···································································································· 12
6. DETAILS OF COMMAND AND RESPONSE FRAMES ································································· 13
6.1 Data Read-out ······························································································································· 13
6.2 Data Write-in ································································································································ 16
7. ADRESS MAP AND DATA FORMAT ······························································································ 18
7.1 Data Format ·································································································································· 18
7.1.1 Transmission data format········································································································· 18
7.1.2 Handling of decimal point········································································································ 18
7.1.3 Data status during abnormal data input indication···································································· 19
7.1.4 Range of write-in data·············································································································· 19
7.2 Data Address Map························································································································· 19
7.3 Additional Explanation of Address Map ·······················································································23
8. SAMPLE PROGRAM························································································································ 27
9. TROUBLESHOOTING ·····················································································································32
10. APPENDIX········································································································································ 33
i
1. COMMUNICATION FUNCTIONS
1.1 General
PXR provides a communication function by RS-485 interface, by which it can transmit and receive data to and
from host computer, programmable controller, graphic display panel, etc.
The communication system consists of master station and slave stations. Up to 31 slave stations (PXR) can be
connected per master station.
Note that, because the master station can communicate with only one slave station at a time, a party to
communicate with must be specified by the "Station No." set at each slave station.
In order that the master station and slave station can communicate, the format of the transmit/receive data must
coincide. Before using communication function, it is necessary for master station to create a program to operate
data transmit/receive in accordance to Z-ASCII protocol described in this manual.
Please use on RS-232C RS-485 converter in case of designating a personal computer or other devices which
have an RS-232C interface as a master station. RS-232C RS-485 converter] (recommended article)
Type: KS-485 (non-isolated type)/SYSTEM SACOM Corp.
Type: SI-30A (isolated type)/SEKISUI ELECTRONICS Co., Ltd.





Caution:
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
Transmission code ASCII code Error detection BCC (Addition) Isolation Functional isolation between transmission circuit
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
PXR5PXR9
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-232C RS-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 setting 0
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. 2The 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 code Parameter End code BCC
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
“:”(3AH [1 digit] STX(02H [1 digit] CR0DH)+LF0AH) [2digits] ETX(03H [1 digit]
Combination 1 Combination 2
8
(2) Station No. [3 digits]
This code means the slave station number.
Only one slave, which has same station number as determined at "STno" parameter, accept the command from
the master.
Please refer to chapter 4 for the details of "STno" settings.
Note : This code is always defined with 3 digits.
Please add "0" in front of the station No. in case it is less than 100. Ex.) Station No. =5 "STno." Setting = "005"
(3) Command code [2 digits]
By setting this code, commands type to be performed by the slave (PXR) can be determined.
There are two kinds of command, "Read-out" and "Write-in".
For the details, please refer to chapter 6.
(4) Parameter [Number of digit is depending on kind of command]
This is the data which is essential to operate the command.
The kind of necessary data is depending on the each command.
Please refer to chapter 6.
(5) End Code [1 digit or 2digits]
This code means "End of Communication Frame".
Please refer to chapter 5.2(1).
(6) BCC (Block Check Character) [2 digits]
This code is used for detecting errors in data transmission. First of all, each character of station No., command
code, Parameter and End Code are summed.
From last 1 byte of the calculation result, the first character goes to the 1st byte, and the last character goes to the
2nd byte in BCC.
Ex.)
:001RW31001,1CRLF(BCC)
30
H 30H 31H 52H 57H 33H 31H 30H 30H 31H 2CH 31H 0DH 0AH
BCC30H+30H+31H+52H+57H+33H+31H+30H+30H+31H+2CH+31H+0DH+0AH=02A3H
The last 1 byte
of calculation result : A 3H
The first character “A” : 41H
The last character “3” : 33
H
9
Loading...
+ 25 hidden pages