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