Page 3
The contents of this document may change without prior notice. Although great care has been taken in the accuracy of this document, Fuji Electric takes no responsibility for loss or indirect damages caused by mistakes, missing information, or use of information in this document.
Contents 1. Communication Functions 7. Address Map and Data Format Overview................4 Data Format................. 40 Connecting to a programmable controller ......5 Sent Data Format ............. 40 Connecting to a personal computer ........5 Internal Calculation Value and Engineering Unit ....40 Managing the Decimal Point ..........
Overview The micro controller is equipped with communication functions from the RS-485 interface and PC loader interface, which • Chapter enables the transmission and reception of data between such devices as the personal computer, programmable controller, and graphic panel. The communication system is composed of a master and slave relationship. Up to thirty-one slaves (micro controllers) may •...
Connecting to a programmable controller Chapter Programmable controller RS-485 PXG Series Connecting to a personal computer Personal RS-232C computer RS-232C PC loader communication cable RS-232C to RS-485 converter RS-485 PXG Series When using the RS-232C to RS-485 converter, check to make sure that the cable is properly connected between the Caution converter and master.
Communication Specifications RS-485 Item Specifications Electrical specifications EIA RS-485 compliant Chapter Communication method Two wire system, half double-bit serial Synchronous method Asynchronous Connection status Max. no. of connections 31 units Communication distance Max 500m (total length) Communication speed 9600bps, 19200 bps Data format Data length 8 bits...
Warning Do not turn on power until all of the wiring is completely finished. There is a risk of electrical shock or damage. Chapter Communication Terminal Configuration ■ RS-485 (rear terminal) ■ PC Loader Interface (Bottom, φ2.5, three prong miniature jack) PXG4 PXG4 Terminal...
Wiring ■ RS-485 Please use a shielded twist pair cable. (Recommended cable: KPEV-SB (made by The Furukawa Electric Co., Ltd.)) • The maximum cable length should be 500m. One master and up to thirty-one micro controllers (slaves) can be connected per •...
Page 14
When using the micro controller in an area where the imposed noise level is expected to exceed 1000V, we recommend using • a noise filter on the master side as seen in the figure below. [Noise filter] (recommended): ZRAC2203-11 (made by TDK Corporation) Programmable controller Personal computer + RS-232C to RS-485 converter...
Page 15
■ PC Loader Interface Use the PC loader communication cable (RS-232C) sold separately. • PXG4 PC loader communication cable (RS-232C) ZZPPXH1 TK4H4563 Master side Chapter RS-232C Personal computer etc. D-Sub 9 pin PXG4 Bottom view PXG5 PC loader communication cable (RS-232C) ZZPPXH1 TK4H4563 Master side...
The following settings are required for proper communication between the master and micro controller units. The communication parameters for the master and all of the units must be set the same. • During RS-485 communication, all of the micro controllers on a circuit must be set with different "Station No. (STno)" other •...
Parameter Setting Procedure The following steps explain how to change the settings to station number "3", parity setting "9600bps/none", and communication permissions "read and writable" as an example. key to display "M M M M v v v v 1 1 1 1 ". Press and hold the The MV1 of the monitoring screen is displayed.
Page 20
Press the key to return to the operation mode PV/SV display. Turn the power to the micro controller off and on again. The changes to the communication parameters become effective after the power turns off and on again. Chapter – 18 –...
Overview The communication system with the MODBUS protocol always operates using a method where the master first sends a command message and the applicable slave replys with a response message. The following describes the communication steps. Master sends the command message for the slave.
Message Composition The command message and response message are composed of four parts: the station number, function code, data part, and error check code. These four parts are sent in that order. Field name No. of bytes Station No. 1 byte Function Code 1 byte Data Part...
Slave Response ■ Normal Slave Response The slave creates and replies with a response message for each command message. The response message has the same format as the command message. The contents of the data part are different depending on the function code. Refer to See "Chapter 6, Message Details".
Function Code For MODBUS protocol, coil numbers or resistor numbers are assigned by the function code, and each function code only works for the assigned coil number or resistor number. The correspondence between the function code and the coil number or resistor number is as follows. Function Code Coil Number, Resistor Number Code...
Calculating Error Check Code (CRC-16) CRC-16 is a 2-byte (16-bit) error check code. The calculation range extends from the start of the message (station number) to the end of the data part. The slave calculates the CRC of the received message and ignores the message if this value is not the same as the received CRC code.
Transmission Control Steps Master Communication Method Start communication from the master while following the rules below. 1. The command message, must be sent after an empty space of at least 48 bit time. 2. The interval between each byte in a command message should be less than 24 bit time. 3.
Reading Data Reading Read-Only Bit Data (Function Code: 02H) The unit reads bit data continuously for the specified number of bits from the first number to start reading from. The slaves systematically send the read data in 8-bit units. When the number of bits to be read is not a multiple of eight, unrelated bits (on the MSB side) all become "0". Caution Function Code Max.
Page 31
Example of Transmitting a Message This following example explains how to read ALM1 and ALM2 on station number 31. • ALM1 detection data bit Relative address: 0000H Data number: 2H • ALM2 detection data bit Relative address: 0001H Master Slave Command Message (bytes) Station No.
Reading Word Data (Function Code: 03H) The unit reads word data continuously for the specified number of words from the first number to start reading from. The slave forwards the read word data from the upper number of bytes to the lower number. Function Code Max.
Page 33
Example of Transmitting a Message (For Engineering Unit) The message is composed as follows when reading the PV input lower limit and PV input upper limit from station number 2. • PV Lower Limit Relative Address: 03F9H Master Slave Response Message (bytes) Command Message (bytes) Station No.
Reading Read-Only Word Data (Function Code: 04H) The unit reads word data continuously for the specified number of words from the first number to start reading from. The slave forwards the read word data from the upper number of bytes to the lower number. Function Code Max.
Page 35
Example of Transmitting a Message (Internal Calculation Data) The message is composed as follows when reading the PV input value from station number 1. • PV value relative address: 0000H Data number: 01H Master Slave Command Message (bytes) Station No. Response Message (bytes) Function Code Station No.
Writing Data Writing Word Data (1 word, function code: 06H) This writes the specified data to the specified number for word data. The master sends the data to be written from the upper number of bytes to the lower number. Function Code Max.
Page 37
Example of Transmitting a Message This example explains how to set PID parameter "P" to 100.0 (1000D = 03E8H) on station number 1. Parameter "P" relative address: 0005H (internal calculation value table) 03EDH (initial value table) Master Slave Command Message (bytes) Station No.
Writing Continuous Word Data (Function code: 10H) This writes continuous word information for a number of written words from the first number for writing. The master sends the data to be written from the upper number of bytes to the lower number. Function Code Max.
Page 39
Example of Transmitting a Message (Internal Calculation Data) The message is composed as follows when writing the following PID parameters to station number 1. P = 100.0 (= 1000D = 03E8H) I = 10 (= 100D = 0064) D = 5.0 (= 50D = 0032H) •...
Page 41
Chapter 7 Address Map and Data Format Data Format – 40 ● Internal Calculation Value Data Address Map – 42 ● Engineering Unit Data Address Map – 66 Chapter – 39 –...
Data Format Sent Data Format The MODBUS protocol used by this equipment employs RTU (Remote Terminal Unit) mode. The data is sent as "numerical value", not as ASCII code. Internal Calculation Value and Engineering Unit In this unit, parameter data and data dependent on an input range can handle the following two types of data. Internal Calculation Value: Values listed as percentages of the input range (0.00 to 100.00, without decimal point) Engineering Unit: Values subjected to scaling to actual values depending on the input range "Engineering Unit"...
Data during Input Error For situations such as overrange, underrange, and input breaks where "U U U U U U U U U U U U U U U U " or "L L L L L L L L L L L L L L L L " display on the front, read PV value becomes 105% or -5% of the input range.
Internal Calculation Value Data Address Map Handles data dependent on an input range as an internal value before scaling (0.00 to 100.00%). See "Operation Manual" for more details about individual parameter functions and settings ranges. Bit Data (read only): function code [02 (H)] Remarks/ Relative Coil...
Word Data (read/write): function code [03 (H), 06 (H), 10 (H)] Operation (Ch1) Resistor Number Parameter Parameter Relative Written data Factory Dependent Contents Type Read data Engineering display name address range Setting on range Internal unit M M M M a a a a n n n n Switches to manual mode 0088 40121 41121...
Page 46
Resistor Number Parameter Parameter Relative Written data Factory Dependent Contents Type Read data Engineering display name address range Setting on range Internal unit A A A A L L L L 4 4 4 4 h " " AL4h AL4h set value 00C8 40185 41185...
Page 47
PID Palette (Ch3) Resistor Number Parameter Relative Written data Factory Dependent Parameter name Contents Type Read data Engineering display address range Setting on range Internal unit S S S S v v v v 1 1 1 1 SV set value 1 0106 40241 41241...
Page 48
Resistor Number Parameter Relative Written data Factory Dependent Parameter name Contents Type Read data Engineering display address range Setting on range Internal unit d d d d 3 3 3 3 " " Derivation time 3 011D 40264 41264 Word 0.0 sec to 999.9 sec 60.0 sec h h h h Y Y Y Y S S S S 3 3 3 3...
Page 49
Resistor Number Parameter Relative Written data Factory Dependent Parameter name Contents Type Read data Engineering display address range Setting on range Internal unit r r r r E E E E v v v v 5 5 5 5 " "...
Page 50
Resistor Number Parameter Relative Written data Factory Dependent Parameter name Contents Type Read data Engineering display address range Setting on range Internal unit r r r r E E E E v v v v 7 7 7 7 " "...
Page 51
Ramp/Soak (Ch4) Resistor Number Parameter Paramete Relative Written data Dependent Contents Type Read data Factory Setting Engineering display r name address range on range Internal unit P P P P T T T T n n n n Ramp/Soak Activation 0231 40561 41561...
Page 52
Resistor Number Parameter Paramete Relative Written data Dependent Contents Type Read data Factory Setting Engineering display r name address range on range Internal unit S S S S v v v v - - - - 8 8 8 8 "...
Page 53
Resistor Number Parameter Paramete Relative Written data Dependent Contents Type Read data Factory Setting Engineering display r name address range on range Internal unit T T T T 1 1 1 1 6 6 6 6 S S S S "...
Page 54
Setup (Ch6) Resistor Number Parameter Parameter Relative Written data Dependent Contents Type Read data Factory Setting Engineering display name address range on range Internal unit P P P P v v v v T T T T PV input type 000F 40016 41016...
Page 55
Resistor Number Parameter Parameter Relative Written data Dependent Contents Type Read data Factory Setting Engineering display name address range on range Internal unit F F F F L L L L o o o o 1 1 1 1 " "...
Page 56
Resistor Number Parameter Parameter Relative Written data Dependent Contents Type Read data Factory Setting Engineering display name address range on range Internal unit d d d d i i i i 1 1 1 1 " " DI-1 function select 009E 40143 41143...
Page 57
Resistor Number Parameter Parameter Relative Written data Dependent Contents Type Read data Factory Setting Engineering display name address range on range Internal unit r r r r M M M M P P P P U U U U " "...
Page 58
PFB (Ch10) Resistor Number Parameter Parameter Relative Written data Dependent Contents Type Read data Factory Setting Engineering display name address range on range Internal unit P P P P G G G G A A A A P P P P PGAP PFB dead band 01C4...
Page 59
Resistor Number Parameter Parameter Relative Written data Dependent Contents Type Read data Factory Setting Engineering display name address range on range Internal unit d d d d P P P P 1 1 1 1 0 0 0 0 " "...
Other Resistor Number Parameter Parameter Relative Written data Dependent Contents Type Read data Factory Setting Engineering display name address range on range Internal unit Front Front SV set value 0002 40003 41003 Word 0 to 10000 SV set (in the 0% to 100% FS set 0092 40131 41131...
Page 61
Resistor Number Order Read/Write Parameter List Resistor Number Resistor Number Relative Relative Parameter contents Parameter contents Engineering Engineering address address Internal Internal unit unit 0001 40002 41002 CTrL (control method) 0048 40057 41057 Sv-1 (Ramp/soak 1 seg/SV set value) 0002 40003 41003 Front SV set value...
Page 62
Resistor Number Resistor Number Relative Relative Parameter contents Parameter contents Engineering Engineering address address Internal Internal unit unit 0087 40120 41120 rTF (RSV input filter) 00CF 40192 41192 AL5h (AL5h set value) 0088 40121 41121 Man (switching manual mode) 00D0 40193 41193 A5hY (ALM5 hysteresis)
Other Resistor Number Parameter Relative Dependent Parameter name Contents Type Read data Engineering display address on range Internal unit Display PV Pv (measurement) 0000 30001 31001 Word 0 to 10000 (0.00 to 100.00%FS) value Display SV Sv (Currently used 0001 30002 31002 Word...
Page 67
Resistor Number Order Read Parameter List Resistor Number Relative Type Memory contents Engineering address Internal unit 0000 30001 31001 Word PV (measurement) 0001 30002 31002 Word SV (Currently used set value) 0002 30003 31003 Word DV (Currently used deviation) 0003 30004 31004 Word...
Engineering Unit Data Address Map Handles data dependent on an input range as a scaled value (engineering unit). See "Operation Manual" for more details about individual parameter functions and settings ranges. Bit Data (read only): function code [02 (H)] Remarks/ Relative Coil Memory...
Page 69
Chapter 8 Sample Program Sample Program – 68 Chapter – 67 –...
• Visual Basic is a registered trademark of the Microsoft Corporation. Fuji Electric Systems Co., Ltd. assumes no responsibility for damages or infringement upon third party rights as a result of using this sample program. Use this program while conforming to the contents of the agreement listed within.
Page 71
' Communication Port Settings **************************************************************** 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...
Page 72
' Creating the Send Command ****************************************************************** Select Case Area Case 3 ReDim Txdat(7) As Byte ' Secured 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 ' Read no.
Page 73
' Import the response data into a byte array. MSComm1.InputMode = comInputModeBinary ' Set binary mode length = MSComm1.InBufferCount ' Retrieve the no. of sent data bytes MSComm1.InputLen = 0 ' Set retrieval of all data Rxbuff = MSComm1.Input ' Import received data into the received buffer Ansdat = Rxbuff ' Assign received data into the byte array ' Calculating CRC for Received Data...
Page 74
' ******************************************************************************************** 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 <...
Page 75
■ Example of data writing • Operation: Writes 2 word data of the set address. • Function code to be used: 10H • Number of write words: 2 ----------------------------------- 'Write 2 words sample program 'Function code : 10H 'Number of words : 2 '----------------------------------- Private Sub Write_command_Click() Write_command.Enabled = False...
Page 76
' Setting the Communication Number for the Other Party *************************************** St = Val(Stno1(idx).Text) Stno = St Mod 256 Stno1(idx).Text = Str(Stno) ' Processing the Address ********************************************************************* AD$ = Str(Val(Address(idx).Text) - 1) AD$ = Right$(("00000" & AD$), 5) Area = Val(Left$(AD$, 1)) Adrsh = Int(Val(Right$(AD$, 4)) / 256) Adrsl = Val(Right$(AD$, 4)) Mod 256 'Creating the Send Command *******************************************************************...
Page 77
' Sending the command. *********************************************************************** ' Creating CRC for Send Data GoSub 10000 ' CRC computation Txdat(Txsu + 1) = CRC1 Txdat(Txsu + 2) = CRC2 ' Send the created command. MSComm1.Output = Txdat ' Send one byte ' Wait until all of the response data is sent. Start = Timer ' Saves the waiting start time.
Troubleshooting Check the following items when the unit cannot communicate. Is the power turned on to all of the equipment related to communication? Are the wire connections correct? (Are the + and – poles matching?) Are the communication settings the same between the master (the top computer) and the slave (micro controller)? Communication speed : 9600bps, 19200 bps Data...