You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 73 Next »

Overview

The Device Module 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.


On this page:


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.

Communication Protocol Selection

Our software 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.

There are various befits in including the included Native Protocols, instead of having to acquired and maintain a third-party OPC Server to enable the connection. See the Page Native Driver vs OPC Server.

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 are the pathways for communication between the HMI and the devices in the system. To create and manage channels, follow these steps:

To create channels:

  • Go to Devices → Channels.

  • Click New item...

  • 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

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.

Description

Enter a description for this channel.

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

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.

Interface

Select the interface type for this channel.

  • Serial - Use to configure the serial parameters for RS232/485 networks. 

  • MultiSerial - Use for configurations with multiple RS-232 ports. 

  • TCPIP - Use for Ethernet or wireless networks. 

Settings

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

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

  • For a serial interface, typically keep the defaults. 
  • For a MultiSerial interface, enter the number of RS-232 ports to use in the Ports field. 
    • AcceptUnsolicited - Accept unsolicited input from the slave. 
    • ListeningPort - TCP port where the slave device is connected (default is 502). 
    • NodeConnection - Number of parallel requests sent to each node (asynchronous communication). 
    • MaxSimultaneousConnections - Maximum number of concurrent connections. 
    • ShareNodeSameIP - Several slaves are connected to a single IP address. For example, RS485/Ethernet Converters. 
    • UseSingleThread - Use a single thread for the same IP nodes. 
    • UsePingToCheckConnection - Check for connection before sending a packet. 

Timeout

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

IntialState

Select the initial state for this channel.

Enabled: the channel is loaded and execution starts when the project starts.

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

Remote: the channel is local in a remote Computer defined that the Remote Settings. See more information at Remote Execution.

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

Remote Settings

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

Driver Version

The version of the current driver being used.

Communication Drivers can run on remote computers, sending Remote Execution.

Restart the Channel

It is possible to restart the Channel of the device module via script. That way, you don't have to shut down the entire system.
?
In Scripts > Classes ?create a class using the following syntax:
Device.Channel.XXXX.Stop()
Device.Channel.XXX.Start()


Note: The "XXXX" refers to the name of the Channel being used.


You can create a Task to call this class when needed. To start the Task you can use the option of the Trigger linked to a tag, when the tag value is modified the Task will call the Class.?

You can also do it in other ways that don't use the class. Alternatively, you can configure a button for example to perform this task.



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

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. 
    • 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:
    • 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. 

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

TemplateID

  • Greater than
  • Greater than or equal to
  • Less than
  • Less than or equal to
  • Equals
  • Not equals
Description

Enter a description for this node.

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



Adding and Editing 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 Unified Namespace Tags.

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

    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

Dynamic Configuration Points > Address

The example below shows how to configure a dynamic Address using the sending of an MQTT telegram, for example:

/topic/gateway/data:

/topic/gatewayX/data

/topic/gatewayY/data

/topic/gatewayZ/data:

In other words: /topic/@Tag.gateway/data:

  • You can create a standard point in Devices>Points, with Tag name, node, and Address


  • You can use the following code to change the Address for the desired point:


string error;
DataTable dt_DevicePoints = TK.ProjectDB.GetDataTable("EditDevicesPoints", "TagName='Tag.Tag01.Velocidade'");
DataRow[] rows = new DataRow[1];
rows[0] = dt_DevicePoints.Rows[0];

@Info.Trace(rows[0]["Address"].ToString());
rows[0]["Address"] = "Group01/"+@Tag.Gateway+"/Device01"; 
@Info.Trace(rows[0]["Address"].ToString());
     
rows[0].AcceptChanges();
TK.ProjectDB.UpdateDataRows("EditDevicesPoints", rows, out error);
     
if (String.IsNullOrEmpty(error) == false)
{
   @Info.Trace("Error changing tag address: " + error);
}
else
{
   @Info.Trace("Applying Devices Changes - begin");
   TK.ProjectDB.ApplyProjectChanges();
   @Info.Trace("OK!");
}


In the second line when using the code DataTable dt_DevicePoints = TK.ProjectDB.GetDataTable("EditDevicesPoints", "TagName='Tag.Tag01.Velocity'"); the first parameter refers to the table you want to obtain, in this case, it would be the Points, in the second parameter it would be the TagName column and the tag configured in Points, in this example the tag: Tag.Tag01.Velocidade.

In the line where the code rows[0]["Address"] = "Group01/"+@Tag.Gateway+"/Device01"; is where you choose the new desired address, in this case @Tag.Gateway which is a string type tag will receive different names and make this substitution.

To internally update this Address you need the following code: TK.ProjectDB.UpdateDataRows("EditDevicesPoints", rows, out error); If no error occurs in the update, you can apply the change to the project using the code: TK.ProjectDB.ApplyProjectChanges(); from this moment on your Address is configured with the new value previously entered.


Customizing the Pre-defined AccessTypes

Our platform 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:

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 New item...

  • Enter or select information, as needed.


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


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. Our software 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 New item...

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

    OnStartup

    When selected, the system reads the value on startup.

    Write

    WriteEvents

    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.

    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 AccessType for more information.



Importing PLC Addresses

When creating the communication nodes and point addresses, there is no need to retype those addresses if they are already defined in some other data source. Currently, Tatsoft supports the following methods to automatically import remote data configuration:

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


If your PLC or Field Device has an open database of file with the available addresses, and you would like to have a tied integration with that configuration and platform addresses, contact us, as we have programming interfaces to allow that just like we did with the OPC datasources.

 For more information, visit Import Tag Wizards.

Importing from an OPC Server

Importing data from an OPC server in FactoryStudio allows for efficient and streamlined integration with industrial automation systems. By creating an OPC communication node and selecting the "Import" option, FactoryStudio automatically creates tags and communication points based on the information available from the OPC server. This functionality simplifies the configuration and maintenance of the project, optimizing the data integration process. To learn more about importing data from an OPC server, please visit Import Tag Wizards - OPC Server.


Tutorial - Importing from an OPCXmIDA

The Importing from OPCXmIDA tutorial guides you through the process of configuring a Kepware server and a FactoryStudio client, establishing an efficient OPC connection between the two systems. By following the steps outlined in the tutorial, you can create and configure devices, tags, and OPCxmIDA communication nodes in both Kepware and FactoryStudio. Additionally, the tutorial covers how to change the visibility property of the tags to ensure proper communication between the OPC server and client. For detailed, step-by-step information on importing from OPCXmIDA, please visit Tutorial - Importing from an OPCXmIDA


Importing from Excel

The import and export of tags and PLC addresses in FactoryStudio is streamlined due to its integration with Excel, as the software extensively utilizes tables in various features. By creating a table in Excel with the required columns, such as TagName, Type, and Address, you can copy and paste the data directly into FactoryStudio. The software ensures the accurate assignment of data to the corresponding columns, even if the column order is different. After the first import, the system stores your settings, making it easy to synchronize previously imported addresses and new addresses. For more detailed information on the import and export process of tags, visit Import Tag Wizards -Importing from Excel.



In this section...

The root page @parent could not be found in space v10.

  • No labels