You are on page 1of 11

Configuring direct communication with a remote device Page 1 of 11

Communication with Other Devices >

Configuring direct communication with a remote device


A communication driver is a DLL containing specific information about the remote equipment and implements the
communication protocol. Drivers for dozens of common and not-so-common devices are installed with InduSoft Web
Studio.

( InduSoft also provides a toolkit to develop new communication drivers. For more information, please contact Customer
Support.)

The Drivers task/worksheet allows you to define the communication interface (or interfaces) between the project and
remote equipment; such as a PLC, a single-loop, and transmitters.

Note: Consult the Help menu for a description of the functions and characteristics that are standard for all drivers. When
developing a project, you can also refer to the specific documentation provided with each communication driver. This
documentation is usually located in the DRV directory.

To configure a communication driver, you must specify the interface parameters (for example, the station address and the
baud rate), specify the equipment addresses, and then link them to project tags.

Use one of the following methods to add or remove a driver:

l On the Insert tab of the ribbon, in the Communication group, click Add/Remove Driver; or
l Right-click the Drivers folder in the Project Explorer, and then click Add/Remove drivers on the shortcut menu.

Both methods open a Communication Drivers dialog, which displays a list of available drivers.
Figure 1. Communication Drivers dialog

Use the parameters on this dialog, as follows:

l Available Drivers field: Lists all available drivers and a brief description of each.
l Help button: Click to open the Help menu, which contains detailed configuration instructions for the driver
currently highlighted in the Available Drivers field.
l Select button: Click to select the driver currently highlighted in the Available Drivers field.
l Selected Drivers field: Lists all selected drivers and their descriptions (if available).
l Remove button: Click to remove a driver currently highlighted in the Selected Drivers field.

When you click OK in the Communications Driver dialog, you create a subfolder for the selected driver(s) in the Drivers
folder located on the Comm tab.

You can right-click on a driver subfolder to access the Settings option, which opens the Communications Parameters
dialog.
Figure 2. Sample Communications Parameters dialog

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 2 of 11

Use the parameters on this dialog, as follows:

l Serial Encapsulation field: Enables serial drivers to communicate with modem, TCP/IP or UDP connections. This
setting is supported only for serial drivers developed with the UNICOMM library, which includes most of the serial
drivers available in the product.
Note: The Modem option is not supported for Pocket PC v3.00 or older.
Note: This section covers only the None option, which enables the driver to connect using a normal serial channel.
Please refer to "Using TCP/IP and UDP Encapsulation" and "Using Modem Connections" below for more
information about other encapsulation modes. "Serial Encapsulation Tests" below lists the drivers that have been
tested with modem, TCP/IP and UDP modes.
l COM field: Click to select a serial communication port.
l Baud Rate, Data Bits, Stop Bits, and Parity fields: Click to select parameters for a serial port configuration.
l Long1, Long2, String1, and String2 fields: These fields are driver custom settings. In the example above, the driver
uses Long1 to set up the error detection method and String1 to define the PLC family type.
l Advanced button: Click to open the Advanced settings dialog. Use this dialog to change the default driver
parameters.

Figure 3. Advanced Settings dialog

Specify or change the default driver parameters as follows:

l Timeout (ms) area:


¡ Start message field: Specify the timeout for the message start.
¡ End message field: Specify the timeout for the message end.
¡ Interval between char field: Specify the timeout between each character.
¡ Wait CTS field: Specify the timeout for the Clear to Send wait.
l Handshake area:
¡ Control RTS drop-down list: Specify whether to use the "Request to Send" control.
¡ Verify CTS drop-down list: Specify whether to use the "Clear to Send" type of verification.
¡ Disable DTR checkbox: Click (enable) this box to disable the DTR function (the driver will not set the DTR
signal before starting the communication).
¡ Enable IR checkbox (only available on Windows Embedded target systems): Click (enable) this box to enable
the serial driver to use an Infrared interface (COM2 port) instead of a standard serial port to communicate
with the device (such as the PLC, I/O, hand-held computers, and so forth).
l Protocol area:
¡ Station field: Some slave drivers such as the Modbus Slave (MODSL) require a slave network address. Use

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 3 of 11

this field to specify the slave address.


¡ Retries field: Type a numeric value to specify how many times the driver will attempt to execute the same
communication command before considering a communication error for this command.
l Buffers length (bytes) area:
¡ Tx Buffer field: Specify the transmission buffer length (in bytes).
¡ Rx Buffer field: Specify the reception buffer length (in bytes).
l Simultaneous Requests area (available only on selected drivers):
¡ Maximum field: Specify the maximum number of requests that may be sent simultaneously to all connected
devices.
¡ Maximum per station field: Specify the maximum number of requests that may be sent simultaneously to a
single device.
Note: The maximum number of simultaneous requests depends on the device and protocol specifications. Please
consult the device manufacturer's documentation.

The development application provides two interfaces, which you can use to configure the driver (associating project tags
to device addresses):

l MAIN DRIVER SHEET: Provides the easiest method for configuring communication between project tags and
device addresses. This interface allows you to automatically group tags to provide the best performance during
runtime. You cannot use this interface to control the time needed to scan a group of tags individually.
l STANDARD DRIVER SHEETS: Allows you to control the time needed to scan a group of tags individually.

You can use both sheets at the same time.

Using TCP/IP and UDP Encapsulation


Most of the serial drivers allow the use of TCP/IP or UDP/IP encapsulation. The encapsulation mode has been designed
to provide communication with serial devices connected to terminal servers on your ethernet or wireless networks. A
terminal server can be seen as a virtual serial port. It converts TCP/IP or UDP/IP messages on your Ethernet or Wireless
network to serial data. Once the message has been converted to a serial form, you can connect standard devices that
support serial communications to the terminal server. The following diagram provides one example of applying this
solution:
Figure 4. TCP/IP Encapsulation

You can enable the encapsulation by following the steps below:

1. Right-click on the driver's folder, and then choose Settings from the shortcut menu.

This will give you access to the communication parameters.

2. In the Serial Encapsulation field, select TCP/IP or UDP/IP:

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 4 of 11

The following fields are available:

l IP Address field: Specify the IP Address for the Terminal Server. This field accepts tags in curly brackets.
l Port Number field: Enter the TCP/IP or UDP/IP port number.
l Status Tag field: This field is available only when using TCP/IP. The tag on this field receives the value 1 when the
TCP/IP connection is established; otherwise, it receives 0.
l Server Mode field: The TCP/IP encapsulation allows the Server Mode, making the remote client responsible for
establishing the connection to enable the communication.

Using Modem Connections


Most of the serial drivers allow the use of modem connections. The modem connection has been designed to enable
communications with remote serial devices connected through a phone line. The following diagram provides one example
of applying this solution:
Figure 5. Modem Connection

You can enable the modem connection by following the steps below:

1. Right-click on the driver's folder, and then choose Settings from the shortcut menu.

This will give you access to the communication parameters.

2. In the Serial Encapsulation menu, select Modem:

Note: The Modem option is not supported for Pocket PC v3.00 or older.

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 5 of 11

The following fields are available:

l Name drop-down list: Select the modem that the driver will use to establish the connection. If you do not know the
modem name, use the Auto Detect option. The Auto Detect 1 will use the first modem available, Auto Detect 2 will
use the second, Auto Detect 3 will use the third, and Auto Detect 4 will use the fourth.
l Phone field: Enter a phone number that the driver will use to connect to the remote device. This field accepts tags
between curly brackets.
l Settings button: Click on this button to configure the modem settings. The window that displays when you click on
this button depends on the operating system that you are using and on the modem type.
Note: The settings configured by clicking on this button are not saved with your project. The information is saved
on the operating system registry, and they are valid only in the computer that you are interacting with. If you install
your project on another computer, you will have to reconfigure these settings.
l Connection button: Click to open the Connection Control window. The default connection settings should suffice
for most of the projects. However, you can take full control over the connection, and also enable incoming calls, by
clicking on this button.
Figure 6. Connection Control dialog

¡ Dial out trigger field: When the value of the tag configured in this field changes, the driver will try to connect
to the remote device. If the connection has already been established, the command is ignored. You do not
have to use this field if you are using Auto Connect.
¡ Hang up trigger field: When the value of the tag configured in this field changes, the driver will disconnect
from the remote device. If the device is disconnected the command is ignored. You do not have to use this
field if you are using Disconnect call if idle for more than.
¡ Auto Connect field: When this option is enabled, the driver will try to connect to the remote device before
sending any information. If the connection fails, the next attempt will be made after the Retry Interval has
expired.
¡ Disconnect call if idle for more than field: When this option is checked, the driver will automatically
disconnect from the remote device if no communication is performed after the time you specified.
¡ Enable incoming calls field: Check this option if you want to enable the driver to receive calls from the
remote device. You can use the Hang up trigger to drop the call once it has been established. Notice that one
driver can use both incoming calls and outgoing calls.
l Status area
¡ Code field: Enter with a tag that will receive one of the following codes when the driver is running:
n 0 = Disconnected
n 1 = Connected
n 2 = Dialing
n 3 = Dropping
n 4 = Closing Line
¡ Description field: Enter with a tag that will receive a complete description of the current status. The
description is associated with the Code field; however, it brings some additional information about the
current status.

Serial Encapsulation Tests


Most of the serial drivers should work with every serial encapsulation mode. However, most of the drivers were
developed before the encapsulation modes had been created. The following table lists the drivers fully tested with certain
encapsulation modes; if the driver that you intend to use is not listed and you are unsure whether it will work, please
contact your distributor.

Driver Modem TCP/IP UDP/IP


MODSL X X X
ABKE X X X
MODBU X X

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 6 of 11

OMETH X

X = Item has been tested

l Main Driver Sheet


The development application automatically inserts the MAIN DRIVER SHEET into the driver folder as soon as
you add the driver to your project.
l Standard Driver Sheets
In addition to the unique MAIN DRIVER SHEET that is available for each driver, you can create several
STANDARD DRIVER SHEETS for each driver. The STANDARD DRIVER SHEETS provide additional fields,
which you can use to control communication.
l Driver Error Codes

Parent topic: Communication with Other Devices


Wonderware InduSoft Web Studio v8.0 Technical Reference
Copyright © 2003–2019 Schneider Electric Software, LLC

Communication with Other Devices > Configuring direct communication with a remote device >

Main Driver Sheet


The development application automatically inserts the MAIN DRIVER SHEET into the driver folder as soon as you add
the driver to your project.

Note: The MAIN DRIVER SHEET is not available for all drivers.

To configure the MAIN DRIVER SHEET, right-click on the icon, and select Open from the pop-up or just double-click
on the icon.

The MAIN DRIVER SHEET dialog displays (see the following figure).
Figure 1. Sample MAIN DRIVER SHEET

The MAIN DRIVER SHEET worksheet is divided into two areas:

l Header area (top section), contains parameters that affect the all tags configured in the Body area of this worksheet;
and
l Body area (bottom section), where you define the relationship between tags in the project and their field equipment
address.

Use the Header area parameters as follows:

l Description field: Type a description of the MAIN DRIVER SHEET for documentation purposes.
l Disable field: Type a tag or an expression to enable and disable the communication of each MAIN DRIVER
SHEET on the fly.

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 7 of 11

¡ Type a value (or expression result) that is greater than zero to disable the MAIN DRIVER SHEET.
¡ Type a zero (or leave this field blank) to enable the MAIN DRIVER SHEET.
l Read Completed field: Type in a tag and the communication driver toggles the tag when it completes a read
command.
l Read Status field: Type in a tag, which is updated with the status of the last read command.
l Write Completed field: Type in a tag and the communication driver toggles the tag when it completes a write
command.
l Write Status field: Type in a tag, which is updated with the status of the last write command.
l Min and Max checkbox: Click (check) to specify minimum and maximum values for data from the field equipment.
l Min and Max fields (become active only when you enable the Min and Max checkbox): Type a range of values,
which can be converted into an engineering format.

The project uses these fields to determine a minimum/maximum range of values for data from the field equipment.
The scaling is done automatically. You must configure the engineering range using the Min and Max parameters on
the Tag Properties dialog. This range affects all tags in the worksheet, except those with customized Min and Max
values, as specified in the Body area of the driver sheet (Min and Max columns).

Use the Body area parameters as follows:

l Tag Name field: Type the name of a project tag to be used by the communication driver.
l Station field: Type the number of the equipment station within the network. The syntax in this field varies with
each communication driver. Refer to the appropriate driver's documentation for further information.
Tip: For some drivers, if you've configured the driver to do serial encapsulation via TCP/IP or UDP/IP, then the
station may be specified using the following format:

IP_address:port_number|station

For example:

10.169.25.18:1234|Station5

To see if this feature is supported on your selected driver, refer to the driver's documentation.

Tip: You can configure a tag name (string) between curly brackets in this field. In this case, the tag value will be
the Station used by the driver. Therefore, you can change the station dynamically during runtime.

Configuring a string tag between curly brackets in the Station field of the Main Driver Sheet (MDS) is especially
useful when configuring projects for redundant PLCs. Changing the value of the tag configured in the Station field,
you can switch automatically from one PLC to the other in case of a failure of the primary PLC (hot/Stand-by).

l I/O Address field: Type the address of the field equipment related to the project tag. The syntax in this field varies
with each communication driver. Refer to the appropriate driver's documentation for further information.
l Action field: Specify the communication direction, using one of the following options:
¡ Read (the project continuously reads the address from the field device and updates the Tag value.)
¡ Write (the project writes the tag value to the field device when the tag value changes.)
¡ Read+Write (Combines the procedures of both the Read and Writeparameters.)
l Scan field: Specify the condition under which the tag value is read from the remote device or server and then
updated in the project database, using one of the following options:
¡ Always means the tag is read and updated during every scan of the communication worksheet, regardless of
whether the tag is used in any other project screens, scripts, or worksheets.

This option is recommended for tags that must be continuously monitored in the background, such as tags
that trigger alarms, tags used in recipes, tags that are recorded in the historical database, and so on.

¡ Screen means the tag is read and updated only if it is being used in at least one open project screen, either
locally or on another client station.

This option is recommended for tags that are used in screen objects, because the project may not need to
update tags that are not being visualized anywhere. Selecting this option can improve project performance.

¡ Auto means the project will automatically choose either Always or Screen, depending on where the tag is
used in your project. If the tag is only used in a screen object on a project screen, then the scan will default to
Screen. But if the tag is configured in any other interface (e.g., Script, Math, Alarm, Trend, Recipe, Report,
Scheduler), then the scan will switch to Always and remain there until the project is stopped.

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 8 of 11

If you are not sure of which option to select, select Always. This will guarantee the tag is read and updated.

l Div field: Specify the division constant when scale adjustment is required. This value is a division factor in a read
operation and a multiplication factor in a write operation. Do not use this field if you are already using Min or
Max in the configuration body.
l Add field: Specify the addition constant when scale adjustment is required. This value is an addition factor in a
read operation and a subtraction factor in a write operation. Do not use this field if you are already using Min or
Max in the configuration body.

Note: The Main Driver Sheet can have up to 32767 rows. If you need to configure more than 32767 communication
addresses, then either configure additional Standard Driver Sheets or create additional instances of the driver.
Tip: By default, the project will scan the communication worksheet every 600 milliseconds, which is the rate at which the
system tag BlinkSlow toggles. To adjust the rate, manually edit the project file (i.e., projectname.APP) to add the
following entry:

[Options]
MainDrvAlwaysTrigger=tagname

tagname can be either another system tag (e.g., BlinkFast, Second, Minute) or a tag that you have created. Whenever
the value of the tag changes, the worksheet will be scanned and the tags will be read.

Parent topic: Configuring direct communication with a remote device


Wonderware InduSoft Web Studio v8.0 Technical Reference
Copyright © 2003–2019 Schneider Electric Software, LLC

Communication with Other Devices > Configuring direct communication with a remote device >

Standard Driver Sheets


In addition to the unique MAIN DRIVER SHEET that is available for each driver, you can create several STANDARD
DRIVER SHEETS for each driver. The STANDARD DRIVER SHEETS provide additional fields, which you can use to
control communication.

Note: You can have a total of 9,999 Standard Driver Sheets for all drivers in your project.
To open a STANDARD DRIVER SHEET, right-click on a driver subfolder and select Insert from the resulting popup
(see the following figure).
Figure 1. Sample STANDARD DRIVER SHEET

The STANDARD DRIVER SHEET dialog is divided into two areas:

l Header area (top section), contains parameters that affect the all tags configured in the Body area of this worksheet
l Body area (bottom section), where you define the relationship between tags in the project and their field equipment

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 9 of 11

address.

Use the Header area parameters as follows:

l Description field: Type a description of the STANDARD DRIVER SHEET for documentation purposes.
l Increase Priority checkbox: Click (check) to keep the reading and writing commands for this sheet on the top of the
communication queue whenever they are triggered.
Note: You must give special attention to this worksheet when you enable the Increase Priority option. If the
worksheet keeps triggering communication commands, the project may never be able to execute the other driver
sheets.
l Read Trigger field: Type a tag that triggers the project to read the worksheet automatically when you change this
tag's value.
l Enable Read when Idle field: Type a tag or constant value. Use a tag (or constant) value greater than zero, to enable
reading from the equipment.
Note: If you use a constant value (other than zero), be sure that your project requires a continuous reading because
this value places a reading request in every communication scan.
l Read Completed field: Type in a tag and the communication driver toggles the tag when it completes a read
command.
l Read Status field: Type in a tag and the communication driver updates the tag with the status of the last read
command.
l Write Trigger field: Type a tag value to activate a group reading. Whenever you change this tag value, the program
writes an equipment worksheet.
l Enable Write on TagChange field: Type a tag or constant value (not zero) to enable the communication driver to
check the worksheet continuously for changes in the tag value. If a change occurs, the project writes this value to
an address in the field equipment.
l Write Completed field: Type in a tag and the communication driver toggles the tag in this field when a write
command completes.
l Write Status field: Type in a tag and the communication driver updates the tag with the status of the last write
command.
l Station field: Type the equipment station number within the network. The syntax in this field varies with each
communication driver. Refer to the appropriate driver's documentation for further information.
Tip: For some drivers, if you've configured the driver to do serial encapsulation via TCP/IP or UDP/IP, then the
station may be specified using the following format:

IP_address:port_number|station

For example:

10.169.25.18:1234|Station5

To see if this feature is supported on your selected driver, refer to the driver's documentation.

l Header field: Specify the data type and/or initial address to be read or written in the equipment. The syntax in this
field varies with each communication driver. Refer to the appropriate driver's documentation for further
information.
Note: You can use text in the Station and Header fields with tag values using the text {tag} syntax.
l Min and Max checkbox (not labeled): Click (check) to specify the minimum and maximum values for field
equipment data.
l Min and Max fields (become active only when you enable the Min and Max checkbox): Type a range of values to
be converted into an engineering format. These fields determine the minimum and maximum range of values.
These values affect all tags in the worksheet.

For example, Memory holds values from 0 to 4095, which means 0% to 100% in the user interface. So for this
example, you must specify 0 to 100 for the min and max tag parameters.

Use the Body area parameters as follows:

l Tag Name field: Type a tag name for the communication driver to use.
l Address field: Type a field equipment address (or address offset) related to the project tag. The syntax in this field
varies with each communication driver. Refer to the appropriate driver's documentation for further information.
l Div field: Specify a division constant to use when scale adjustment is required. The project uses this value as a
division factor in a read operation and a multiplication factor in a write operation. Do not use this field if you are
already using Min or Max in the configuration body.
l Add field: Specify an addition constant to use when scale adjustment is required. The project uses this value as an
addition factor in a read operation and a subtraction factor in a write operation. Do not use this field if you are
already using Min or Max in the configuration body.

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 10 of 11

For read operations:

tag = (value in the equipment) / Div + Add

For write operations:

value in the equipment = (tag - Add) * Div

If you leave the cells empty in the Div and Add fields, this function is ignored.

Notes
Each Standard Driver Sheet can have up to 4096 rows. However, the Read Trigger, Enable Read When Idle, and Write
Trigger commands attempt to communicate the entire block of addresses that is configured in the sheet, so if the block of
addresses is larger than the maximum block size that is supported by the driver protocol, then you will receive a
communication error (e.g., "invalid block size") during run time. Therefore, the maximum block size imposes a practical
limit on the number of rows in the sheet, and that limit varies by driver. For more information, please refer to the driver
documentation for your selected driver.

Also, keep in mind that when you use the Write Trigger feature with memory-based drivers (e.g., MODBU, MOTCP,
ABTCP, OMETH, SIETH), the driver writes to the entire block of registers from the first address through the last. If a
specific register has not been declared in the worksheet but its address is within the block, the register will receive a zero
(0) value. Check the worksheet for gaps in the address range. This does not apply to name-based drivers (e.g.,TWCAT,
COSYS, ABCIP).

Parent topic: Configuring direct communication with a remote device


Wonderware InduSoft Web Studio v8.0 Technical Reference
Copyright © 2003–2019 Schneider Electric Software, LLC

Communication with Other Devices > Configuring direct communication with a remote device >

Driver Error Codes


The Read Status and Write Status fields return error codes to the tags you specified for those fields. These error codes can
be standard or customized for each driver. For a description of customized error codes, consult the documentation for the
driver.

The following are standard error codes, which are always negative values:

l 0=OK
l -1=Invalid serial port
l -2=Invalid baud rate
l -3=Invalid number of bits
l -4=Invalid number of stop bits
l -5=Invalid parity
l -6=Invalid irq
l -7=Serial port already in use
l -8=Invalid buffer size
l -9=Memory not enough
l -10=Tx buffer empty
l -11=Tx buffer full
l -12=Rx buffer empty
l -13=Rx buffer full
l -14=Timeout waiting CTS
l -15=Timeout waiting start a message
l -16=Timeout waiting a message to finish
l -17=Timeout between rx char
l -18=Timeout between tx char
l -19=No carrier detected
l -20=No DSR detected
l -21=Could not find a 8250 in address
l -22=Tx line is busy
l -23=User abort
l -24=Function not supported

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019
Configuring direct communication with a remote device Page 11 of 11

l -25=Overrun
l -26=Parity
l -27=Overrun and parity
l -28=Framing
l -29=Framing and overrun
l -30=Framing and parity
l -31=Framing, overrun and parity
l -32=Timeout waiting a tx message to finish

The UNICOMM.MSG file in the […]\Wonderware InduSoft Web Studio v8.0\Bin directory also contains descriptions of
the standard error codes.

The DriverName.MSG file in the […]\Wonderware InduSoft Web Studio v8.0\Drv directory contains descriptions of the
customized error codes for each driver.

Parent topic: Configuring direct communication with a remote device


Wonderware InduSoft Web Studio v8.0 Technical Reference
Copyright © 2003–2019 Schneider Electric Software, LLC

file:///C:/Users/livington/AppData/Local/Temp/~hhC721.htm 15/1/2019

You might also like