Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The software platform establishes Channels to manage communication using protocols. A DeviceChannel object encapsulates a selected Protocol and its configuration settings. The Channel is the next step of the Device Module configuration, mapping the stations of PLCs or devices in a field network, and allowing the selection of the protocol settings that will be used with each device

What is the Device Module 

The Device Module implements real-item data communication with a wide variety of field devices and industrial protocols.

The Device Module supports standard interfaces like OPC-UA, OPC-DA and MQTT, Hart, and many proprietary protocols to various PLCs manufacturers.

The connectivity also includes IT protocols, like SNMP and Ping, and connection with Historian tools, such as OSIsoft PI, GE Historian, InfluxDB and Canary.

Currently around 50 drivers are included at no extra charge in the platform, and our development team has experience with more than 200 communication protocols.

On this page:

Table of Contents
maxLevel3

Device Module Highlights

stylenone


Configuring Device Channels

Device Channels are the pathways for communication between the HMI and the devices in the system. The sections below describe how to create and edit Device Channels on the platform in more detail.

Creating and Editing a Device Channel

To create a new channel, follow these steps:

  1. Access Devices → Channels.
  2. Click on the plus icon.
  3. Choose a Protocol and fill in the Channel Name and Description fields. The table at the end of this section describes each option available.
  4. Click OK.

Image Added

To configure or edit an existing channel, follow these steps

  1. Access Devices → Channels.
  2. Double-click the property you wish to edit on the row corresponding to the channel you want to modify.
  3. Edit the property fields.

Image Added


Device Channel Properties

The following table describes each available property you can configure when editing a channel:

Field

Description

Protocol Options

Defines the options for this protocol. The options depend on the selected protocol. Check each protocol documentation to guide you.

Interface

Defines

Tip

Connectivity is a key feature of the software platform

  • Simplify your architecture by removing the needing for additional communication products (e.g. Kepware / Matrikon)

  • Easily setup a communications hub to support comms and logic between practically any device, any database, any historian, anywhere.

  • On-Premise, Edge or enterprise level, and to/from the cloud – we have you covered!

  • MQTT Broker and OPC Server are both built-in!

  • MQTT SparkPlug B and OPC-UA simulators expedite demos and prototyping.

  • Driver Toolkit allows our team, or any third-party, to easily add new interfaces.

Key concepts

Channels

The Channel defines a data source connection, using an specific Protocol driver (e.g. Modbus) and an Interface type (e.g. RS-232, TCP/IP).

The Channel may access multiple stations (e.g. field devices, PLC) using the defined protocol and Interface.

Nodes

Each station is called a Node. Each node has one or more data Points.

Points

Points are registers, I/O values or variables residing in field devices (Nodes). Data Points provide the specific values for tags to access. Each data Point is bound to a specific Tag in the Project configuration.

AccessType

Each data point is associated with an AccessType. This defines the rules for reading and writing values for that data point, such as the polling rate, whether a read is performed on startup, and whether you write values to that data Point.

Purpose and Key Concepts

Channels

The Device Module uses Channels to establish connections with field devices. Each channel is defined by a specific protocol driver and connection type, such as RS-232 or TCP/IP. Channels allow the module to access multiple devices (such as PLCs) using the defined protocol and interface.

Nodes

Each device connected to the system through channels is called a Node. Nodes can be individual devices or groups of devices. Each node contains one or more Points.

Points

Points are individual items that can be read or written from/to nodes. They can be registers, I/O values or variables residing in field devices (nodes). Each Point is bound to a specific Tag in the Project configuration.

AccessType

Each Point is associated with an AccessType, which defines the rules for reading and writing values for that Point, such as the polling rate, whether a read is performed on startup, and whether you write values to that Point. The AccessType allows users to configure how clients can access data points in the system.

Overall, the Device Module simplifies architecture by removing the need for additional communication products like Kepware/Matrikon and provides an easy-to-use communications hub that supports comms and logic between practically any device, database or historian anywhere.

Configuration Workflow

The typical configuration workflow for the Device Module has the following sequence:

Device Module Configuration Workflow

Action

Where 

Comments

Create Channels

Devices → Channels

Identify the required field devices and protocols the project requires, create channels accordingly.

Create Nodes

Devices → Nodes

Identify the Network addresses and relevant information to all stations and devices that need connectivity.

Map Tags to Point addresses

Devices → Points

Optionally, you can Copy Tags from Excel/CSV from Excel or execute Import Wizards.

Create or Customize AccessTypes

Devices → AccessTypes

Optionally, you can optimize the communication, grouping Points with similar requirements to the same AccessType.

Creating Channels

To create channels:

  • Go to Edit → Devices → Channels.

  • Click Create New.

  • The Create New Channel window displays.

  • Enter or select information, as needed.

  • Click OK. The channel is added as a new row in the table

Enter a description for this channel.

Device Channel Creation Settings

Field/Column

Description

Channel Name

Enter a name for the channel. The system allows you to know if the name is not valid.

Protocol

Select the protocol this channel uses.

Interface

Select the interface type for this channel.

Serial

-

: Use this option to configure the serial parameters for RS232/485 networks.

 

MultiSerial -

Multi Serial: Use this for configurations with multiple RS-232 ports.

 

TCPIP

-

: Use for Ethernet or wireless networks. 

Description

Info
For more information about the configuration for common protocols and interfaces, click Help at the top of the tab.

To edit device channels:

  • Go to Edit → Devices → Channels.

  • To add or remove a column, right-click the column heading area and select or deselect columns.

  • Edit the fields on the row corresponding to the channel you want to modify.

Settings

Defines

Device Channel Configuration Properties

Field/Column

Description

ProtocolOptions

Configure the options for this protocol.
The protocol options are dependent upon the selected protocol. Select the protocol, from the dropdown list at the top of the page, and click the HELP button to access the specific protocol's documentation.

Settings

Configure

the settings for this channel. The available values will depend on the interface the channel is using

. NoteThe settings here must match the settings on the slave device

.

 

For a serial interface, typically keep the defaults.

 

For a

MultiSerial

Multi Serial interface, enter the number of RS-232 ports to use in the Ports field.

 For a TCPIP interface: 

Node Connection: The number of parallel requests sent to each node (asynchronous communication).  

Accept Unsolicited: Allow to accept

AcceptUnsolicited - Accept

unsolicited input from the slave.

 ListeningPort -

Listening Port: The TCP port where the slave device is connected (default is 502). 

NodeConnection - Number

Node Connection: The number of parallel requests sent to each node (asynchronous communication). 

MaxSimultaneousConnections - Maximum

Max Simultaneous Connections: The maximum number of concurrent connections. 

ShareNodeSameIP -

Share Node Same IP: Several slaves are connected to a single IP address. For example, RS485/Ethernet Converters. 

UseSingleThread -

Use Single Thread: Use a single thread for the same IP nodes. 

UsePingToCheckConnection -

Use Ping To Check Connection: Check for connection before sending a packet

.  

Info

The settings here must match the settings on the slave device.


Timeout

Configure

Defines the timeout options for this channel. Typically, keep the default value.

IntialState

InitialState

Select

Defines the initial state for this channel

.

, the states can be as follows:

Enabled:

the

The channel is loaded and execution starts when the project starts.

Disabled:

the

The channel is loaded, but does not starts execution going the disabled state.

Remote:

the

The channel is local in a remote Computer defined that the Remote Settings.

See more information at Remote Execution

 See Remote Channels page.

Reserved:

the

The channel is not loaded, it acts as the channel was temporarily deleted from the project.

Remote Settings

RemoteSettings

Set

Defines the primary IP and backup IP to configure the remote computer where this channel will run.

Driver Version

DriverVersion

The

Defines the version of the current driver being used.

Protocol Drivers

Native Protocols vs OPC

What are the benefits of supplying native protocols interfaces to PLCs, instead of just use OPC client and rely on external OPC server to get the date?

Some PLCs are using OPC UA as their native built-in protocol, certainly this question does apply to them, but to other equipments using proprietary protocols. 

There are many scenarios when the native driver is more beneficial. Let us explore some of them:

Higher Performance

Instead of a direct connection, invariably adding one more application in the middle cause additional lag time. Further, the AccessTypes and the ability of parles execution (multi-threading) available in the Device Module allows optimized configuration not available in most OPC servers.

Cost Reduction

Most of the native drivers are included at no charge. The exceptions when there is a cost, it is typically quite smaller than the OPC server cost.

The OPC server still needs to use the Native Protocol Addresses

One misleading argument to use OPC is to hide the PLC address from the configuration. The reason it is misleading is that you need to use the native PLC address to setup the configuration of the OPC server anyway; you just duplicated the work load.  

The exception here is if the OPC Server is already installed and serving multiple applications. In this case, the connection using the OPC Client to the centralized OPC server is recommended.

Another good option is to leverage the OPC Server included in the Module device for the Edge application. In this case, the project connects with the field device with the native protocol, still enabling its OPC Server functionality, so other applications can use the built OPC Server in the FrameworX to access the data. 

Easier Field Maintenance and Deployment 

As explained on the previous item, if the OPC Server was not in its place, adding one more "middle-man" is just stressing the deployment and maintenance procedures.

Improved technical support  

Two points for potential failure or misconfigurations, and two independent suppliers, typically do not compare with a single environment and centralized support.

Available Communication drivers



Working with Channel

Stop and Start Commands

After creating a solution, you may face issues that compromise the communication with the field device. In such moments, instead of restarting the entire system, you may solve the problem by restarting the channel. You can perform such tasks using scripts, avoiding shutting down the entire system. To do so, follow these steps:

  1. Access Scripts → Classes
  2. Create a new class using the C# code below, where "XXXX" refers to the name of the channel.

    Code Block
    languagec#
    @Device.Channel.XXXX.Stop()
    @Device.Channel.XXXX.Start()


You can create a Task or Expression to call this class when needed and do it in other ways that don't use the class.

See the Remote Channels page for more information.

Code Block
languagec#
public void Stop()
{
	@Device.Channel.ControlLogix.Stop(10);
}



In this section:

Page Tree
root@parent

The up-to-date list of Communication drivers is publics at docs.tasoft.com at the Communication Drivers section.

Additional driver can be created using the Drivers Toolkit.

Creating Nodes

Nodes are the devices or PLCs on the network that you communicate with. You can enter the settings for your nodes as usual through the Engineering Workspace. You can also import settings from an OPC server or from another data source. See "Importing PLC Addresses" below.To configure nodes:

  • Go to Edit → Devices → Nodes.

  • Enter or select information, as needed.

  • To add or remove a column, right-click the column heading area and select or deselect columns.

Device Node Configuration Properties

Column

Description

Name

Enter a name for the node. The system lets you know if the name is not valid.

Channel

Select the channel for this node. For more information about the configuration for common protocols, click Help at the top of the tab.

PrimaryStation

Enter the information required to access the primary node, based on the protocol selected.

Note

The protocol options are dependent upon the selected protocol. Select the protocol from the dropdown list at the top of the page and press the HELP button to access the specific protocol's documentation.

For Modbus protocol:

  • For a Serial interface, the SlaveID is the device's slave address on the Modbus network. Valid addresses are 1-247. 
  • For a MultiSerial interface, select the number of the ComPort and enter the SlaveID, which is the device's slave address on the Modbus network. Valid addresses are 1-247. 
  • For a TCPIP interface: 
    • IP - Identification of the slave device's address. 
    • Port - TCP port where the slave device is connected (default is 502). 
    • SlaveID - Device slave address on the Modbus network. Valid addresses are 1-247. 
  • For OPC interfaces:
  • Service URL - Defines the location of the OPC server. 
    • You must configure the DCOM settings to access an external OPC server. Contact support for assistance. 
  • RefreshRate - Server refresh rate. 
  • AllTemsSameGroup - Adds all items to a single group OPC. This way, only one connection is created with the OPC server. 
  • WaitAfterConnect - The time the application waits, after a project starts, to attempt to communicate. 

Note

OPC UA and OPCXmlDA protocols have a "Test"button to test the connection. OPC UA also has a "Certificates" button to create new certificates for the system.|

BackupStation

Enter the information required, based on the protocol, to access the backup node. When the backupstation is defined and a communication failure occurs on the primary station, the system automatically attempts to establish communication with the backup station.

SyncDate

Date that the import was done (read only field).

SyncStation

Information about the station where the import was done - Station IP, Port and Slot - (read only field).

SyncSettings

Information about the settings used by the system to import the file (read only field).

Description

Enter a description for this node.

[Other columns]For definitions of other columns that are available in many tables, see Common Column Definitions.

Creating Points

Data Points define specific values for each node that can be accessed using tags. The number of data points you can configure is related to both the ProductModel that is configured for the project and your software license. 

To configure data points:

  • Go to Devices → Points.

  • You can copy and paste tags from the Tag → Objects.

  • Enter or select information, as needed.

  • To add or remove a column, right-click the column heading area and select or deselect columns.

    Device Points Configuration Properties

    Field/Column

    Description

    TagName

    Enter a tag name or click "..." to select a tag. You can also create a new tag.

    Node

    Select the node for this data point.

    Address

    Enter the register address which is based on the PLC and protocol for this data point and tag.

    Note

    The Protocol options are dependent upon which protocol is selected. Select the protocol from the dropdown list at the top of the page, and press the HELP button to access the specific protocol's documentation.

    DataType

    Select the data type you want to use. Most protocols should use the native option. When native is used, the protocol will automatically handle the data conversion.

    Selecting a different data type overrides the defaults. Some options may not be applicable to the selected node. Make sure you know the applicable data types.

    Modifiers

    If the PLC uses a different byte order, select the options you want. You can change the position bit, byte, Word, or Dword of the data that is communicated.

    AccessType

    Select the access type for this data point. You can define and configure the access types. See Access Types below.

    Scaling

    If you want to manipulate the tag value, select the options you want.

    When the data is read in the Equation option:

    • Div - The system will divide the register value by what you enter here. 
    • Add - The system will add the amount you enter here as an offset of the result of the division. 
    • For a write operation, the calculations are the opposite (multiple by the Div value, then subtract the Add value).

    LabelA text that represents a label on the point

    Importing PLC Addresses

    When creating communication nodes and data points, you can import them if they are defined in another data source in the following ways:

    • You can copy and paste the contents of a table from Excel. The tables can have different columns or order, as long you include the title of the column in the copy and paste operations. The system will put the data in the expected columns, even if the order is different in the source and target tables.

    • You can import the data from csv files.

    • For Rockwell ControlLogix devices, you can import from L5k definition files.

    • You can use various Import Wizards from many data sources

    • For OSIsoft® PI database, there is a FactoryStudio version to share definitions.

    • A programming API is available that can populate the tables from code, even from runtime execution when it is necessary.

    Access Types Configuration

    Access types define the specific methods for reading and writing the values of each data point. This could be the polling rate, whether or not a read is performed on startup, and whether or not unsolicited input is accepted. FactoryStudio comes with a few predefined access types that you can use, or you can create your own.

    To configure access types:

  • Go to Devices → AccessTypes.

  • Do one of the following:

  • To edit an existing access type, double-click a field.

  • To create a new access type, click Create New.

  • Enter or select information, as needed.

    Device AccessType  Configuration Properties

    Field/Column

    Description

    Name

    Enter a name for this access type.

    Read

    ReadPolling

    Select when you want to enable read polling.

    ReadPollingRate

    Enter how often the address value is retrieved.

    ReadTrigger

    Enter an object property that tells the system when to read the value.

    ReadOnStartup

    When selected, the system reads the value on startup.

    ReadStatus

    Enter an object property that receives the status of the read communication.

    ReadCompleted

    Enter an object property that receives an indication that the reading is completed. The value will change between 0 and 1 every time a reading is completed.

    Write

    WriteEventEnable

    Select to enable the writing of values to the PLC.

    WriteEvent

    Select when the value is written.

    WriteTrigger

    Enter an object property that tells the system when to write the value.

    WriteStatus

    Enter an object property that receives the status of the write communication.

    WriteCompleted

    Enter an object property that receives an indication that the writing is completed. The value will change between 0 and 1 every time a writing is completed.

    Settings

    AcceptUnsolicited

    When selected, the system accepts values from the PLC, even if the polling time has not yet elapsed.

    UseStaticBlocks

    Select to use the block command field

    BlockCommand

    Enter a definition for each block that will be created. Check the driver documentation to see if the specific driver uses this field and the valid values.

    Description

    Enter a description for the access type.

    One very efficient AcceesType is to read data when it is being used by the application. Go to the section OnDisplayOrServer for more information.

    AnchorUsing Diagnostic ToolsUsing Diagnostic ToolsUsing Diagnostic Tools

    After you start the project in the Startup window, select the diagnostic tools. These are: PropertyWatch (Watch), TraceWindow (Trace), and ModuleInformation (Info). 

    You can also start the diagnostic tools on the Run → Test and Run → Startup pages by left-clicking the desired tool's icon. If menus are enabled for the display, you can also access the tools menu. 

    Image Removed 

    Module Information

    The Module Information tool provides information about the operation of the modules. If you choose the devices module and a specific channel, you will see information regarding the function of the communication channel. 

    The "Read Groups Information" is important because it provides information about the virtual reading groups, the run time of each item, the quantity of the readings, and the readings that have failed. It also reports on the code and date/time of the last error. 

    Image Removed

    These are the typical steps to use the Module Information tool:

    • Go to Read Groups Information to look at the number of successful and failed communication events and in order to quickly identify the communication blocks.

    • If you have systematic errors in all of the blocks or status codes with negative values, it typically means you cannot access the remote device. Check if the node address is right.

    • If you have specific blocks with systematic errors, verify the tags and addresses that are connected to the blocks. Use the TraceWindow with the Device information to collect information about the communication errors.

    • For some protocols, like OPC, the discarded items will show as a wrong addresses in the configuration.

    Keep in mind that you can only READ from a field device when an Enterprise application is running in test mode. This makes it useful to run the application with ONLINE CONFIGURATION enabled because you do not need to start and stop the driver when modifying the configuration. You can modify PLC addresses, AccessTypes, and most of the application, and you can see the results in real-time on your running application. You can use the Startup window or the PropertyWatch tool to start and stop only one module, instead of restarting the entire runtime system. 

    Property Watch

    Property Watch is a diagnostic tool used to access the tags and internal properties of the system for reading or writing. Type the name of the property in the Object column, and its value will be found in the Value column.

    Image Removed

    For example, in the screen shown above, select Tag.Coils or Device.Channel.modbus.Status . The value of these objects will be shown. To the right side, additional properties are displayed for the selected object. 

    Info
    titleDevices negative error code

    For Module Information and Property Watch, there are negative error codes that represents specific messages that can help to find the root cause of the error. In the Module Information, refer to the LastErrorCode column.

    On Property Watch, refer to @Device.Channel.ChannelName.Status.

    See below the list of negative error codes:

    • 0 Success

    • -1 BuildCommandException

    • -2 ParseCommandUnsolicitedException

    • -3 ParseReplyException

    • -4 BuildReplyUnsolicitedException

    • -5 ChannelException

    • -6 NodeException

    • -100 Base Send Error

    • -101 Base SendAndWait Error

    • -102 TCP Create Error 1

    • -103 TCP Create Error 2

    • -104 TCP Create SocketError

    • -105 TCP Connect Callback Error

    • -106 TCP Receive Error

    • -107 UDP Create Error

    • -108 UDP Receive Error

    • -109 Serial Create Error

    • -110 Serial Receive Error

    • -111 TCP NotConnected

    • -112 Start message timeout

    • -113 Receiving bytes timeout

    • -114 End message timeout

    • -115 Connect timeout

    • -200 ProtocolError

    • -201 InvalidProtocol

    • -202 InvalidStation

    • -203 InvalidCommand

    • -204 InvalidMsgSequence

    • -205 InvalidCheckSum

    • -206 InvalidAddress

    • -207 InvalidModifiers

    Trace Window

    The Trace Window tool displays system messages in a data grid interface. If you enable the module devices in the settings, information will be available about the status of reads, writes, unsolicited input, TX frames (sent), and RX frames (received).

    Image Removed

    When checking the devices CheckBox in the Settings, enable only the ERROR, INFO, and Warning information. Do not enable the Debug information, or you will create too much data. For ControlLogix devices, it is very important to use this tool, as the system will present here the invalid addresses on the configuration.

    If you click the settings button in the configuration dialog, you can select which message types and modules to display. You can see the data in the data grid or save it to a file. It is also possible to configure a tag in ObjectName, and click the Add button to display a menu to select that object and include it in the monitoring.

    Image Removed

    The Device Namespace

    The Device namespace is the entry point for all objects related to the device module.

    Info
    For general information on namespace and object concepts, go to the section Objects and Attributes.

    The Device.Channel object lists all of the configured channels and their runtime properties.

    The Device.Node object lists all of the configured nodes and their runtime properties.

    The Device.AccessType object lists the defined access types and has options to execute synchronous calls on reading and writing to the device. 

    The following tag properties are updated based on the device module:

    Exampletag.tagName.DevicePointDevice point address connected with this tag.
    Tip
    titleProgramming reference on runtime objects

    See Namespaces Reference for the complete list of properties and available methods.

    In this section...

    Page Tree
    root@self
    spacesV10