Delete Group

To delete a Group of the selected Service select the desired Group and perform one of the following:

  • Right click on the Group and select Delete.

Delete Group

  • Use the Delete key on the Keyboard.

To delete all Tags and Groups in the configuration select the top  Tags Group and right click on the top object and select Delete All.

Delete All Tags

Delete Tag

To delete a Tag of the selected Service select the desired Tag and perform one of the following:

  • Right click on the Tag and select Delete.

Delete Tag

  • Use the Delete key on the Keyboard.

To delete all Tags and Groups in the configuration select the top Tags Group and right click and select Delete All.

Delete All Tags

Add Tag

To add a Tag to the Service at the Root Level select the Tags Group at the top and perform one of the following:

  • Right click on the Tags Group and select Add Tag.

Add Tag

  • Or select the Add Tag Button on the Menu Bar.

Add Tag

To add a Tag to a Group select the desired Group and perform one of the following:

  • Right click on the Group and select Add Tag.

Add Tag

  • Or select the Add Tag Button on the Menu Bar.

Add Tag

Add Group

To add a Group to the Service at the Root Level select the Tags Group at the top and perform one of the following:

  • Right click on the Service and select Add Group.

Add Group

  • Or select the Add Group Button on the Menu Bar .

Add Group

To add a Group to a Group select the desired Group and perform one of the following:

  • Right click on the Group and select Add Group.

 Add Group

  • Or select the Group and select the Add Group Button on the Menu Bar .

Add Group

Getting Started MQTT

To interface OAS with another MQTT Client please see the Getting Started MQTT Broker guide.

To send and receive data to a Sparkplug B Edge of Network Nodes see the Getting Started Sparkplug B Host App guide.

To enable OAS as a Sparkplug B EoN Node to interface with Host and Client Applications see the Getting Started Sparkplug B EoN Node guide.

Configure an MQTT Driver

Tags can be defined to connect to MQTT devices and software brokers with the built in MQTT Driver Interface.  The following steps can be used to setup direct communications with a MQTT Broker.

Step 1

OASStart Configure OAS application from the program group Open Automation Software.

Step 2

Select Configure-License and verify that MQTT is one of the available Drivers in the lower left of the form.  If you do not see the MQTT driver available contact support@oasiot.com to update your license.

Enabled Drivers

Note: You will need to be running Open Automation Software Version 8.26 or greater to support MQTT communications.  You can download the latest version at www.openautomationsoftware.com/downloads/open-automation-software/

Step 3

Select Configure-Drivers.

Configure Drivers

Step 4

Select localhost or the remote service you wish to modify with the Select button to the right of the Network Node list.

Network Node

Note: Optionally select the Live Data Cloud node if you are hosting Allen Bradley data over the Internet with a standard Internet connection.

Step 5

Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with MQTT Source.

Define the properties for the desired physical connection.

Note: You may need to Set Default Network Adapter for Driver Interfaces of the operating system.

Set the driver to MQTT. Enter the IP Address of the broker. The default port is 1883.

MQTT Driver Configuration

Enter the User Name and Password if required.

Keep Alive Time – Default is 60 Seconds.

Reconnect Time – Default 10 Seconds. If the connection to the broker is lost the Reconnect Time determines how long to wait before attempting to reconnect.

Optionally define a secondary failover MQTT Broker if the primary MQTT Broker fails with the property Enable Failover.

If both the primary and secondary broker are offline the Return to Online settings determines the retry frequency.

View Driver Interface Failover for more information and and video demonstrating communications failover.

Step 6

Select the Add button in the lower part of the form to add the Driver Interface as an available selection when defining Tags in the next step.

Add Driver

Note: If you need to define several Driver Interfaces you can use the CSV Export and CSV Import on the toolbar in the upper right together with Microsoft Excel.

Publish Selected Tags to MQTT Broker

There are 2 ways to publish data from OAS to a MQTT Broker.  Both require Tags to be setup first for the data sources you want to transfer.

Note: If you wish to receive data from a MQTT Broker just to Reading Data from MQTT Broker below.

View the following video for a complete demonstration of how to publish data to MQTT Brokers, Azure IoT, and AWS IoT Gateway.

  • 00:00 – Introduction
  • 00:23 – Set up Tags in OAS
  • 00:41 – Configure Azure IoT
  • 01:53 – Publish Selected Tags
  • 05:31 – Visual Studio Code
  • 08:00 – Step by step instructions
  • 08:12 – Bulk Publish to AWS IOT
  • 09:21 – Step by step instructions / Publish Data to AWS IOT Gateway
  • 09:33 – Bulk Publish to mqtt broker
  • 10:29 – MQTT Explorer
  • 11:20 – Step by step instructions/ Getting Started MQTT
  • 11:34 – Save button of the OAS Configuration tool

Step 1

Enable Publish Selected Tags at the bottom of the Driver configuration.

Step 2

Select to publish data continuously at a specified interval, based on event, or at a specific time of day.

IoT Publish Type

If Event Driven browse for a local or remote OAS tag that will trigger the publish.  Select a Boolean tag that will change state from false to true, true to false, or both.  Or choose an Integer tag that trigger a publish anytime the value changes other than 0.

IoT Publish by Event

Step 3

Enable Publish Latest Value Only to send only the latest value of each tag when published or disable to send all value changes since the last time a publish occurred.

Enabled Include All Tags Each Publish to send at least the latest value of each tag when published or disable to only send the tags that have changed since the last publish.

Enable Publish All Tags As One Topic to publish all tag values as one topic or disable to send each tag as its own topic.

IoT Publish Options

See examples in Step 6 below for each selectable option.

Step 4

Specify the Publish Topic Id if choosing to Publish All Tags As One Topic.

Specify the Tag Id, Value Id, an optional Quality Id, and Timestamp Id for each tag value that is sent.

IoT Publish Ids

When including the Timestamp Id also specify the timestamp format, use Custom to specify your own date and time format.

Step 5

Specify local and remote OAS tag variables to include in each publish and specify the Id.  Value is the current value from the data source or you can select any of the over 600 tag variables of each tag to publish.

IoT Publish Tags

Optionally use CSV Export and CSV Import buttons to set up additional tags to publish using Microsoft Excel.

When selecting remote tags use Basic Networking syntax or Live Data Cloud syntax in the tag path.

Step 6

Select Apply Changes to begin publishing to AWS IoT Gateway.  Select Save to save the new driver configuration within the tag file.

Examples:

Examples of publishing every 2 seconds with each tag value changing every second:

IoT Publish Options

Topic: oas_tags
{
  “values”: [
    {
      “id”: “Ramp”,
      “value”: 39,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.8090169943749475,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    },
    {
      “id”: “Random”,
      “value”: 10,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    }
  ]
}
 
IoT Publish All Value Chagnes
 
Topic: oas_tags
{
  “values”: [
    {
      “id”: “Ramp”,
      “value”: 16,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.587785252292473,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Random”,
      “value”: 96,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Ramp”,
      “value”: 17,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.6691306063588583,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    },
    {
      “id”: “Random”,
      “value”: 26,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    }
  ]
}
 
IoT Publish Tag Id Topics
 
Topic: Ramp
{
  “value”: 35,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
Topic: Sine
{
  “value”: -1,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
Topic: Random
{
  “value”: 83,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
 

Use Data Route to Send Data to MQTT

Step 1

See Getting Started – Data Route to define a Target tag in any source tag.

Reading Data from MQTT Broker

Step 1

Select Configure-Tags.

Configure Tags

Select localhost or the remote service you wish to modify with the Select button to the right of the Network Node list.

Network Node

Note: Optionally select the Live Data Cloud node if you are hosting Allen Bradley data over the Internet with a standard Internet connection.

Step 2

Select to Add a Tag.

Note: You can also add organizational Groups as many levels deep as you prefer and add tags to groups.  To do this first add a Group to Tags Group at the root level, then right click on the Group in the right window to add additional Groups or Tags.

Add Group

Step 3

Change the Data Source Tag property to MQTT.

Data Source MQTT

Step 4

Select the correct Driver Interface from the Driver Interface pull down list.

Step 5

Enter the topic.

MQTT Topic

Step 6

Select the Quality of Service.

Step 7

Set the Topic Timeout – 0 = Topic will never timeout. Any number greater than 0 will cause the data to be Bad Data Quality if the broker does not publish within the time frame specified.

MQTT Topic Timeout

Step 8

Select to include Timestamp and or Data Quality to the topic.

This will publish to the specified topic above OAS/Items Sent/Timestamp  and or OAS/ItemsSent/Quality.

MQTT Settings

Configuring the Default Network Adapter

If the communications for the MQTT driver is not working at all you may need to set the default network adapter priority in the operating system.

Step 9

To setup automated data transfer of any OAS Tag to any MQTT Broker see Getting-Started – Data Route and set the Target Destination to MQTT.

Step 10

To define multiple tags use the CSV Export and CSV Import on the toolbar in the upper right together with Microsoft Excel.

Note: You can also programmatically define Tags using the free to use OASConfig .NET Standard assembly,  OPCSystems .NET Framework 4 assembly, or REST API.

Step 11

Select the Save button on the toolbar at the top.

Save Button

Step 12

Create a directory on the local C: drive with the name OASDemo.

Save the file DemoTags.tags in the directory C:\OASDemo.  Of course use the correct path for Linux.

Save Tags

Step 13

Under Configure – Options set the Default Tag Configuration File so when the computer restarts the tag file will automatically be loaded.

View Post

Siemens Address Syntax

Open Automation Software Tags can be defined to connect directly to Siemens controllers with the built in Siemens Driver Interfaces which support communications over Ethernet to S7-200, S7-300, S7-400, S7-1200, and S7-1500.

The following steps can be used to setup direct communications with Siemens controllers:

Syntax

Standard Types:

<Memory Area><Data Width><Address>
<Memory Area><Data Width><Address>.<Bit>

S7-200 Timer and Counter:

<Memory Type><Address>

Data Block:

DB<Number>.DB<Data Width><Address>
DB<Number>.DB<Data Width><Address>.<Bit>

Memory Areas

Memory
Area
Description Bit
Access
Byte
Access
Word
Access
DWord
Access
I,
E
Discrete
Inputs and Image Register
R/W R/W R/W R/W
Q,
A
Discrete
Outputs and Image Register 
R/W R/W R/W R/W
M Internal Memory
Bits
R/W R/W R/W R/W
SM Special
memory Bits
R/W R/W R/W R/W
V Variable
Memory
R/W R/W R/W R/W
T Timer
Current and Timer Bit
R/W
(T.Bit)
no T.Current
R/W
no
C Counter Current
and Counter Bit
R/W
(C.Bit)
no C.Current
R/W
no
HC High-speed
Counter
no no no RO
AI Analog
Inputs
no no RO no
AQ Analog
Outputs
no no RW no
AC Accumulator no no no no
L Local
Variable Memory
no no no no
S SCR R/W R/W R/W R/W


S7-300, S7-400

Memory
Area

Description

Bit
Access

Byte
Access

Word
Access

DWord
Access

I,
E

Discrete
Inputs and Image Register

R/W

R/W

R/W

R/W

Q,
A

Discrete
Outputs and Image Register 

R/W

R/W

R/W

R/W

M,
F

Internal Memory
Bits

R/W

R/W

R/W

R/W

PI,
PE

Peripheral
Inputs

R/W

R/W

R/W

R/W

PQ,
PA

Peripheral
Outputs

R/W

R/W

R/W

R/W

DB

Datablock
Memory

R/W

R/W

R/W

R/W

 

S7-1200, S7-1500

Memory
Area

Description

Bit
Access

Byte
Access

Word
Access

DWord
Access

I,
E

Discrete
Inputs and Image Register

R/W

R/W

R/W

R/W

Q,
A

Discrete
Outputs and Image Register 

R/W

R/W

R/W

R/W

M,
F

Internal Memory
Bits

R/W

R/W

R/W

R/W

DB

Datablock
Memory

R/W

R/W

R/W

R/W

 

Data Width

Data
Width Specifier

Description

Bits

Supported
Data Types

X,
none

Bit

1

Boolean

B

Byte

8

SByte,
Byte, BCD8, String, Structured Types

W

Word

16

Int16,
UInt16, BCD16, WString

D

DWord

32

Int32,
UInt32, BCD32, Single

 

Address

Address is controller family and model dependent. Consult controller documentation for valid ranges.

Bit

Data
Width Specifier

Description

Valid
Range

B

Byte

0..7

W

Word

0..15

D

DWord

0..31

Note: If error code 0x00000005 – Address does not exist or is out of range is returned as a system error uncheck Optimized block access attribute of dbOptimized in the controller program and re-compile and upload to the controller.

Getting Started Siemens

Open Automation Software Tags can be defined to connect directly to Siemens controllers with the built in Siemens Driver Interfaces which support communications over Ethernet to S7-200, S7-300, S7-400, S7-1200, and S7-1500.

Step 1 – Check Siemens License

OAS

Start Configure OAS application from the program group Open Automation Software.

Select Configure-License and verify that Siemens is one of the available Drivers in the lower left of the form.  If you do not see Siemens driver available contact support@oasiot.com to update your license.

NOTE: To configure remote OAS Engines enter the IP Address or node name in the Network Node field and click on Select.

Network Node
Enabled Drivers

Note: You will need to be running Open Automation Software Version 8.0.0.10 or greater to support direct Siemens communications.  You can download the latest version from our downloads page.

Step 2 – Configure Siemens Driver

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with a Siemens Data Source.

Siemens Driver Interface

Set the Driver type to Siemens.

Siemens Driver Type

Define the IP Address of the controller to interface with.

IP Address

NOTE: When connecting to a S7-200 append the TSAP Local and Remote to the IP Address. Ex: 192.168.1.1.1000,1000. Here is a link to the Siemens Documentation on TSAP: https://support.industry.siemens.com/tf/ww/en/posts/is-tsap-hard-to-understand/26160/?page=0&pageSize=10#top

Select the Processor Type for the controller.

Siemens Processor Type

Select the Link Type.

Siemens Link Type

Set the Rack and CPU Slot number.

Siemens Rack and CPU Slot

Optionally define a secondary failover of controller if the primary controller fails with the property Enable Failover.


If both the primary and secondary controllers are offline the Return to Online settings determines the retry frequency.

View Driver Interface Failover for more information and and video demonstrating communications failover.

Select the Add Driver button above the Driver list in the left pane to add the Driver Interface as an available selection when defining Tags in the next step.

Add Driver

NOTE: If you need to define several Driver Interfaces you can use the CSV Export and CSV Import on the toolbar in the upper right together with Microsoft Excel.

CSV Import and Export

Drivers can also be programmatically assigned with the OAS REST API or .NET Server Configuration interface.

Step 7 – Configure Siemens Tags

Select Configure-Tags.

Menu Configure Tags

Select Add Group to add a group to place tags in.

Add Group
Add Tag Group

NOTE: You can add organizational Groups as many levels deep as you prefer and add tags to groups.  To do this first add a Group to the root level, then right click on the Group in the right window to add additional Groups or Tags.

Tag Group Options

Select Add Tag to add a tag to the group selected.

Add Tag
Add Tag to Group

Change the Data Source Tag property to Siemens.

Siemens Data Source

Select the correct Driver Interface from the Driver Interface pull down list.

Siemens Driver Selection

Specify the Address of the variable to access.

Siemens Address

See Siemens Address Syntax how to define memory addresses.

Example: DB1.DBD1 would be used to access a single float variable from data block 1.

Select the correct Siemens Data Type.

Siemens Data Type

Specify the desired Polling Rate for the Tag.

Polling Rate

To disable communications to the device you can use Enable by Tag to control when communications is active. Leave this property disabled to establish communications at all times.

Enable by Tag

The Device Read property can be used to disable continuous polling and request data on event from the transition from false to true of a value of a Boolean tag. Leave this property disabled to establish communications at all times.

Device Read

Select Apply Changes to make the changes active on the tag.

Apply Changes

Check that the data quality of the tag is Good Quality and the value from the device is returned.

Good Quality

If the data quality is Bad Quality view Troubleshooting Siemens Bad Data for solutions to common errors.

Note: If error code 0x00000005 – Address does not exist or is out of range is returned as a System Error uncheck Optimized block access attribute of dbOptimized in the controller program and re-compile and upload to the controller.

To define multiple tags use the CSV Export and CSV Import on the toolbar together with Microsoft Excel.

CSV Import and Export

When exporting tags choose which columns to include in the CSV file. There are over 800 properties available for use in each tag and reducing the amount of data can help to focus on the properties of interest.

Siemens CSV Export

NOTE: Tags can also be programmatically assigned with the OAS REST API or .NET Server Configuration interface.

Step 4 – Save Siemens Tags and Drivers

Select the Save button on the toolbar at the top.

Load and Save

Enter a file name to be saved in C:\ProgramData\OpenAutomationSoftware\ConfigFiles directory on Windows or ConfigFiles subdirectory on Linux.

When prompted to set the file as the default configuration to load on startup select Yes.

Set Default Tag File

The tags defined are now ready for use in all OAS features like Data Logging, Data Route, and Open UIEngine.

One Click Allen Bradley

Tags can be automatically setup by using the One Click Allen Bradley feature that reads all variables from an online controller or controller file and creates tags based on the variables and data types found.  The One Click feature is available both online and offline.  We recommend using the online method.  Instructions for the online method are below as well as a video.  There is a video at the bottom of the page for the offline method.

Online One Click Allen Bradley

Import Allen Bradley variables from a controller to Open Automation Software.

Step 1

Open the OAS Configure application from the program group Open Automation Software in your Start Menu.

Step 2

Select Configure Drivers from the top Menu.

Allen Bradley Drivers

Step 3

Select localhost or the remote service you wish to modify with the Select button to the right of the Network Node list.

Step 4

Enter a friendly name in the Driver Interface Name box. In the Driver drop down list, select AB Logix. Enter the IP address for your device in the IP Address box.

Allen Bradley Driver

Step 5

Click the Add Driver button in the pane on the left. Your new driver will appear in the list under it.

Allen Bradley Add Driver

Step 6

Select Configure Tags from the top Menu. Select your Network Node.

Allen Bradley Configure Tags

Step 7

Right Click on the the Tags group at the top of the tag browser on the left and choose Add Group. In the Group Name box that opens, enter AB Tags.  Say OK.

Allen Bradley Tag Group

Step 8

Select your new AB tag group from the tree.  Click One Click Import from the top menu bar.  In the One Click Import box that opens, choose Import Online Ab Variables.

Step 9

In the Control Logix Tag Browse window that opens, Select your Network Node and then select your AB Driver Interface from the drop down list.

Allen Bradley Control Logix

Step 10

Select the program you want to import from under the Programs list that appears.  A list of all the tags in the PLC will appear.  You can select individual tags, groups of tag or all of the tags from the list.

Step 11

Select the AB Tags group from the Tags window on the right.  Specify a Poll Rate if desired. Choose Add Selected Tags or Add All Tags

Note: You can use the CSV Export or CSV Export Selected buttons at this point to export your tags into a CSV file to be used later to import into OAS.

Step 12

Once you have received the success message, you can close the Online Import window.  Refresh your tag browser by re-selecting your network node.  Your new tags should now appear under the AB folder you created.

Offline One Click Allen Bradley

Import Allen Bradley variables from a program file to Open Automation Software.

There is also a custom data type editor to add or remove variables that will be added to the file abdt1.xml in the directory C:\Program Files\Open Automation Software\OAS.  If you make changes to this file make sure to backup abdt1.xml before you perform any software update.

Getting Started Allen Bradley

Open Automation Software Tags can be defined to connect directly to Allen Bradley controllers with the built in AB Logix and AB Classic Driver Interfaces which support communications over Ethernet to ControlLogix, CompactLogix, GuardLogix, and Micro800 with the AB Logix driver, and MicroLogix, SLC 500, and PLC-5 with the AB Classic driver. The following steps can be used to setup direct communications with Allen Bradley controllers.

Step 1 – Check Allen Bradley License

OASStart Configure OAS application from the program group Open Automation Software.

Select Configure-License and verify that ABLogix and / or ABClassic is one of the available Drivers in the lower left of the form.  If you do not see either AB drivers available email support@oasiot.com to update your license.

NOTE: To configure remote OAS Engines enter the IP Address or node name in the Network Node field and click on Select.

Network Node
Enabled Drivers

ABLogix is needed for ControlLogixCompactLogixGuardLogix, and Micro800.

ABClassic is needed for MicroLogixSLC 500, and PLC-5.

NOTE: You will need to be running Open Automation Software Version 8 or greater to support direct Allen Bradley communications.  You can download the latest version at www.openautomationsoftware.com/downloads/open-automation-software/

Step 2 – Configure Allen Bradley Driver

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with an AB Data Source.

Allen Bradley Driver Interface Name

Set the Driver type to AB Logix or AB Classic.

AB Logix Driver Type

AB Logix: ControlLogix, CompactLogix, GuardLogix, and Micro800
AB Classic: MicroLogix, SLC 500, and PLC-5

Define the IP Address of the controller to interface with.

IP Address

To connect to a device through a Gateway use the following IP Address:
A – Gateway IP Address
B – Backplane Number (always 1)
C – Slot Number of DHRIO (Decimal)
D – Channel Number of DHRIO (A or B)
E – Node Address of Remote Device (Octal for DH)
Example 192.168.1.125,1,2,A,7

AB Logix:

Set the Processor Type.

AB Processor Type

Set the Backplane and CPU Slot number if using ControlLogix.

AB Backplane and CPU Slot Number

AB Classic:

Select the AB Classic Type.

AB Classic Type

CSP: Default for PLC5 and SLC5/05 Direct Connections
EIP: Used for Micrologix 1100 and newer PLC5 and SLC5/05 Direct Connections
ENI: 1761-NET-ENI connections to PLC5, SLC500 and MicroLogix
CLG DH: Used for ControlLogix Gateway to PLC5, SLC500, MicroLogix. and ControlLogix Gatway to PLC5 and SLC5/04 via DH+

Set the Processor Type.

AB Classic Processor Type

NOTE: To increase the processor overall speed in response in the logix 5000 program right click on the processor in the tree and select properties. In the Advanced Tag you can adjust System Overhead Time Slice. Increasing this value will increase the communications throughput. The Default is 20%:

Optionally define a secondary failover of controller if the primary controller fails with the property Enable Failover.

If both the primary and secondary controllers are offline the Return to Online settings determines the retry frequency.

View Driver Interface Failover for more information and and video demonstrating communications failover.

Select the Add Driver button to add the Driver Interface as an available selection when defining Tags in the next step.

Add Driver

NOTE: If you need to define several Driver Interfaces you can use the CSV Export and CSV Import on the toolbar in the upper right together with Microsoft Excel.

CSV Import and Export

Step 3 – Configure Allen Bradley Tags

Select Configure-Tags.

Menu Configure Tags

Select Add Group to add a group to place tags in.

Add Group
Add Tag Group

NOTE: You can add organizational Groups as many levels deep as you prefer and add tags to groups.  To do this first add a Group to the root level, then right click on the Group in the right window to add additional Groups or Tags.

Tag Group Options

Select Add Tag to add a tag to the group selected.

Add Tag
Add Tag to Group

Change the Data Source Tag property to AB Logix or AB Classic.

AB Data Source

Select the correct Driver Interface from the Driver Interface pull down list.

AB Driver Interface

If using AB Logix select BROWSE to browse for the Address in the controller.

AB Address

NOTE: Controllers for AB Classic do not support browsing, manually set the Address.

If communicating to a string variable set the AB Data Type to STR, use AUTO for all other data types.

AB Data Type

Set the desired Polling Rate for reading from the device. The rate can be set to 100 nanoseconds, but the lowest practical rate would be 20 milliseconds or 0.02 seconds.

Polling Rate

To disable communications to the device you can use Enable by Tag to control when communications is active. Leave this property disabled to establish communications at all times.

Enable by Tag

The Device Read property can be used to disable continuous polling and request data on event from the transition from false to true of a value of a Boolean tag. Leave this property disabled to establish communications at all times.

Device Read

Select Apply Changes and verify the Value and data quality is good.

Apply Changes

Check that the data quality of the tag is Good Quality and the value from the controller is returned.

Good Quality

If the data quality is Bad Quality view Troubleshooting Allen Bradley Bad Data for solutions to common errors.

One Click Allen Bradley Video

Note: You may want to use One Click Allen Bradley to add tags from the controller automatically.

How to automatically import Allen Bradley variables to Open Automation Software.

Another way to define multiple tags is to use the CSV Export and CSV Import on the toolbar together with Microsoft Excel.

CSV Import and Export

When exporting tags choose which columns to include in the CSV file. There are over 800 properties available for use in each tag and reducing the amount of data can help to focus on the properties of interest.

AB CSV Export

NOTE: Tags can also be programmatically assigned with the OAS REST API or .NET Server Configuration interface.

Step 4 – Save Allen Bradley Tags and Drivers

Select the Save button on the toolbar at the top.

Load and Save

Enter a file name to be saved in C:\ProgramData\OpenAutomationSoftware\ConfigFiles directory on Windows or ConfigFiles subdirectory on Linux.

When prompted to set the file as the default configuration to load on startup select Yes.

Set Default Tag File

NOTE: The tags and and drivers are both saved into one file.

The tags defined are now ready for use in all OAS features like Data Logging, Data Route, and Open UIEngine.

Getting Started Modbus

Open Automation Software Tags can be defined to connect directly to Modbus slave devices or host data to Modbus masters with the built in Modbus Driver Interface which supports communications over Ethernet and Serial interfaces for Modbus TCP, Modbus RTU, and Modbus ASCII protocols.

You can view the Getting Started with Modbus Video to familiarize yourself with the following steps to setup Modbus communications.

  • 00:00 – Introduction
  • 00:30 – Configure OAS Application
  • 02:26 – How to Configure Tags
  • 03:00 – Data Type
  • 04:33 – Address for memory location
  • 04:49 – Modbus Data Type
  • 05:26 – Simulator Communication
  • 06:30 – Data Route Functionality
  • 07:43 – Tag Management
  • 07:46 – CSV Export
  • 08:35 – Set Up Tags Programmatically
  • 08:56 – Data Destinations
  • 09:22 – Save Tag Configuration
  • 09:54 – Further Questions

The following steps can be used to setup direct communications with Modbus devices.

Step 1 – Check Modbus License

OAS

Start Configure OAS application from the program group Open Automation Software.

Select Configure-License and verify that Modbus is one of the available Drivers in the lower left of the form.  If you do not see Modbus available contact support@oasiot.com to update your license.

NOTE: To configure remote OAS Engines enter the IP Address or node name in the Network Node field and click on Select.

Network Node
Enabled Drivers

Note: You will need to be running Open Automation Software Version 8 or greater to support direct Modbus communications.  You can download the latest version at www.openautomationsoftware.com/downloads/open-automation-software/

Step 2 – Configure Modbus Drivers

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with a Modbus Data Source.

Modbus Driver Interface Name

Set the Driver type to Modbus.

Modbus Driver

Set the Type as Master to communicate with a Modbus device.  Set to Slave if OAS is to interface with one or more Modbus masters.

Modbus Type

Set the Connection type as Ethernet or Serial.

Modbus Connection Type

Set the Ethernet Type or Serial Type to the Modbus protocol to use.  For Ethernet connections TCP is the most common. For Serial connections the most common would be RTU or ASCII. OAS supports all protocols on both connection types.

Modbus Protocol

Ethernet Connection:

Specify the IP Address and Port Number. For Master connections specify the IP Address of the Modbus device. For Slave connections et the IP Address to the computer IPv4 IP address or network node name if the master is on a remote PC.  You can also use 127.0.0.1 or localhost if the Modbus master will be on the same computer as OAS.

Modbus Ethernet

Serial Connection:

Specify the Serial Port Number for Windows or Linux Port Name for Linux.

Modbus Serial

Specify Timeout and Number of Retries when a communication failure occurs.

Modbus Timeout

For Master connections Enable Single Write controls how individual writes are performed.

When enabled Function Code 05 to be used when there is only one Output Coil to write, Function Code 06 to be used when there is only one Holding Register to write.
When disabled Function Code 15 will always be used for Output Coils and Function Code 16 for Holding Registers.

Enable Single Write

For Master connections Enable Multiple Write allows multiple holding registers with contiguous addresses to be sent in one packet.

Enable Multiple Write

Set Bad Msgs to Offline to the number of successive communication failures to stop communications to the device and retry at the rate specified in Return to Online.

Messages to Offline

NOTE: Set Bad Msgs to Offline to 0 to leave the device online at all times.

For redundancy support optionally define a secondary failover device if the primary device fails with the property Enable Failover.


If both the primary and secondary device are offline the Return to Online settings determines the retry frequency.

View Driver Interface Failover for more information and and video demonstrating communications failover.

The Comm Bad and Comm Good properties can be used to assign an Integer Tag to be updated with the communication summary of the driver interface.

Comm Bad CountWill set a tag with the driver interface Comm Bad Count.
The number of times the communications of the driver interface has transitioned from good to bad. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Bad Read CountWill set a tag with the driver interface Comm Bad Read Count.
The number of communication reads from the device has failed for the driver interface. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Bad TimeWill set a tag with the driver interface Comm Bad Time.
The time in seconds the communications to the device has been bad. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Bad Write CountWill set a tag with the driver interface Comm Bad Write Count.
The number of write failures to the device. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Good CountWill set a tag with the driver interface Comm Good Count.
The number of times the communications of the driver interface has transitioned from bad to good. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Good Read CountWill set a tag with the driver interface Comm Good Read Count.
The number of communication reads from the device has succeeded for the driver interface. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Good TimeWill set a tag with the driver interface Comm Good Time.
The time in seconds the communications to the device has been Good. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Good Write CountWill set a tag with the driver interface Comm Good Write Count.
The number of successful writes to the device. Can be reset to 0 when tag defined to Comm Count Reset transition from false to true.
Comm Count ResetDefine a Boolean tag that can reset the Comm Counts and Times.
A transition from false to true will reset the counts.

Select the Add Driver button in the upper left to add the Driver Interface as an available selection when defining Tags in the next step.

Add Driver

Note: If you need to define several Driver Interfaces you can use the CSV Export and CSV Import on the toolbar with Microsoft Excel.

CSV Import and Export

Drivers can also be programmatically assigned with the OAS REST API or .NET Server Configuration interface.

Step 3 – Configure Modbus Tags

Select Configure-Tags.

Menu Configure Tags

Select Add Group to add a group to place tags in.

Add Group
Add Tag Group

NOTE: You can add organizational Groups as many levels deep as you prefer and add tags to groups.  To do this first add a Group to the root level, then right click on the Group in the right window to add additional Groups or Tags.

Tag Group Options

Select Add Tag to add a tag to the group selected.

Add Tag
Add Tag to Group

Change the Data Source Tag property to Modbus.

Modbus Data Source

Select the correct Driver Interface from the Driver Interface pull down list.

Modbus Driver Interface

Specify the Device Address (set as -1 if it is not to be used on Ethernet)

Device Address

Select the correct Memory Type from the Memory Type pull down.

Modbus Holding Register

NOTE: Use the “As Boolean” types to access bits of a 16, 32, or 64 bit Integer.

Specify the Address for the memory location.

Modbus Memory Location

The base of the memory type will be added to the Address.

Extended addressing is also supported.

To communicate to 410001 set the Memory Type to Holding Register and the address to 10001.

To communicate to 465535 set the address to 65535.

Following are some examples.

  • To access 40,001 use address of 1
  • To access 49,999 use address of 9,999
  • To access 50,000 use address of 10,000
  • To access 410,001 use address of 10,001
  • To access 420,000 use address of 20,000
  • To access 430,000 use address of 30,000
  • To access 440,000 use address of 40,000
  • To access 450,000 use address of 50,000
  • To access 460,000 use address of 60,000
  • To access 465,535 use address of 65,535

NOTE: Zero Based Addressing will subtract 1 from the address when communicating to the device.

Zero Based Addressing

Example: Communicating to Holding Register 40000 the Memory Type will be Holding Register and the Address would be 1.

For Input Register and Holding Register Memory Types select the correct Modbus Data Type.

Modbus Data Type

Word Swap and Byte Swap can be enabled to swap words or bytes within the value received or sent.

Word Swap and Byte Swap

Max Words per Packet is used to control the maximum number of words allowed in each communication packet. OAS can support up to 10,000 words per packet if the device can support it. Most Modbus devices only support 125 words per packet.

Max Words per Packet

Set the desired Polling Rate for reading from the device. The rate can be set to 100 nanoseconds, but the lowest practical rate would be 20 milliseconds or 0.02 seconds.

Polling Rate

To disable communications to the device you can use Enable by Tag to control when communications is active. Leave this property disabled to establish communications at all times.

Enable by Tag

The Device Read property can be used to disable continuous polling and request data on event from the transition from false to true of a value of a Boolean tag. Leave this property disabled to establish communications at all times.

Device Read

Each Modbus Tag provides communication stats for success or failure on reading and writing to a device. Use the property Quality Stats Reset by Tag to define a Boolean tag that will reset the stats on a value transition from false to true.

Quality Stats Reset by Tag

Select Apply Changes to make the changes active on the tag.

Apply Changes

Check that the data quality of the tag is Good Quality and the value from the device is returned.

Good Quality

If the data quality is Bad Quality view Troubleshooting Modbus Bad Data for solutions to common errors.

To define multiple tags use the CSV Export and CSV Import on the toolbar together with Microsoft Excel.

CSV Import and Export

When exporting tags choose which columns to include in the CSV file. There are over 800 properties available for use in each tag and reducing the amount of data can help to focus on the properties of interest.

Tag CSV Export Columns

NOTE: Tags can also be programmatically assigned with the OAS REST API or .NET Server Configuration interface.

Step 4 – Save Modbus Tags and Drivers

Select the Save button on the toolbar at the top.

Load and Save

Enter a file name to be saved in C:\ProgramData\OpenAutomationSoftware\ConfigFiles directory on Windows or ConfigFiles subdirectory on Linux.

When prompted to set the file as the default configuration to load on startup select Yes.

Set Default Tag File

The tags defined are now ready for use in all OAS features like Data Logging, Data Route, and Open UIEngine.