You are on page 1of 62

Modview

Operation Manual

Release 1.5
December, 1999

ARCOM CONTROL SYSTEMS, INC.


13510 SOUTH OAK STREET
KANSAS CITY, MISSOURI 64145
PHONE 1.816.941.7025
FAX 1.816.941.0343

ARCOM CONTROL SYSTEMS, LTD.


CLIFTON ROAD
CAMBRIDGE CB1 4WH
UNITED KINGDOM
PHONE +44.1.223.411200
FAX +44.1.223.410457

Modview Operation Manual

Modview
Operation Manual

Copyright Arcom Control Systems, Inc. 1997-1999

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

Arcom Control Systems

Modview Operation Manual

REVISION HISTORY

Release

Revisions

Date

1.0
1.1
1.2
1.3
1.4
1.5

Initial release of Modview Manual


Minor revisions, added Modload documentation
Minor revisions
Fully reformatted
Modload summary instructions
Added troubleshooting information

July, 1997
January, 1998
February, 1998
March, 1998
September, 1999
December, 1999

ii

Arcom Control Systems

Modview Operation Manual

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

Designing Modview Templates ....................................................................................................... 8


3.1
3.2
3.3
3.4
3.5

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

Polling Field Units ......................................................................................................................... 25


5.1
5.2
5.3
5.4

Switch to Data Mode ................................................................................................................................ 25


Writing Data to Field Units ...................................................................................................................... 26
Diagnostics............................................................................................................................................... 27
Standard Templates .................................................................................................................................. 29

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

Troubleshooting Modview ............................................................................................................ 38

Modload Utility ............................................................................................................................. 43

Arcom Control Systems

iii

Modview Operation Manual

8.1 Starting Modload...................................................................................................................................... 44


8.2 Configuration ........................................................................................................................................... 44
8.3 Reading Directory..................................................................................................................................... 45
8.4 Transferring Files ..................................................................................................................................... 46
8.5 Deleting Remote Files............................................................................................................................... 48
8.6 ModFile Protocol (Specification)............................................................................................................... 49
8.6.1
Command 22 - Initiate File Write................................................................................................... 50
8.6.2
Command 23 - Write Data Block.................................................................................................... 51
8.6.3
Command 24 - Initiate File Read.................................................................................................... 53
8.6.4
Command 25 - Read Data Block..................................................................................................... 54
8.6.5
Command 26 - Directory Request ................................................................................................... 55
8.6.6
Command 27 - Remove File ........................................................................................................... 56

iv

Arcom Control Systems

Modview Operation Manual

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

Act as a simple SCADA interface to a network of Modbus devices

Configure devices via Modbus registers

Poll Modbus devices over a TCP/IP network connection.

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.

A summary of the chapters in this manual follows:


Chapter 2: Installation describes installation and registration of the software.
Chapter 3: Designing Modview Templates provides instruction on creating Modview Templates.
Chapter 4: Communications Setup tells how to set up parameters for communication with the field
devices.
Chapter 5: Polling Field Units details the polling process and the communication diagnostics
available in Modview.
Chapter 6: Modbus Overview gives a brief review of the Modbus protocol.

Arcom Control Systems

Modview Operation Manual

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.

Arcom Control Systems

Modview Operation Manual

CHAPTER 2
2 Installation
This chapter describes the process of installing the Modview software.

2.1 System Requirements

386/486 or Pentium with at least 4Mb of RAM

Windows 3.1, Windows for Workgroups (3.11), or Windows 95

4 Mb free hard disk space

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.

2.2 Installation of Software


Modview is supplied on two diskettes which are installed similar to most Windows applications.
Insert Disk1 and run A:\SETUP.EXE. Modview can be installed to any directory, but the
recommended installation directory is shown as follows:

You will be prompted for registration information. Enter your name and company.

Arcom Control Systems

Modview Operation Manual

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.

Arcom Control Systems

Modview Operation Manual

After installation of Disk 2 is complete, you will be prompted to make a change to


AUTOEXEC.BAT.

Note: This change to AUTOEXEC.BAT is required for use of Modview with


Windows 3.11 or earlier, but is not required for use with Windows 95/98.
Replace the <PATH> in the statement above with the actual path of the SHARE.EXE program.
The actual command line added to your AUTOEXEC.BAT will be something like:
C:\DOS\SHARE.EXE

/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.

Arcom Control Systems

Modview Operation Manual

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.

Arcom Control Systems

Modview Operation Manual

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.

Arcom Control Systems

Modview Operation Manual

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.

Arcom Control Systems

Modview Operation Manual

3.2 File menu


In the File menu, the following options are available. Corresponding shortcut keys and toolbar
buttons are also shown. Options 1-9 list the most recently opened template files.
File Menu:
Menu Option
New Template

Function
Open template file

Shortcut Key
Ctrl-N

Open Template

Create new file

Ctrl-O

Exit

Close Modview

Alt-F4

1-9

Open most recent files


up to 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.

Arcom Control Systems

Modview Operation Manual

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

Open Windows Terminal


(Windows 3.1 only)

Open Windows Calculator


Configure Communication
Preferences
Open Template HelpNotes

3.3 Set up Poll Records


Below the toolbar is the main data window, which is called the "data grid". Each row, or "record",
defines a register to poll from the slave field unit.
The Name column is text used to identify each register being polled. The maximum number of
characters allowed in this field is 63.
The Slave column is the Modbus slave address of each field unit being polled. Note that each row
can have a different slave address, from 1 to 255.
The Register is the Modbus register number, following the Modicon standard convention:
00,001 to 09,999
10,001 to 19,999
30,001 to 39,999
40,001 and higher

Coils (digital, read/write)


Statuses (digital, read only)
Input registers (16-bit analog, read only)
Holding registers (16-bit analog, read/write)

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

Signed 16-bit integer, -32,768 to +32,767

16-bit Unsgnd

Unsigned 16-bit integer, 0 to 65,535

Arcom Control Systems

Modview Operation Manual

32-bit Long Int

Signed 32-bit integer, -2,147,483,648 to 2,147,483,647. Modview


polls two registers beginning at the specified register, and concatenates
those two 16-bit numbers into a 32-bit entity. An option provides for
swapping the position of the most-significant and least-significant
register.

Boolean(0=OFF)

Displays OFF for a 0, and ON for any number other than 0

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

Reads 4 registers and interprets each register as two bytes of ASCII


characters.

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

Arcom Control Systems

Ctrl-W

Copy entire record.

11

Modview Operation Manual

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

Delete the current record. (This deletes the row highlighted


in blue, not the row in which a single field may be selected.)

Fill

Ctrl-F

This will add a specified number of registers to the end of


the list. This option does not require selecting a row first.

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.

3.4 Command Buttons


Modview provides command buttons which are used to define up to 10 Modbus write commands.
These buttons are shown at the bottom of the screen in Design mode.

Click on one of the buttons to bring up a menu for defining the button parameters.

12

Arcom Control Systems

Modview Operation Manual

Enable

Enables/disables the command button.

Caption

This is the text that will appear on the button.

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

Changes the color of text on the button. Change this to enhance


readability.

Status Bar Text

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

Scroll to each Command Button you wish to program.

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.

Arcom Control Systems

13

Modview Operation Manual

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.

3.5 Modview Help


Modview provides several types of help for designing and using templates.
Name and Comment columns -- As described above, brief comments can be entered into the Name
and Comment fields for each data register, giving the user information on what each point does or
what data to enter into the register, etc.
Help Contents -- Press F1 or select Help, Contents to display some basic information about the
use of Modview.
Template HelpNotes -- Select this option from the Help menu. The Template HelpNotes section
is unique to each Modview template. The designer of the template can provide information to users
on how to use this particular template, or other relevant information. Users can also add to this
HelpNotes text at any time.

14

Arcom Control Systems

Modview Operation Manual

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

Set up TCP/IP Modbus


parameters

F5

Toolbar Button

(in Configure
Communication menu)

4.1 Configure Communications


Below is the window for the Configure Communication Parameters window. These configuration
parameters give you much control over how the Modbus poll commands are sent and received. The
various options are explained below.

Arcom Control Systems

15

Modview Operation Manual

4.1.1 Local Communication Parameters


Port

This is the local communication (COM) port on your PC being used to


poll the field device.

Word Length

Select 7 or 8 bit word length (typically 8).

Stop Bits

Select 1 or 2 stop bits (typically 1).

Parity

Select Even, Odd, or None (for no parity).

Baud Rate

Baud rate should match that of the device being polled.

Flow Control

Select the desired setting for flow control (typically None).

4.1.2 Timing Parameters


Response Timeout for
polls

Number of seconds that Modview should wait for a response to a poll


before retrying. Values allowed are 1 to 30 seconds.

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).

4.1.3 Modbus communication parameters


Maximum block size

Maximum number of registers that Modview will request in any poll.


The maximum number allowed is 124, since Modbus limits polls and
responses to 255 bytes.
When Modview is switched to Data mode, it examines the at the list of
registers defined in the data grid, and intelligently builds polls based on
the Maximum Block Size parameter. This option allows great
flexibility in customizing the polling scheme.
Values allowed are 0 to 124.
Examples:
1. You are polling for register 40,001 and 40,120 with the Maximum
Block Size set to 124. Modview will build a single poll to request

16

Arcom Control Systems

Modview Operation Manual

120 registers starting at 40,001. If you wish instead to force


Modview to send two separate polls, one for each register, set the
block size to less than 120.
2. You wish to limit the number of bytes in a response message to 25.
Set the maximum block size to 10 registers. (10 registers times 2
bytes per register, plus 5 bytes overhead for the Modbus protocol in
a response message.)
3. You want Modview to send a separate poll for each register in the
list. Set the Maximum Block Size to 1. If one register (such as
40,001) is listed twice in the data grid, Modview will only send one
poll command for 40,001 and display the returned value in both
records of the data grid.

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.

No. of Retries to mark


data as Bad

Modview will retry each poll that receives no response up to the


number of retries, and then displays the word "Error" in the value
column if no response is received. Values allowed are 0 to 9.

'Noise' bytes leading


transmission

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.

'Noise' bytes trailing


transmission

Modview will randomly generate 8-bit byte values up to the configured


number of trailing noise bytes, and add them to the message just after
the Modbus CRC error-check sequence. Values allowed are 0 to 8.

Arcom Control Systems

17

Modview Operation Manual

4.1.4 Modem Communication


Dial modem
before starting

Check this box to have Modview dial a modem before starting to


send Modbus polls. The modem must be connected to the COM
port, and some configuration of both the host and receiving modems
may be necessary in order to establish a reliable connection.

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

Auto Answer ON (remote modem only)

Hang up when DTR drops (host modem only; depends on host software)

Local Echo Off

Quiet Mode (no display of result codes)

Fixed Serial Port Baud Rate

Set Connect Speed for Modems

Ignore DTR

CD Override

Disable Flow Control

Disable Data Compression

Disable Error Control

Modem Ignores RTS on Receive Data

Arcom Control Systems

Modview Operation Manual

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

This is the telephone number to dial prior to starting Modbus polls. If


a number (such as 9) is required to obtain an outside line prior to
dialing, this must be included in the Phone Number box. Use a comma
to add a pause.

Delay between
dialing and
polling

This option tells Modview to wait a certain number of seconds before


polling to allow the modems and field device to sync up.

Arcom Control Systems

19

Modview Operation Manual

4.1.5 Additional Parameters


TCP/IP
parameters

TCP/IP Modbus options are explained in a later section.

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

This parameter provides a similar option for 32-bit long integers.


The LSW gives the lower 16 bits of the long integer, and the MSW
gives the upper 16 bits. Long integers can be in the range of
-2,147,483,648 to +2,147,483,647 if signed integer (or 0 to
4,294,967,295 if unsigned integer). The application must know
whether to interpret the number as a signed or unsigned long
integer.
Modview's standard for interpreting and displaying 32-bit long
integers is signed integer, with the first register being the LSW and
the second register being the MSW (most-significant bit of the
MSW is the sign of the long integer). For example, if a long
integer at register 43,073 is requested, Modview polls registers

20

Arcom Control Systems

Modview Operation Manual

43,073 and 43,074. Register 43,073 is the lower 16 bits of the


number, and register 43,074 is the upper 16 bits (including the sign
bit). Selecting the "Swap registers for Long Integer conversion"
reverses the order of the registers in Modview's display.

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.

Arcom Control Systems

21

Modview Operation Manual

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

Arcom Control Systems

Modview Operation Manual

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.

Arcom Control Systems

23

Modview Operation Manual

4.4 Connection to Field Devices


After Modview is configured to poll the field device, the physical connection to the device must be
made. Some typical wiring diagrams are shown below.
For connecting Modview directly to a device using RS-232, make the following connections from
the PC:

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

Arcom Control Systems

Modview Operation Manual

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.

5.1 Switch to Data Mode


Under the View menu, select Switch to Data Mode. You can also press the F9 key or the
button on the toolbar. Modview will build the polls and begin sending them to the device.
At the specified intervals (defined under Preferences) the data returned by the device will appear
under the Value column. If no response is received to a poll after the set number of retries, the
word "<ERROR>" will appear under Value.
Below is a picture of a typical Modview window in Data mode. This is shown with the "Override
Slave With" box UNchecked, so the Slave column is visible in the data grid. Otherwise the Slave
column would not appear and all polls would be sent to one slave address.

Arcom Control Systems

25

Modview Operation Manual

Switching back to Design mode can be accomplished by selecting that option under the View menu,
pressing the F9 key, or by clicking the

button on the toolbar.

Switch to Design Mode

Number Maker
Open Windows Calculator
Comms Status Window
Open Template HelpNotes

5.2 Writing Data to Field Units


In order to write data to a field device, the record must be defined as read/write (R/W) in Modview
and the register must be a read/write register (typically 00,xxx or 40,xxx registers).
There are several ways to write data to the device using Modview.
1. The first is to click on the Value cell for that register and enter new data. In order to do this,
there must be a valid number in the Value cell, indicating that Modview is currently polling the
specified register. As soon as the new value is typed and the Enter key is pressed, Modview
will immediately build a poll to send that data to the specified register using the data you
entered. Depending on the device, you will typically see the new value appear in the Value
column as soon as Modview reads the data back from the register.
2. Another technique to send data is using the Command Buttons, as described in Section 3.4,
Command Buttons.
3. Sometimes a device will use a bit-weighted integer to set certain configuration parameters. In
this case you will want to create or change an integer number by turning on or off specific bits
within the register. Modview provides a utility called the Number Maker to simplify this task.
button on the toolbar. Below is a screen
The Number Maker is selected by pressing the
capture of the Number Maker window. If Modview is polling and a valid unsigned integer Value
is currently selected, Modview will automatically pull this number out of the data grid and into the
Number Maker.

26

Arcom Control Systems

Modview Operation Manual

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 number of failed polls yields the following information:

Clicking on the large text area at the bottom of the Modview screen tells information about the
current communication settings.

Arcom Control Systems

27

Modview Operation Manual

The Comm Status window is brought up by clicking on the


toolbar button. This shows the
current status of all possible 255 slave devices and the number of polls to each failed slave device
button updates the number of failed polls. The
since the last good response. Clicking on the
Comm Status window can be closed by clicking on the button in the upper left corner.

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

Arcom Control Systems

Modview Operation Manual

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.

5.4 Standard Templates


As mentioned in Chapter 2, Installation, Disk 3 of Modview contains sample templates which
should be copied from the diskette to the Modview directory. Some of the standard templates are
used for configuring particular hardware products or for diagnostic purposes, and are briefly
described below.
See documentation within a particular template for more information on specific features of that
template. Templates supplied on the installation disks are subject to change without notice and do
not form part of any contract.
MYFIRST.TLE

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

Used to verify communication with several Modbus field devices. It can


be used to scan an entire network of Modbus devices to see which ones
respond to Modview, or to verify an unknown Modbus address of a
particular device. The template polls for Modbus register 40,001 in slave
addresses 1 through 85.
To use this template, make sure that the "Override Slave" checkbox is
UNchecked and that the baud rate and other communication parameters
are correct for the desired device(s). Several other Modview settings
should be configured for optimal performance, as follows:
Response Timeout for Polls = 1
Delay between polls / Delay after completing all polls = 0
Number of retries = 0
Display and DDE Refresh Rate = Refresh after 1 second
Communication Layer = Serial Binary Modbus

Arcom Control Systems

29

Modview Operation Manual

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

Same as above except for slave addresses 86-170.

SCNNODE3.TLE

Same as above except for slave addresses 171-255.

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

Used to configure HtMux communication parameters (prior to HtMux


release 5.0). In HtMux/HtNode release 5.0 these are used only for viewing
the configuration parameters.

HTMUXCHN.TLE

Used to define HtMux Hart channel configurations (prior to HtMux


release 5.0).

HTMXSTUS.TLE

Used to view the binary communication status of up to 512 devices on an


HtNode or HtMux. A value of 1 indicates that the HtMux is polling the
device and receiving valid responses; a value of 0 indicates that no
response is being received.

EXAMPLE1.TLE EXAMPLE3.TLE

Used to illustrate sample configurations for HtNode or HtMux (release


5.0).

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

Used to configure parameters of a Hart device connected to an M1 RTU.

M1HARTPV.TLE

Used to view process variables of Hart device connected to an M1 RTU.

SHIM.TLE

Used to view a few process variables and Hart device configuration


parameters for the SHIM multiplexer.

DE.TLE

Used to configure Arcom's DEMUX product.

DE_PVS.TLE

Used to view process variables on Arcom's DEMUX product.

Arcom Control Systems

Modview Operation Manual

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.

6.1 Modbus Command Codes


As stated earlier, Modview only supports Modbus Binary (or Modbus RTU) protocol. It does not
support the Modbus ASCII version of the protocol. Modbus Binary uses CRC-16 error checking
to ensure data integrity.
The Modbus function codes implemented in Modview are listed below.
Code
01

Registers
00,001 - 09,999

Meaning
Read Coil Status (ON/OFF) of group of coils

02

10,001 - 19,999

Read Input Status (ON/OFF) of group of discrete inputs

03

40,001 - 49,999

Read Holding Registers

04

30,001 - 39,999

Read Input Registers

05

00,001 - 09,999

Force Single Coil to state of ON or OFF

06

40,001 - 49,999

Preset Single (Holding) Register to specified value

6.2 Protocol Structure


This section gives a brief description and example of each of the function codes and the protocol
structure. This is provided mainly for references purposes to assist with communication
troubleshooting being performed using Modview.
In each protocol message, the "Data Start" bytes are an offset from the first register defined by the
command type. For example in the first example below, the Data Start of 0x0004 is an offset from
the base register 00,001. Thus, the first register requested is 00,005.

Arcom Control Systems

31

Modview Operation Manual

6.2.1 Command 01 -- Read Coil Status


Data returned from the device packs digital states into 8-bit bytes, with the least significant register
state in the least-significant bit of the byte. In this example, 24 coil registers (00,005 to 00,028)
are read from RTU #1. The coils 5, 8, 13, 23, and 28 are ON; the rest are OFF.

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

6.2.2 Command 02 -- Read Input Status


The Read Input Status command returns data similar to command 01. In this example, 20 digital
status registers (10,081 to 10,100) are read from RTU #5. Statuses 10,081 and 10,100 are ON;
the rest are OFF

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

Arcom Control Systems

Modview Operation Manual

6.2.3 Command 03 -- Read Holding Registers


In this example, 2 holding registers (40,384 to 40,385) are read from RTU #192. The values
contained in the registers are 65 and 2047, respectively.

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

6.2.4 Command 04 -- Read Input Status


In this example, 2 analog input registers (30,122 to 30,123) are read from RTU #16. The values
contained in the registers are 100 and 4095, respectively.

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

Arcom Control Systems

Byte
Count
04

Register
#1 High
00

Register
#1 Low
64

Register
#2 High
0F

Register
#2 Low
FF

CRC

CRC

FE

EA

33

Modview Operation Manual

6.2.5 Command 05 -- Force Single Coil


In this example, coil 00,001 in RTU #1 is forced to an ON state. The data sent to the device will
be 0xFF00 to turn a coil on, and 0x0000 to turn it off. The normal response to this command will
be identical to the poll.

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

6.2.6 Command 06 -- Preset Single Register


In this example, a single register 40,001 in RTU #1 is forced to a value of 1000 (0x3E8). The
normal response to this command will be identical to the poll.

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

Arcom Control Systems

Modview Operation Manual

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.

6.2.7 Command 15 -- Force Multiple Coils


In this example, 12 coils (00,011 to 00,022) are forced in RTU #1. Coils 11, 13, 15, 18, and 20
are turned ON; the rest are turned OFF. Coils 23 to 26 will remain unchanged.

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

6.2.8 Command 16 -- Preset Multiple Registers


In this example, 2 holding registers (42,489 to 42,490) are set in RTU #1. The register values sent
to the device are 0 and 16384, respectively.
Note that if these two registers are evaluated in Modview as an IEEE floating point number starting
at register 42,489 instead of two integers, the result will be displayed as 2.00000 (0x4000 0000).

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

Arcom Control Systems

Qty
Low
02

35

Modview Operation Manual

6.2.9 Modbus Exception Response


Occasionally a Modbus device will reply to a poll with an "exception response", usually indicating
some type of error in communication or operation. This may be in response to any of the above
commands, and the form of the response gives some diagnostic information on the type of problem
that has occurred.
The form of the exception response is shown below and will always contain five bytes. The second
byte of the message is the function code with the high bit set to indicate an exception. In this
example the Slave address is 11 and the Modbus poll command is 01, Read Coils.

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

Illegal Data Address

The address in the poll is not a valid address in the slave.

03

Illegal Data Value

The value in the data field is not allowable in the


addressed slave location.

04

Device Failure

Slave's microprocessor has failed to respond to message,


or an abortive error has occurred.

Code (xx)
01

36

Arcom Control Systems

Modview Operation Manual

05

Acknowledge

Slave has accepted and is processing a long duration


program command. Commands sent before processing is
finished will result in a rejected message response.

06

Busy, Rejected
Message

Message was received okay, but slave is engaged in a long


duration program command.

07

Negative
Acknowledgement
Memory Parity Error

Program function cannot be performed.

08

Arcom Control Systems

Parity error in Modbus read of extended memory bits.

37

Modview Operation Manual

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.

When starting Modview, you receive a message "The file C:\WINDOWS\


SYSTEM\MSCOMM.VBX is out of date. This program requires a newer version."

Another program has installed a different version of MSCOMM.VBX that is not


compatible with Modview. In order to correct this you will probably need to reboot the
computer before proceeding with these instructions.

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.

Re-install Modview, which should install the correct MSCOMM.VBX file.

Run Modview to make sure it now works properly.

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.

Command buttons are not visible in the Data Mode.

38

Arcom Control Systems

Modview Operation Manual

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.

Some register values are completely blank in Data Mode.

The DataType field has been left blank. Switch to Design mode and select a valid
datatype.

All registers show "<Error>" in the value column.

Arcom Control Systems

39

Modview Operation Manual

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.

Some registers show "<Error>" and others show values.

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.

Arcom Control Systems

Modview Operation Manual

TCP/IP can't connect to a device over the network.

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.

Try rebooting the computer and attempt a connection again.

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.

Reboot the computer and try running Modview again.

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.

Arcom Control Systems

41

Modview Operation Manual

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.

Arcom Control Systems

Modview Operation Manual

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

Modload is a file transfer utility embedded in Arcoms Modview utility.


Like Modview, Modload currently runs on Windows 95/98 but not NT machines
The APEX (or Director) configuration must contain at least one valid slave object.
This slave object doesnt have to be related to the Modload function at all.
Modloads RTUs Modbus (slave address) must be set to above slave address.
Press ALT-D or click Refresh Remote Directory to display APEX files.
Find the desired file in the desired PC directory on left screen.
To send file, double click & hold it and drag it to remote directory on right.
If Modload error 11, division by zero. appears (0to5 times), click OK and ignore.
To delete a file, double click & hold it and drag it to trash can.
Can reboot by sending any file named reset but with no dot and no extension.

Arcom Control Systems

43

Modview Operation Manual

8.1 Starting Modload


Upon running Modload, the following window appears:

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

, and the following menu

Arcom Control Systems

Modview Operation Manual

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.

8.3 Reading Directory


Once these parameters are set, you should be able to view the files contained in the remote device.
Make sure the communication cable is connected properly to the device, and press the
button. Modload will execute a directory command and display the list
of files in the remote device, such as the following.

Arcom Control Systems

45

Modview Operation Manual

8.4 Transferring Files


Files may be transferred from the Local Directory to the Remote (slave) directory, or they may be
transferred from the Remote to the Local. The procedure for transferring files either direction is
similar. First change to the correct directory on the local drive, and make sure the remote directory
has been updated by clicking the Refresh Remote Dir button.

To transfer a file from the Local Directory to the Remote Directory:


- double-click on a file in the lower left box under "Local Dir", after the double-click, leave the
mouse button held down.
- Drag the mouse pointer into the "Remote Dir" portion of the window, and release the mouse
button.
A menu similar to the following will appear. Click on Yes to confirm the download, or click on No
or Cancel to abort the procedure.

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

Arcom Control Systems

Modview Operation Manual

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.

Arcom Control Systems

47

Modview Operation Manual

8.5 Deleting Remote Files


To delete a file from the Remote Directory:
- double-click on a file under "Remote Dir" and leave the mouse button held down.
- Drag mouse over the top of the trash can
to the menu:

, and release the mouse button. Click Yes

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

Arcom Control Systems

Modview Operation Manual

8.6 ModFile Protocol (Specification)


This section describes the ModFile protocol in detail, which is the protocol used by Modload to
perform file transfers. This information is provided for reference to software developers and for
troubleshooting. Most users can disregard this section completely.
ModFile is a file download protocol to be used within networks of embedded industrial controllers
and communications equipment. The purpose of the file download protocol is to supply an
embedded processor system with file-based information, to support such things as:

Executable program binary files

Ladder logic program files

Report/screen format files

Communication configuration files

Fieldbus device definition files

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.

Arcom Control Systems

49

Modview Operation Manual

8.6.1 Command 22 - Initiate File Write


Modbus function code 22 (16 hex) is used to initiate transfer of a data file to a desired remote unit
on the network.
It is the responsibility of the remote node to ensure that enough space is available in the filing
system to receive the file download before acknowledging the query. If the file name does not exist,
a new file will be created; otherwise the old file will be overwritten with the new file.
Query Data Format
Addr

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

Response Data Format


Addr

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.

Arcom Control Systems

Modview Operation Manual

File Size
CRC16

4 Byte Long
2 Bytes

Echo of file size .


CRC16 Code

8.6.2 Command 23 - Write Data Block


Function code 23 (17 hex) transmits a single block of data to the addressed remote unit. Blocks
sent to a remote unit must arrive in contiguous order; i.e., block numbers will start at #0 and
increment upwards after each successful block acknowledgment. The protocol will allow the same
block number to be sent more than once to account for lost acknowledgments.
The block size of the data portion of the query allows for up to 245 bytes of data to be sent in each
transmission although the field that contains the number of bytes in the packet define the actual
block size. Using this mechanism, the host could choose to use any block size as long as blocks are
contiguous. (In function 22, the actual file size is calculated on number of 245 byte blocks.
Therefore if different block sizes are used in transmission, the total number of bytes transferred
must remain the same.)

Query Data Format


Addr

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

Response Data Format


Addr

Func
Code

Field Name
Addr
Func
Block Number
Result Code

Arcom Control Systems

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

Modview Operation Manual

CRC16

3 = No file open on this port.


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

Arcom Control Systems

Modview Operation Manual

8.6.3 Command 24 - Initiate File Read


Modbus Function 24 (18 hex) is used to initiate transfer of a data file from a desired remote unit on
the network to the Modbus Host.

Query Data Format


Address

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

Response Data Format


Addr

Func
Code

Field Name
Addr
Func
Result Code

File Size
CRC16

Arcom Control Systems

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

Modview Operation Manual

8.6.4 Command 25 - Read Data Block


Function code 25 (19 hex) is used to read a block of data after a command 24 has been
acknowledged successfully. A query code of 0 is used to request the next consecutive block, or a
code of 1 is used to request the remote device to resend the previous block.

Query Data Format


Addr

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

Response Data Format


Addr

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

zzz Data Byte

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

File Data Associated with Block #


CRC16 Code

Arcom Control Systems

Modview Operation Manual

8.6.5 Command 26 - Directory Request


Function code 26 (1A hex) is used to retrieve the current file directory contents from a desired
remote unit. Note that file entries may be retrieved one at a time.
Query Data Format
Addr

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

Response Data Format


Addr

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

Arcom Control Systems

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.

Date/Time Stamp of File

CRC16 Code

55

Modview Operation Manual

8.6.6 Command 27 - Remove File


Function code 27 (1B hex) is used to remove an existing file from the directory.

Query Data Format


Addr

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

Response Data Format


Addr

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

Arcom Control Systems

You might also like