DIGITAL CONTROLLER
COMMUNICATION
FUNCTIONS (MODBUS)
TYPE: PXH
INP-TN514207-E
Note: Windows® is the registered trade mark of Microsoft Corporation.
Note: Visual Basic® is the registered trade mark of Microsoft Corporation.
Note: MODBUS® is the registered trade mark of Gould Modicon.
z 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.
Notice
CONTENTS
CONTENTS....................................................................................................................... i
1. COMMUNICATION FUNCTIONS ......................................................................................1
▪ Via RS-485 interface and PC loader interface, PXH provides communication functions of transmit-
ting and receiving data to and from host computer, programmable controller, graphic panel, etc.
▪ The communication system consists of master station and slave stations. For RS-485 communica-
tion, up to 31 slave stations (PXHs) 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.
For loader communication, one slave station (PXH) can be connected per master station.
▪ In order that the master station and slave station can communicate, the format of the trans-
mit/receive data must coincide. For the PXH, the format of the communication data is determined
by the MODBUS protocol.
▪ Please use an 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: RC-77 (isolated type)/ RA SYSTEMS make http://www.ras.co.jp
Type: K3SC-10 (isolated type)/ OMRON make http://www.omron.co.jp
RS-232C communication with PC is available upon connecting Type: ZZPPXH1*TK4H4563 to PC
loader interface where PXH is provided in standard.
Programmable
controller
RS-485
RS-232C
RS-485
Personal
computer
RS-232C
D-sub9 pin
RS-232C
RS-485 communication converter
Caution:
When using the RS-232C ⇔ RS-485 converter, pay attention to cable connection between the con-
verter 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.
For avoiding electric shock and malfunctions, do not turn on the power supply until all wiring is
completed.
3.1 Communication Terminal Allocation
■ PXH9 (RS-485)
Terminal number (14) (15) (16)
Signal name
■ PXH9 (PC loader interface)
PC loader interface
RS485
+
SG
RS485
–
Φ2.5, 3-pole miniature jack
INP-TN514207-E
3
3.2 Wiring
■ RS-485
▪ Use twisted pair cables with shield. Recommended: KPEV-SB (Furukawa Electric make)
▪ The total extension length of the cable is up to 500 m. A master station and up to 31 units of the
PXH can be connected per line.
▪ Both ends of the cable should be terminated with terminating resistors 100Ω (1/2W or more).
▪ If the PXH is to be installed where the level of noise applied to the PXH 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 make)
▪ If problematic in EMC at communication, loading the communication cable with ferrite can lower
the noise level.
Recommended ferrite core: ZCAT series (TDK make)
MSFC series (Morimiya Electric make)
Master station
(PC, etc.)
RS-232C⇔RS-485
Master station side
Twisted pair cable with shield
+
SG
RS-485 interface
or
RS-485 side of the RS-232C RS-485 converter
Terminating resistor
100Ω (1/2W)
Noise filter PXH
Transmission
cable
Slave (PXH)
+
SG
Slave (PXH)
+
SG
Slave (PXH)
▪ SG connection is not mandatory, but is
+
effective for remedying communication
errors attributable to noises.
Terminating
resistor
100Ω (1/2W)
SG
INP-TN514207-E
4
■ PC loader communication
▪ Use an optional PC loader communication cable (RS-232C).
PC loader communication cable
Master station side
(RS232C)
ZZPPXH1 TK4H4563
*
PC or the like
RS232C
D-Sub 9 pins
Bottom of PXH
INP-TN514207-E
5
4. SETTING OF COMMUNICATION CONDITION
In order that the master station and instrument (PXH) can correctly communicate, following settings are required.
▪ All communication condition settings of the master station and those of instruments (PXH) are indentical.
▪ For RS-485 communication, different "station numbers (STN4)" are assigned to all PXHs which are con-
nected to a common line. (Any "Station No." is not shared by more than one instrument.)
▪ For PC loader communication, the station No. is fixed at "1".
Both for PC loader communication and RS-485 communication, same station No. "1" may be assigned.
4.1 Setting items
The parameters to be set are shown in the following table. Set them by operating the front panel
keys.
■ RS-485
CH B COM
Parameter
symbol
SPD4
――― Data length 8 bits Fixed (can not be changed)
――― Stop bit 1 bit Fixed (can not be changed)
BIT4 Parity setting odd
STN4 Station No. 1
■ PC loader communication
CH B COM
Parameter
symbol
SPD2
――― Data length 8 bits Fixed (can not be changed)
――― Stop bit 1 bit Fixed (can not be changed)
BIT2 Parity setting odd
―――Station No. 1 Fixed (can not be changed)
Item
Transmission
speed
Item
Transmission
speed
Value at
delivery
38400bps
Value at
delivery
38400bps
Setting range Remarks
96 : 9600bps
192 : 19200bps
384 : 38400bps
8n : none parity
8o : odd parity
8E : even parity
0 to 255
(0: communication function stop)
Setting range Remarks
96 : 9600bps
192 : 19200bps
384 : 38400bps
8n : none parity
8o : odd parity
8E : even parity
Set the same
communication
condition to
the master station
and all slave
stations.
Set a different
number to each
station.
Set the same
conditions as
the master station.
INP-TN514207-E
6
4.2 Setting Operation Method
The following example shows how to set the communication conditions.
Example: For RS-485, set BIT4 parity at even and STN4 at 18.
Key
operation
SEL
∨
SEL
SEL
>∧∨
SEL
∨
SEL
Indication Description
200
LP01SV
200
PS1
0000
b COM
Ch
b. STN4
02 1
b. STN4
02 00001
b. STN4
02 00018
b. STN4
02 18
b. BIT4
04 8o
b. BIT4
04 8o
Operation status (PV/SV indication) or (PV/MV indication)
Press the SEL key to display PS1.
Press the ∨ key repeatedly until b.COM channel appears. (If
past over, press the ∧ key to return.)
Press the SEL key to display STN4 parameter.
Press the SEL key. The numeric value on the lower
indicator blinks and the setting mode is selected.
Press 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 BIT4 parameter.
Press the SEL key. The numeric value on the lower
indicator blinks and the setting mode is selected.
∧∨
SEL
DISP
DISP
b. BIT4
04 8E
b. BIT4
04 8E
b COM
Ch
LP01SV
200
200
Press the ∧ or ∨ key until the numeric value changes to 8E
(even parity).
Press the SEL key again. The numeric value stops blinking
and the setting is registered.
Press the DISP key to resume b.COM channel indication.
Press the DISP key to resume the operation status (PV/SV
indication).
* Be sure to turn off and on power so that the communication condition settings will affect the control.
INP-TN514207-E
7
5. MODBUS COMMUNICATION PROTOCOL
5.1 Outline
The communication system by the MODBUS protocol is that the communication always starts from
the master station and a slave station responds to the received message.
Transmission procedures is as shown below.
1) The master station sends a command message to a slave station.
2) The slave station checks that the station No. in the received message matches with the own station No.
or not.
3) If matched, the slave station executes the command and sends back the response message.
4) If mismatched, the slave station leaves the command message and wait for the next command
message.
a) In case when the station No. in the received command message matches with the own slave
station No.
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 message
Command message
Response message
(Not respond)
Data on
the line
Data on
the line
INP-TN514207-E
8
5.2 Composition of Message
Command message and response message consist of 4 fields; Station No., Function code, Data and
Error check code. And these are sent in the following order.
Station No. (1 byte)
Function code (1 byte)
Data (2 to 69 bytes)
Error check code (CRC-16) (2 bytes)
Fig. 5-1 Composition of message
In the following, each field is explained.
(1) Station No
Station No. is the number specifying a slave station. For RS-485 communication, the command
is processed only by the slave station whose station No. matches with the No. set in the parameter "STN4".
For details of setting the parameter "STN4", refer to chapter 4.
For PC loader communication, the station No. is fixed at "1".
(2) Function code
This is a code to designate the function executed at a slave station.
For details, refer to section 5.4.
(3) Data
Data are the data required for executing function codes. The composition of data varies with
function codes. For details, refer to chapter 6.
A register number is assigned to each data in the indicating controller. For using the data by
communication, designate the register number.
Note that the register number transmitted on message is expressed as its relative address.
The relative address is calculated by the following expression.
Relateve address
The lower 4 digits of the
=
Register number
– 1
For example, when the resister number designated by a function code is 40003,
Relative address = (lower 4 digits of 40003) – 1
= 0002
is used on the message.
INP-TN514207-E
9
(4) Error check code
This is the code to detect message errors (change in bit) in the signal transmission.
On the MODBUS protocol (RTU mode), CRC-16 (Cycric Redundancy Check) is applied.
For CRC calculation method, refer to section 5.5.
INP-TN514207-E
10
5.3 Response of Slave Station
(1) Response for normal command
To a relevant message, the slave station creates and sends back a response message which corre-
sponds to the command message. The composition of message in this case is the same as in
section 5.2.
Contents of the data field depend on the function code. For details, refer to Chapter 6.
(2) Response for abnormal command
If contents of a command message have an abnormality (for example, non-actual function code is
designated) other than transmission error, the slave station does not execute that command but
creates and sends back a response message at error detection.
The composition of response message at error detection is as shown in Fig. 5-2. The value used
for function code field is function code of command message plus 80
Table 5-1 gives error codes.
Function code + 80H
Error check(CRC-16)
Station No.
Error code
.
H
Error code Contents Description
01H Illegal function codeNon-actual function code is designated.
02H Illegal data address A relative address of resister number to which the
03H Illegal data value Because the designation of number is too much,
(3) No response
Under any of the following items, the slave station takes no action of the command message and
sends back no response.
▪ A station number transmitted in the command message differs from the station number speci-
▪ A error check code is not matched, or a transmission error (parity error, etc.) is detected.
▪ The time interval between the composition data of the message becomes longer than the time
▪ Station No. of a slave station is set as 0.
▪ A write-in command is sent while executing FIX.
Fig. 5-2 Response message at error detection
Table 5-1 Error Code
Check for the function code.
designated function code can not be used.
the area where resister numbers do not exist is designated.
fied to the slave station.
corresponding to 24 bits. (Refer to section 5.6 Transmission Control Procedure.)
INP-TN514207-E
11
5.4 Function Code
According to MODBUS protocol, register numbers are assigned by function codes.
Each function code acts on specific register number.
This correspondence is shown in Table 5-2, and the message length by function is shown in Table 5-3.
Table 5-2 Correspondence between function codes and objective address
Function code Resister No.
No. Function Object No. Contents
03H
04H
06H Write-in Holding register4xxxxRead-out/write-in word data
10H
Read-out
(continuously)
Read-out
(continuously)
Write-in
(continuously)
Holding register4xxxxRead-out/write-in word data
Input register 3xxxxRead-out word data
Holding register4xxxxRead-out/write-in word data
Table 5-3 Function code and message length
Function
code
03H Read-out of word data 32 words 887 69
04H
*1
06H Write-in of word data 1 word 888 8
10H
*1) For PXH, all data is designated by 2 words.
Read-out of word data
(read-out only)
Write-in of continuous
word data
(write-in of word data) is used, only 1 lower word can be written in, and only 1 upper word
If 06
H
cannot.
Contents
Number of
designatable
data
15 words 887 35
32 words 11738 8
[Unit:byte]
Command message Response message
Minimum Maximum Minimum Maximum
INP-TN514207-E
12
5.5 Calculation of Error Check Code (CRC-16)
CRC-16 is the 2-byte (16-bits) error check code. From the top of the message (station No.) to the
end of the data field are calculated.
The slave station calculates the CRC of the received message, and does not respond if the calculated
CRC is different from the contents of the received CRC code.
Fig. 5-3 shows the flow of the CRC-16 calculation system.
Set FFFFH (hexadecimal number) in CR.
Exclusive logical sum (XOR) is executed
with CR and one character (1 byte) of the I
characters, and its results is set in CR.
Start
Set 1 in I.
Explanation of variables
CR : CRC error check data (2 bytes)
I : Digits of calculation characters
in command message
J : Check on the number of times
of CR calculation
Set 1 in J.
Bit at right end
of CR is 1?
YES
Shift CR to right by 1 bit, and A001H and
exclusive logical sum (XOR) are executed
and its result is set in CR.
Add 1 to J.
NO
Calculation (8 times)
is finished?
J>8
YES
Add 1 to I.
NO
Shift CR to right by 1 bit.
INP-TN514207-E
NO
Calculation of all characters is
completed?
I>All characters
YES
End
Fig. 5-3 Flow of CRC-16 calculation
13
(Calculation is executed in the order
of command message station No.,
function code and data.)
CR calculation result shall be added
to the last command message in the
order of LOW byte and HIGH byte.
5.6 Transmission Control Procedure
(1) Transmission procedure of master station
The master station must proceed to a communication upon conforming to the following items.
(1-1) Before sending a command message, provide 48 bits time or more vacant status.
(1-2) For 1 command message, each field part should be sent below 24 bits time interval.
(1-3) Within 24 bits time after sending a command message, receiving stand-by status
starts.
(1-4) Provide 48 bits time or more vacant status between the end of response message re-
ception and beginning of next command message sending [same as in (1-1)].
(1-5) For ensuring the safety, make a confirmation of the response message and make an
arrangement so as to provide 3 or more retries in case of no response, error occurrence, etc.
Note) The above definition is minimum requirement. For ensuring the safety, it’s recom-
mended the program for the master should be developed with 2 to 3 times margins.
Concretely, it is advised to arrange the program for 9600 bps with 10 ms or more for
vacant status (1-1), and within 1 ms for byte interval (1-2) and changeover from
sending to receiving (1-3).
(2) Description
1) Detection of the message frame
2) Response of this instrument (PXH)
Since the communication system uses the 2-wire RS-485 interface, there may be 2 statuses
on a line below. (The same goes with PC loader communication.)
(a) Vacant status (no data on line)
(b) Communication status (data is existing)
Instruments connected on the line are initially at a receiving status and monitoring the line.
When 24 bits time or more vacant status has appeared on the line, the end of preceding frame
is assumed and, within following 24 bits time, a stand-by status is posted. When data ap-
pears on the line, the instruments enter on receiving, and when 24 bits time or more vacant
status is detected again, and the end of that frame is assumed. I.e., data which appeared on
the line from the first 24 bits time or more vacant status to the next 24 bits time or more vacant status is fetched as one frame.
Therefore, one frame (command message) must be sent upon confirming the following.
(1-1) 48 bits time or more vacant status precedes the command message sending.
(1-2) For 1 command message, each byte should be sent below 24 bits time interval.
After a frame detection (24 bits time or more vacant status is detected), this instrument car-
ries out processing with that frame as a command message. If the command message is ad-
dressed to the own station, a response message is returned. Its processing time is about 10
ms (depends on contents of command message).
After sending a command message, therefore, the master station must observe the following
(1-3) Stand-by status is posted within 24 bits time after sending a command message.
INP-TN514207-E
14
Controll
station
Controll
station
→
←
PXH
PXH
POL1
Space of longer than 50msis needed.
(longer than 100ms is recommended.)
POL2
About 10 msec
POL1 response data
Data on line
POL1 POL2 POL1 response data
INP-TN514207-E
15
5.7 FIX Processing (Cautions in data write)
The instrument is provided inside with a non-volatile memory (EEPROM) for holding the setting pa-
rameters. Data written in the non-volatile memory is not lost even if turning off the power.
To hold parameters that were written in the internal memory via communication after turning off the
power, the FIX process is effective. It allows parameters to be written in nonvolatile memory.
Fig. 5-4 shows the FIX procedure.
Cautions:
▪ FIX processing takes approximately 5 seconds to 3 minutes (depending on how many parameters
were changed).
▪ While writing, do not turn off the power of the PXH. Otherwise, the data in the non-volatile
memory will be destroyed, whereby the PXH could not be used any longer.
▪ Don’t change parameters on the front panel when performing the FIX procedure, or memory error
may result.
▪ The non-volatile memory (EEPROM) is a device where the number of write-in times is limited.
The guaranteed number of write-in times of the non-volatile memory used on the instrument is
100,000 minimum. Therefore, limit the times of FIX processing to bare minimum, like when set-
ting parameters are changed. Refrain from carrying out the FIX processing periodically for example or while such is not absolutely required.
Start FIX
Read the FIX address
with function code : 03
relative address : 0C50
No
FIX=0?
H
H
Yes
Write ‘1’ into FIX address
with function code : 06
relative address : 0C50
Read the FIX
with function code : 03
relative address : 0C50
address
H
H
H
H
No
FIX=0?
Yes
End FIX
Fig. 5-4 FIX procedure
INP-TN514207-E
16
6. DETAILS OF MESSAGE
6.1 Read-out of Word Data [Function code: 03H]
Function code Max. word number read-out in one messageRelative data address Register No.
Upper byte of contents of the first word data
Lower byte of contents of the first word data
Upper byte of contents of the next word data
Lower byte of contents of the next word data
~
~
Upper byte of contents of the last word data
Lower byte of contents of the last word data
(2) Function explanation
Words data are read-out, starting from read-out start No. until read-out word number. The slave
station transmits the read-out word data in the order of upper and lower bytes.
For PXH for which all data consists of 2 word units, data should be read out by units of 2 words.
Example: Suppose data is 99999 (00 01 86 9F
) Suppose data is 1
H
(1) (2) (3) (4)
(3) 86
(4) 9F
(1) 00
LH(Low word High byte)
LL(Low word Low byte)
HH(High word High byte)
00 LH
01 LL
00 HH
INP-TN514207-E
(2) 01
HL(High word Low byte)
17
00 HL
(3) Message transmission
The following shows an example of reading out PV1F (PV1 full scale) from No. 1 station.
Upper byte of contents of the first word data
Lower byte of contents of the first word data
Upper byte of contents of the next word data
Lower byte of contents of the next word data
~
~
Upper byte of contents of the last word data
Lower byte of contents of the last word data
(2) Function explanation
Words data are read-out, starting from read-out start No. until read-out word number. The slave
station transmits the read-out word data in the order of upper and lower bytes.
For PXH for which all data consists of 2 word units, data is read out by units of 2 words.
(1) (2) (3) (4)
Example: Suppose data is –2 (FF FF FF FE
)
H
(3) FF LH
(4) FE LL
(1) FF HH
INP-TN514207-E
(2) FF HL
19
(3) Message transmission
The following shows an example of reading out PV value from No. 1 station.
Designated data is written in word data of write-in designate No. Write-in data are transmitted
from master station in the order of upper and lower bytes.
For PXH, all data consist of 2 word units. If 06H (write-in of word data) is used, only 1 lower
word of 2 word data can be written in, and only 1 upper word of 2 word data cannot.
in one messageRelative data address Register No.
40001-43711
0000
Upper Upper
Lower
UpperUpper
Lower
Upper Upper
Lower
Write-in designate No.
(relative address)
Write-in word
data
CRC data
0E7E
-
H
H
Lower
Lower
Lower
(3) Message transmission (example)
The following shows an example of setting 100.0 (1000
slave station.
When setting is being locked, response is returned normally, but the command is not
executed. Make sure that setting is not locked to send the write-in command.
The setting lock parameter can be written in even if communication setting is invalidated.
If the write-in command message is sent to any slave station during the FIX process,
response is not returned from it.
=03E8H) to the parameter "P1" of No.1
D
H
Station No. 01H
H
Upper02 H Upper 02H
Lower82
H
Upper03H Upper 03H
LowerE8
H
Upper28H Upper 28H
LowerE4
H
Write-in designate No.
(relative address)
State of write-in
designation
CRC data
Lower 82
Lower E8
Lower E4H
H
H
INP-TN514207-E
21
6.4 Write-in of Continuous Word Data [Function code: 10H]
Since the transmission data can not include a decimal point, data of 100.0 is
transmitted as "1000".
For transmission format of each data, refer to the address map (Chapter 7).
When setting is being locked, response is returned normally. However, the
Caution
command is not executed. If the write-in command message is sent to any slave
station during the FIX process, response is not returned from it.
Data number:06H (2 words per data)
H
Station No. 01H
H
Upper 02H Upper 02H
Lower 82
H
Upper 00H Upper 00H Write-in word
Lower 06
H
Upper 03H
Lower E8
H
Write-in start No.
Write-in
word number
CRC data
Lower 82H
Lower 06
H
Lower 9BH
Upper 00H
Lower 00
H
Upper 00H
Lower 64
H
Upper 00H
Lower 00
H
Upper 00H
Lower 32
H
Upper 00H
Lower 00
H
Upper B6H
Lower D8
H
INP-TN514207-E
23
7. ADDRESS MAP AND DATA FORMAT
7.1 Data Format
7.1.1 Transmission data format
The MODBUS protocol used in this instrument (PXH) is RTU (Remote Terminal Unit) mode.
Transmitted data is "numeric value" and not "ASCII code".
7.1.2 Engineering unit
This instrument can handle set value data or other data which are affected by input range as follows.
Engineering unit: Subjected to scaling to match the actual value according to input range
[Example] The value of "PV = 150" (input range: 0º to 400ºC)
Register No.Data (HEX) Data (decimal)
Engineering unit 0102 00000096H
● How to change the input range setting via communication
The input range setting is for full scale, base scale and decimal point position setting.
In order that the change of input range setting will affect the control, power must be turned off and
on, or the reset command must be executed.
Changing the decimal point position automatically changes the full scale and base scale settings.
Example: Changing the input range from 0 to 400, to 0.0 to 400.0
Designate by UCD1
if TPLT = 10, 11
(0 to 3)
Designate by PV1D
if TPLT = 13, 14
(0 to 3)
AIM 31345
MV1 30265
AO1 31105
AO2 31107
AMV1 31381
RCJ1 31057
Kind Register No.
PV1 30259PV1 31025
SV1 30261
DV1 30263PV2 31027
AI1 31031
7.1.4 Data when input is abnormal
When "UUUU" or "LLLL" is displayed on the face panel on account of over-range, under-range or
input burnout for example, PV read-out value (register No. 30259) is 105% or –5% of input range.
Presence of any input abnormality via communication can be detected by:
"Register No. 30269: Input abnormal status"
Digits below
decimal point
Designate by PV1D
(0 to 3)
Designate by PV2D
(0 to 3)
Designate by AI1D
(0 to 3)
Designate by UCD1
(0 to 3)
1 digit below
decimal point
2 digits below
decimal point
Kind Register No.
FFV1 31389
RCJ2 31059
7.1.5 Range of write-in data
When data is written in each parameter, the write-in data should be kept within the setting range.
PXH can accept the write-in data beyond the range, however, be careful since the PXH performance
will not be guaranteed.
INP-TN514207-E
26
7.1.6 Floating decimal point type
The mathematical calculation constant uses the floating decimal point type at communication.
Type name Sign Bits
Floating decimal point type Yes 32 (2 words)
(1) Floating decimal point type data format
Floating decimal point (float) data of a binary number is expressed by the data format shown
in [Fig. 7-1].
31
se
s : Sign of mantissa part (1 bit)
e : Exponent part (8 bits)
m : Mantissa part (23 bits)
HHHLLHLL
Decimal point position of mantissa part
2324
16
80
m
Fig. 7-1 Floating decimal point type data format
INP-TN514207-E
27
7.2 Communication Address Map
Caution: Never write data into addresses which are not disclosed to users.
Otherwise a failure may be caused.
For detailed contents about individual parameter function or setting range, refer to the user's manual.
Word data [read-out/write-in] : Function code [03
Relative
address
0000H 40001 REM1 Remote mode
0010H 40017 STBY Standby command
0014H 40021 AT Auto tuning command
0020H 40033 LACH Alarm unlatch command
0030H 40049 PLTN Palette signal selection 0 to 7
0040H 40065 LOC Key lock 0 to 5
0060H 40097 RES Reset command
0100H 40257 AL1 Alarm 1 setting
0100H 40257 A1-L Alarm 1 low limit setting Absolute value alarm: 0 to 100%FS *
0102H 40259 A1-H Alarm 1 high limit setting Deviation alarm: –100 to 100%FS *
0104H 40261 1 TP Alarm 1 type 0 to 11, 16 to 32, 35 to 38
0106H 40263 1 OP Alarm 1 option 0 to 15 (0000B to 1111B)
0108H 40265 1HYS Alarm 1 hysteresis ▪ Engineering unit setting (0 to 50%FS) *
010AH 40267 1DLY Alarm 1 delay time 0 to 9999 (sec or min)
0110H 40273 AL2 Alarm 2 setting
0110H 40273 A2-L Alarm 2 low limit setting Absolute value alarm: 0 to 100%FS *
0112H 40275 A2-H Alarm 2 high limit setting Deviation alarm: –100 to 100%FS *
0114H 40277 2 TP Alarm 2 type 0 to 11, 16 to 32, 35 to 38
0116H 40279 2 OP Alarm 2 option 0 to 15 (0000B to 1111B)
0118H 40281 2HYS Alarm 2 hysteresis ▪ Engineering unit setting (0 to 50%FS) *
011AH 40283 2DLY Alarm 2 delay time 0 to 9999 (sec or min)
Constant 1 used for template
Constant 2 used for template
Constant 3 used for template
Constant 4 used for template
Constant 5 used for template
Constant 6 used for template
Constant 7 used for template
Constant 8 used for template
Constant 9 used for template
Constant 10 used for template
Constant 11 used for template
Constant 12 used for template
Constant 13 used for template
Constant 14 used for template
Constant 15 used for template
Constant 16 used for template
▪ Floating decimal point type
99999 to 0.0000
–0.001 to –9999
0: NRML
1: LPV
0 to 255
0 to 255
–19999 to 99999
Write-in data
setting range
Affected by
input range
Remarks or
corresponding
parameter
Turn off and
on power
Turn off and
on power
INP-TN514207-E
34
Word data [read-out only] : Function code [04H]
Relative
address
0100H 30257
0102H 30259 PV1
0104H 30261 SV1
0106H 30263 DV1
0108H 30265 MV1
010CH 30269 FAULT1
0310H 30785
0312H 30787
0314H 30789
0316H 30791
0318H 30793
031AH 30795
031CH 30797
031EH 30799
0340H 30833 ALM1 Alarm 1 status
0342H 30835 ALM2 Alarm 2 status
0344H 30837 ALM3 Alarm 3 status
0346H 30839 ALM4 Alarm 4 status
0348H 30841 ALM5 Alarm 5 status
034AH 30843 ALM6 Alarm 6 status
034CH 30845 ALM7 Alarm 7 status
034EH 30847 ALM8 Alarm 8 status
0400H 31025 PV1 PV1 measurement value *
0402H 31027 PV2 PV2 measurement value *
0406H 31031 AI1 Ai1 measurement value *
0420H 31057 RCJ1
0422H 31059 RCJ2
0450H 31105 AO1 AO1 output value
0452H 31107 AO2 AO2 output value
Register
No.
Parameter
name
PID
MODE1
ALM1
(RELAY)
ALM2
(RELAY)
ALM3
(RELAY)
ALM4
(RELAY)
ALM5
(RELAY)
ALM6
(RELAY)
ALM7
(RELAY)
ALM8
(RELAY)
Parameter contents Read-out data
0001H: Fault status
0002H: Standby status
0004H: Remote Ack
0008H: Other than auto mode
0010H: Auto mode request
0020H: Remote mode request
Current control mode
Process variable (PV) used
for control currently
Currently used setpoint
(SV)
Currently used deviation
(DV)
Currently used manipulating
value (MV)
Currently used input error
status information
Alarm 1 status (relay status)
Alarm 2 status (relay status)
Alarm 3 status (relay status)
Alarm 4 status (relay status)
Alarm 5 status (relay status)
Alarm 6 status (relay status)
Alarm 7 status (relay status)
Alarm 8 status (relay status)
PV1 RCJ measurement
value
PV2 RCJ measurement
value
0040H: Auto tuning status
0080H: Normal operation status
0100H: PV tracking status
0200H: Local SV status
0400H: Remote SV status
0800H: Local + PV tracking status
1000H: Forced manual mode status
2000H: EX-MV mode status
4000H: Manual mode status
–25999 to 105999
(Input scale: –5 to 105% FS)
–19999 to 99999 (within settable range) *
–125998 to 125998
(Input scale: –105 to 105% FS)
–250 to 1250 (–25.0 to 125.0%)
Normal: 0
Over: 1
Under: 2
Excitation: 1, Non-excitation: 0
Excitation: 1, Non-excitation: 0
ON: 1, OFF: 0
–214783647 to 214783648
–250 to 1250 (–25.0 to 125.0%)
Affected by
input range
*
*
Remarks or
corresponding
parameter
Corresponding bit to
relevant status
is "1".
INP-TN514207-E
35
Relative
address
0470H 31137 DI01 DI1 to 4 input status
0472H 31139 DI11 DI11 to 15 input status
04D0H 31233 DO01 DO1 to 4 output status
04D2H 31235 DO11 DO11 to 15 output status
0540H 31345 AIM
0550H 31361
0552H 31363
0554H 31365
0556H 31367
0558H 31369
055AH 31371
055CH 31373
055EH 31375
0564H 31381 AMV1
056CH 31389 FFV1 Feed Forward value –214783647 to 214783648
Dim idx As Integer
Dim Ansdat() As Byte ' For storing answer data
Dim Rxbuff As Variant ' Receive data buffer
Dim PauseTime ' Sets the communication wait time
' Required wait time depends on transmission speed and transmission frame length
Dim Stno As Byte ' Communication station number
Private Sub Form_Load()
' Initializing the variable ************************************************************************************************************
Stno = 1
Main.Visible = True
End Sub
'-----------------------------------------'Read continuous words sample program
'Function code : 03H, 04H
'Number of words : 2
'------------------------------------------
Private Sub TX1_Click()
TX1.Enabled = False
' Communication port setting ********************************************************************************************************
If Com5.Value = True Then
Comm_port = 5 ' COM5
ElseIf Com4.Value = True Then
Comm_port = 4 ' COM4
ElseIf Com3.Value = True Then
Comm_port = 3 ' COM3
ElseIf Com2.Value = True Then
Comm_port = 2 ' COM2
Else
Comm_port = 1 ' COM1
End If
If SPD192.Value = True Then
Comm_speed = "19200," ' 19200bps
ElseIf SPD96.Value = True Then
Comm_speed = "9600," ' 9600bps
Else
Comm_speed = "38400," ' 38400bps
End If
If Even1.Value = True Then
Comm_parity = "E," ' Even parity
ElseIf Odd1.Value = True Then
Comm_parity = "O," ' Odd parity
Else
Comm_parity = "N," ' No parity
End If
PauseTime = 0.2 ' Sets the wait time (0.2 sec)
idx = 0
' Opening the communication port ****************************************************************************************************
MSComm1.CommPort = Comm_port ' COM port setting
MSComm1.Settings = Comm_speed & Comm_parity & "8,1" ' Speed / Party / 8bit_Data / Stop_1bit
MSComm1.PortOpen = True ' Opens a port
' Setting the opposite station number for communication **********************************************************************************
St = Val(Stno1(idx).Text)
Stno = St Mod 256
Stno1(idx).Text = Str(Stno)
ReDim Txdat(7) As Byte ' Secures 8 byte array
Txdat(0) = Stno ' Station No.
Txdat(1) = &H4 ' Command
Txdat(2) = Adrsh ' High address
Txdat(3) = Adrsl ' Low address
Txdat(4) = &H0 ' Number of read-in words (High)
Txdat(5) = &H2 ' Number of read-in words (Low)
Txsu = 5 ' Number of transmission data
Case 4
ReDim Txdat(7) As Byte ' Secures 8 byte array
Txdat(0) = Stno ' Station No.
Txdat(1) = &H3 ' Command
Txdat(2) = Adrsh ' High address
Txdat(3) = Adrsl ' Low address
Txdat(4) = &H0 ' Number of read-in words (High)
Txdat(5) = &H2 ' Number of read-in words (Lo)
Txsu = 5 ' Number of transmission data
Case Else ' For other value
MSComm1.PortOpen = False ' Closes COM port
TX1.Enabled = True
Exit Sub
End Select
' Transmitting a command **********************************************************************************************************
Start = Timer ' Saves the waiting start time
Do While Timer < Start + PauseTime ' Whether time setting elapsed
DoEvents ' Transfers the control to another process
If ((Start + PauseTime) - Timer) > PauseTime Then
Start = Timer
End If
Loop
' Fetching the answer data into byte array
MSComm1.InputMode = comInputModeBinary ' Designates binary mode
length = MSComm1.InBufferCount ' Acquires required number of receive data bytes
MSComm1.InputLen = 0 ' Designates acquisition of all data
Rxbuff = MSComm1.Input ' Fetches receive data into receive buffer
Ansdat = Rxbuff ' Assigns byte array to receive data
ReDim Txdat(12) As Byte ' 13 bytes
Txdat(0) = Stno ' Station No.
Txdat(1) = &H10 ' Command
Txdat(2) = Adrsh ' High address
Txdat(3) = Adrsl ' Low address
Txdat(4) = &H0 ' Number of write-in words (High)
Txdat(5) = &H2 ' Number of write -in words (Lo)
Txdat(6) = &H4 ' Number of write -in bytes
Txdat(7) = byteData(2) ' Write-in data (Lo high)
Txdat(8) = byteData(3) ' Write-in data (Lo lo)
Txdat(9) = byteData(0) ' Write-in data (High high)
Txdat(10) = byteData(1) ' Write-in data (HIgh lo)
Txsu = 10 ' Number of transmission data
Case Else ' For other
MSComm1.PortOpen = False ' Closes COM port
Write_command.Enabled = True
Exit Sub
End Select
' Transmitting a command ********************************************************************************************************
' Generation of CRC for transmission data
GoSub 10000 ' CRC calculation
Txdat(Txsu + 1) = CRC1 '
Txdat(Txsu + 2) = CRC2 '
' Waiting until all answer data is received
Start = Timer ' Saves the waiting start time
Do While Timer < Start + PauseTime ' Whether time setting elapsed
DoEvents ' Transfers the control to another process
If ((Start + PauseTime) - Timer) > PauseTime Then
Start = Timer
End If
Loop
10000 ' CRC calculation subroutine IN:Txdat(Txsu) / OUT CRC1,CRC2 *****************************************************************
CRC = &HFFFF
For i = 0 To Txsu Step 1
CRC = CRC Xor Txdat(i)
For J = 1 To 8 Step 1
CT = CRC And &H1
If CRC < 0 Then CH = 1 Else: CH = 0: GoTo 11000
CRC = CRC And &H7FFF
11000 CRC = Int(CRC / 2)
If CH = 1 Then CRC = CRC Or &H4000
If CT = 1 Then CRC = CRC Xor &HA001
Next J
Next i
CRC1 = CRC And &HFF
CRC2 = ((CRC And &HFF00) / 256 And &HFF)
Return
End Sub
INP-TN514207-E
42
9. TROUBLESHOOTING
If the communication is unavailable, check the following items.
□ Whether all devices related to communication are turned on.
□ Whether wirings are correct. (Whether polarities are correct.)
□ Whether the number of connected instruments and connection distance are as specified.
□ Whether communication conditions coincide between the master station (host computer) and slave sta-