About 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:
Key Concepts and Terminology
Protocols
Protocols are the rules governing the communication between devices. FactoryStudio supports a variety of communication protocols, both native and OPC-based.
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.
How the Device Module Works
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. |
Features Highlights
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.
Managing Channels and Nodes
Channels are the connections used to communicate with field devices or PLCs. Nodes represent the devices or PLCs on the network. Both channels and nodes can be created, edited, and managed in the Device Module.
Channels are responsible for managing communication protocols and drivers, while Nodes handle multiple threads pointing to the configured Channels. Understanding the relationship between Channels and Nodes is essential for efficient data exchange.
- Channels: Execute processes based on communication protocols and drivers, configuring the required protocol or driver for a specific device.
- Nodes: Perform multiple threads pointing to the Channels, ensuring efficient data exchange and minimizing latency.
Managing Channels and Nodes: Channels are created and configured to handle specific communication protocols and drivers. Nodes, in turn, manage multiple threads pointing to these Channels. This multi-threaded approach ensures efficient data exchange and reduces latency, allowing the system to scale and handle numerous devices simultaneously.
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
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.
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.
Organizing the Points with Acess Types
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.
Points are groups that point to Nodes and are responsible for transferring information between configured devices and FactoryStudio. AccessTypes define specific methods for reading and writing data point values using polling.
- Points: Groups pointing to Nodes, responsible for transferring information between configured devices and FactoryStudio.
- AccessTypes: Define specific methods for reading and writing data point values at specific moments using polling.
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.
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.
One very efficient AcceesType is to read data when it is being used by the application. Go to the section OnDisplayOrServer for more information.
Handling Read and Write events
In a SCADA system, handling read and write events is crucial for the efficient exchange of data between the HMI, PLCs, and other devices. FactoryStudio facilitates these events by allowing users to configure access types, which define the specific methods for reading and writing the values of each data point. The access types can be configured to determine the polling rate, specify whether a read is performed on startup, and decide whether unsolicited input is accepted.
Configuring the Device Module
The Device Module in FactoryStudio plays a central role in managing communication between the HMI and devices in an industrial automation system. To ensure seamless integration and optimal performance, it is essential to properly configure the Device Module. This includes selecting the appropriate communication protocol, creating and managing device channels, and defining device nodes and points.
Selecting a Communication Protocols
FactoryStudio supports a wide range of communication protocols to facilitate interaction between the HMI and various industrial devices. To select the appropriate protocol for your system, consider factors such as compatibility with the devices in your network, data transfer speed, reliability, and security requirements. Once you have determined the most suitable protocol, configure it within the Device Module to establish communication between the HMI and devices.
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
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 and Managing Device Channels
Device channels in FactoryStudio are the pathways for communication between the HMI and the devices in the system. To create and manage channels, follow these steps:
- Go to Edit → Devices → Channels.
- Click Create New to add a new channel.
- Enter or select the required information in the Create New Channel window.
- Click OK to add the channel as a new row in the table.
- To edit existing channels, modify the fields on the row corresponding to the channel you want to update.
By properly configuring the Device Module, selecting the right communication protocol, and effectively managing device channels, you can ensure a robust and efficient industrial automation system using FactoryStudio as your HMI/SCADA solution.
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
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.
To learn more about how to create and edit channels within the device module, please refer to: Device Configuration - v10 - Tatsoft LLC
Defining Device Nodes
Device nodes in FactoryStudio represent the devices or PLCs in the network that the HMI communicates with. Configuring device nodes is essential for ensuring proper data exchange within the industrial automation system. To define device nodes, follow these steps:
- Go to Edit → Devices → Nodes.
- Enter or select the required information.
- To add or remove a column, right-click the column heading area and select or deselect columns.
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.
To learn more about how to create and edit Nodes within the device module, please refer to: Device Configuration - v10 - Tatsoft LLC
Adding and Editing Device Points
Device points define specific values for each node that can be accessed using tags. Configuring data points is crucial for monitoring and controlling various aspects of the industrial automation system. To add and edit device points, follow these steps:
- Go to Devices → Points.
- Copy and paste tags from Tag → Objects, if necessary.
- Enter or select the required information.
- To add or remove a column, right-click the column heading area and select or deselect columns.
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.
To learn more about how to create and edit Points within the device module, please refer to: Device Configuration - v10 - Tatsoft LLC
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.
Customizing the Pre-defined AccessTypes
FactoryStudio comes with several pre-defined access types that define the specific methods for reading and writing the values of each data point. To further optimize data exchange, users can customize these access types as needed. To customize pre-defined access types:
- Go to Devices → AccessTypes.
- To edit an existing access type, double-click a field.
- To create a new access type, click Create New.
- Enter or select the required information.
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.
To learn more about the device module's accesstype tab, see: Device Configuration - v10 - Tatsoft LLC
One very efficient AcceesType is to read data when it is being used by the application. Go to the section OnDisplayOrServer for more information.
Working with the Device Module
The Device Module in FactoryStudio is an essential component that enables seamless communication between the HMI and various devices in the industrial automation system, such as PLCs and other equipment. To maximize the potential of this module, it is crucial to understand its features and capabilities in-depth.
Runtime Execution
During runtime execution, the Device Module manages all aspects of communication between the HMI and the devices in the industrial automation system. This includes establishing and maintaining connections, handling read and write requests, and processing data quality and device status information. Proper configuration and optimization of the Device Module are critical for ensuring seamless data exchange, minimal latency, and optimal system performance. The Device Module supports a wide range of communication protocols, making it adaptable to diverse devices and systems.
Integration with Other Modules
FactoryStudio's modular architecture allows the Device Module to easily integrate with other modules like Alarms, Historian, and Scripts. This integration enhances system functionality and simplifies data management, fostering a unified approach to industrial automation. This seamless integration between modules promotes efficient workflows, reduces development time, and enables the creation of sophisticated and powerful HMI/SCADA solutions.
Distinctions between Devices and TagProviders
In FactoryStudio, devices represent the physical equipment in the system, while TagProviders are the logical entities that store and manage tag information. Understanding the distinction between these two components is essential for effective system configuration and management. By clearly separating the responsibilities of these components, FactoryStudio promotes modularity, simplifies configuration, and enables users to build scalable and maintainable solutions.
Using Data Quality on Displays
Data quality is a critical aspect of any HMI/SCADA system, as it ensures that operators receive reliable and accurate information about the process. FactoryStudio allows users to incorporate data quality on displays to provide a visual representation of data reliability, enabling operators to make well-informed decisions. This allows operators to identify potential issues and take appropriate action to maintain system performance and safety.
Advanced Features and Options
FactoryStudio offers various advanced features and options to further enhance the capabilities of the industrial automation system. These features include support for importing PLC addresses, integration with third-party systems, and an API for programming custom functionality. Leveraging these features can help create a tailored and efficient HMI/SCADA solution that meets the specific requirements of your industrial automation system.
Troubleshooting and Best Pratices
Troubleshooting and implementing best practices are essential for ensuring the smooth operation of your industrial automation system using FactoryStudio. By addressing common issues and following recommended guidelines, you can enhance system performance, maintain reliability, and minimize downtime.
In the PLC Address Import section under Devices > Points, it is important to ensure that the correct protocol option is selected when connecting ControlLogix PLCs. In some cases, the default option "Model OTHERS" may not work correctly, and it may be necessary to select a specific model, such as "Model 1756-L8X". If you encounter issues with a ControlLogix Channel not sending or receiving values, try changing the protocol option to the specific model and test the communication.
In the PLC Address Import section under Devices > Points, it is important to ensure that the path and file name are correct when importing L5K files using the "From Filename" or "From Device" options. In some cases, the "From Device" option may fail, and it may be necessary to use the "From Filename" option with the L5K file to make it work correctly.
Common Issues and Solutions
Communication Failures: If your system experiences communication failures between the HMI and devices, check the configuration of channels, nodes, and points. Ensure that device settings, such as IP addresses and communication protocols, are correct. Additionally, verify that the Device Module is running and that there are no errors in the communication logs.
Data Quality Issues: When encountering data quality issues, such as stale data or inaccurate values, review the configuration of access types and polling rates. Adjusting these settings may improve data quality and ensure reliable information is displayed on the HMI.
Importing PLC Addresses: If you experience issues importing PLC addresses, verify that the source file format and contents are correct. Also, ensure that the appropriate import method is selected in FactoryStudio, such as importing from Excel spreadsheets, CSV files, or L5K definition files.
Best Practices and Recommendations
System Design: Plan and design your industrial automation system with scalability and maintainability in mind. Use a modular approach, separating responsibilities between devices, TagProviders, and other modules. This promotes efficient workflows and simplifies system management.
Documentation: Keep thorough documentation of your system, including device configurations, communication settings, and customizations. This will help with troubleshooting, maintenance, and future system upgrades.
Training: Ensure that operators and maintenance personnel are well-trained in using FactoryStudio and understand the specific configurations of your system. This will enable them to identify and resolve issues efficiently, minimizing system downtime.
Regular Maintenance and Updates: Schedule regular maintenance for your system, including software updates, hardware inspections, and performance assessments. This proactive approach will help to identify potential issues before they escalate, ensuring the reliability and performance of your industrial automation system.
Device Module Runtime Attributes
Using 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.
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.
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.
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.
Devices 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).
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.
The Device Namespace
The Device namespace is the entry point for all objects related to the device module.
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:
Example | |
---|---|
tag.tagName.DevicePoint | Device point address connected with this tag. |
Programming reference on runtime objects
See Namespaces Reference for the complete list of properties and available methods.