Professional Documents
Culture Documents
Operation Manual
Release 1.5
December, 1999
Modview
Operation Manual
DISCLAIMER
This manual contains information that is correct to the best of Arcom's knowledge. It is intended to be a
guide and should be used as such. It should not be considered as a sole source of technical instruction,
replacing good technical judgement, since all possible situations cannot be anticipated. If there are any
doubts as to exact installation, configuration and/or use, call Arcom Control Systems, Inc. at
(816) 941-7025
ACKNOWLEDGEMENTS
Windows and Windows 95 are trademarks of Microsoft Corporation
Modbus is a registered trademark of Schneider Automation, Inc.
HART is a registered trademark of the HART Communication Foundation
All other trademarks are recognized
REVISION HISTORY
Release
Revisions
Date
1.0
1.1
1.2
1.3
1.4
1.5
July, 1997
January, 1998
February, 1998
March, 1998
September, 1999
December, 1999
ii
Table of Contents
Page
1
2
Introduction .................................................................................................................................... 1
Installation....................................................................................................................................... 3
2.1 System Requirements.................................................................................................................................. 3
2.2 Installation of Software............................................................................................................................... 3
2.3 Registration ................................................................................................................................................ 6
Concepts..................................................................................................................................................... 8
File menu ................................................................................................................................................... 9
Set up Poll Records................................................................................................................................... 10
Command Buttons .................................................................................................................................... 12
Modview Help .......................................................................................................................................... 14
Communications Setup.................................................................................................................. 15
4.1 Configure Communications ...................................................................................................................... 15
4.1.1
Local Communication Parameters .................................................................................................. 16
4.1.2
Timing Parameters ......................................................................................................................... 16
4.1.3
Modbus communication parameters................................................................................................ 16
4.1.4
Modem Communication ................................................................................................................. 18
4.1.5
Additional Parameters .................................................................................................................... 20
4.2 Preferences ............................................................................................................................................... 21
4.3 TCP/IP ..................................................................................................................................................... 23
4.4 Connection to Field Devices ..................................................................................................................... 24
Modbus Overview......................................................................................................................... 31
6.1 Modbus Command Codes ......................................................................................................................... 31
6.2 Protocol Structure ..................................................................................................................................... 31
6.2.1
Command 01 -- Read Coil Status.................................................................................................... 32
6.2.2
Command 02 -- Read Input Status .................................................................................................. 32
6.2.3
Command 03 -- Read Holding Registers ......................................................................................... 33
6.2.4
Command 04 -- Read Input Status .................................................................................................. 33
6.2.5
Command 05 -- Force Single Coil .................................................................................................. 34
6.2.6
Command 06 -- Preset Single Register............................................................................................ 34
6.2.7
Command 15 -- Force Multiple Coils.............................................................................................. 35
6.2.8
Command 16 -- Preset Multiple Registers....................................................................................... 35
6.2.9
Modbus Exception Response........................................................................................................... 36
iii
iv
CHAPTER 1
1 Introduction
Modview is a utility designed by Arcom Control Systems to aid in testing and debugging Modbus
communications networks. Modview runs under Microsoft Windows 3.1 or 95 and provides a
very flexible interface to poll Modbus devices and view the data in a variety of data formats.
Some uses for Modview include:
Troubleshoot communication between a PC and a Modbus RTU or PLC over many types
of communication links
Throughout this manual, the terms "field device" and "field unit" are used to describe any Modbus
slave device being polled by the Modview program, and may be considered synonymous with the
terms PLC or RTU.
Modview is based on a concept called 'Templates'. A Modview template is a file containing a list
of Modbus registers to be polled, data type, and RTU/PLC slave address. In the Design window,
the Templates are created and saved to disk. In the Data window, the slave device(s) are polled
using the registers in the current Template and the resulting data are displayed. Values can also be
written to the Modbus slave devices.
Modview supports standard Modbus RTU (Binary) protocol over a serial port and encapsulated
within TCP/IP packets, but it does not support Modbus ASCII protocol.
Chapter 7: Troubleshooting Modview answers the commonly asked technical questions on the
Modview software.
Chapter 8: Modload Utility provides instructions on using Modload to download files to a
ModFile compatible device, such as HtNode and HtMux.
CHAPTER 2
2 Installation
This chapter describes the process of installing the Modview software.
For best viewing, you may need to configure Windows for a higher screen resolution.
Modview is a 16-bit application and may not run under Windows NT.
You will be prompted for registration information. Enter your name and company.
There are two types of installations using the Modview setup program. The first is Full
Installation, which should normally be used. If Modview or Arcoms RTU Configurator software
has already been installed, the Add-on SmartTool Installation can be used. This will skip
installation of Disk2, which contains DLLs which should have already been installed. If you are
not sure about which installation to use, choose Full Installation.
If you are using Arcom's Modload, HtNode, HtMux, or UCG products, you may need the
additional "SmartTools" contained on the Modview diskettes. Click the checkbox labeled Install
additional Arcom SmartTools to install these programs.
The installation program will begin installation and prompt you to insert the second disk.
/L:500
If you are using Windows 3.11 or earlier, you will need to reboot the computer after modifying the
AUTOEXEC.BAT file.
After installation is complete, Modview setup will add shortcut icons to the Arcom Utilities
program group under Windows Program Manager, or in the Windows 95 Start menu.
Disk 3 of Modview contains two self-extracting ZIP files called TEMPLATE.EXE and
MODVDOCS.EXE. The TEMPLATE.EXE contains sample Modview templates for use with
certain systems, and MODVDOCS.EXE contains the Modview manual in a Microsoft Word
format.
Copy these two files from Disk 3 to the directory where Modview was installed, and double-click
on each of them in Windows File Manager or Explorer to extract the sample templates and
documentation into that directory.
2.3 Registration
Modview is currently provided as "Freeware" or "Shareware". As such, there is a registration
required for long-term use of the software. All functionality is available without registering.
However, while polling devices in Data mode, Modview will occasionally stop polling and display
a floating button asking you to register, which will go away after 15 seconds. To register the
Modview software, select "Register" under the Help menu or click on the floating "Register"
button.
A registration number will be displayed and you will be prompted to enter the PEC (Product
Enabling Code) to register the software. With this dialog box open, call Arcom Control Systems or
send E-mail or a FAX with the registration number shown on the screen, and you will be given the
PEC code.
Note: The registration number and PEC are randomly generated every time you
select the Register option. If you are sending E-mail or FAX, you must leave this
Register dialog box open until you receive your PEC code from Arcom.
CHAPTER 3
3 Designing Modview Templates
This section describes the procedures for creating templates which will cause Modview to request
data from a Modbus slave device.
3.1 Concepts
The Template files created by Modview are based on Microsoft Access 1.1 databases. Each row in
the grid defining a Modbus register is a record in the database, and the column headings identify the
fields for each record.
Modview uses the information in the database to build the Modbus polls that are sent to the device,
and to display the data that is returned. Modview allows you to specify one global slave unit, or if
the communication network is a multidrop circuit Modview can poll multiple slaves
simultaneously.
Below is the opening screen that appears when Modview is run. You will either create a new
template or open one that has been provided.
Function
Open template file
Shortcut Key
Ctrl-N
Open Template
Ctrl-O
Exit
Close Modview
Alt-F4
1-9
Toolbar Button
Select the New Template option to create a blank template, or Open Template to open an existing
one. The figure below shows the template named MYFIRST.TLE in Design mode, where the
templates are edited.
The toolbar for the Design mode is shown below, with the buttons labeled. Right-click on the
buttons, and a description of the button appears at the bottom of the Modview window.
Number Maker
Override all slave
addresses
Open Template
New Template
Switch to Data Mode
The Slave item for each row can be left blank if you will always use the "Override Slave with"
option to send all polls to the same field unit.
The DataType column tells Modview how to display the data it retrieves from the field unit. These
data types are described below.
10
16-bit Integer
16-bit Unsgnd
Boolean(0=OFF)
IEEE 754-Float
32-bit IEEE 754 floating point number. Modview reads two registers
and displays them as a floating point. This same convention is used by
many SCADA packages, field units, and DCS systems. An option
provides for swapping the position of the first and second registers.
ASCII 8-byte
Note: In the current release of Modview (version 1.02), the ASCII data is displayed
with the lower 8 bits in each register being the first ASCII character and the upper 8
bits being the next character. There is currently no provision for swapping the bytes.
Under the Options column you can select whether Modview treats the register as Read-only (RO)
or Read-Write (R/W). If R/W is selected and the device supports writing to that register, you can
enter a new value for the register while in Data mode and Modview will send the new value to the
field device.
The Use box tells whether Modview will actually poll for this register or not. Click in the box to
change this option. A blue check mark indicates that Modview will poll, and a red 'X' will keep
Modview from polling. This option is used mainly for disabling certain registers if, for instance,
you want to increase the speed of polling on other registers.
The Comment column is used to enter more detailed descriptions of each data point. The
maximum number of characters allowed in this field is 255.
Select any cell containing data by clicking it. Click again to edit the data, or in some columns you
can just start typing to replace existing data. To add a new row, click or move the cursor to the last
defined row, press the down arrow to add a new row, and begin entering data for the new record.
Several functions are available to manipulate rows, most of which require selecting a row. A whole
row can be selected by moving the mouse pointer to the leftmost side of the row, where the pointer
changes to a check mark. Commands under the Edit menu which may be used are:
Edit Menu:
Copy Record
Ctrl-W
11
Paste Append
Increment
Record
Ctrl-R
After copying, this will paste the record to the end of the
list and increment the register number. (There is currently
no facility to copy and paste without incrementing.)
Delete Record
Ctrl-D
Fill
Ctrl-F
The Fill menu is shown below. You can select the starting register, number of registers to add, the
data type, and Read-Only or Read/Write option.
Click on one of the buttons to bring up a menu for defining the button parameters.
12
Enable
Caption
Modbus Register
Modbus register into which data will be written; such as 40,001 for the
first holding register and 1 (or 00,001) for the first coil.
Value to write
This value will be written into the register when the button is pressed in
Data mode.
ForeColor
This is explanatory text that will appear at the bottom of the screen
when the button is pressed, to give the user more information.
Scroll bar
The picture below shows the Modview window in Data mode with only two buttons defined. The
buttons which are disabled disappear from the screen in Data mode.
Note: When the "Override Slave With" checkbox is UNchecked (allowing multiple
slave devices to be polled, all command buttons are disabled.
13
When a button is pressed in Data mode, a window similar to the following will appear, asking to
confirm whether or not to send the data to the field device. Press the Yes button to send the
command, or press No or Cancel to exit without sending the command.
14
CHAPTER 4
4 Communications Setup
Several options are provided for configuring Modview. These options under the Configure menu
are listed as follows, with their shortcut keys and button bar icons:
Configure Menu:
Menu Option
Function
Configure communication
Communication
parameters
Shortcut Key
F3
Preferences
Select preferences
F4
TCP/IP
F5
Toolbar Button
(in Configure
Communication menu)
15
Word Length
Stop Bits
Parity
Baud Rate
Flow Control
Delay between individual Number of seconds between the receipt of one response and the sending
of the next poll. Values allowed are 0 to 30 seconds.
polls
Delay after completing
all polls
Also called poll cycle delay, this is the number of seconds after
completing all the defined polls until beginning the sequence again.
Values allowed are 0 to 21,600 seconds (6 hours).
16
TIP: Setting the Maximum Block Size to 0 will force Modview to send a separate poll
for every active row in the data grid, even if one register is listed more than once. This
might be useful if a set polling sequence of registers is required.
This and the following option can be used to simulate how field devices
handle the introduction of noise immediately preceding or following the
Modbus message, such as the noise introduced by radio key-up or
squelch tails. Modview will randomly generate 8-bit byte values up to
the configured number of leading noise bytes, and add them to the
message just preceding the Modbus address byte. Values allowed are 0
to 8.
17
Some recommended modem parameters are listed below, which may need to be applied to both the
host and remote modems. See modem documentation for details on how to set these. Some of
these settings may not be necessary and additional parameters may be required for certain types of
modems.
18
Hang up when DTR drops (host modem only; depends on host software)
Ignore DTR
CD Override
Dial Out
Configuration
This button
opens the modem configuration
window. This box can be used to set the required parameters for the
modem as described above.
Modem
Initialization
String
Use this option to set the initialization string for the modem (the "Dial
Modem Before Starting" checkbox must also be selected).
The dialog box shown is for example only and may not represent the
correct initialization string for any particular type of modem.
Phone Number
to Dial
Delay between
dialing and
polling
19
Swap registers
for Floating
Point conversion
The Modicon Modbus protocol specification doesn't allow for 32bit numbers such as IEEE floating point or long integer. Modview
supports the de-facto standard of 32-bit numbers used by many
other SCADA vendors that retains full protocol compatibility with
Modicon Modbus. Instead of adding new function codes or register
types to the Modbus protocol for floating point and long integer,
two standard 16-bit numbers are used to represent one 32-bit entity.
Modview, or any other host application, reads the two registers and
converts them back into their 32-bit representation.
Because of the absence of a standard in this area, some SCADA
vendors have adopted different schemes to represent 32-bit
numbers. Some of these make the first register the least-significant
word (LSW) and the second register the most-significant word
(MSW). This is Modview's standard method of representing 32-bit
IEEE floating point. The option in Modview to "Swap registers for
Floating Point" allows support for other systems which reverse the
order of the registers.
For example, if an IEEE floating point number is requested from
register 42,049, Modview will request registers 42,049 and 42,050.
The resulting number will be displayed using register 42,049 as the
lower 16 bits and register 42,050 as the upper 16 bits.
Note: A few vendors use different data structures that are not supported by Modview.
For example, the version of Modbus IEEE floating point used by Bristol Babcock
RTUs reverses the 8-bit bytes within each register.
Swap registers
for Long Integer
conversion
20
4.2 Preferences
The Preferences menu provides some display options and other settings that affect how data is
acquired and displayed. Select Preferences under the Edit menu or click the
toolbar.
button on the
The Display (Color or Black & White) option was intended to provide a display option for black
and white displays, but it does not have any effect in the present version of Modview.
The Grid Lines option turns on or off the display of horizontal and vertical grid lines in the data
grid portion of the Modview window.
The DDE option allows data from Modview to be echoed to another DDE-aware application in
Windows. In the present version of Modview, the DDE supported is not the complete
implementation of DDE. In order to get live updates of the data in Modview into another
application, some portion (even a small area) of the cell in the Modview grid containing that value
must be visible on screen.
Note: When using the DDE option, only 128 records in the Modview data grid will be
used. All rows below this will not be polled when DDE is enabled.
Clicking on the Enable checkbox for DDE brings up the following menu, giving instruction on the
use of DDE references to Modview within another application. Refer to the application's
documentation for more information on the format of DDE references within that application.
21
The Preferences option listed as Grid Writes/Confirm will, if enabled, request confirmation of
data written to the device when entered manually into the Modview data grid.
The Display & DDE Refresh Rate option specifies how often data is updated in Modview. The
default option is to update the grid after completion of all polls. In some situations, due to long
delays or a large poll list, this option may need to be set to refresh after a certain interval (in
seconds). The values allowed for this option are 1 to 9 seconds.
The last option under Preferences is the selection of Serial Binary Modbus (default) or TCP/IP
Modbus. Normally you will use serial Modbus unless the field device is connected via a TCP/IP
network and is capable of communication with this protocol. See the next section for more
information on this option.
22
4.3 TCP/IP
In addition to standard serial Modbus, Modview can also use a protocol known as "TCP/IP
Modbus" which is now supported by a number of DCS and SCADA vendors. TCP/IP Modbus
encapsulates the standard Modbus protocol messages within a TCP/IP transport layer. This
protocol format allows a powerful range of options, such as RTUs and other Modbus-capable
devices networked together on an Ethernet LAN; and TCP/IP connectivity to field devices via
satellite from a Modbus host.
In Modview, TCP/IP Modbus is selected in the Preferences menu (as opposed to the standard
Serial Binary Modbus). An additional menu, shown below, is provided to configure the TCP/IP
parameters. This sub-menu is selected either from the Edit menu, or from the TCP/IP button in the
Configure Communication Parameters dialog box.
The TCP/IP Configuration menu allows the TCP/IP address to be defined for the slave device
Modview should poll, and the IP port number on the receiving device that supports Modbus
protocol. Consult documentation on the field device being used to determine these addresses and/or
how to configure them in the device.
Note: the field device(s) will also have a Modbus slave address between 1 and 255 which should be
specified in the data grid of Modview, just like standard serial Modbus devices.
23
RS-232 DB-9
Pin 3 TXD
Pin 2 RXD
Pin 5 GND
Pin 7
Pin 8
Pin 4
Pin 1
RTS
CTS
DTR
DCD
or
RS-232 DB-25
Pin 2 TXD
Pin 3 RXD
Pin 7 GND
Pin 4
Pin 5
Pin 20
Pin 8
RTS
CTS
DTR
DCD
If the connection is direct RS-232, the handshaking lines (RTS/CTS, DTR/DSR) are not necessary
and should be omitted for simplicity in troubleshooting. When connection from the PC is to a
modem, handshaking may be required. Because of the many different options available for
communication networks, all possible configurations are not shown here. Consult modem or other
hardware documentation to verify pin-outs, configuration, and cabling details.
24
CHAPTER 5
5 Polling Field Units
The defining of polls described in an earlier section was done with Modview in the Design mode.
After the polls have been defined, the communication parameters have been set, and the physical
link has been established to the device, you are now ready to begin polling.
25
Switching back to Design mode can be accomplished by selecting that option under the View menu,
pressing the F9 key, or by clicking the
Number Maker
Open Windows Calculator
Comms Status Window
Open Template HelpNotes
26
A number can be entered in decimal or hexadecimal and the same number will be reflected in the
other formats. The number can also be entered in binary by clicking on the bits to change them
from 1 to 0 or 0 to 1.
The Number Maker can be used simply as a utility to convert between decimal, hexadecimal, and
binary. Pressing Exit will close the dialog box without any effect.
However, if you want to send the number to the field device, click on the "Update Grid on Exit"
checkbox. When the Exit key is pressed, the value will be sent to the register that was active. This
feature only works when the register is specified as an unsigned 16-bit integer, Modview is in Data
mode, the register is read/write, and the value was selected in the data grid before opening the
Number Maker.
5.3 Diagnostics
Modview provides many diagnostic tools that assist in debugging the Modbus communications.
At the bottom right-hand side of the Modview window in Data mode, there are two numbers. The
blue number on the right indicates the total number of polls sent, and the red number on the left
indicates the number of failed polls. Both numbers are reset every time Modview is switched from
Design mode to Data mode, and they wrap around to zero after reaching 100,000. These
indications can be used to diagnose intermittent communication problems or to calculate percentage
throughput on the communication network.
Clicking on the number of total polls also yields additional statistics on the communication:
Clicking on the large text area at the bottom of the Modview screen tells information about the
current communication settings.
27
A very powerful tool is the Debug window, which shows the actual polls sent by Modview and the
responses received from the field device. The Debug window is opened by selecting it from the
View menu or by pressing Ctrl-B.
When polling is started by switching to Data mode, the Debug window shows the initial
communication parameters it is using and the polls which will be sent. The following example is
typical:
28
Some ways to use the Debug window for diagnostic purposes are:
1. Use the Debug window to monitor the polls going out and check what is the response to the
polls.
If a "Requested" message goes out with no "Received", then the poll has timed out. Verify the
field device address, baud rate, cable connection, etc. If lower baud rates are used, the problem
may be that Modview has built a large poll and has timed out before all the response can be
received. Try increasing the response timeout.
2. Keep the Debug window open and switch back to Design mode, allowing you to scroll up in the
list of most recent polls.
3. The text within the Debug window can be selected with the mouse, copied with Ctrl-C, and
pasted into another text application.
Sample template that comes with Modview listing a few I/O points of
various data types. The original intent of this template was to be used with
Arcom's M1 RTU.
SCNNODE1.TLE
29
Begin polling, and scroll through the list of registers to see which ones
have a value shown. These are the devices which are responding to
Modbus polls. If a particular device doesn't respond as expected, try
checking the cabling or change the communication setup in Modview to a
different baud rate, etc.
This template assumes that the device being polled has a register defined at
the first holding register location, typically register 40,001 in standard
Modicon Modbus format (using Modbus command 03.)
30
SCNNODE2.TLE
SCNNODE3.TLE
HT-DATA.TLE
Used to view and/or change static device data on a Hart device connected
to the HtNode or HtMux (release 5.0).
HTMUXCFG.TLE
HTMUXCHN.TLE
HTMXSTUS.TLE
EXAMPLE1.TLE EXAMPLE3.TLE
3095LOG1.TLE
and
3095LOG2.TLE
Used with the 3095 Default configuration for HtNode (release 5.0) to
retrieve historical log records from a Rosemount 3095FT flow transmitter.
M1-HART.TLE
M1HARTPV.TLE
SHIM.TLE
DE.TLE
DE_PVS.TLE
CHAPTER 6
6 Modbus Overview
Modview was designed to generally follow the Gould Modbus protocol specification (protocol
document PI-MBUS-300 Rev. B, Copyright 1985, Gould Inc.). This chapter briefly describes
the function codes implemented and other relevant protocol information related to Modview. More
details about the Modbus protocol specification can be obtained from Schneider Automation, Inc.
Registers
00,001 - 09,999
Meaning
Read Coil Status (ON/OFF) of group of coils
02
10,001 - 19,999
03
40,001 - 49,999
04
30,001 - 39,999
05
00,001 - 09,999
06
40,001 - 49,999
31
Poll:
Address
Function
01
01
Data
Start
High
00
Data
Start Low
Num of
registers High
Num of
registers Low
CRC
CRC
04
00
18
7D
C1
Response:
Address
01
Function
01
Byte Count
03
Byte #1
09
Byte #2
01
Byte #3
84
CRC
ED
CRC
BF
Poll:
Address
Function
05
02
Data Start
High
00
Data
Start Low
50
Num of
registers High
00
Num of
registers Low
14
CRC
CRC
79
90
Response:
Address
05
32
Function
02
Byte Count
03
Byte #1
01
Byte #2
00
Byte #3
08
CRC
29
CRC
CC
Poll:
Address
Function
C0
03
Data Start
High
01
Data
Start Low
7F
Num of
registers High
00
Num of
registers Low
02
CRC
CRC
E4
FE
Response:
Address
Function
C0
03
Byte
Count
04
Register
#1 High
00
Register
#1 Low
41
Register
#2 High
07
Register
#2 Low
FF
CRC
CRC
38
9B
Poll:
Address
Function
10
04
Data Start
High
00
Data
Start Low
79
Num of
registers High
00
Num of
registers Low
02
CRC
CRC
A3
53
Response:
Address
Function
10
04
Byte
Count
04
Register
#1 High
00
Register
#1 Low
64
Register
#2 High
0F
Register
#2 Low
FF
CRC
CRC
FE
EA
33
Poll:
Address
Function
01
05
Data Start
High
00
Data Start
Low
00
Data
ON/OFF
FF
Data
CRC
CRC
00
8C
3A
Data Start
High
00
Data Start
Low
00
Data
ON/OFF
FF
Data
CRC
CRC
00
8C
3A
Response:
Address
Function
01
05
Poll:
Address
Function
01
06
Data Start
High
00
Data Start
Low
00
Data Value
High
03
Data Value
Low
E8
CRC
CRC
89
74
Data Start
High
00
Data Start
Low
00
Data Value
High
03
Data Value
Low
E8
CRC
CRC
89
74
Response:
34
Address
Function
01
06
The following two commands are not implemented in Modview because there is currently no
provision to execute these commands, and the Modbus exception response is not displayed in
Modview. They are described here for reference purposes only.
Poll:
Addr
Func
01
0F
Coil#
High
00
Coil#
Low
0A
Qty of
coils High
00
Qty of
coils Low
0C
Byte
Count
02
Byte
#1
95
Coil#
High
00
Coil#
Low
0A
Qty of
coils High
00
Qty of
coils Low
0C
CRC
CRC
75
CC
Byte
#2
02
CRC
CRC
0B
8B
Response:
Addr
Func
01
0F
Poll:
Addr
Func
01
10
Reg#
High
09
Reg#
Low
B8
Qty
High
00
Reg#
High
09
Reg#
Low
B8
Qty
High
00
Qty
Low
02
Byte
Count
04
Data
High
00
CRC
CRC
C2
71
Data
Low
00
Data
High
40
Data
Low
00
CRC
CRC
A2
ED
Response:
Addr
Func
01
10
Qty
Low
02
35
Poll:
Address
Function
0B
01
Data Start
High
00
Data
Start Low
04
Num of
registers High
00
Num of
registers Low
18
CRC
CRC
Response:
Address
0B
Function
81
Exception Code
xx
CRC
CRC
The xx above will be a one byte exception code. Some standard exception codes are shown in the
table below. Other exception codes may be valid depending on the type of slave device.
Name
Illegal Function
Meaning
Poll function was not an allowable action for the
addressed slave.
02
03
04
Device Failure
Code (xx)
01
36
05
Acknowledge
06
Busy, Rejected
Message
07
Negative
Acknowledgement
Memory Parity Error
08
37
CHAPTER 7
7 Troubleshooting Modview
Some of the commonly asked questions regarding installation and use of Modview are listed below,
along with suggested solutions to these problems. For further technical support contact Arcom
Control Systems at the addresses listed at the beginning of this manual.
Using Windows 3.1 File Manager or Windows 95 Explorer, view the contents of
C:\Windows\System and check the date of MSCOMM.VBX. The version that Modview
requires is dated 4/28/93 12:00AM. If another MSCOMM.VBX file is located here, move
it to another temporary location.
Keep the other version of MSCOMM.VBX until you can be sure that no other program
that was using it will be affected by the change.
Modview gives the error "Error (68 - Device unavailable). You are trying to use COM 1" when
switching from Design mode to Data mode.
Another program may be using the COM port. The error dialog box tells the COM port
that is in use. Check the Communications setup and select another COM port, or close the
program that is using it.
Occasionally Windows drivers get confused and cause the COM port to be disabled, and
you may have to reboot the computer.
If another program grabs control of the COM port on starting Windows and it can't be
closed, you may have to remove that program from the Startup icon of Windows so that it
doesn't start automatically on startup.
38
You may not have clicked Enable when setting up the command button.
If you have configured and Enabled the desired command buttons, make sure that the
"Override Slave with" box is checked. The command buttons don't work unless this is the
case, because Modview uses the global slave address to send the poll defined in the
command button.
Some registers indicate "Not Polling" in the Value column in Data Mode.
Switch to Design mode and check the row defining that register -- the register field may be
blank or invalid, or the 'Use' column may be blank or disabled with a red X.
If the "Override Slave" box is UNchecked then the slave address field may be blank (if
Override Slave is turned on, then the slave column can be left blank without affecting
communication).
If you have more than 128 rows defined in the data grid and the DDE option is enabled
under Preferences, the rows below 128 will indicate "Not Polling". Turn off the DDE
option to see all the data.
If the value being polled is IEEE floating point and the returned data is an invalid floating
point number or NAN (not a number), the value may show "Not Polling". Try creating a
new template with only one register. If the value shows "Not Polling", turn on the Debug
option to verify what data is actually being returned. Or change the data type to 32-bit
long integer and verify that polling is occurring in this case. Using IEEE floating point
data format, try changing the "Swap registers for Floating Point conversion" option to see
if data is returned correctly.
Try clicking with the mouse into each cell on the problem row(s) in the Modview grid, and
reenter the data to make sure everything is entered properly. Or, try entering a different
register value and data type in the row and attempt polling again.
If the above suggestions do not solve the problem, the template may be corrupt. Either
delete the problem row(s) in the Modview grid and add new ones to poll for the data, or
create a new template.
The DataType field has been left blank. Switch to Design mode and select a valid
datatype.
39
Check cabling -- there may be a broken wire, wrong polarity on the RS-232, or other
problems in the communication. To verify the correct connection of TX and RX lines on
RS-232, stop polling and measure each with a voltmeter; both pins 2 and 3 should have a
negative voltage less than -3 VDC with respect to ground. Also check that handshaking is
not being used, or is connected correctly.
Check the baud rate, parity, stop bits, and Slave address both in Modview and in the
Modbus slave device.
The response Timeout may be too short. This is especially a problem at slower baud rates
(2400 or lower). Try increasing Modview's Response Timeout option.
The COM port may be inactive. Occasionally communication drivers will conflict and fail
to work properly. Try rebooting the computer and the field device.
If all the registers from one RTU slave address are <Error> and another slave address
shows values, then there may be a communication problem to the one failed RTU (see
above).
Otherwise, this situation may be caused by a timeout problem on larger polls. This is
especially noticeable at slower baud rates. You may be able to verify if this is the problem
by opening the Debug window. If there are large blocks of data being returned followed by
a "CRC error", then Modview is timing out too soon for some polls. To correct this,
increase the Response Timeout or decrease the Maximum Block Size in the
Communication settings window.
If this doesn't correct the problem, it may be that Modview is set to poll for registers that
don't exist in the field device. Try reducing the Maximum Block size to 1 and poll again.
If some registers still appear as <Error>, check the hardware documentation to verify
whether those registers exist in the field device.
If the device uses non-standard Modbus (especially for such data types as floating point,
long integer, and ASCII), Modview may not be able to poll for this data. Some devices
which use two registers for one floating point number will not respond if the request does
not ask for even multiples of data starting at the correct address. Also, some devices which
mix non-standard data types in the holding register area will not respond if the poll request
crosses the boundary between different data types.
When switching to Data mode, a message appears at the bottom of the screen similar to the
following: "Trying to connect to Host = 204.70.188.10" and eventually times out.
40
Modview is configured to poll using TCP/IP Modbus and can't find the slave device. If
you are actually polling over a serial port, select the "Serial Binary Modbus" under the
Preferences menu.
See if you can connect to the device by some other means, such as using the Ping command
or Telnet to that IP address and Port number.
Make sure the host computer running Modview is able to reach the network of the remote
device using TCP/IP. This may require checking the TCP/IP setup in the host computer.
Make sure the device you are polling is connected to the network and that the Modbus
Slave address of the device is the same as that configured in Modview.
Make sure that the correct IP address is set in Modview, and that the Port number is the
correct Modbus Slave port on the remote device. Note: the Port number must be a valid
TCP/IP port which supports TCP/IP Modbus protocol on the remote.
If the remote device is simultaneously being polled on that same network port by another
Modbus host, maybe the device cannot support two simultaneous Modbus connections on
the same port. Check to make sure no other host devices are polling the remote at the same
time.
You get a "General Protection Fault" error while opening a configuration or when entering Data
mode.
or
You get a "53 File not found" error when trying to open or create a template.
Make sure you are not trying to run Modview on a Windows NT computer.
If you are using TCP/IP Modbus, set the protocol under Preferences to "Serial Binary
Modbus" and change the communication setting to a valid COM port that you know
doesn't have any Windows address or IRQ conflicts. It doesn't matter if there is no device
actually connected to that COM port. Leave the setting on serial Modbus until you have
resolved the General Protection Fault issue.
If this doesn't work, reboot the computer and try reinstalling Modview from the original
diskettes again.
If you are still getting the same error, there may be a corrupted system file which the
Modview installation program can't overwrite. Reboot the computer again, and open the
Windows Explorer or File Manager. View the contents of the Modview disks 1 and 2, and
note the files with a .DL_ or .VB_ extension. Under the C:\WINDOWS\SYSTEM
directory, locate all these files (which will have .DLL and .VBX extensions, respectively).
Move all of the files into a temporary directory which Windows allows you to move, reboot
the computer, and reinstall Modview.
41
42
If the error persists, there is a possibility that the original disks have been corrupted.
Obtain a new set of Modview diskettes from Arcom Control Systems and re-install.
CHAPTER 8
8 Modload Utility
As mentioned in the Installation chapter, Modview includes the option to install additional "Smart
Tools". If these tools are installed, their icons will appear along with the icon for Modview.
Historically these additional utilities were used for various purposes in some of Arcom products.
Currently, Modload is the only one of these utilities still being used. If you are using an Arcom
HtNode or HtMux, you will need Modload to download configurations to the multiplexer.
Modload is a utility to transfer a DOS file to and from a field device using Modbus protocol. This
is particularly useful when the file transfer must be done remotely, allowing a configuration to be
downloaded on the same serial port normally used by the SCADA host.
Modload Summary
43
The Local Dir is the local directory on your computer, from which you can select the subdirectory
and files to transfer. The Remote Dir is the remote directory of the field device you are
communicating with. Files may be transferred to or from the local directory, or they may be
deleted from the remote directory.
8.2 Configuration
You must select the Modbus address of the remote device you are communicating with. The
Modbus address must be a number between 1 and 255.
Next you must set up Modload for the correct communication parameters. This is similar to the
configuration done in Modview. Click on the Configure button
appears.
44
Set the baud rate, correct COM port, etc., for your local PC to match communication parameters
with the device you are connecting to. Press Done when finished.
45
During download, the menu will show the progress of the file download. Once the file has been
transferred completely, the remote directory will be updated, and a dialog box similar to the
following will appear.
46
Sometimes an error message "11-Division by Zero" appears during the first part of a file transfer.
This is not a fatal error -- just click on OK to continue the transfer. If you receive the message
"filename successfully downloaded", then you should not be concerned about having received the
error message.
If communication cannot be established with the remote device, or if the device does not support
ModFile protocol, you may receive the following error. To correct this error, try clicking the
Refresh Remote Dir button to make sure the communication link is available. You can also try
increasing the "Retries on NAK" or the "Timeout on NoReply" parameters in the Modload
configuration and trying the download again.
If you attempt to download a file to the Remote Directory that is zero bytes in length, the following
error message is given.
47
The file will be deleted, and Modload will then automatically refresh the Remote Dir window.
Files cannot be deleted from the Local Directory. This can be done instead through Windows File
Manager or Explorer.
48
The protocol must be robust, easy to understand, and usable within existing control network
schemes and have the following characteristics:
1. It must be independent of network topology and media.
2. It must be half duplex in nature, since a full duplex implementation would exclude many
existing network topologies.
3. It must have block transmission characteristics with automatic retry on bad or unacknowledged
blocks.
4. It must maintain a security level of at least a CRC16 algorithm level of statistical integrity.
In order to meet these conditions, Modbus binary protocol with some defined extensions has been
chosen. It fulfills the criteria stated above with the additional inherent advantage of using the
structure of Modbus protocol, which is the de facto standard protocol in use by many modern
SCADA systems.
The following sections define the extended Modbus function codes that will be used to implement
the file download mechanism.
49
Function
Code
File Name
Low Byte
NULL
File Size
Low Byte
File Size
Field Name
Addr
Function Code
File Name
Month
Day
Year
Hour
Minute
# of Blocks
File Size
CRC16
File Name
High Byte
Month
File
Name
Day
File Size
File
Name
Year
File Size
High Byte
Field Width
1 Byte
1 Byte
9 Bytes
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
2 Byte Integer
4 Byte Long
2 Bytes
File
Name
File
Name
Hours
Minutes
CRC 16
CRC 16
File
Name
File
Name
# of Blocks
High Byte
# of Blocks
Low Byte
Description
Desired Remote Unit Address, 1-255
Function code of 16 hexadecimal (22 decimal)
8-byte NULL terminated ASCII file name
Month field of file downloaded
Day field of file downloaded
Year field of file downloaded
Hour field of file downloaded
Minute field of file downloaded
Total # of blocks in file downloaded
Size of file to download in bytes
CRC16 Code
Func
Code
Field Name
Addr
Func
Result Code
50
Result
Code
File Size
Low Byte
Field Width
1 Byte
1 Byte
1 Byte
File
Size
File
Size
File Size
Hi Byte
CRC16
CRC16
Description
Responding Remote Unit Binary Address
Function Code of 16 hexadecimal (22 decimal)
0 = Ready to begin transaction
1 = File system busy.
2 = Not enough room on filing system.
File Size
CRC16
4 Byte Long
2 Bytes
Func
Code
Block #
Hi Byte
Field Name
Addr
Func
Block Number
Number of Bytes
Data
CRC16
Block #
Lo Byte
Field Width
1 Byte
1 Byte
2 Bytes
1 Byte
1-245 Bytes
2 Bytes
# of
Bytes
Data
Byte #n
zzz
Data Byte
#n+Num
CRC16 CRC16
Description
Desired Remote Unit Address 1-255
Function Code of 17 hexadecimal (23 decimal)
Block Number of Data Contained in Query
Number of Data Bytes Contained in Data Block
File Data Associated with Block #
CRC16 Code
Func
Code
Field Name
Addr
Func
Block Number
Result Code
Block Number
Hi Byte
Field Width
1 Byte
1 Byte
2 Bytes
1 Byte
Block Number
Lo Byte
Result
Code
CRC16
CRC16
Description
Responding Remote Unit Address
Function Code of 17 hexadecimal (23 decimal)
Block Number of Data Block of this response.
0 = Ack and Continue
1 = Wack - File System Busy, Resend block again.
2 = Nak. Block out of order.
51
CRC16
2 Bytes
Example:
Addr
03
Func
Code
17
Block #
Hi Byte
00
Block #
Lo Byte
01
# of Bytes
F5
Data Byte
#n
7e
zzz
Data Byte
#n+Num
8f
CRC16
CRC16
In this example, the first data block is being transmitter to remote unit 03. The block # is 1, for 245
(0xF5).
Upon receiving this block of data, the remote unit will respond with:
Addr
Func Code
03
17
Block Number
Hi Byte
00
Block Number
Lo Byte
01
Result
Code
0
CRC16
CRC16
The result code of 0 indicates that data block #1 was received without error and that the next data
block may be transmitted.
52
Func
Code
File Name
High Byte
NULL
CRC16
CRC16
Field Name
Addr
Func
File Name
CRC16
Field Width
1 Byte
1 Byte
9 Bytes
2 Bytes
File
Name
File
Name
File
Name
File
Name
File
Name
File
Name
File Name
Low Byte
Description
Desired Remote Unit Binary Address 1-255
Function Code of 18 hexadecimal (24 decimal)
8 byte NULL terminated ASCII File Name
CRC16 Code
Func
Code
Field Name
Addr
Func
Result Code
File Size
CRC16
Result
Code
File Size
Low Byte
Field Width
1 Byte
1 Byte
1 Byte
4 Byte Long
2 Bytes
File
Size
File
Size
File Size
High Byte
CRC16
CRC16
Description
Responding Remote Unit Binary Address
Function Code of 18 hexadecimal (24 decimal)
0 = Ready to begin transaction
1 = File system busy.
2 = File Not Found.
Number of Bytes in file to receive.
CRC16 Code
53
Func
Code
Block Number
High Byte
Field Name
Addr
Func
Block Number
Query Code
Field Width
1 Byte
1 Byte
2 Bytes
1 Byte
CRC16
2 Bytes
Block Number
Low Byte
Query
Code
CRC16
CRC16
Description
Responding Remote Unit Address
Function Code of 19 hexadecimal (25 decimal)
Block Number of Next Data Block to receive
0 = Send Next Sequential Data Block
1 = Send Last Data Block
CRC16 Code
Func
Code
Field Name
Addr
Func
Block Number
Number of
Bytes
Data
CRC16
54
Block #
Hi Byte
Block #
Low Byte
# of
Bytes
Data
Byte #n
CRC16
CRC16
#n+Num
Field Width
1 Byte
1 Byte
2 Bytes
1 Byte
Description
Desired Remote Unit Address 1-255
Function Code of 19 hexadecimal (25 decimal)
Block Number of Data Contained in Query
Number of Data Bytes Contained in Data Block
1-245 Bytes
2 Bytes
Func
Code
Field Name
Addr
Func
Reset File
Pointer
Reset File
Pointer
NULL
Field Width
1 Byte
1 Byte
1 Bytes
CRC16
NULL
NULL
CRC16
CRC16
Description
Desired Remote Unit Address 1-255
Function Code of 1A hexadecimal (26 decimal)
A non-zero value in this field will reset the file
pointer to the beginning of the directory. A zero
value will obtain the next file in the list.
CRC16 Code
2 Bytes
NULL
Func
Code
File Name
High Byte
File Size
Low Byte
Seconds
File
Size
File Type
Field Name
Addr
Func
File Name
NULL
File Size
Month
Day
Year
Hours
Minutes
Seconds
File Type
CRC16
File
Name
File
Size
CRC16
Field Width
1 Byte
1 Byte
8 Bytes
1 Byte
4 Bytes
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
2 Bytes
File
Name
File Size
High Byte
File
Name
Month
File
Name
Day
File
Name
File
Name
File
Name
Year
Hours
Minutes
CRC16
Description
Responding Remote Unit Address
Function Code of 1A hexadecimal (26 decimal)
8 Byte ASCII filename. Null value if end of file list.
Null value always.
Unsigned long integer file size in bytes. Zero if end of file
list.
CRC16 Code
55
Func
Code
File
Name
Filename
High Byte
File Name
Low Byte
Field Name
Addr
Func
File Name
CRC16
File
Name
File
Name
File
Name
File
Name
File
Name
CRC16 CRC16
Field Width
1 Byte
1 Byte
8 Bytes
2 Bytes
Description
Responding Remote Unit Address
Function Code of 1B hexadecimal (27 decimal)
8 Byte ASCII filename.
CRC16 Code
56
Func
Code
Result
Code
Field Name
Addr
Func
Result Code
Field Width
1 Byte
1 Byte
1 Byte
NULL
CRC16
3 Bytes
2 Bytes
NULL
NULL
NULL
CRC16 CRC16
Description
Responding Remote Unit Address
Function Code of 1B hexadecimal (27 decimal)
0 = File removed successfully
255 = Error encountered during remove.
Null value always.
CRC16 Code