Modbus and Phone Modems Kenneth Jenningsi (6/29/00) Today's modems are radically different from their predecessors. Gone are the plug and play days of the past. Also gone is the getting of coffee and waiting for the data to be sent. These days, it is possible to send a one-megabyte data file in six minutes or less. Obviously, these changes are affecting our modem choices for transmitting Modbus data. The new, high-speed modems may be the right solution for demanding SCADA (supervisory control and data acquisition) applications. This paper gives some insight into the selection and implementation of a telephone modem installation using Modbus protocol.ii Introduction Since 1978, Modbus has been successfully implemented in varieties of applications. No other protocol can boast a wide industrial acceptance as Modbus. The prosperity of Modbus is due to its ease of use and its ability to communicate over a wide variety of media: wire, fiber optics, radios, microwaves, satellites and telephones. The telephone modem is the primary instrument for communicating Modbus messages over long distances. Phone modems are capable of sending and receiving data virtually anywhere in the world. Many people choose them because they are inexpensive and readily available. Modems have undergone radical changes in the past several years. These changes enable them to send large amounts of data quickly over regular telephone wires. The new “V.90” standardiii permits modem download transmission rates up to 57,600 bits per second (BPS) over normal telephone lines. The newer technology does have a penalty. The penalty involves the loss of a simple hookup. Newer modems have numerous (and complex) options. They include the following: Buffering (for communicating at different speeds) Fallback and fall-forward modes (for adjusting speeds on noisy lines) Error correction and data compression (for maximum transmission rates) Negotiation (for determining the best communication connection) Handshaking (for preventing overrun) Understanding the various options, determining when to use them and making sure that they are compatible is the first step in establishing a successful communication’s system. 1 Types of Modems There are three types of phone modems: dial-up, leased line and cellular. A dial-up modem requires the host computer to dial the telephone number of the remote site before communicating. This lengthens the time it takes to communicate to the remote unit. A leased line modem, on the other-hand, provides instantaneous communication. Cellular phone modems provide mobile communications for today’s person on the go. This offers tremendous advantages for maintenance personnel that are responsible for numerous sites over large distances. Additionally, these data ported portable phones provide fax, e-mail and file transfer functions. Cellular phone modems are usable with either analog or digital data phones. Wired phone modems are available in both analog and digital formats. Analog modems are by far the most common. Digital phone modems, more properly called data service units (DSU’s), are gaining in popularity (especially with utility users using Adtran’s models IIIAR and DSU5600iv, Eazy’s MT 132A-R2v and Motorola’s DDSMR1). Options Some modems have redundancy capabilities. They may either have multiple leased line accessing or dial-up fallback modes.vi If using a fallback modem, make sure it can automatically dial the remote site’s telephone number since most host‘s software does not provide dialing capabilities. Other modems can combine voice and data on the same phone line. Select Modbus ASCII mode whenever using this method, since data gaps are likely during the voice transmission period. Jargon When it comes to communicating, modems use their own jargon. A virtual alphabet soup combination of letters and numbers is used in communicating to the modem. Fortunately, most modems converse using a standard "Hayes" protocol for their initialization. Initializing a modem means configuring it for a particular mode of operation. Each modem possesses a set of commands for establishing these modes of operation (see table D). Small variations in commands do exist between different manufacturers and models; so pay careful attention to the modem's manual. The most commonly used commands are those that begin with a single letter (A-Z). These commands instruct the modem to perform a specific operation such as dialing a telephone number, resetting the modem, turning off the modem's speaker or displaying log-on information. Commands that begin with the ampersand (&) usually involve the modem's communications parameters. Commands that begin with the percent sign (%) and slash (/ or \) involve Microcom Networking Protocol (MNP) operations; avoid them when using Modbus communications. Cellular phone modems have unique commands for controlling additional functions and have commands that deal with wireless networking. MNP10 protocol is permissible when using Modbus ASCII with cellular phones. The modem must be in the command mode to receive and process these command instructions. If the modem is not in the command mode, it simply passes the 2 information on to the receiving modem as if it were data. To enter the command mode, issue three plus signs (+++) in rapid succession followed by silence. This causes the modem to stop communicating and to start listening for commands. The first command, issued before all others, is the AT command. Use it to gain the modem's attention. It tells the modem that a command or group of commands follows. A command line may contain up to 40 characters. Terminate all commands with a carriage return (enter). This causes the modem to process the given command. After initializing the modem, save the parameters to permanent memory using the &W0 command; a power loss will clear the configuration. The modem is now ready for dialing telephone numbers (ATDT) or returning on-line (ATO). Guidelines The primary factor in selecting a communication mode depends upon the options that the devices offer and those needed. If speed is an issue, select Modbus RTU instead of Modbus ASCII. It is 25% faster than the ASCII mode when using a phone modem (see table A). Use the same data rate throughout the system because speed buffering causes data gaps and produces errors. If the devices need to communicate at different speeds, select the ASCII mode. The ASCII mode uses a carriage return with line feed to signify the end of message. Modbus ASCII mode permits timing gaps between characters and allows messages to get through with no problems. It is also much easier to troubleshoot than the RTU mode. While it may be slower than the RTU mode, it's not appreciably slower. Give special consideration when choosing between software and hardware communication port setups. Software configurations offer the most selections (baud rates, data bits, parity bits and stop bits). However, a total loss of power or CPU failure may change the software configuration. Hardware configurations may offer fewer selections. Unlike software selectable configurations, hardware setups do not change during power loss. This affords the opportunity of reloading the program and attempting to restart the unit. Sometimes, selecting one option enables or disables another option. Selecting the DIP (hardware configuration) mode rather than the memory (software configuration) mode on Modicon's 984-xx5 series PLC enables the Modbus Plus bridge mode. This enables a single modem to communicate to numerous PLC's. If one requires multiple bridging networks at different locations, choose the bridge multiplexer with its silent master (X-mode) option. The host receives multiple replies whenever more than one PLC is in a bridging mode on a network: PLC's report back with bad slave ID’s along with the good reply from the intended PLC. This causes garbled replies. The X-mode operation solves this problem by inhibiting the invalid address reply that normally returns to the host. Use the bridge multiplexer when a device does not support a particular communication mode. For example, if all PLC's use the RTU mode and a non-PLC device uses the ASCII mode, then use a bridge multiplexer to convert the message from RTU to ASCII. Another very important consideration in selecting a modem and choosing amongst the various communication parameters is the data transmission length. Most modems use ten bit data words (start+data+parity+stop); Modicon's PLC default is eleven bits. See if 3 your slave unit requires eleven bits or can use ten bits. Newer model 984’s permit configurable bridging; older units do not. External modems are easier to troubleshoot since they have status lights. These lights indicate transmission and reception of data, handshaking status, carrier detection, transmission speed, power and diagnostic conditions. External modems are also easier to install. If the modem stops functioning or locks up, it is easier to reset. Internal modems have no diagnostic lights and are more difficult to install but are very convenient for portable computers. Since high-speed modems use error correction and compression methods for high data transfer rates, one may think about employing these modes. In most cases, disable or turn off these modes because they slow down the system. Additional error checking, performed by the modem, is the source of the delay and defeats the effectiveness of compression. When using compression, small messages reduce throughput. Effective high-speed compression requires the master to send large messages (200 registers not the present 16) and faster port speeds (57K baud). Table A summarizes the effects of using V.42bis data compression. Handshaking is a new factor to consider. Some Modbus devices, such as Modicon’s Compact E984-275 port number 2, do not support hardware (RTS/CTS) handshaking. On dialup modems this is not a problem but it is a problem with radio and lease line modems. Be careful about selecting which communication port to use. Virtually any telephone modem with asynchronous RS232 capabilities is useable with Modbus. Use the same modem at both ends for it is much easier to deal with a single manufacturer, if problems arise, than two. Pay careful attention to initializing the modems when mixing and matching different units (see Table B). Table C 110XCA20401 provides additional information about the RJ45 to 25 Pin Male Adapter modems used in this report. 1 black 2 red 3 yellow 4 brown 5 Wiring Prefabricated modem cables are available for most PLC's. These cables make for easy installation when connecting a PLC to a modem. The slot mount 984 PLC requires an AS-W954-006 cable (refer to the system's manual, GM-0984-SYS page 63, or Modfax document #1954). To Micro PLC +5V DSR TX RX GND RTS CTS SHD 1 2 3 4 5 6 7 8 blue orng 6 green 7 8 white 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 RJ45 Different PLC’s require different cablesvii due to physical constraints, such as tight DB25 spaces and protective covers. The Figure 1 Quantum PLC, for example, requires a new thin plastic molded connector because of its shallow front door cover. The Micro PLC requires an adapter to convert from a RJ45 connector to a DB25 connector (see Figure 1). Figure 2 shows the wiring for a Bay Network Alliance lease line modem.viii 4 NC RX TX GND DTR DSR RTS CTS NC 1 2 3 5 4 6 7 8 9 1 3 2 7 4 5 6 20 8 SHLD RD TD GND RTS CTS DSR DTR CD Telco SHLD TD RD GND RTS CTS DSR DTR CD 1 2 3 7 4 5 6 20 8 1 3 2 5 4 5 7 8 9 NC TX RX GND DTR DSR RTS CTS NC (Wiring Is For Bay Alliance Modem Only!) Figure 2 Newer and smaller modems usually have a DB9 connector instead of a DB25 connector, so check your modem first before wiring. After obtaining or making your RS232 cables, you are ready to connect your modems. Connecting the modems is even easier. Simply plug a telephone cable, with its RJ11 connector on it, into the modem and then plug the other end of the cable into the telephone line. Make sure that the telephone line is an analog one and not a digital one. Digital lines, like those found in offices (e.g., PBX: Public Branch Exchange), will not work and may even damage the modem due to high voltages. Initializing the Modem After connecting the modem to the computer, it is ready for initialization. Initializing the modem involves sending it a series of letters and numbers, such as those from Table D or the modem's manual. These combinations of letters and numbers instruct the modem to perform a particular function. Refer to Table B for initialization suggestions. Use a terminal emulator package, such as ProComm Plus, to communicate to the modem. Select the desired communication parameters and issue an AT command. This instructs the modem that command information is being sent. If the modem is working properly and the cabling is correct, both transmit and receive data lights should blink and the modem should respond with an OK. If not, the modem may not be in the command mode. Issue three plus signs (+++) to make the modem enter the command state and try the command again. If the transmit data indicator light does not blink, you should check the wiring. It is advisable to reset the modem to the factory default mode before beginning. Use the &F (or &F0,1,2) command to do this. Afterwards, issue single or multiple commands. End all commands with a carriage return (enter). Write the configuration into the modem's memory or use it on a temporary basis until no longer needed. If the RTU mode is being used, turn off the modem’s error correction, compression and speed buffering. If the modem does not default to this, issue an &Q0. If the modem has a problem with handshaking, try issuing an &K0. If that fails, try jumping the request to send and clear to send handshake lines together on the Modbus device. A slave modem has an additional requirement. It needs to auto-answer the incoming calls. Use the S0 command to select the auto-answering mode. Enter the number of rings to wait before answering after the S0 command (e.g., S0=3 for wait three rings). Remember to write the configuration to memory, using the &W0 command, before powering down the modem. 5 Testing First, connect the slave and master modem with a telephone cable (without connecting to the telephone line). Then, connect each modem to a computer running a communications program. Select the same communications settings as those used with Modbus. Turn on the modems and issue an AT. If the master modem needs special initialization, do so. Issue an ATD to the master modem and then an ATA to the slave modem. The ATD and ATA cause the modems to connect to each other without having to dial out on the telephone line. Try chatting back and forth after the modems connect. If this works, the modems’ configurations are likely correct. Troubleshooting If the modems fail to connect or cannot pass data back and forth, the configuration is not correct. Use the modem's indicator lights to diagnose the problem. The modem's ready (MR), terminal ready (TR), request-to-send (RS), clear-to-send (CS), carrier detect (CD) and on-hook (OH) indicator lights should all be lit. The slave modem's auto answer (AA) indicator should light, too. The transmit (TX) and (RX) indicator lights should blink on and off when sending data. If either the terminal ready light or the request to send light fails to light, the problem is likely incorrect wiring or an improperly functioning terminal. Try a different modem configuration; one that ignores the RTS input signal. If that fails, then you must jumper out the missing signal. If the indicator lights are functioning properly and the data is not being received correctly, then a mismatch between the modems' communication parameters must exist. Check the baud rate, parity type, number of data bits and stop bits for correctness. Also, check the modem's ability to use that mode. The Aceex modem, for example, strips off the eleventh bit when using &Q5 or &Q6 but not when using &Q0. Other modems may claim to transmit eleven data bits but unexpectedly change to ten bits upon receiving a modem command function. Some modems, like the Practical Peripheral, can provide connection information that aids in diagnosing communication problems. Issuing an I6 command causes the Practical Peripheral modem to display a data connection screen. This screen tells the amount of data sent, number dialed, connection time, communication mode, protocol used, compression method, flow control and parity type used and the speed of the modem and terminal. It also displays the reason for terminating the last call. This information is very handy for determining connection failures. Occasionally, manufactures must change components due to parts obsolescence. This may cause a working system to stop functioning when adding these newer components. Either find older components or wait until manufacturing revisions become available. Contact the manufacturer to see if this is a possibility and find out if there is an available update. Another troubleshooting technique involves monitoring the communication’s link with either a hardware data analyzer or a software snooper program such as Win-Tech’s Listen32ix. By examining the data stream being sent back and forth, communication faults can be found. Missing characters, extra characters (due to noise or tail-squelch) and timing issues become readily apparent when using the analyzer. 6 Modsoft Using Modsoft with a telephone link is the same as using Modsoft with a direct wire connection. Before communicating over the telephone, one must first establish a modem connection using a communications program, such as ProComm Plus. Enter the modem's initialization string, port number, baud rate, parity type and number of stop bits into the communication’s program. Dial the telephone number of the remote PLC. After the modems connect, exit to DOS (ALT+X) without hanging up the line and start Modsoft. Next, go to the communications setup. Select Modbus I using the same parameters as with ProComm Plus and use Modsoft as usual. When finished, remember to hang up the line or turn off the computer. To hang up the line, go back to ProComm Plus and hang up (ALT+H). ProWORX Both ProWORX Plus and ProWORX NxT have the capability of connecting to the PLC via a modem dial-up connection. ProWORX needs no additional dialing programs. Just select the communications port, the dial-up modem option type (an optional password connection is also available), enter the modem’s initialization string and then click OK. Leave the other entries at their default value. Figure 3 shows a typical communications setup for ProWORX NxT.x Figure 3 Connection to the PLC is 10 bits, so set the communications to either ASCII with even parity or RTU with no parity. If not, ProWORX will prompt with a message when the OK 7 button is pressed. Also, make certain that the Modbus port on the PLC matches the ProWORX parameters. When connecting to the PLC, the software will prompt for the phone number. Enter the phone number and then click on the dial button. ProWORX dials the number and makes the connection to the remote PLC. When finished, go back and click on the hang-up button. Operating in Windows Obtaining data from the PLC via a Modbus direct cable hookup is very simple; however, it is both tricky and frustrating to do so over phone lines when using Windows. The problem with Windows is its unfriendly nature of communication port sharing; it usually does not. When one Windows program (such as Windows terminal program) is running and another program tries to communicate using the same port, Windows balks and refuses to let the second program have port access. This is similar to file sharing violations; great for protecting files but not so great in this application. So how do we make the connection? One way is to use ProComm Plus for DOS in a Window’s DOS session. Running ProComm Plus, within a DOS session, effectively cloaks the port from Windows. Another way is to use Window’s older Terminal program or Windows 95 newer HyperTerminal program. These programs require modifying the system.ini file to allow for communication port sharing between DOS and Windows applications. When using communications port #2, add the statement “Com2AutoAssign=0” (without quotation marks) to the [386ENH] section of the system.ini file.xi When using a configurable modem (e.g. IBM’s Thinkpad 760E internal Mwave modem or any other Digital Signal Processing modem), Windows “AutoAssign” will not work. Use a DOS based dialing program for these types of modems. Windows NT doesn’t support the “Auto Assign” feature either. The technique to make the connection is to use an external modem and add &D0 to the modem’s initialization command (or remove the wire between pin 20 of the computer and the modem). Next, use HyperTerminal to dial the remote PLC. After making the connection, hang-up the connection and launch the desired program. When finished, re-launch HyperTerminal and then send +++ to the modem and then ATH0 to hang-up. This method works because HyperTerminal attempts to hang-up the modem by signaling the modem to hang-up via pin 20. Since pin 20 is ignored (&D0 or disconnected), the modem never hang-ups until either power is removed or an ATH0 (hang-up) command is sent. This technique will not work on an internal modem. Modlink Modlink is a Windows based DDE communications program that allows a computer to communicate to a Modbus slave device. It is an easy to use SCADA Modbus master communication’s program. Constructing an Excel spreadsheet with live data from the PLC is easy using Modlink and takes only a matter of minutes. Try connecting to the Los Angeles Technology Center using 9600 baud with 7 data bits, even parity and one stop bit. Make sure to disable the modem’s data compression and error correction feature before dialing. 8 If using a Practical Peripherals’ 14400FXSA modem and ProComm Plus, initialize the modem with ATL1&Q0&K0^M using the setup utility (ALT+S). Next, select modem options, general options, initialization options and enter the initialization string. After making your connection, exit to DOS from ProComm without hanging up the phone line using ALT+X (this returns you back to Windows). Launch Excel and then Modlink. Create a new database by clicking on file and new. Edit the serial port to match the modem’s communications parameters and adjust the poll time to 1000 milliseconds. Add a new PLC into the PLC list with an address of 8 with the communications port matching the modem’s port number. Next, add a symbol with a name of timer using the previously defined PLC name and reference a single address of 1600 using an output register type of integer. This symbol, register 41600, is the free running timer of the motion demo PLC. Copy the created symbol from Modlink and then paste it into Excel using the Edit, Paste Special and Paste Link commands. Select a background color for the cell using the right mouse button and format cells option. Verify that the data is being updated in Excel. If using an external modem, check the modem’s transmit and receive indicator lights. Save the Modlink database and Excel spreadsheet for your next session. When finished, run ProComm Plus again and hang up the line or shutdown the computer to disconnect from the phone line. Communicating via the Internet Modbus messages are not limited to just RS232 serial communications. Modbus messages may even travel within TCP-IP Ethernet message packets. This makes it possible to communicate to a PLC via the Internet. The world’s first Internet PLC serverxii simulates this functionality. Connecting to the PLC server requires a modem, an Internet provider, and a Web browser. After connecting with your Web browser, you can read the PLC’s data and configuration. Portable Communications Portable communication devices using cellular technology are capable of transmitting Modbus messages. These devices employ both analog and digital techniques for sending messages between master and slave devices. Today, the analog cellular phone is the most popular of these type devices for data communications. Cellular phone imperfections can cause considerable challenges to transmitting Modbus data over mobile telephone networks. Problems with establishing and keeping quality transmissions often occur. Connection failures (try redialing again later or possibly try changing location) and excessive retry rates (try lowering transmission speeds or remaining stationary) can happen. Transmission power reductions, hand-offs (transferring the call to a different cellular site for balancing customer load) and sending cellular control information on the voice channel can cause a disconnection. To ensure high transmission reliability, use Modbus ASCII protocol with cellular protocols on both sides of the cellular connection (this requires both modems to be cellular compatible). If cellular protocols do not work, disable both error correction and data compression. Also, try using cellular modem pools when available (contact your cellular provider for availability). 9 Analog cellular telephone modems often include ETC cellular protocol that combats harsh line conditions during cellular transmissions. ETC protocol improves the initial connection success rate, automatically calculates optimal transmission speeds, provides error detection with data retransmission and conditions the signal line. In addition to ETC, other numerous functionsxiii and commandsxiv are available for use with cellular phones.xv Digital cellular phones, utilizing the new digital Personal Communication Services xvi (PCS) network, are far less susceptible to noise. These PCS phones are now becoming available for use in large metropolitan areas. These digital phones have multi-line liquid crystal displays (LCD’s) and are also multifunctional. Functions include paging, faxing, call waiting, conference calling, caller id, text messaging, data communications and many more (many functions are standard, some are optional). Companies manufacturing PCS phones with modem capabilities include Ericsson, Motorola and Nokia. Network service providers (AT&Txvii, Pacific Bellxviii and others) are just now beginning to provide data communication capabilities. Before you buy, be sure to check out their capabilities in your area before purchasing. To use your modem with a cellular phone, turn off the phone and connect your approved cellular phone modem cablexix to the phone. Next, connect the other end of the cable into the modem connector of your running computer. Finally, turn on the phone and have the computer dial the number. The Technology Center Square D’s Los Angeles Technology Center has a Modbus telephone modem set to auto-answer incoming calls. It is available for access twenty-four hours a day. The telephone number is (562) 692-3195xx. Please select 7 data bits, even parity and one stop bit. Select any baud rate from 600 to 28,800 BPS. You may dial in and use ProWORX, Modsoft, Modlink, Modsnoop, SPC or any other program. The slave modem communicates to the PLC at 19,200 baud via the modem’s speed buffering feature. The PLC’s bridging feature then transfers the communications to the Modbus Plus network at one million bits per second. The Modbus Plus network possesses many PLC (and non-PLC) devices. You may access the following PLC nodesxxi on the network: Unit 2 (Quantum): Concept (pharmaceutical demo) Unit 6 (984-145): Beckwood IEC demo (#215) Unit 7 (Quantum): Hot-standby demo Unit 8 (984-145): Beckwood motion demo (connected to the modem) Unit 9 (Quantum): MCC controller Unit 10 (Quantum): Beckwood “Quantour” demo Unit 14 (Quantum): Concept (reactor demo) Unit 70 (Micro 612): Beckwood simulator (#205) (via BM85) 10 Unit 71 (Micro 512): Beckwood simulator (#206) (via BM85) Unit 72 (984-141): Beckwood ATV16 demo (#221) (via BM85) Unit 73 (984-145): Beckwood Compact demo (#208) (via BP85) Unit 74 (Quantum): Interbus-S, thermocouple demo (via BP85) Unit 75 (Pwrlink): Powerlink panelboard (via MEB) Unit 76 & Unit 77: Powerlogic (via MEB) (future) Summary Today's high-speed phone modems provide a cost-effective solution for transmitting Modbus data. Today’s modems cost less, communicate faster, are more reliable and have many new advanced features. However, for most Modbus applications, many of these advanced capabilities slow down rather than speed up data transmission. These advanced capabilities make installations more difficult. Correctly configuring a modem allows it to communicate to virtually any other modem using Modbus. Properly configuring today's modem is challenging and will likely remain so. Finally, newer high-speed communications evolving today may require new interfacing techniques. Prepare for changes and modifications to your present system as this happens. Since Modbus is an adaptable protocol, it will endure these changes and will provide you service for many more years. If you have any information regarding a modem that you would care to pass along, please call (562) 463-3568. We appreciate your input. 11 TABLE A MODBUS PERFORMANCE CHARTxxii CONNECT MODBUS PC MODE MODE BAUD MB+ PLUS 1M DIRECT 7,N,2 2,400 V22bis 7,N,2 2,400 V22bis 7,N,2 2,400 DIRECT 7,N,2 9,600 V32 7,N,2 9,600 V32 (PCS) 7,N,2 9,600 V32/V42bis 7,N,2 9,600 V32/V42bis 7,N,2 9,600 V32/V42bis 7,N,2 19,200 DIRECT 7,N,2 19,200 DIRECT 8,N,1 2,400 V22bis 8,N,1 2,400 DIRECT 8,N,1 9,600 V32 8,N,1 9,600 DIRECT 8,N,1 19,200 MEDIA PLC UPLOAD UPLOAD UPLOAD BAUD BAUD ALL STATE 4XXXX'S 1M 12 6 4 1M 2,400 2,400 135 64 45 2,400 2,400 194 92 65 2,400 19,200 155 74 52 9,600 9,600 37 17 12 9,600 9,600 55 25 18 9,600 9,600 150 47 34 9,600 9,600 118 53 37 9,600 19,200 101 46 31 9,600 19,200 82 36 25 19,200 19,200 21 10 7 2,400 2,400 80 38 27 2,400 2,400 124 59 41 9,600 9,600 25 12 8 9,600 9,600 41 19 13 19,200 19,200 14 7 4 TABLE B MODEM INITIALIZATION COMMANDS MASTER MODEM MASTER INITIALIZATION COMMAND AT&F AT&F AT&F1&Q0 AT&F1&Q0\N1 AT&F1&Q0 AT&F0 AT&F1&Q0\N1 AT&F&Q0S37=9&K0 AT&F\N1 SLAVE INITIALIZATION COMMAND Zoom (V32) AT&F&K0S0=1 Zoom (V32) AT&F&K0&Q0S0=1 Compudyne AT&FS0=1 Compudyne AT&FS0=1 Zoom (V32) AT&F&K0S0=1 Zoom (V32) AT&F&K0S0=1 Zoom (V32) AT&F&K0&Q0S0=1 MI-G144E AT&F\N1&K0\Q0S0=1 Zoom (V32) AT&F&K0S0=1 MBUS MODE ASCII RTU BOTH BOTH ASCII ASCII RTU ASCII ASCII 2,400 2,400 2,400 2,400 9,600 9,600 9,600 9,600 9,600 V22b V22b V22b V22b V32 V32 V32 V32 V32 Viva Accura Accura*** PPI Mhz XJ2144 Nokia 2190 Robotics**** Sportsterxxiii AT&F&Q6&K0 AT&F&Q6&K0 AT&F&K0 AT&F1&Q6&K0 AT&F&Q&K AT&F AT&F&B1&H0&M0&K0 S32=0S27=32S0=1 Zoom (V32) Zoom (V34) PPI (V34) Zoom (V34) Zoom (V34) Zoom (V34) Robotics**** Sportster AT&F&K0S0=1 AT&F&K0S0=1 AT&F&K0S0=1 AT&F&K0S0=1 AT&F&K0S0=1 AT&F&K0S0=1 AT&F&B1&H0&M0&K0 S32=0S27=32S0=1 ASCII ASCII ASCII ASCII ASCII ASCII RTU 9,600 19,200 9,600 19,200 9,600 9,600 9,600 V32b V34 V42b V32b V32b V32b V32b Thinkpad & Globalxxiv AT&F&K0&Q6 Supra 28.8& AT&F&C1&D0&K0&Q6 Accura 28.8 N=0S37=9S0=2&W1 ASCII 9600 V32b Thinkpad & Global AT&F&K0&Q6 Boca 33.6 ASCII 9600 V32b Generic* Generic* PPI** Aceex** PPI Aceex Aceex Accura Paradyne SLAVE MODEM BAUD RATE COM MODE 3710-A2-203 AT&F&K0&Q0&D0 S0=1&W1*** *1200/2400 baud Hayes compatibles ** Terminal dialing baud and Modsoft baud = 19,200 *** &Q6 not used due to noise **** Switch 4 typically down (must be set to echo offline) 12 TABLE C MODEM COMPARISON CHART MANUFACTURER PRACTICAL ZOOM ZOOM ACEEX BOCA RESEARCH HAYES ERICSSON (PCS) MOTOROLA (PCS) INTEL PSION DACOM NOKIA (PCS) MODEL 14400FXSA VX V.32 V34 28.8 1496I M1440E ACCURA288 DPY 101 711 SYN5182 146917 GOLD CARD DTP-8 TYPE FEATURES MODBUS COSTxxv EXT V32b,42,42b/FAX/LCD MASTER $150 EXT V32,42,42b SLAVE $50 EXT V34,32,42,42b/FAX SLAVE $100 INT V32b,42,42b/FAX MASTER $50 EXT V32b,42b/FAX SLAVE $45 EXT V34,32b/FAX MASTER $100 PCMCIA V34,32,32b,42/FAX MASTER $499 PCMCIA V34,32,32b,42/FAX MASTER $428 PCMCIA V32b,42,42b/FAX MASTER $150 PCMCIA $249 V90/K56/V.34/FAX MASTER PCMCIA V110,34,32,32b,42/FAX MASTER $349 TABLE D MODEM COMMANDS COMMAND +++ AT A DP/DT E(x) H(x) L(x) M(x) O Q(x) S(r)=x S(r)? V(x) W(x) X(x) Z(x) &C(x) &D(x) &F(x) &K(x) &Q(x) &T(x) &V &W(x) &Y(x) DESCRIPTION Go to command mode Attention (Issue before all commands) Answer DP=Pulse dial, DT=Tone dial Echo command characters (E0=no echo, E1=echo) Hook control (H0=hang up, H1=on line) Speaker volume (L0=lowest, L1=low, L2=medium, L3=highest) Speaker control (M0=off, M1=on until carrier, M2=on, M3=on while connecting) Exit command mode and go to on-line communication mode Return response control (Q0=enable, Q1=disable) Set S register to value x (S0=1 is for autoanswer) Display S register value Return response format (V0=numeric form, V1=word form) Display connection messages (W0=none, W1=display negotiation and DTE speed, W2=display DCE speed only) Display extended connect codes (X0,1=no detection, X2=detect dialtone, X3=detect busy, X4=detect dialtone and busy) Restore user configuration profile (Saved by &W0,1,2) Carrier detect (&C0=always on, &C1=on when carrier present) Data terminal transition control (&D0=ignore, &D1=go to command state, &D2=hang up & accept commands, &D3=reset) Reset modem to factory [not user] defaults &F0: Standard Hayes modem (no error detection or compression) &F1: Error detection & compression (use &F for Zoom) Flow control selection (&K0=none, &K3=hardware control, &K4=software control, &K5=transparent software control) [N/A when &Q0 selected] Communications mode for V.42 modems &Q0: Direct mode (no buffering and no error correction/compression) [Aceex modem includes MNP5 operation with &Q0] &Q5: Negotiate speed and error correction mode &Q6: Normal mode (speed buffering only) [N/A with Aceex modem] Test mode (refer to your modem for procedures to follow) Display modem's configuration Write configuration to memory profile 0, 1 or 2 Profile reset selection (&Y0=profile 0, &Y1=profile 1) 13 Troubleshooting Appendixxxvi The PLC will not respond when I communicate to it when using a modem. Your modem is a 10-bit modem and you are trying to communicate using the 11-bit default. Modicon PLC’s use 8 data bits, even parity and one stop bit. Most modems use no parity, 8 bits. Reconfigure your PLC to 8,N, 1 and make sure to place it into the memory mode. (This is a problem for Micro users with only one port; you need to buy a BM85 or obtain a two port Micro.) [9] I am using 10 bits but I still cannot log-on with Modsoft. A) Your modem needs the correct configuration (see Table B for initialization strings). Make sure you disable both data compression and error correction. [10] B) Turn off the automatic speed buffering mode when using Modbus RTU mode and make sure your modem’s carrier is in V.32 mode (9600 baud) not V.32bis mode (14400 baud). Use the special “S” command function for setting the carrier’s baud rate (S37=9 for a Practical Peripheral modem). [3] C) You forgot to setup ProComm as 8,N,1 or (more likely) forgot to specify Modsoft as 8,N,1. Most people just hit the return button without carefully looking at the Modsoft parameters. [2] D) You are selecting different communication ports between Modsoft and ProComm. Make sure that you select the same serial port for both Modsoft and ProComm. Modsoft remembers your last port selection. Change it whenever you change connection modes (i.e., going from a direct connection to a modem connection). [4] E) The PLC is not in memory mode (default mode is 8/E/1) or the Modbus port configuration is incorrect. [2] F) You plugged the cable into the wrong PLC Modbus port (usually port 2). [2] G) You forgot to set your files and buffers large enough for Modsoft [3]. Try increasing the buffers and file size in the config.sys file. Make sure you can run Modsoft without the modem. I still cannot connect. Is the problem at my host site or at my remote site? Try connecting to the Los Angeles Technology Center using seven data bis, even parity and one stop bit (7/E/1). If you can log-on and connect using Modsoft in ASCII mode, then the problem is most likely at your slave site (PLC, modem or cable). Reconfigure your slave site for 7/E/1 and then try connecting to it. If you are successful, change a single parameter and then try again. Try sending the following ASCII string inside the quotation marks “:087E011960(CTL+M)(CTL+J)” to address 8. If a response returns, then communications is occurring and solution C, D or G (from above) will likely fix the problem. If you can not connect to the Technology Center, then the problem is with your host site. See if you can connect to a bulletin board. I cannot log-on with Modsoft but FactoryLink, Panelmate or other MMI devices communicate to the PLC OK. A) Your PLC or computer does not have the DSR line connected properly; it must be high (+V). The DSR connection may be loose. In this case, Modsoft connects but fails to display the networks properly and then stops. [3] B) If using a bridge multiplexer, the DSR on the bridge multiplexer must be high (+V) as well as the DSR on the PLC. A PLC ‘not there’ error, which shows up immediately when using a bridge multiplexer, indicates that the DSR line is missing. The usual solution is to jumper the DTR line to the DSR line (at the PLC and at bridge multiplexer). This is a good way to prevent program changes, yet allow data transfers. I can connect to bulletin boards just fine with ProComm but not to the PLC using Modsoft. You may have some incompatibility with your computer or the ProComm Plus configuration. Modsoft assumes you are using the standard IRQ for each communication port (COM 1,3,5 with IRQ4 and COM 2,4,6 with IRQ3). Use Windows’ device manager program to find the modem’s interrupt number. A non-standard interrupt number causes Modsoft and LModsoft to fail when using Modbus. [1] 14 When attaching, the modem’s (PLC and/or computer) indicator lights do not look right. If missing a critical light (TX, RX, DSR, CD or CTS when RTS comes on), the cable’s wiring is incorrect. Sometimes a modem initialization string can compensate. You need a breakout box or an in-line indicator to troubleshoot this problem (Radio Shack has them for about $15). What looks right? Hard to tell; it just comes with experience. [3] I get random characters after ProComm (Windows) connects, but not with the DOS version. Are you using an Orchid video board in Windows? Their older driver has a problem with COM4. It uses COM4 to communicate to the video board. Obtain their new COM4 driver or move your modem to COM 1 or COM3. [1] I can connect to the PLC, with and without a modem, using the default but not 8/N/1. This is not a modem problem but you may experience this problem when using a modem. See if you can make a direct wire connection using 8/N/1. If you can, then your mouse driver is likely the problem. This problem was first seen in 1993 with Saeger notebooks. These notebooks have mouse drivers that search for a mouse on COM 1/2. The problem, which appears random, occurs when you boot the computer without a mouse. It loads the mouse TSR using COM1 when no mouse is present. When using Modsoft with COM1, the mouse driver should cause conflicts (or so one would think). However, the mouse driver uses 8/N/2 so it’s apparently OK with your defaults. When using Modsoft with other parameters, it produces errors. The solution is to prevent the mouse driver from loading (remark it out in the autoexec.bat file) or use COM2 for Modsoft. [3] This is not a likely problem now since Windows does not use DOS drivers. Sometimes I can connect to the PLC with a modem and sometimes not. I see the RX light on the PLC modem blinking when I am not transmitting data. What causes this to happen? A) A TSR or a hardware device conflict (scanner, digitizer, or audio card) may exist. If you are using COM 3/4, it shares a common IRQ between those devices. This is OK providing you do not get TSR conflicts and the two devices do not try to talk at the same time. Try removing the card(s) and move your modem to COM 1 or 2. [2] B) A noisy phone line may cause this problem. Dial the phone number and listen to how the line sounds. The modem may not tolerate the line noise. Try a phone line in another part of the city or try another modem and try C) below. [2] C) Replace the slave PLC with a computer and try communicating both ways between the two computers. If you can not communicate, a bad modem or cable is likely. D) Try Modbus ASCII mode, as it is more forgiving than RTU. I can no longer communicate to my PLC after upgrading from a 584 or chassis mount 984 to a slot mount 984. The older units process Modbus RTU messages differently. Supposedly, older PLC’s incorrectly use a parsing technique to determine the end of the Modbus message. Parsing allows for processing messages with large delays between characters. The slot mount 984 PLC adheres to the 3-character time-out function for determining the end of message. [2] I get a message “communication port in use” when trying to connect in Windows or the modem’s transmit light fails to blink when Modsoft tries to connect. Add Com1AutoAssign=0 or Com2AutoAssign=0 to the [386ENH] section of the system.ini file when using Windows 9X [3]. This does not work for Windows NT or Windows 2000. I can not get Modsoft to work in DOS with my PCMCIA modem but it works with an external modem. Modsoft does not work with a PCMCIA modem in DOS. Use Windows instead or use an external modem. It is unclear, at this time, why this happens. 15 I receive a non-supported PLC when connecting to my PLC with Modsoft. You are using Modsoft Light and trying to connect to a PLC that the software does not support. Try a different PLC address that has a Compact or Micro PLC. Use the full version Modsoft, if you wish to connect to a 984E or Quantum. [3] My modem says it supports 11 bits but whenever I dial a phone number, it reverts to 10 bits. New information indicates that placing a phone call with an eleven bit “Hayes” compatible modem causes it to revert to ten bits. It appears that the only way to get it to work is to store the number in the modem’s memory and let it automatically dial the phone number. [1] Some of my modems communicate properly and some don’t. Why? Modem vendors change firmware from time to time. Firmware changes may affect handshaking, timing, or processing options. This problem is most likely to occur when changing out a modem. U.S. Robotic modems exhibiting this problem may not work when using Modbus RTU mode. [1] This problem may also occur when replacing an older PLC or using a new PLC. This problem first began in July of 1999 when Intel stopped producing a communication chip and an alternative chip was substituted. IBM, Zoom, US Robotics modems work fine but Aprotek modems do not work with the newer PLC’s. [6] My Accura modem doesn’t communicate to my Practical Peripheral modem. I have tried everything to get it to work. However, I can get a Zoom modem to communicate to it. This appears to be similar to the above problem. It appears that a chipset or firmware may not be very tolerant to noisy lines. Try using data compression and error correction (remove the &Q6). This should provide better immunity to noise. It will, though, slow down communications throughput [2]. Hyperterminal doesn’t work with Modsoft. It works with another computer but not this one. If your modem is a built-in internal modem, it is likely a DSP modem. The IBM Thinkpad 760E uses a MWAVE internal DSP modem. AutoAssign appears not to work with this type of modem. Therefore, Windows based dialing programs won’t work with DOS based programs. To see if this is happening, view Hyperterminal’s window along with Modsoft. If Hyperterminal displays data when trying to connect to the PLC, then this is the problem. Use an external modem or use a DOS based dialing program to solve the problem [1]. I appear to connect immediately when logging onto my PLC and never see any logic. This happens when the modem echoes back the characters to the computer before receiving the Modbus reply message. If using a U.S. Robotic’s modem with option switches, make certain that switch number four is down, not up [4]. A defective cable (a short between the transmitted and receive data lines) will cause this as well [2]. A modem that has been improperly initialized can also do this [1]. To find out if this is occurring, remove the cable where it connects to the PLC and then log onto the PLC. An echo-back problem exists if a log-on occurs instead of a receiving a timeout error message. 16 Notes: i Kenneth Jennings runs the Automation Technology Center in Los Angeles, CA. (Phone: 562/463-3568). This document contains hyperlinks to various Internet sites. Microsoft’s Word displays these hyperlinks as blue underlined text. ii Hyperlink to http://www.modicon.com/intr7.html. iii The V.90 standard was ratified by the International Telecommunications Union (ITU) during 1998. The V.90 standard replaces the x2 and K56 protocols. iv Contact Greg Meyer at Com-Net Industries (818/767-4440) for more information on Adtran or Advanced Digital Networks. v Contact the Eazy company for more information on their modems. The Bay Networks’ Alliance modem (model DD3804001) is a 2/4 wire, 10 bit leased line modem with an AutoDial fallback mode. For more information, contact Signal Enterprises, Inc. (916/791-8802). vi vii Hyperlink to http://www.modicon.com/wincgi/printform.pl. viii Thanks to Brad Nohr (formerly Square D), Mike Nease and Lloyd Trick (from MSO) for this information. ix Hyperlink to ftp://www.win-tech.com/demos/listen32.zip and http://www.win-tech.com. ProWORX Plus, version 1.55, works with IBM’s Thinkpad PC. ProWORX NxT, version 2.0, works with Compaq’s PC and an internal modem (V56VL global). Other PC’s and modems will likely also work but have not been tested. x xi Consult Microsoft’s Knowledge base document number Q130402. xii Hyperlink to http://www.pep1.modicon.com. xiii Hyperlink to ftp://www.mhz.com/pub/info/techbull/3116.txt. xiv Hyperlink to ftp://www.mhz.com/pub/info/techbull/3112.txt. xv For information about Megahertz PCMCIA modems, refer to their technical document #3112 (Cellular for Megahertz PC Card Users) and technical document #3116 (Cellular Modem Functions). xvi Personal Communication Services was created in late 1993 and became operational during the latter part of 1996. xvii Hyperlink to http://www.attws.com/nohost/cellular/ce_new4.html. xviii Hyperlink to http://www.pacbell.com/products/wireless/pcs/index.html. xix Using an unapproved cable can damage your modem and/or phone. xx Square D’s Los Angeles office will move in September 2000. The phone number will change at that time. xxi PLC addresses are likely to change. xxii Upload time in seconds for C984-145, with PLC running, using Modsoft. Modsoft uploads 16 registers for each transaction. The PLC has 41 networks, 1083 words of logic, 32 segments, 1056 coils, 512 inputs, 128 input registers and 1600 holding registers. The master modem is a PPI 14400 FXSA and the slave modem is a Zoom V32. The direct connection is via a Modbus RS232 programming cable. xxiii Thanks to Mr. Peter Thiessen of Thiessen Engineering. 17 xxiv Thanks to James Banks of Kintronic. xxv Many older modems are no longer available. Older modem prices are a best estimate. xxvi Numbers in brackets [] indicate the number of occurrences of this problem. 18
© Copyright 2026 Paperzz