F4masmbm F4 MAS MB M
User Manual: F4-MAS-MB-M Online ation - AutomationDirect
Open the PDF directly: View PDF .
Page Count: 57
Download | |
Open PDF In Browser | View PDF |
Automationdirect.com Direct Logic 405 MODBUS MASTER F4–MAS-MB Order Number: F4-MASMB-M TRADEMARKS Automationdirect.com is a Trademark of Automationdirect.com Modbus is a Trademark of Gould Inc. COPYRIGHT Copyright 1994, FACTS Engineering Inc., 8049 Photonics Dr., New Port Richey, Florida, 34655.. World rights reserved. No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy photograph, magnetic or other recording media, without the prior agreement and written permission of FACTS Engineering, Inc. Last Issued Date: February 2002 Current Issued Date: June 2002 WARNING Thank you for purchasing automation equipment from FACTS Engineering. We want your new FACTS Engineering automation equipment to operate safely. Anyone who installs or uses this equipment should read this publication (and any other relevant publications) before installing or operating the equipment. To minimize the risk of potential safety problems, you should follow all applicable local and national codes that regulate the installation and operation of your equipment. These codes vary from area to area and usually change with time. It is your responsibility to determine which codes should be followed, and to verify that the equipment, installation, and operation is in compliance with the latest revision of these codes. At a minimum, you should follow all applicable sections of the National Fire Code, National Electrical Code, and the codes of the National Electrical Manufacturers Association (NEMA). There may be local regulatory or government offices that can help determine which codes and standards are necessary for safe installation and operation. Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes and standards. We do not guarantee the products described in this publication are suitable for your particular application, nor do we assume any responsibility for your product design, installation, or operation. If you have any questions concerning the installation or operation of this equipment, or if you need additional information, please call us at 1-800-783-3225. This document is based on information available at the time of its publication. While efforts have been made to be accurate, the information contained herein does not purport to cover all details or variations in hardware and software, nor to provide for every possible contingency in connection with installation, operation, and maintenance. Features may be described herein which are not present in all hardware and software systems. FACTS Engineering assumes no obligation of notice to holders of this document with respect to changes subsequently made. FACTS Engineering retains the right to make changes to hardware and software at any time, without notice. FACTS Engineering makes no representation or warranty, expressed, implied, or statutory with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or usefulness of the information contained herein. No warranties of merchantability of fitness for purpose shall apply. TABLE OF CONTENTS CHAPTER 1 : INTRODUCTION................................................................................. 1.1 RANDOM READ/WRITE .............................................................................................................1.1 TABLE READ..............................................................................................................................1.1 TABLE WRITE ............................................................................................................................1.1 NETWORK SETUP .....................................................................................................................1.2 CHAPTER 2 : MODULE CONFIGURATION.............................................................. 2.1 SLOT DEPENDENT CONFIGURATION ....................................................................................2.1 CONFIGURATION POINTER (F4-MAS-MB reads from V memory)...........................2.2 MODE WORD (F4-MAS-MB reads from V memory)...................................................2.2 FIRMWARE VERSION / ERROR CODE (F4-MAS-MB writes to V memory) .............2.4 CONFIGURATION TABLE .........................................................................................................2.5 Communication Rate Code..........................................................................................2.5 Communication Rate Code Table ...............................................................................2.5 Radio Keying On-Delay Time.......................................................................................2.6 Radio Keying Off-Delay Time ......................................................................................2.6 Radio Keying Timing ....................................................................................................2.6 Wait for First Character Time-Out...............................................................................2.6 Wait for Last Character Time-Out ...............................................................................2.7 Serial Parity and Framing ............................................................................................2.7 F4-MAS-MB JUMPER DESCRIPTIONS AND LOCATIONS......................................................2.8 PORT 2...........................................................................................................................2.8 PORT 1...........................................................................................................................2.8 CLR ALL.........................................................................................................................2.8 F4-MAS-MB PORT PINOUTS ....................................................................................................2.9 F4-MAS-MBR JUMPER DESCRIPTIONS AND LOCATIONS .................................................2.10 CLR ALL.......................................................................................................................2.10 Transmit Level Adjustment Pot.................................................................................2.10 Receive Sensitivity Adjustment Pot..........................................................................2.10 Communication Path Selection.................................................................................2.11 Mode Selection ...........................................................................................................2.11 F4-MAS-MBR PORT PINOUTS................................................................................................2.12 Transmit Relay ............................................................................................................2.12 F4-MAS-MBR WIRING DIAGRAM ..............................................................................2.13 CHAPTER 3 : RANDOM READS............................................................................... 3.1 CHAPTER 4 : RANDOM WRITES ............................................................................. 4.1 CHAPTER 5 : TABLE READ/WRITE CONFIGURATION.......................................... 5.1 Read Table and Write Table Status Word (V7010 and V7012)...............................................5.1 Number of Read Table Entries (V7011) ...................................................................................5.2 Number of Write Table Entries (V7013) ...................................................................................5.2 Pointer to Write Data (V7014) ...................................................................................................5.2 Pointer to Write Table Entries (V7015) ....................................................................................5.2 Read Table Entries Configuration............................................................................................5.3 Read Table Data.........................................................................................................................5.3 Write Table Configuration.........................................................................................................5.4 Write Table Data.........................................................................................................................5.4 CHAPTER 6 : CONFIGURATION EXAMPLE............................................................ 6.1 DESCRIPTION OF EXAMPLE....................................................................................................6.1 F4-MAS-MB Example Configuration ........................................................................................6.2 F4-SLV-MB Example Configuration .........................................................................................6.4 F4-MAS-MB Example Ladder....................................................................................................6.4 F4-SLV-MB Example Ladder.....................................................................................................6.9 CHAPTER 7 : TROUBLESHOOTING........................................................................ 7.1 Description of Normal Operation (F4-MAS-MB, Modbus on Port 2, Diagnostic Mode Enabled).........................................................................................................................7.1 Description of Normal Operation (F4-MAS-MB, Modbus on Port 1, RS232 with RTS/CTS)7.1 Common F4-MAS-MB Problems and Solutions......................................................................7.2 APPENDIX A : RADIO MODEM/LEASED LINE MODEM SPECIFICATIONS ..........A.1 TRANSMITTER SPECIFICATIONS........................................................................................... A.1 RECEIVER SPECIFICATIONS .................................................................................................. A.1 FREQUENCY PARAMETERS ................................................................................................... A.2 APPENDIX B : RS232 AND 422/485 WIRING DIAGRAMS ......................................B.1 RS-232 STANDARD................................................................................................................... B.1 RS-232 DTE and DCE Pin Names and Signal Flow .................................................. B.1 IBM COMPUTER CABLES........................................................................................................ B.2 RS-232 WITH HARDWARE HANDSHAKE ............................................................................... B.4 RS-422/485 COMMUNICATION ................................................................................................ B.5 RS-422/485 POINT-TO-POINT CABLING................................................................................. B.6 RS-485 TWO WIRE MULTI-DROP ............................................................................................ B.7 Connecting Cables and Line Termination.............................................................................. B.9 CHAPTER 1 : INTRODUCTION The FACTS Engineering Modbus Master Module is used to host a Modbus network with an Automationdirect 405 PLC. The F4-MAS-MB is an intelligent Communication CoProcessor which may be installed in any slot of a DL405 CPU base. The network connection can be hardwired, a leased phone line, or various radio configurations. The F4-MAS-MB communicates with any slave device on the Modbus network using high level Modbus commands. Modbus function code 3 is used for reads and function code 16 is used for writes. The F4-MAS-MB can operate in either a random read/write mode, a table read/write mode, or both. RANDOM READ/WRITE The random read/write mode uses the DL405 RX/WX (Read from Network/Write to Network) instructions to trigger Modbus reads and writes. If simple configuration and start-up are important, then the RX/WX random reads and writes provide that option. Random reads and writes would typically be used when reads and writes are event driven. The random read and write modes require minimal configuration of the F4-MAS-MB module. TABLE READ The table read/write mode uses a polling list built by the user in DL405 V memory to trigger reads and writes. Each entry in a read or write table specifies a secondary address (slave device), data address (V memory location), and the number of bytes to read/write. The table read feature could be used to constantly read a block of data from several slave devices. This way the operating status of several machines could be monitored from one central location. The read parameters are configured once. Once the table read is enabled, the read data is constantly written to V memory pointed to by the module. TABLE WRITE The table write feature could be used to constantly update multiple slave devices with data that represents analog inputs, PID output, or some other value that needs to stay current in the slave devices. A status word is used to control the read and write table operations. If fast response and high throughput are most important, then the table reads and writes provide for that need. INTRODUCTION 1.1 NETWORK SETUP The F4-MAS-MB provides two ports which are each jumper selectable for either RS-422 or RS-232 operation. Either port may be selected as the Modbus port. Two hardwired networks using F4-MAS-MB modules may be installed in the same DL405 CPU base for redundant network configurations. The non-Modbus port may be enabled for use as a built-in data communication analyzer for troubleshooting network communications. In addition to reporting network messages, the troubleshooting port displays module operating status and reports network communication faults such as CRC-16 and no response errors. The following examples show some sample hardware setups to illustrate where the F4-MAS-MB fits into a system. Example 1 - F4-MAS-MB as Modbus Master with DL340 CPU’s (Need FA-ISONET converter for each 340)and F4-SLV-MB’s as Modbus slaves. R S - 4 2 2 M u ltid r o p F4-M A S -MB Modbus Master DL340 DL340 F4-SLV-MB F4-SLV-MB Example 2 - F4-MAS-MB as Modbus Master with DL340's (Need FA-ISONET converter for each 340) and F4-SLV-MB’s as Modbus Slaves. Computer connected to the DL430 or DL440 Slave port (using DirectNET protocol) monitoring all slave data. R S - 4 2 2 M u ltid r o p F4-M A S -MB M o d b u s M a s ter DL340 DL340 Host Computer Running H o s t Softw a re w / D ire c t N e t D r i v e r 1.2 INTRODUCTION F4-SLV-MB F4-SLV-MB Example 3 - F4-MAS-MBR as Modbus Master with F4-SLV-MBRs as Modbus slaves on a radio network. Radio Modem Radio Modem Radio Radio F4-SLV-MBR F4-MAS-MBR Modbus Master DL340 INTRODUCTION 1.3 1.4 INTRODUCTION CHAPTER 2 : MODULE CONFIGURATION The Modbus Master Module configuration consists of three components: - Minimal Configuration (required for RX / WX operation) - Read Table Configuration - Write Table Configuration Minimal configuration is required to operate the 405 Modbus Master Module in random read and random write mode. The minimum slot dependent configuration data is described in this chapter. The Module communication parameters are stored in eight contiguous V memory locations. These locations included baud rate, radio keying on delay, radio keying off delay, user specified time out, pointers for table read and table write modes. Since the location of this information is specified by the user it can be located anywhere in user V memory. In order to use the Table Read and Table Write Modes the user must build the tables that define the reads and writes. The Read Table and Write Table Status words are used to control table operation and monitor the current status. Table entries contain a secondary address, data address, number of items to read or write, location of data to write or read. The Table Configuration data can be set up and controlled using relay ladder logic, stage programming, an operator interface, or a DirectSOFT Data View. SLOT DEPENDENT CONFIGURATION The Slot Dependent Data consists of three V memory locations dedicated to each slot of an eight slot base. The first location is a pointer to the location of the module configuration data. The second location is a mode word where each bit enables/disables specific functions of the F4-MAS-MB module. The third location contains the F4-MAS-MB version number and an error code if the Table Read or Table Write mode is selected and there is a major error in their configuration(s). Slot Number Configuration Pointer Mode Word Error Code 0 V7350 V7351 V7352 1 V7353 V7354 V7355 2 V7356 V7357 V7360 3 V7361 V7362 V7363 4 V7364 V7365 V7366 5 V7367 V7370 V7371 6 V7372 V7373 V7374 7 V7375 V7376 V7377 MODULE CONFIGURATION 2.1 CONFIGURATION POINTER (F4-MAS-MB reads from V memory) Pointer to first V memory address of the Configuration Table. This location is read after power up or a program to run transition. The Configuration Table data consists of the baud rate, radio keying delays, pointers to locations of table information. This ladder shows how a table starting address of V5000 is specified for a F4-MAS-MB installed in slot 4. Word configuration will start at V5000 Table starting address for Slot 4 MODE WORD (F4-MAS-MB reads from V memory) This location is read after power up or reset. Add the binary weights of the options desired and load the resulting number into the V memory location for the slot that the F4-MAS-MB is installed in. Bit Function ON OFF Binary Weight 0 Modbus Port Port 1 Port 2 1 (1Hex) 1 Diagnostic Mode Enable Disable 2 (2Hex) 2 Reserved Reserved Reserved 4 (4Hex) 3 RS-485 Echo Suppression Enable Disable 8 (8Hex) 4 Automatic Address Recognition Enable Disable 16 (10Hex) 5 Carrier Adjust Enable Disable 32 (20Hex) 6 Table Read Enable Disable 64 (40Hex) 7 Table Write Enable Disable 128 (80Hex) 8 Select Read Function Code FC4 FC3 256 (100Hex) 9 – 15 Reserved Modbus Port Turn this bit 'ON' to select Port 1 for Modbus, 'OFF' to select Port 2 for Modbus. If diagnostic mode will be used set the Modbus port to port 2. Diagnostic Mode If enabled and the Modbus Port is Port 2 then all Modbus communications will be echoed out Port 1. In this mode all messages transmitted and replies received are echoed out of port 1 at 9600 baud (no parity, 8-bit word, 1 stop bit). Data bytes are displayed in hexadecimal. Received and transmitted messages are preceded by "RXD =" and "TXD =" respectively. At power up the current module configuration will be printed out of port 1. This mode is only recommended during startup or troubleshooting. If enabled and the Modbus Port is Port 2 then all Modbus communications will be echoed out Port 1. 2.2 MODULE CONFIGURATION RS485 Echo Suppression Two wire RS-485 connections cause all transmissions to be echoed. This echo must be suppressed so the F4-MAS-MB does not interpret the echo as the slave response. Turn ON this bit to automatically suppress the RS485 echo. If you are using four wire RS422 then Turn OFF this bit. Automatic Address Recognition Valid for Port 1 only. If enabled it forces an 11-Bit data frame with an 8-bit word and 1 stop bit. The 9th parity bit is used to distinguish between address and data bytes. The hardware on the F4-MAS-MB or the F4-SLV-MB checks this bit, if it is a 1 and the address byte matches, the subsequent data bytes are loaded and processed. Use this feature when all remotes are FACTS modules and the host supports AAR. The FACTS Modbus Master module F4-MAS-MB supports the AAR feature. Carrier Adjust If enabled and Port 2 is the Modbus Port and Debug Mode is Enabled then the radio keying relay is closed and the radio carrier is output until this bit is reset. If Modbus is on Port 2 and Diagnostic mode is enabled the message "Adjusting Radio Modem Carrier" is printed out of port 1 until the Carrier Adjust bit is turned off. If this is not a F4-MAS-MBR module then RTS will be turned ON on port 2. This feature is for adjustment purposes only. Table Read If enabled the information required for the Table Read function is loaded and the Table Read is executed based on the Table Read Status Word. Table Write If enabled the information required for the Table Write function is loaded and the Table Write is executed based on the Table Write Status Word. Select Read Function Code Turn this bit on to configure the F4-MAS-MB to use function code 4 for reads. Function code 4 is used to read Modbus input register addresses (30001 range). Leave this bit off to use function code 3 for reads. Function code 3 is used to read Modbus holding register addresses (40001 range). MODULE CONFIGURATION 2.3 FIRMWARE VERSION / ERROR CODE (F4-MAS-MB writes to V memory) This location will contain the Version number in the High Byte and the Error Code in the Low Byte. This location is written after power up or reset and after table configuration data has been validated. Low Byte Error Codes: 00 - no errors detected in read table, write table, last RX or WX Table Errors: 01 - read table configuration error 02 - write table configuration error 04 - read table run-time error 08 - write table run-time error RX/WX Errors: 10 - Invalid Number of Bytes (64 Max for RX/128 Max for WX) 20 - Time Out Error 40 - CRC Error 8n - Modbus Error (n=Modbus Error code) Example: 2.4 A F4-MAS-MB module in slot 0 has powered up with a Read Table Configuration Error so V7352=1001 (BCD/HEX in DirectSOFT Data View). Version 1.0 F4-MAS-MB with a Read Table Configuration Error. The Read Table Error can be determined from the Read Table Status Word. MODULE CONFIGURATION CONFIGURATION TABLE V - Memory Location Description V7000 Communications Rate Code V7001 Radio Keying ON Delay V7002 Radio Keying OFF Delay V7003 Wait for First Character Timeout V7004 Wait for Last Character Timeout V7005 Serial Parity and Framing V70056- V7007 Reserved V7010 - V7017 Optional Table driven read / write configuration data Communication Rate Code The Location specified as the Table Beginning Address (V7000) contains the communication rate code for the Modbus communication port. The Communication Rate Code table shows each communication rate code. If an invalid code is found the baud rate will default to 1200. The maximum baud rate for Port 2 is 9600. The maximum baud rate that can be set on a radio modem module is 1200 baud. Communication Rate Code Table Communication Rate Code Communication Rate (bps) 1 300 2 600 3 1200 4 2400 5 4800 6 9600 7 19200 8 38400 9 57600 A 115200 MODULE CONFIGURATION 2.5 Radio Keying On-Delay Time The Radio Keying On-Delay Time should be placed at the Table Beginning Address + 1 (V7001). The value is in BCD in units of milliseconds between 0 and 9999. This value is used for Port 1 and Port 2. It should be set to one if a direct wire connection is used. Radio Keying Off-Delay Time The Radio Keying Off-Delay Time should be placed at the Table Beginning Address + 2 (V7002). The value is in BCD in units of milliseconds between 0 and 9999. This value is used for Port 1 and Port 2. It should be set to one if a direct wire connection is used. Radio Keying Timing If the Modbus port is a RS232 port, the Radio Keying Delays affect the RTS line of that port. If the Modbus port is a Radio Modem, the Radio Keying Delays affect the RTS line and the Keying Relay of that port. RXD TXD Keying Relay or RTS Wait for First Character Time-Out The Wait for First Character Time-Out should be placed at the Table Beginning Address + 3 (V7003). The value is in BCD in units of milliseconds between 1 and 9999. This value is used for Port 1 and Port 2. If a value of zero is in this location the Wait for Last Character Time-Out will default to 100 milliseconds. This value determines how long the Modbus Master will wait for a response. 2.6 MODULE CONFIGURATION Wait for Last Character Time-Out The Wait for Last Character Time-Out should be placed at the Table Beginning Address + 4 (V7004). The value is in BCD in units of milliseconds between 1 and 9999. This value is used for Port 1 and Port 2. If a value of zero is in this location the Wait for Last Character Time-Out will default to 3.5 character times based on the current baud rate. This is useful for adjusting out radio noise when the carrier is dropped. Serial Parity and Framing Value 0 1 2 3 Setting No Parity, 8 Data Bits, 1 Stop Bit No Parity, 8 Data Bits, 2 Stop Bits Odd Parity, 8 Data Bits, 1 Stop Bit Even Parity, 8 Data Bits, 1 Stop Bit MODULE CONFIGURATION 2.7 F4-MAS-MB JUMPER DESCRIPTIONS AND LOCATIONS PORT 2 The communication interface type for port 2 is selected by placing a jumper on one of the port 2 options, either RS422 or RS232. The RS232 selection is the default factory setting. PORT 1 The communication interface type for port 1 is selected by placing a jumper on one of the port 1 options, either RS422 or RS232. The RS232 selection is the default factory setting. CLR ALL This jumper should always remain on one post (this is the factory setting). CAUTION: 2.8 Installing the CLR ALL jumper on both posts will prevent the module from operating correctly. MODULE CONFIGURATION F4-MAS-MB PORT PINOUTS PORT 1 Pin Symbol Description 1 RXD1+ Data Input High, RS-422 2 TXD1 Data Output, RS-232 3 RXD1 Data Input, RS-232 4 RTS1 DTE has data to xmit, RS-232 5 CTS1 DTE may xmit data, RS-232 6 RXD1- Data Input Low, RS-422 7 GND Signal Ground 8 TXD1- Data Output Low, RS-422 9 TXD1+ Data Output High, RS-422 PORT 2 Pin Symbol Description 1 RXD2+ Data Input High, RS-422 2 TXD2 Data Output, RS-232 3 RXD2 Data Input, RS-232 4 RTS2 DTE has data to xmit, RS-232 5 CTS2 DTE may xmit data, RS-232 6 RXD2- Data Input Low, RS-422 7 GND Signal Ground 8 TXD2- Data Output Low, RS-422 9 TXD2+ Data Output High, RS-422 MODULE CONFIGURATION 2.9 F4-MAS-MBR JUMPER DESCRIPTIONS AND LOCATIONS CLR ALL This jumper should always remain on one post (this is factory setting). CAUTION: Installing the CLR ALL jumper on both posts will prevent the module from operating correctly. Transmit Level Adjustment Pot Access to the transmit level adjustment pot is made via the small hole above the Port 2 DE-9 connector marked TXL. Turn the 25 turn pot clockwise to reduce the transmit level. Place a jumper on the Fixed Output posts to select the fixed -9 dBm transmit level. Place a jumper on the Four Wire Adjustable Output posts to enable transmit level adjustment. Receive Sensitivity Adjustment Pot Access to the receive sensitivity pot is made via the small hole above the Port 1 DE-9 connector marked SENS. Turn the 25 turn pot counter-clockwise to attenuate (decrease) the receive sensitivity. To disable the pot place a jumper on the "600" pins. To enable 2-wire or 4-wire sensitivity adjustment, position a jumper on the pins labeled "2ADJ" or "4ADJ" respectively. 2.10 MODULE CONFIGURATION Communication Path Selection Install a single jumper in one of the four sets of pins labeled ALB, 600, 2ADJ, OR 4ADJ in the diagram below. This selects the signal path as shown in the table below. Communication Path ALB 600 2ADJ 4ADJ Data TXD to RXD (analog loop back) n ¨ ¨ ¨ 4-Wire w / no RXD sensitivity adjustment ¨ n ¨ ¨ 2-Wire w / RXD sensitivity adjustment ¨ ¨ n ¨ 4- Wire w / RXD sensitivity adjustment ¨ ¨ ¨ n Mode Selection Modem operating mode selection is made by positioning jumpers on the last 5 pairs of pins labeled "4" to "0" as shown in the following tables. A "¨ " in the following tables indicates that the jumper should be removed whereas a “n" indicates that it should be installed. 300 BAUD Modem Operating Mode Description 4 3 2 1 0 Bell 103 orig., 300bps, full-duplex, 2-wire n n n n n Bell 103 orig., 300bps, full-duplex, 4-wire (Receive = Transmit frequency, 1070 / 1270 Hz) ¨ n n n n Bell 103 answer, 300 bps, full-duplex, 2-wire n n n n ¨ Bell 103 answer, 300 bps, full-duples, 4-wire (Receive = Transmit frequency, 2025 / 2225 Hz) ¨ n n n ¨ 4 3 2 1 0 CCITT V.23 mode 1, 600 bps, half-duplex, 2-wire n ¨ n n n CCITT V.23 mode 1, 600 bps, full-duplex, 4-wire ¨ ¨ n n n CCITT V.23 mode 1, 600 bps, half-duplex, 2-wire w/ soft turn off n ¨ ¨ n n 4 3 2 1 0 Bell 202, 1200 bps, half-duplex, 2-wire n n n ¨ n Bell 202, 1200 bps, full-duplex, 4-wire ¨ n n ¨ n Bell 202 w / equalization, 1200 bps, half-duplex, 2-wire n n n ¨ ¨ Bell 202 w / equalization, 1200 bps, full-duplex, 4-wire ¨ n n ¨ ¨ CCITT V.23 mode 2, 1200 bps, half-duplex, 2-wire n n ¨ ¨ n CCITT V.23 mode 2, 1200 bps, full-duplex, 4-wire ¨ n ¨ ¨ n 600 BAUD Modem Operating Mode Description 1200 BAUD Modem Operating Mode Description CCITT V.23 mode 2, 1200 bps, half-duplex, 2-wire w/soft turn off n ¨ ¨ ¨ n CCITT V.23 mode 2 w / equalization, 1200 bps, half-duplex n n ¨ ¨ ¨ CCITT V.23 mode 2 w / equalization, 1200 bps, full-duplex ¨ n ¨ ¨ ¨ CCITT V.23 mode 2 w / equalization, 1200 bps, half-duplex, 2-wire w/soft turn off n MODULE CONFIGURATION ¨ ¨ ¨ ¨ 2.11 F4-MAS-MBR PORT PINOUTS PORT 1 Pin Symbol Description 1 n/c 2 TXD1 Data Output, RS-232 3 RXD1 Data Input, RS-232 4 RTS1 DTE has data to xmit, RS-232 5 CTS1 DTE may xmit data, RS-232 6 n/c 7 GND 8 n/c No Connection, reserved 9 n/c No Connection, reserved No Connection, reserved No Connection, reserved Signal Ground PORT 2 Pin Description 1 Modem Transmit - 2 Modem Transmit + 3 reserved 4 Modem Receive - 5 Modem Receive + 6 no connection 7 Relay Output N.O. 8 Relay Output Com 9 no connection Transmit Relay An on-board Solid State relay provides a normally open contact closure which can be used to key a radio transmitter. Maximum load current is 100 mA from 0 to 300 V ac or dc. Maximum ON state resistance is 24 Ù. The relay closes when the RTS line is asserted. See page X for a description of the timing of the radio keying relay. 2.12 MODULE CONFIGURATION F4-MAS-MBR WIRING DIAGRAM F4-MAS-MBR Port 1 Pin n/c TXD1 RXD1 RTS1 CTS1 n/c GND n/c n/c 1 2 3 4 5 6 7 8 9 Port 2 Pin -Send +Send -Rcvd +Rcvd N.O. Com PC Serial port, 25 pin 22 3 2 4 5 7 6 8 20 RI RXD (input) TXD (output) RTS (output) CTS (input) GND (logic com) DSR (input) DCD (input) DTR (output) Typical Data Radio -Data IN (microphone) +Data IN 1 2 3 4 5 6 7 8 9 -Data OUT (speaker) +Data OUT +Key Transmitter -Key (Push to talk) ¬ For half duplex (2-wire) operation, connect Port 2 pins 1 to 4 and pins 2 to 5. MODULE CONFIGURATION 2.13 CHAPTER 3 : RANDOM READS Once the module configuration data has been read the F4-MAS-MB(R) is ready to execute random Modbus reads triggered from the PLC. Module in slot 0 Read from Slave 1 Read 1 Word, 2 Bytes Place data start @ V1400 Interrupt F4-MAS-MB and read from Modbus Data Address 0 (40001 if bit 8 of Mode Word is OFF) The Error relay associated w/ slot is energized if the Modbus slave returns an error response. The Modbus exception response code will be placed in V7352 for random reads and writes. LD Kssaa - ss is the slot number where the F4-MAS-MB is located aa is the Hex address of the Modbus slave to read LD Knnnn - number of data items (words) to read in Hex LDA Vffff - RX Vnnnn - Modbus data address to read from Starting location to place data that is read from network The V-memory value to specify is calculated by one of the following formulas: If bit 8 of Mode Word is OFF Modbus Address – 40001 then Convert Result to Octal 40101-40001 = 100d / 144o / V144 If bit 8 of Mode Word is ON Modbus Address – 30001 then Convert Result to Octal 31001-30001 = 1000d / 1750o / V1750 RANDOM READS 3.1 3.2 RANDOM READS CHAPTER 4 : RANDOM WRITES Once the module configuration data has been read the F4-MAS-MB module is ready to execute random Modbus writes triggered from the PLC. Module in slot 0 Write to Slave 1 Write 1 Word, 2 Bytes Write data starting from V1400 Interrupt F4-MAS-MB and write to Modbus Data Address 0 (40001) The Error relay associated w/ slot is energized if the Modbus slave returns an error response. The Modbus exception response code will be placed in V7352 for random reads and writes. LD Kssaa - ss is the slot number where the F4-MAS-MB is located. aa is the Hex address of the Modbus slave LD Knnnn - number of data items (bytes) to write in hex LDA Vffff - WX Vnnnn- Modbus data address to write location of data to write to network The V-memory value to specify is calculated by the following formula: Modbus Address – 40001 then Convert Result to Octal 40101-40001 = 100d / 144o / V144 RANDOM WRITES 4.1 4.2 RANDOM WRITES CHAPTER 5 : TABLE READ/WRITE CONFIGURATION The Table Configuration data will be read constantly if table read or table write (bit 6 or 7 of the mode word) mode is enabled. The V-memory location referred to in this chapter assume that the Configuration Pointer in the Slot Dependent V-Memory has a value 7000 BCD. V - Memory Description V7010 Read Table Status Word V7011 Number of Read Table Entries V7012 Write Table Status Word V7013 Number of Write Table Entries V7014 Pointer to Write Table Data V7015 Pointer to Write Table Entires V7016 Reserved V7017 Reserved Read Table and Write Table Status Word (V7010 and V7012) Meaning High Byte Low Byte Stop Executing Table 0 0 Execute Table 0 1 Time-Out Error 02 nn = Table Entry in Error First table entry is 01 CRC16 Error 04 nn = Table Entry in Error First table entry is 01 Modbus Error m8 m = Modbus Exception Code 1 - Illegal Function 2 - Illegal Data Address 3 - Illegal Data Value 4 - Failure in Associated Device 5 - Acknowledge 6 - Busy, Rejected Message 7 - Negative Acknowledgement 8 - Memory Parity Error nn = Table Entry in Error First table entry is 01 Table Configuration Error cF c = Configuration Error Code 1 - Invalid slave address in table entry 2 - Invalid number of bytes in table entry 3 - Table start address below user V-memory 4 - End of table after user V-memory 5 - Invalid Number of Entries nn = Table Entry in Error First table entry is 01 TABLE READ/WRITE CONFIGURATION 5.1 Number of Read Table Entries (V7011) BCD value for the number of Read Table Entries. Each entry takes four V memory locations starting at the first V memory location after the Table configuration Data (V7020 in this example). Value must be in the range of 1 to 64. Number of Write Table Entries (V7013) BCD value for the number of Write Table Entries. Each entry takes four V memory locations starting at the V memory location pointed to by the Pointer to Write Table Entries (V7015 in Table Configuration). Value must be in the range of 1 to 64. Pointer to Write Data (V7014) BCD value that points to the starting V memory location that data will be written from. Each Table Write Entry specifies the number of words to write, this number is used to calculate which V-memory locations will be used for each Table entry. Value must be in the range V1400 to V7377. Pointer to Write Table Entries (V7015) BCD value that points to the starting V memory location that Table Write Entries will be loaded from. Each Table Write Entry uses four V memory locations. Value must be in the range V1400 to V7377. 5.2 TABLE READ/WRITE CONFIGURATION Read Table Entries Configuration The Read Table Entries start at the next V memory location after the Table Configuration Data (V7020 in this case). (A): (F4-MAS-MB reads from V memory) Address of slave for this entry - 1 to 247 in HEX (B): (F4-MAS-MB reads from V memory) Modbus Data Start Address in HEX (C): (F4-MAS-MB reads from V memory) Number of words to read - 1 to 125 in HEX (D): (Allocate space)(F4-MAS-MB calculates and writes to V-mem) Pointer to starting location that data was written to. Repeat for each Read Table Entry. Read Table Data The data read for each Read Table entry is placed starting at the first V memory location after the last Read Table Entry. This location is pointed to by the fourth V memory location in each entry (D). This value is caculated by the module to simplify RLL access of network data. Entry 1 (A) V7020 (B) V7021 (C) V7022 (D) V7023 Entry 2 (A) V7024 (B) V7025 (C) V7026 (D) V7027 Entry 3 (A) V7030 (B) V7031 (C) V7032 (D) V7033 . . . . Up to 64 Entries TABLE READ/WRITE CONFIGURATION 5.3 Write Table Configuration The Write Table entries start at the V memory location indicated by the Pointer to Write Table Entries value in the Table Configuration. (V7070 in this case) (A): (F4-MAS-MB reads from V memory) Address of slave for this entry - 1 to 247 in HEX (B): (F4-MAS-MB reads from V memory) Modbus Data Start Address in HEX (C): (F4-MAS-MB reads from V memory) Number of words to write - 1 to 125 in HEX (D): (Allocate space)(F4-MAS-MB calculates and writes to V mem) Pointer to starting location that data was written from for this entry. Repeat for each Write Table Entry. Write Table Data The Write Table Data starts at the location indicated by the Write Table Data value in the Table Configuration. The starting location for each entry is pointed to by the fourth V memory location of each entry. Entry 1 (A) V7070 (B) V7071 (C) V7072 (D) V7073 . . . . Up to 64 Entries 5.4 TABLE READ/WRITE CONFIGURATION CHAPTER 6 : CONFIGURATION EXAMPLE DESCRIPTION OF EXAMPLE · · · · · · · · The F4-MAS-MB is installed in Slot 0 of a 4-Slot 405 CPU Base. There are three F4-SLV-MBs on a RS422 multidrop line connected to the F4-MAS-MB. The three remotes are setup as secondary address 1,2 and 3 respectively. The baud rate required is 115.2K Port 1 of the F4-MAS-MB will be the Modbus Master port. Port 1 of the F4-SLV-MBs will be the Modbus Slave Ports. The F4-MAS-MB will read V1400 through V1407 from each remote and place these values in one block of V memory. This block of V-memory containing the values from all three slaves will be written to V3000 through V3027 in each slave. The F4-MAS-MB will write a value of FFFF to V3030 of each slave for use with a watchdog timer. If the slave does not get this value within a certain period of time it will be considered a time-out, if the slave does get this value it will clear it and wait for the next one. CONFIGURATION EXAMPLE 6.1 F4-MAS-MB Example Configuration The following tables show how the F4-MAS-MB configuration V memory locations should be set for this example. The locations that show dddd are dynamic locations and will change based on F4-MAS-MB operation. Slot Dependent Configuration V7350 - Start V-memory 7000 V7351 - Mode Word 00C9 (1+8+64+128=201decmial = C9 Hex) V7352 - Version / Error Code 11dd Module Configuration V7000 - baud rate code 000A V7001 - radio keying ON delay 0000 V7002 - radio keying OFF delay 0000 V7003 - wait for first 0000 V7004 - wait for last 0000 Table Configuration V7010 - read table status word dddd V7011 - number read table entries 0003 V7012 - write table status word dddd V7013 - number write table entries 1 V7014 - pointer to write data 7034 V7015 - pointer to write entries 7070 Table Entries V7020 - slave address 0001 V7021 - data address 0300 V7022 - number of words 0008 V7023 - pointer to read data 0E1C - (V7034) V7024 - slave address 0002 V7025 - data address 0300 V7026 - number of words 0008 V7027 - pointer to read data 0E24 - (7044) V7030 - slave address 0003 V7031 - data address 0300 V7032 - number of words 0008 V7033 - pointer to read words 0E2C - (7054) 6.2 CONFIGURATION EXAMPLE Read Data V7034 - V7043 Data read from entry 1 V7044 - V7053 Data read from entry 2 V7054 - V7063 Data read from entry 3 Write Entries V7070 -slave address 0000 - (broadcast address) V7071 - data address 0600 - (V3000) V7072 - number of words 0025 V7073 - pointer to write data 0E1C - (V7034) Write Data The Write Table Data in this example is the data that was read with the Read Table. This was done by making the pointer to the write data (V7014) the same location as the start of read data. The watchdog value of FFFF will be placed into V7064 by PLC ladder logic. CONFIGURATION EXAMPLE 6.3 F4-SLV-MB Example Configuration The following table shows how the F4-SLV-MB configuration V memory locations should be set for this example. See the F4-SLV-MB User's Manual. Each F4-SLV-MB is installed in slot 0. V7350 - Configuration Pointer K7300 V7351 - Mode Word 0005 (1+4 = 5Decimal = 5Hex) V7300 - Baud Rate code 000A V7301 - Slave Address 0001 - (slave 1) 0002 - (slave 2) 0003 - (slave 3) V7302 - Radio keying ON delay 0000 V7303 - Radio keying OFF delay 0000 V7304 - Wait for last character 0000 F4-MAS-MB Example Ladder The following ladder logic uses the SP0 contact to configure the table driven network read/write operation of the Modbus master module. Note that these values are written into non-volatile V-Memory. If these values are loaded using DirectSoft or a host software package then the SP0 rungs would not be required. The module reads the configuration values at power up or a program to run transition of the CPU. On First Scan Only Load pointer to configuration for a F4MAS-MB installed in slot 0 Load Mode Word for slot 0 Modbus port 1 = 1 Multidrop ON = 8 Table read ON = 64 Table write ON = 128 Total = 201 6.4 CONFIGURATION EXAMPLE F4-MAS-MB Ladder (Continued) On First Scan Only Baud rate code Wait for first character timeout value On First Scan Only Number of Read Table Entries Number of Write table entries Pointer to Write table data Pointer to Write table entries CONFIGURATION EXAMPLE 6.5 F4-MAS-MB Ladder (Continued) On First Scan Only Read table entry number 1 Secondary address Data address (1400Octal - 300Hex) Number of words to read On First Scan Only Read table entry number 2 Secondary address Data address (1400Octal - 300Hex) Number of words to read 6.6 CONFIGURATION EXAMPLE F4-MAS-MB Ladder (Continued) On First Scan Only Read table entry number 3 Secondary address Data address (1400Octal - 300Hex) Number of words to read On First Scan Only Write table entry number 1 Secondary address(0 is broadcast address) Data address(3000Octal - 600Hex) Number of words to write CONFIGURATION EXAMPLE 6.7 F4-MAS-MB Ladder (Continued) On First Scan Only Value used for watchdog timer in secondaries If no errors in last read table execution then execute it If no errors in last write table execution then execute it On First Scan Only If read error and not executing read table then store last error in V6000 and execute read table If write error and not executing write table then store last error in V6001 and execute write table 6.8 CONFIGURATION EXAMPLE F4-SLV-MB Example Ladder On First Scan Only Load configuration pointer Load mode word for F4-SLV-MB modbus port 1 = 1 multidrop ON = 4 (1+4=5) Baud rate code(A for 115200) Secondary address(Change for secondary 2 and 3) CONFIGURATION EXAMPLE 6.9 On First Scan Only When V3030 is equal to zero turn ON C0 and set V3030 = 0 If C0 is OFF for > 3 secs. Then there is a comm. time-out Count the number of communication time-outs 6.10 CONFIGURATION EXAMPLE CHAPTER 7 : TROUBLESHOOTING Description of Normal Operation (F4-MAS-MB, Modbus on Port 2, Diagnostic Mode Enabled) 1. At power up the F4-MAS-MB power LED comes on and stays on. 2. The F4-MAS-MB signs on as a D4-DCM in the I/O Configuration. 3. The Slot Dependent V-memory and the Configuration Table V-memory is read to determine the configuration. 4. The TX1 LED flashes green while the module configuration is printed out of port 1. 5. The TX2 LED flashes green each time the F4-MAS-MB transmits a Modbus request. The TX1 LED flashes green while the Modbus request is echoed out of Port 1 in a readable format. 6. The RX2 LED flashes green while the F4-MAS-MB receives the response from the addressed slave. The TX1 LED flashes green while the Modbus response is echoed out of Port 1 in a readable format. 7. Steps 5 and 6 repeat. Description of Normal Operation (F4-MAS-MB, Modbus on Port 1, RS232 with RTS/CTS) 1. At power up the F4-MAS-MB power LED comes on and stays on. 2. The F4-MAS-MB signs on as a D4-DCM in the I/O Configuration. 3. The Slot Dependent V-memory and the Configuration Table V-memory is read to determine the configuration. 4. The TX1 LED flashes green and the TX2 LED flashes red (indicates port1 RTS asserted) each time the F4-MAS-MB transmits a Modbus request. 5. The RX1 LED flashes green and the RX2 LED flshes red (indicates port 1 CTS asserted) while the F4-MAS-MB receives the response from the addressed slave. 6. Steps 4 and 5 repeat. TROUBLESHOOTING 7.1 Common F4-MAS-MB Problems and Solutions Problem: I changed values in the Slot Dependent V-memory or Configuration Table V-memory but the changes do not have any effect. Cause: Slot Dependent V-memory and Configuration Table V-memory is only read at power up. Solution: Power Cycle the PLC for the changes to take effect. Problem: The Power LED is ON and the TX LED flashes but the RX LED never flashes and the Modbus master reports a time-out error. Cause 1: The baud rate does not match the Modbus slave(s). Solution 1: Change the baud rate (Table Beginning Address + 0) so it matches. Cause 2: The slave address(es) does not match the address in the Modbus master request. Solution 2: Verify the address the master is sending requests to and make sure the Modbusslave addresses match. Cause 3: The Port configuration jumper is set wrong. Solution 3: Set the jumper to RS232 or RS422 to match the master. Problem: The Power LED is ON and the TX LED flashes and the RX LED flashes but the Modbus master reports a CRC-16 or time-out errors. Cause: In a Radio Modem application delays may be required to prevent communication errrors. Solution: The Radio Keying Delays (Table Beginning Address + 1 and +2) need to be increased. 7.2 TROUBLESHOOTING APPENDIX A : RADIO MODEM/LEASED LINE MODEM SPECIFICATIONS TRANSMITTER SPECIFICATIONS Description Min Fixed Carrier Output Level Typ Max Units -10 -9 dBm Adjustable Carrier Output Level -40 0 dBm Frequency Accuracy (Except 202) -0.4 0.4 Hz Frequency Accuracy (202 Mark) -1.0 1.0 Hz Request to Send (RTS) to Clear to Send (CTS) ON Delay (std.) 25 8 ms @ 300 bps ms @ 1200 bps Request to Send (RTS) to Clear to Send (CTS) OFF Delay (std.) .5 msec RECEIVER SPECIFICATIONS Description Min Received Signal Range -45 Typ Max Units 0 dBm Carrier Detect ON Level -42 dBm Carrier Detect Hysteresis 5.5 dB Frequency Deviation Tolerance -16 16 Hz Carrier Detect ON Delay 10 3 16 5 ms @ 300 bps ms @ 1200 bps Carrier Detect OFF Delay 7 2 20 8.5 ms @ 300 bps ms @ 1200 bps RADIO MODEM/LEASED LINE MODEM SPECIFICATIONS A.1 FREQUENCY PARAMETERS Modem Mode Baud Rate Transmit Frequency Receive Frequency Space Hz Mark Hz Space Hz Mark Hz Bell 103 Origin 300 1070 1270 2025 2225 Bell 103 Answer 300 2025 2225 1070 1270 CCITT V.23 Mode 1 600 1700 1300 1700 1300 CCITT V.23 Mode 2 1200 2100 1300 2100 1300 CCITT V.23 Mode 2 Equalized 1200 2100 1300 2100 1300 Bell 202 1200 2200 1200 2200 1200 Bell 202 Equalized 1200 2200 1200 2200 1200 A.2 RADIO MODEM/LEASED LINE MODEM SPECIFICATIONS APPENDIX B : RS232 AND 422/485 WIRING DIAGRAMS RS-232 STANDARD RS-232-C (RS-232) is an interface standard from the Electronic Industries Association (EIA). The standard names and defines 20 communication signals, assigned to separate pins in a 25-pin connector. The five unassigned pins may carry nonstandard signals required by any individual system. Each signal is transmitted as a positive or negative electric current between 3 and 15 volts (usually 12 volts). The signal assigned to each pin flows in one direction only. Signals output, for example, from a computer must input to a terminal, and vice versa. RS-232 signals travel over a serial interface cable that may have up to 25 wires. Since most signals are not required for simple communication, cables have as few as 2 or 3 wires. As shown in the following cabling diagrams, jumpers often are installed at one or both of the connectors to ensure that flow control signals are satisfied. The signals flow between two types of interface ports, data communication equipment (DCE) and data terminal equipment (DTE). The pin names are the same for both DCE and DTE equipment, however, the direction of signal flow is reversed. RS-232 DTE and DCE Pin Names and Signal Flow Pin Abrev. Name Signal Direction DCE Description DTE 1 FG Frame Ground None None 2 TXD Transmit Data Input Output DTE Output Data Path 3 RXD Receive Data Output Input DCE Output Data Path 4 RTS Request to Send Input Output DTE has data to XMIT 5 CTS Clear to Send Output Input DTE may XMIT data 6 DSR Data Set Ready Output Input DCE has data to XMIT 7 SG Signal Ground Input Output 8 DCD Data Carrier Detect Output Input Modem has carrier 20 DTR Data Terminal Ready Input Output DCE may XMIT data 22 RI Ring Indicator Output Input RS232 AND 422/485 WIRING DIAGRAMS B.1 IBM COMPUTER CABLES B.2 RS232 AND 422/485 WIRING DIAGRAMS IDENTIFYING A COMMUNICATION PORT AS DCE OR DTE With an unknown RS-232 port powered, measure the dc voltage between pin-2 and ground (pin-7) and pin-3 and ground. If the most negative pin is pin-2 then the port is DTE. If the most negative pin is pin-3 then the port is DCE. Improper connection of pins 2 and 3 will not damage the interface. RS232 AND 422/485 WIRING DIAGRAMS B.3 RS-232 WITH HARDWARE HANDSHAKE B.4 RS232 AND 422/485 WIRING DIAGRAMS RS-422/485 STANDARD The RS-485 transceivers on CoProcessor's so equipped are compatible with both RS-422 and RS-485 signals. RS-422 uses high current differential outputs and is specified to 4000 feet at 10 Megabaud. Lower speed communications, such as 19.2K baud, may use substantially longer cables. RS-485 is an upgraded version of EIA RS-422-A and offers higher current tri-state drivers which are internally protected from bus contentions caused by multiple drivers on the same line. RS-485 drivers will also withstand higher voltages on their outputs when disabled (high impedance state). RS-485 is specified for multiple transmitter and multiple receiver systems as well as single and multi-drop RS-422 applications. The RS-422 specification permits only one driver and 10 receivers on a line. The RS-485 standard allows up to 32 drivers and receivers on the same transmission line. RS-422/485 COMMUNICATION Most CoProcessors have one RS-422/485 communication interface some have two. To select a port for RS232 or RS422/485 data reception mode, please refer to "JUMPER DESCRIPTIONS AND LOCATIONS" in the chapter for the CoProcessor module that you are using. Transmissions from a selectable port are always available at RS-232 and RS-422/485 signal levels simultaneously. RS232 AND 422/485 WIRING DIAGRAMS B.5 RS-422/485 POINT-TO-POINT CABLING B.6 RS232 AND 422/485 WIRING DIAGRAMS RS-485 TWO WIRE MULTI-DROP RS232 AND 422/485 WIRING DIAGRAMS B.7 RS-422 FOUR WIRE MULTI-DROP B.8 RS232 AND 422/485 WIRING DIAGRAMS Cable Shielding Shielding improves noise immunity (magnetic field protection). It is important to ground the shield at the receiver end only. Grounding the receiver end only provides the least high frequency signal attenuation and the best rejection of unwanted signals. Grounding both ends of the shield will cause magnetic field induced noised currents to flow through ground. Noise may then appear on the data lines due to transformer like coupling with the shield. If the cable shield is used as the system ground conductor then placing a 100Ω resistor in series with the shield and the ground connection will reduce noise producing ground currents. Connecting Cables and Line Termination A dual twisted pair plus ground connection is recommended for 4-wire RS-422 networks. Proper termination of the balanced transmission line is required to prevent data errors. A typical AWG 22 solid wire with .060 inch plastic cover, twisted 4.5 times per foot has a characteristic impedance of about 120Ω. Thus the selection of the two 62Ω line-to-ground terminating resistors. Line-to-ground termination is preferred to the often shown line-to-line 120Ω termination. In noisy or long line applications the much better line-to-ground common-mode rejection capability is particularly important. In multidrop networks, the line must be terminated at the extreme ends only as shown in the two previous diagrams. Addition of intermediate terminations will adversely load the line. If both the transmit and receive ends of the same twisted pair are terminated, double the value of the termination resistors. RS232 AND 422/485 WIRING DIAGRAMS B.9
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.2 Linearized : No Page Count : 57 Creator : Microsoft Word Create Date : Tuesday, June 18, 2002 2:31:23 PM Title : F4masmbm.PDF Author : Unknown Producer : Acrobat PDFWriter 3.02 for Windows Subject :EXIF Metadata provided by EXIF.tools