Fuji Electric PXR Instruction Manual

Micro controller x communication functions (rs-485 modbus)

Advertisement

Quick Links

Instruction Manual
MICRO CONTROLLER X
COMMUNICATION
FUNCTIONS
(RS-485 MODBUS)
TYPE: PXR
INP-TN512642a-E

Advertisement

Table of Contents
loading

Summary of Contents for Fuji Electric PXR

  • Page 1 Instruction Manual MICRO CONTROLLER X COMMUNICATION FUNCTIONS (RS-485 MODBUS) TYPE: PXR INP-TN512642a-E...
  • Page 2 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.
  • Page 3: Table Of Contents

    CONTENTS 1. COMMUNICATION FUNCTIONS ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1.1 General 2. SPECIFICATIONS ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2.1 Communication Specifications ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3. CONNECTION ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3.1 Terminal Allocation ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3.2 Wiring ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4. SETTING OF COMMUNICATION CONDITION ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4.1 Set Items ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4.2 Setting Operation Method ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5.
  • Page 4: Communication Functions

    COMMUNICATION FUNCTIONS 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.
  • Page 5: Specifications

    SPECIFICATIONS Communication Specifications Item Specification Electrical specification Based on EIA 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...
  • Page 6: Connection

    CONNECTION WARNING For avoiding electric shock and malfunctions, do not turn on the power supply untill all wiring have been completed. Terminal Allocation Terminal number Signal name -3-...
  • Page 7: Wiring

    • Use twisted pair cables with shield. Recommended cable: UL2464, UL2448, etc. • 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.
  • Page 8: Setting Of Communication Condition

    • 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.) Set Items The parameters to be set are shown in the following table.
  • Page 9: Setting Operation Method

    Setting Operation Method The following example shows how to set the communication conditions. Example: Selecting an even parity and “STno=18” on a station. Indication Description operation Running state (PV/SV indication) P-n1 Press the SEL key for approximately 6 seconds. P-n1 appears and (6 seconds) No.
  • Page 10: Modbus Communication Protocol

    MODBUS COMMUNICATION PROTOCOL General The communication system by the MODBUS protocol is that the communication is always started 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)...
  • Page 11: Composition Of Message

    Composition of Message Command message and response message consist of 4 fields ; Station No., Function code, Data and Error check code. And these are send in this order. Station No. (1 byte) Function code (1 byte) Data (2 to 125 bytes) Error check code (CRC-16) (2 bytes) Fig.
  • Page 12 Error check code This is the code to detect message errors (change in bit) in the signal transmission. On the MODUBUS protocol (RTU mode), CRC-16 (Cycric Redundancy Check) is applied. For CRC calculation method, refer to section 5.5. -9-...
  • Page 13: Response Of Slave Station

    Response of Slave Station Response for normal command To a relevant message, the slave station creates and sends back a response message which corresponds 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.
  • Page 14: Function Code

    Function Code According to MODBUS protocol, coil numbers and register numbers are assigned by function codes. Each function code acts on specific coil number and 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 Coil No.
  • Page 15: Calculation Of Error Check Code (Crc-16)

    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.
  • Page 16: Transmission Control Procedure

    (1-1) 48 bits time or more vacant status precedes the command message sending. (1-2) Interval between bytes of 1 command message is smaller than 24 bits time. 2) Response of this instrument (PXR) After a frame detection (24 bits time or more vacant status), this instrument carries out processing with that frame as a command message.
  • Page 17 Space time of longer than 5ms is needed (longer than 10ms is recommended) Master station → PXR POL1 POL2 1 to 30msec Master station ← PXR POL1 response data Data on line POL1 POL1 response data POL2 -14-...
  • Page 18: Fix Processing (Cautions At Write-In Of Data)

    ・ Write in the non-volatile memory takes approximately 5 seconds at the longest approximately 5 seconds. ・ While writing, do not turn off the power of the PXR. Otherwise, the data in the non-volatile memory will be destroyed, whereby the PXR could not be used any longer.
  • Page 19: Details Of Message

    DETAILS OF MESSAGE Read-out of Bit Data [Function code:01 ] Function code Max. bit number read-out in one message Relative data address Coil number 1 bit 0000 00001 Message composition Command message composition (byte) Response message composition (byte) Station No. Station No.
  • Page 20: Read-Out Of Read-Out Only Bit Data [Function Code:02 H ]

    Read-out of Read-out Only Bit Data [Function code:02 Function code Max. bit number read-out in one message Relative data address Coil number 8 bits 0000 -000F 10001-10016 Message composition Command message composition (byte) Response message composition (byte) Station No. Station No. Function code Function code Read-out start No.
  • Page 21 Message transmission (example) The following shows an example of reading-out the state of the alarm 1 and alarm 2 transmitted from No.31 slave station. Alarm 1 detect data bit Relative address : 000C Data number : 02 Alarm 2 detect data bit Relative address : 000D Command message composition (byte) Response message composition (byte) Station No.
  • Page 22: Read-Out Of Word Data [Function Code:03 H ]

    Read-out of Word Data [Function code:03 Function code Max. word number read-out Relative data address Resister No. Kind of data in one message Internal calculation value 0000 40001-40113 -0070 60 words Engineering unit 03E8 41001-41113 -0458 Message composition Command message composition (byte) Response message composition (byte) Station No.
  • Page 23 Message transmission (a) In case of data of internal calculation value The following shows an example of reading the low and high limits of set value from No. 2 slave station. Relative address of low limit of set value : 001E Data number : 02 Command message composition (byte) Response message composition (byte)
  • Page 24 (b) In case of data of engineering unit The following shows an example of reading the low and high limits of set value from No. 2 slave station. Relative address of low limit set value : 0406 Data number : 02 Command message composition (byte) Response message composition (byte) Station No.
  • Page 25: Read-Out Of Read-Out Only Word Data [Function Code:04 H ]

    Read-out of Read-out Only Word Data [Function code:04 Function code Max. word number read-out Relative data address Resister No. Kind of data in one message Internal calculation value 0000 30001-30015 -000E 15 words Engineering unit 03E8 31001-31015 -03F6 Message composition Command message composition (byte) Response message composition (byte) Station No.
  • Page 26 Message transmission (a) In case of data of internal calculation value The following shows an example of reading-out the PV from No. 1 slave station. Relative address of PV:0000 Data number:01 Command message composition (byte) Response message composition (byte) Station No. Station No.
  • Page 27: Write-In Of Bit Data (1 Bit)

    After receiving above command, it takes approximately 100ms to 5s seconds that PXR saves memory data from RAM to EEPROM. Caution If you turn off the PXR during above saving (approximately 100ms to 5s), memory data are broken and can not be used. Point For details of FIX processing, refer to section 5.7.
  • Page 28: Write-In Of Word Data (1 Word)

    Write-in of Word Data (1 word) [Function code:06 Function code Max. word number write-in Relative data address Resister No. Kind of data in one message Internal calculation value 0000 40001-40113 -0070 1 words Engineering unit 03E8 41001-41113 -0458 Message composition Command message composition (byte) Response message composition (byte) Station No.
  • Page 29: Write-In Of Continuous Word Data [Function Code:10 H ]

    Write-in of Continuous Word Data [Function code:10 Function code Max. word number write-in Relative data address Resister No. Kind of data in one message Internal calculation value 0000 40001-40113 -0070 60 words Engineering unit 03E8 41001-41113 -0458 Message composition Command message composition (byte) Response message composition (byte) Station No.
  • Page 30 Message transmission (example) The following shows an example of writing-in P=100.0, I=10, and D=5.0 to No. 1 slave station. P=03E8 (=1000 ) I=0064 (=100 ) D=0032 (=50 ) Parameter "P" Relative address:0005 Data number:03 Command message composition (byte) Response message composition (byte) Station No.
  • Page 31: Address Map And Data Format

    ADDRESS MAP AND DATA FORMAT Data Format 7.1.1 Transmission data format The MODBUS protocol used in this instrument (PXR) is RTU (Remote Terminal Unit) mode. Transmitted data is "numeric value" and not "ASCII code". 7.1.2 Internal calculation value and engineering unit This instrument can handle 2 kinds of set value data or other data which are affected by input range as follows.
  • Page 32 7.1.3 Handling of decimal point Some internally stored data have more digits below decimal point than displayed on the face panel. No decimal point is added to transmission data. For data given in the following table, carry out an alignment of decimal point. (a) Internal calculation value data (address map shown in Section 7.2) Digits below point Kind...
  • Page 33 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 open- circuit for example, PV read-out value is 105% or -5% of input range. Presence of any input abnormality via communication can be detected by: "Register No.
  • Page 34: Address Map Of Internal Calculation Value Data

    Address Map of Internal Calculation Value Data Data affected by input range is handled in terms of internal value (0.00 to 100.00% value) before scaling. For detailed contents about individual parameter function or setting range, refer to the operation manual (ECNO: 406).
  • Page 35 Word data [read-out/write-in] : Function code [03 , 06 , 10 Remarks or Relative Resister Write-in data Affected by Type Memory contents Read-out data corresponding address setting range input range parameter 0: Not writing-in 0:No request (Same function 0000 40001 Word Non-volatile memory write-in 1: Writing in memory 1:Request to write in as 00001)
  • Page 36 Remarks or Relative Resister Write-in data Affected by Type Memory contents Read-out data corresponding address setting range input range parameter 0028 40041 Word Alarm 1 type 0 to 34 ALM1 0029 40042 Word Alarm 2 type 0 to 34 ALM2 002A 40043 (Do not use)
  • Page 37 Relative Remarks or Resister Write-in data Affected by address Type Memory contents Read-out data corresponding setting range input range parameter 0: Execute No. 1 to 4 ramp/soak (PTn=1) 1: Execute No. 5 to 8 ramp/soak Note 0052 40083 Word Ramp/soak pattern selection (PTn=2)...
  • Page 38 Word data (read-out only) : Function code [04 Remarks or Relative Resister Read-out data Affected by Type Memory contents corresponding address input range parameter (Displayed PV 0000 30001 Word Process value (PV) 0 to 10000(0.00 to 100.00%FS) value) (Displayed SV 0001 30002 Word Currently used set value (SV) 0 to 10000(0.00 to 100.00%FS)...
  • Page 39: Address Map Of Engineering Unit Data

    Address Map of Engineering Unit Data Data affected by input range is handled in terms of a value (engineering unit) after scaling. For detailed contents about individual parameter function or setting range, refer to the operation manual (ECNO: 406). Bit data [read-out/write-in] : Function code [01 , 05 Remarks or Relative...
  • Page 40 Word data [read-out/write-in]: Function code [03 , 06 , 10 Remarks or Relative Resister Write-in data Affected by corresponding Type Memory contents Read-out data address setting range input range parameter Non-volatile memory write-in 0: Not writing in 0:No request (Same function 03E8 41001 Word (FIX execution)
  • Page 41 Remarks or Relative Resister Write-in data Affected by Type Memory contents Read-out data corresponding address setting range input range parameter 040F 41040 Word Setting lock 0 to 5 0410 41041 Word Alarm 1 type 0 to 34 ALM1 0411 41042 Word Alarm 2 type 0 to 34 ALM2 0412...
  • Page 42 Remarks or Relative Resister Write-in data Affected by Type Memory contents Read-out data corresponding address setting range input range parameter 0: Execute No. 1 to 4 ramp/soak Note 043A 41083 Word Ramp/soak pattern selection 1: Execute No. 5 to 8 ramp/soak 2: Execute No.
  • Page 43 Word data (read-out only) : Function code [04 Remarks or Relative Resister Read-out data Affected by Type Memory contents corresponding address input range parameter (Displayed PV 03E8 31001 Word Process value (PV) -1999 to 9999 (within input scale) value) (Dsiplayed SV 03E9 31002 Word Currently used set value (SV) -1999 to 9999 (within set value limit)...
  • Page 44: Additional Explanation Of Address Map

    Additional Explanation of Address Map *② Register number 40087, 41087 (read-out/write-in area) Contents of the communication DI action Used for requesting a DI action via communication. Once written in, the contents remain held unless the power is turned off or another value is written in. Pay attention to this point particularly when canceling the alarm latching.
  • Page 45 *④ Register numbers 30008, 31008 (read-out only area) Input/main unit abnormal status Contents Read-out 0 Input Lower open-circuit 0:Lower open-circuit absent 1:Lower open -circuit present 1 Input Upper open-circuit 0:Upper open-circuit absent 1:Upper open-circuit present 2 Input under-range 0:Under-range absent 1:Under-range present 3 Input over-range 0:Over-range absent...
  • Page 46 *⑥ Register numbers 30009, 31009 (read-out only area) Ramp/soak current running position Read- Indication of parameter Running position (status) out data “STAT” 0 oFF Stop status of ramp/soak 1 1-rP No. 1 ramp time 2 1-Sk No. 1 soak time 3 2-rP No.
  • Page 47: Sample Program

    SAMPLE PROGRAM This section concerns data read-out/write-in sample program by GW-BASIC* which operated on Windows 95* MS-DOS* PROMPT. Note that the program shown here is for reference for you to create a program and not for guaranteeing all actions. Before executing the program, make sure of the communication conditions in the following procedure. ・...
  • Page 48 (a) Example of data read-out Operation:Read-out PV, SV (currently used), DV and MV (control output 1) at a time. (Continuous word read-out from read-out only area) Used function code :04H Read-out start register No. :31001 (Engineering unit data) Read-out word number :4 1000 '------------------------------------------------------- 1010 '...
  • Page 49 1730 CRC.L$=RIGHT$("0"+HEX$(CRC.L),2) 1740 CRC.H$=RIGHT$("0"+HEX$(CRC.H),2) 1750 PRINT "CRC calculation = ";CRC.L$;" ";CRC.H$ 1760 IF CC(LENGTH-1)<>CRC.L THEN GOTO 1790 'GOTO ER.MESSAGE 1770 IF CC(LENGTH)<>CRC.H THEN GOTO 1790 'GOTO ER.MESSAGE 1780 GOTO 1920 'GOTO PRT.RESULT 1790 'ER.MESSAGE 1800 PRINT "Communication error" 1810 END 1900 ' 1910 '------------- Display of result --------------------------- 1920 'PRT.RESULT...
  • Page 50 (b) Data write-in example Operation : Start ramp/soak of No. 1 station via communication (Single word write-in) Used function code :06H Write-in register No. :41082 (Table of engineering unit data) Write-in data (Ramp/soak start) :11082 1000 '------------------------------------------------------- 1010 ' READ CONTINUOUS WORDS SAMPLE PROGRAM 1020 '------------------------------------------------------- 1030 '...
  • Page 51 1730 CRC.L$=RIGHT$("0"+HEX$(CRC.L),2) 1740 CRC.H$=RIGHT$("0"+HEX$(CRC.H),2) 1750 PRINT "CRC calculation = ";CRC.L$;" ";CRC.H$ 1760 IF CC(LENGTH-1)<>CRC.L THEN GOTO 1790 'GOTO ER.MESSAGE 1770 IF CC(LENGTH)<>CRC.H THEN GOTO 1790 'GOTO ER.MESSAGE 1780 GOTO 1920 'GOTO PRT.RESULT 1790 'ER.MESSAGE 1800 PRINT "Communication error" 1810 END 1900 ' 1910 '------------- Display of result --------------------------- 1920 'PRT.RESULT...
  • Page 52: Troubleshooting

    Whether send/receive signal timing conforms to Section 5.4 in this manual. □ Whether the station No. designated as send destination by the master station coincides with the station No. of the connected PXR Whether more than one instrument connected on the same transmission line shares the same station No. □...

Table of Contents