I want to have a bit go to true at 7, 15, and 23 hours.

  1. Create a Tag called DateAndTime with the Date Type of String and the Data Source of DateTimeString.
  2. Modify the Calculation in both Reset tags to the following.

IF(SUBSTR([DateAndTime.Value],STRLEN([DateAndTime.Value])-8,8) = “”07:00:00″”,1,0)|IF(SUBSTR([DateAndTime.Value],STRLEN([DateAndTime.Value])-8,8) = “”15:00:00″”,1,0)|IF(SUBSTR([DateAndTime.Value],STRLEN([DateAndTime.Value])-8,8) = “”23:00:00″”,1,0)

Getting Started – Tags

Tags are used to define data source communications, alarm limits, and other real-time signal properties like Time On and Counts for keeping track how long a point has been on and how many times it has transitioned in a given period. Tags are common data sources to all clients. Data Sources can be setup to communicate with Modbus, Allen Bradley, Siemens controllers, MQTT, and OPC Servers.

To use data directly from a Visual Studio application use the default data source of Value as a fixed value that can be changed using the OPC Controls Data component. Tags can also be used to setup Calculations from other local and remote Tags.

The following section is how to manually add and define Tags using the Configure OAS application. Tags can also be added and modified using the CSV Import and Export selections using the Configure-Tags application to use Excel or other third party Comma Separated Variable editor.

To learn how to programmatically add or modify Tags from your own Visual Studio application refer to the following article on how to add and define multiple tags with one method:

OAS System Config – Get and Set Tag Properties

For a complete list of all Tag properties refer to the OAS Configuration – Tags section in this help file./sdk/articles/oasconfig04.html

Please view the Getting Started with Open Automation Software Video to familiarize yourself with installation, setting up Tags, selecting Data Sources and Destinations, and implementing Networking and Security.


Step 1

OAS


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


Step 2

Select Configure-Tags.

Configure Tags

Step 3

Select the Local OAS Service by selecting the Select button.

Network Node

Note: The Configure application can be used to connect to remote systems using the network node name or IP address of the remote node the OAS Service is running on.  Simply enter the IP Address or network node name of the remote OAS Service you wish to connect to and click on the Select key.

Note: When selecting a service if you receive a warning dialog that the service cannot be retrieved make sure the OAS Service, OAS Data Service, and OAS Database Service are started as described in Start Service.

Cannot Access OAS

Step 4

If you already have the default Demo Tags loaded you can right in the list of tags to the right to Delete All Tags.

Delete All

Click on the Add Tag button located at the top of the Tag browser.

Add 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 the root level, then right click on the Group in the right window to add additional Groups or Tags.

Add Group

Step 5

Enter the Tag name Ramp in the Add Tag dialog box.

Add Tag To Root

Step 6

Repeat Steps 4 and 5 with Tag name Sine.


Step 7

Repeat Steps 4 and 5 with Tag name Random.


Step 8

Select Tag Ramp in the right Tag window.

Ramp

All Tag properties will appear in the lower window.

Tag Properties

Step 9

For the Value Parameter set the Data Source to OPC Item.

Data Source

Step 10

Use the OPC Browse button at the right of the OPC Item to browse OPC Servers.

OPC Item Browse

Step 11

Expand Local to expand EEI.OPCSimulator and select SimDevice.

Sim Device Select

Step 12

Select Ramp from the list of OPC Items and select OK to enter the OPC Item EEI.OPCSimulator\SimDevice.Ramp.


Step 13

If you plan to use trending on this point enable the Trend Point option in the upper right of the Tag Properties window.

Trend Point

Step 14

Set the Description field to Ramp.


Step 15

Select the High High Parameter and set the Value field to 80 and enable the High High alarm.


Step 16

Select the High Parameter and set the Value field to 60 and enable the High alarm.


Step 17

Select the Low Parameter and set the Value field to 40 and enable the Low alarm.


Step 18

Select the Low Low Parameter and set the Value field to 20 and enable the Low Low alarm.


Step 19

Select the Apply Changes button in the lower right corner.

Apply Changes

Step 20

Select Tag Random and the Value Parameter.

Random

Repeat Steps 8 through 14 and Step 19 substituting Ramp for Random as Tag name and OPC Item name.

EEI.OPCSimulator\SimDevice.Random.


Step 21

Select Tag Sine and the Value Parameter.

Sine

Repeat Steps 9 through 19 substituting Ramp for Sine as Tag name and OPC Item name.  Use 0.9 for High High Value, 0.8 for High Value, 0.2 for Low Value, and 0.1 for Low Low Value.

EEI.OPCSimulator\SimDevice.Sine.


Step 22

Select the Save button on the toolbar at the top.

Save

Step 23

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

Save the file DemoTags.tags in the directory C:\OASDemo.

Save Tags

Step 24

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

Frequently Asked Questions – Tags

Can I setup Tag programmatically?
Yes, using the OPC Systems component. The most effective method to set up multiple tags in one call is the TagCSVImport method as demonstrated in the Programmatic Interface topic in .NET Configuration - Programmatic Access Tags.
Can I access a bit of an Integer value of an Open Automation Software Tag?
Yes, set the Data Type of the Open Automation Software Tag to Signed Byte, Unsigned Byte, Short Integer, Unsigned Short Integer, Integer, Unsigned Integer, Long, or Unsigned Long. When browsing for a Tag in a client application Bit00 up to Bit63 will be available selection immediately under the Value property. myTag.Bit00 is an example of providing read and write access to bit 0 of an integer value.
A CSV Export and Import does not work when running on a system with Regional Language settings use a comma as a decimal holder.
Because the OAS Service runs under the SYSTEM Account it is not using the Regional Language settings. In some operating systems when you change the Regional Language the SYSTEM account is not updated. To correct this go to Region and Language under Control Panel, and select the Administrative tab. Select Copy settings and select the option to Copy your current settings to: Welcome screen and system accounts and select OK. Restart the OAS Services or restart the operating system. The CSV export and import will now use your decimal separator selected for the operating system.
We have accumulative value and we want to take Delta for this accumulative value at end of each hour. For example value at start of the hour is 100 and at the end of the hour it is 150, so Delta is 50 for this specific hour. How we can use calculation tag option to achieve it?
First create a String Tag called DateTime with the Data Source of DateTimeString. Next create a Double Tag called InitialValue with the Data Source of Calculation and the following Calculation. IF(SUBSTR([DateTime.Value],STRLEN([DateTime.Value])-5,5) = “00:00”,[SourceTag.Value],[InitialValue.Value]) Then you have a second Double Calculation Tag called TheDifference with the following Calculation. [SourceTag.Value]-[InitialValue.Value] A third Calculation Tag called LastHour can be used to hold the last hour’s result. IF(SUBSTR([DateTime.Value],STRLEN([DateTime.Value])-5,5) = “59:59”,[TheDifference.Value],[LastHour.Value])
I want to create a Calculation that gives a result of a sum over 15 minutes and then resets to 0.
Create a Calculation Tag with the following Calculation. AVG(IF(MOD([SumCalcs.TotalSeconds.Value],900)=0,-987654321,[SumCalcs.Input.Value]),900)*MOD([SumCalcs.TotalSeconds.Value],900)
How to display hours, minutes, and seconds as a string from Time On of a Tag.
STRFORMAT([myTagValueTimeOnTotal]%60,"00")&":"&STRFORMAT(MOD([myTagValueTimeOnTotal],60),"00")&":"&STRFORMAT(([myTagValueTimeOnTotal] - ([myTagValueTimeOnTotal]%60)*60 - MOD([myTagValueTimeOnTotal],60))*60,"00")
I want to have a bit go to true at 7, 15, and 23 hours.
  1. Create a Tag called DateAndTime with the Date Type of String and the Data Source of DateTimeString.
  2. Modify the Calculation in both Reset tags to the following.
IF(SUBSTR([DateAndTime.Value],STRLEN([DateAndTime.Value])-8,8) = ""07:00:00"",1,0)|IF(SUBSTR([DateAndTime.Value],STRLEN([DateAndTime.Value])-8,8) = ""15:00:00"",1,0)|IF(SUBSTR([DateAndTime.Value],STRLEN([DateAndTime.Value])-8,8) = ""23:00:00"",1,0)
How can I keep track of how long a Boolean Tag is on or how many times it has transitioned?
Use the Time On and Counts property.
Tag CSV Export and Import

Import CSV

Select the OAS Service that you desire to import a CSV file to the Tag configuration and click the CSV Import button on the top menu to import a Comma Separated Variable file.
CSV Import
Use the Export CSV feature to generate a CSV file. You can then use Microsoft Excel or other CSV compatible application to add or modify Tags. Only the Tag name is the required field. You can select to include or exclude all other fields. Only those fields that are found in the header will be used to update the properties of the Tags. If a Tag already exists it will be updated. If the Tag does not exist it will be created. Existing Tags that are not specified in the CSV file will not be updated or deleted. The same tag parameter structure can be used to programmatically define tags with the TagCSVImport method on the free to use OASConfig and OPCSystems components. This is demonstrated in  .NET Server Configuration-CSV Import and Export example.

Export CSV

Select the OAS Service that you desire to extract the Tag configuration from and select click the CSV Export button to generate a Comma Separated Variable file.
CSV Export
You can then use Microsoft Excel or other CSV compatible application to add or modify Tags. Use the Import CSV feature to then import the modified CSV file.
If you wish to just export a particular Tag Group, right click on the Tag Group and select Export to CSV.
Export to CSV

Videos – Tags

Getting Started Tags

For a quick tutorial on configuring tags view the Quick Start Example – Configure Tags section or view the following video:

Getting Started OAS (Legacy)

The following video was created from earlier versions of OAS, but is still applicable for those data sources shown in the video to familiarize yourself with installation, setting up Tags, selecting Data Sources and Destinations, and implementing Networking and Security.

One Click OPC

Automatically setup the realtime database from OPC Servers in one step.

One Click Allen Bradley

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

OPC Servers

How to connect to OPC Servers for all products.  Refer to One Click OPC for automated setup.

OPC Server to OPC Server

How to setup automatic data transfer from OPC Server to OPC Server on your LAN, WAN, and Internet.

Calculations

How to setup math equations and logic as a Data Source with the built Calculation engine for all products.

Alarm Limits

How to setup alarm limits in real-time tag configuration.

  • 00:00 – How to set up alarms limits
  • 00:24 – Programmatically Configure Tags
  • 01:34 – Another way to adjust the alarm limit
  • 02:17 – Alarms Group
  • 02:52 – Alarm Priority
  • 03:07 – Time Delay
  • 03:18 – Alarm Text
  • 04:55 – Alarm Tracking
  • 05:29 – Alarms Limits
  • 06:26 – Boolean Signals
  • 06:34 – Example Applications Videos
  • 07:07 – More Questions

Time On and Counts

Monitor how many times a value or alarm transitions and how long it has been active.

Total

Summation for total values.

Watch Window

View multiple tag values, timestamps, and data quality using the Watch Window.

 

Tag CSV Export and Import

Import CSV

Select the OAS Service that you desire to import a CSV file to the Tag configuration and click the CSV Import button on the top menu to import a Comma Separated Variable file.

CSV Import

Use the Export CSV feature to generate a CSV file. You can then use Microsoft Excel or other CSV compatible application to add or modify Tags. Only the Tag name is the required field.

You can select to include or exclude all other fields. Only those fields that are found in the header will be used to update the properties of the Tags. If a Tag already exists it will be updated. If the Tag does not exist it will be created. Existing Tags that are not specified in the CSV file will not be updated or deleted.

The same tag parameter structure can be used to programmatically define tags with the TagCSVImport method on the free to use OASConfig and OPCSystems components. This is demonstrated in  .NET Server Configuration-CSV Import and Export example.

Export CSV

Select the OAS Service that you desire to extract the Tag configuration from and select click the CSV Export button to generate a Comma Separated Variable file.

CSV Export

You can then use Microsoft Excel or other CSV compatible application to add or modify Tags. Use the Import CSV feature to then import the modified CSV file.

If you wish to just export a particular Tag Group, right click on the Tag Group and select Export to CSV.

Export to CSV

Tags Programmatic Interface

Use the OPC Systems component in your Visual Studio application to programmatically modify Tag and Tag Groups.

Refer to FormConfigureCSV, FormConfigureGroups, and FormConfigureTags Forms in the WinForm Example Code example for an example and how to add and modify tag.

To learn how to programmatically add or modify Tags from your own Visual Studio application refer to the following article on how to add and define multiple tags with one method:

OAS System Config – Get and Set Tag Properties

Time On and Counts

View the following video for explanation of each parameter and how to enable Time On And Counts:

When this feature is enabled in a Tag Value or Alarm Limit it will keep track of how long a Boolean value is true and how many times it transitions to True.

The Time On and Counts feature will keep track of the following:

  • TimeOn – How long the point is on for the current instance in minutes.
  • TimeOnCurrentDay – How long the point is on for the current day.
  • TimeOnPeriod1 – How long the point is on for Period 1.
  • TimeOnPeriod2 – How long the point is on for Period 2.
  • TimeOnTotal – How long the point has been on for all of time.
  • CountCurrentDay – How many times the point has transitioned for the current day.
  • CountPeriod1 – How many times the point has transitioned for Period 1.
  • CountPeriod2 – How many times the point has transitioned for Period 2.
  • CountTotal – How many times the point has transitioned for all of time.

The following image shows how the points will appear for connection in a client if the High High Alarm Limit is enabled for Time On and Counts.  You can also use Value or any other Alarm Limit.

Time On and Count Parameters

Daily Reset

The time of day that the day should end to reset the Time On and Counts.

Period 1

The amount of time in minutes to keep track of for Time On and Counts for Period 1 time.

Period 2

The amount of time in minutes to keep track of for Time On and Counts for Period 2 time.

Reset Time On and Counts Tag

When defined to a Boolean tag the Time On and Counts totals will be reset with the tag is True.

Retain Time On and Counts on Service Restart

To retain the Time On and Counts totals after a system restart go to Configure-Options-Retain Values and enable to retain Time On and Counts to a file.