Overview – Redundancy

Redundancy 473

Open Automation Software Service Oriented Architecture supports any number of parallel servers and client systems. Following are some key attributes that help promote automatic switchover of one system to another.  There multiple ways to implement redundancy for servers, data sources, databases, and applications.

Server – Redundancy

IIoT Server Redundancy

Use Same Tag Names On Parallel Servers

Modify Tag 1

Open Automation Software real-time service can have the same group and tag name structure running on parallel servers. The source of the tags can be the same or different. For the most reliable connection to the data source it is best to run the OAS Services with direct connection to the source.

Client Application Switchover

Client Application Switchover 474

Each .NET application can implement an automated or controlled switch to data servers.

For automated client switch from primary server to backup server on either a server failure or tag quality failure use the AddBackupNetworkNode method to add monitoring of a primary server and backup server.  If the tag values from the primary server are bad quality the backup server data will be used with the same tag name.  Or if the entire primary server is unreachable the tag values from the backup server will be used.  This provides redundancy for sensor failure, controller failure, communications failure to the controller, server failure, or communications failure to the server.

Example: AddBackupNetworkNode(“localhost”,”192.168.1.1”)

See Client Application Failover for more details and a video of demonstration of this feature.

For manual switchover the logic to determine which is the master can be variable based on quality of individual points. As an example if there are 3 redundant servers and each as a tag called DataQuality you can use logic to monitor the Qualities array from the event for each tag.

If all Qualities are True you can decide which server to the client should switch to. If only one of the servers is good quality then the choice is easy.

Use the AddNetworkNodeAlias method of the OASData.NetworkNodes, OPCSystemsDataConnector.NetworkNodes, OPCControls.OPCControlsNetworkNodes or OPCWPFDashboard.OPCWPFNetworkNodes components to alias the original network node definition of all tags defined to the network node to a different network node.

Example: AddNetworkNodeAlias(“localhost”,”192.168.1.1”)

The AddNetworkNodeAlias method is demonstrated in the Form FormMain of the WinForm Example Code.

Also demonstrated in the following WPF application in detail:
WPF Redundancy Client Example – Demonstrates automated switch to data servers:
Download the Redundancy Client Example

For all trend controls programmatically define the pens of the trend to remote nodes. An example is demonstrated in the Form FormMain of the WinForm Example Code.

For all alarm controls use the AlarmNetworkNodes property to define what remote services the alarm window is connected to.  An example is demonstrated in the Form FormMain of the WinForm Example Code.

Visual Basic WinForm Example Code for realtime data access and all configurations access:
Download the WinForm VB Example

C# WinForm Example Code for realtime data access and all configurations access:
Download the WinForm C# Example

 

Create Master Tag in Each Service

Modify Tag 1

In Open Automation Software create one or more tags to provide a status of it being a master is active mode or standby mode. These tags can be used by client applications for determine switchover logic and also for activate properties in data logging, alarm logging, alarm notification, report, and recipe configurations.

The data source for the tag can be a Calculation to automatically monitory other service tags with the Quality parameter or the value can be set from other remote applications like a .NET application, Microsoft Excel, OPC Clients, OPC Servers, or databases.

It best to include a heartbeat within a Calculation tag to verify that the remote service or application is still communicating to the service.

The logic to determine if a service is completely variable, but do not implement something that will prematurely put the service in a standby mode leaving no service as the master.

Things to consider if a service should be the master:

  • Network failure
  • PLC / controller communications failure
  • OPC Server failure
  • OPC Server communications to devices (PLCs)
  • Database engine access
  • Remote service shutdown or PC failure

Source When Bad to Different Remote Tag

Remote Tag 477

For each Tag value there is a Source When Bad property that can be set to another local or remote Tag when the data quality of the original source is bad.  The Source When Bad property can be set to Set Sources To Tag Value and then alternate source can then be defined to another Tag.

Enable Communications from Tag

Modify Tag 1

Communications to a data source can be enabled or disabled with the property Enable by Tag.

When the Enable by Tag property is enabled a Boolean Tag can be defined to enable of disable the communications based on its value.

Retain Values, Alarm Limits, Times, Trends, Alarms

Retain 479

Under Configure-Options-Retain Values you can enable to store to disk the following information so when the service computer is restarted all of the latest values are retained.

Values and Alarm Limits for any Tag Value or Alarm Limit with a data source of Value.

Time and Counts for keeping track of times and counts for individual tag parameters with the feature Time On and Counts enabled.

Trends for real-time trend cache.

Alarms for all real-time alarms and the ability to retain when the alarm originally occurred.

File Data Source for Redundant Servers

Retain 479

To share values and alarm limits across multiple servers the Data Source of a Tag Value or Alarm Limit can be set to File Binary, File Text, or File XML. The path of the file that is shared is specified under Configure-Options-File Data Source.

This path can be set to a remote drive and directory that is accessible by all redundant services. For all tag names that are the same on each service with the Data Source of File all will be updated with the same value when one of the services receive a write from a client.

It does require that the remote file be able to be accessed in order to update the tag value on the multiple services.

Data Source – Redundancy

IIoT Data Source Redundancy

Driver Interface Failover

Client Application Switchover 474

Each Interface can optionally enable a failover connection if the primary connection fails.  To enable the failover option use the driver interface property Enable Failover.  This can be set for AB Classic, AB Logix, AWS IoT Gateway, Azure IoT, CANBus, Modbus, MQTT, MTConnect, OPC UA, and Siemens.

To define failover Classic OPC DA OPC Servers go to Configure-Options-OPC and define the list of primary OPC Servers and Backup OPC Servers.

See Driver Interface Failover – Communication Redundancy for detailed instructions for setup.

AddBackupNetworkNode for .NET applications is also applicable to resolve a data source failure.

Activate Properties

Activate Properties 475

Each configuration in Open Automation Software including data logging, alarm logging, alarm notification, reports, and recipes all have an Activate by Tag property under the Common tab of each configuration group to enable or disable the groups execution.

This can be assigned to a Boolean master tag that is true when the features should be enabled and false when disabled. You may need to use additional Calculation tags for each group if more than just an active master tag determines if the execution state of the configuration group.

Database – Redundancy

IIoT Database Redundancy

Data Buffering For Logging, Trending, and Alarms

Data Buffering 476

Each service runs as a Windows Service and on network failure to remote clients all data is retained locally in the service. All trend, alarm, and data logging data is cached in the service at all times to be available for remote clients.

When performing data logging of data from a remote service data can be written to the local hard disk using the Data Buffering feature found under Configure-Options. The same is true for a database engine failure or a network loss to a remote database engine.

View the following video on data buffering to disk.

Data Buffering

How to setup data logging so there is no data loss on a network or database engine failure.

Data Log-Override All Data Logging Server Names

Data Buffering 476

The same data logging configuration can be used on multiple services. If each service needs to log to a different database engine the property Override All Data Logging Database Server Names can be used to override all server names in all logging groups to point to only that database engine server.

Error Feedback in Data Logging Groups

Data Buffering 476

Each data logging group has a property to enable a write of status to an Integer tag. The definition of each error code and assignment of error feedback tag is found under the Common tab of each data logging group.

Log to the Same Table from Multiple Servers

Data Buffering 476

The OAS Engine data logging and alarm logging groups can be enabled and disabled based on tag values.  You can have as many logging groups on the same server or multiple servers which can automatically activate based on tag value or quality.

See Redundant Data Logging to the Same Table from Multiple Services for details of setup.

Application – Redundancy

IIoT Application Redundancy

Each OAS service can support multiple client applications to monitor same or dissimilar tag lists. Data quality and timestamp is delivered from the data source to the final use of the data. If logging data or alarms to a database multiple OAS services can receive data from remote OAS services to log to the same or different database engines.

See Client Application Failover for automated switch from primary server to backup server when an application looses communications to a server or the tag quality from the data source is bad.

Smart Client with .NET Framework 1.1

Smart Client with .NET Framework 1.1 463

Perform the following steps to setup the Example application for Smart Client Deployment using the .NET Framework 1.1 with application developed with Visual Studio 2003.  Although possible to run applications as a Smart Client on systems with .NET Framework 1.1 only, you can see it is easier to use the .NET Framework 2.0 Click Once deployment that is included in Visual Studio 2005.

Step 1

Share the directory where the application resides.

By default this would be C:Program FilesEEIOPC Systems.NETExamplebin.

Smart Client with .NET Framework 1.1 464

Step 2

Open port 58724 on all systems that will be communicating together that have a firewall.

On each OAS Service system that you wish to connect to and each remote system you will be running the application from add TCP port number 58724 if a firewall is enabled. This port number is adjustable in the service and in all .NET dlls.

For Windows XP SP2 Select Control Panel-Windows Firewall.

Select the Add Port button.

Enter a Name and the Port Number 58724.

Smart Client Click Once Deployment 460

Use the Change scope button to limit the IP range to the systems that will be communicating together.

Smart Client Click Once Deployment 461

Step 3

On all remote systems that will be running the Smart Client Example application use the Microsoft .NET Framework Configuration tool to Trust the Example application.

Select Control Panel-Administrative Tools-Microsoft .NET Framework 1.1 Configuration. (Please note that if you do not see the Microsoft .NET Framework 1.1 or 2.0 Configuration tool install the .NET Framework in the operating system.).

Select Runtime Security Policy.

Use the Increase Assembly Trust Task to add all of the files from the shared network folder on the hosting system from Step 1.

Smart Client with .NET Framework 1.1 465

Smart Client with .NET Framework 1.1 466

Select each file from the shared network folder one by one.

Smart Client with .NET Framework 1.1 467

Smart Client with .NET Framework 1.1 468

Smart Client with .NET Framework 1.1 469

Set the level of minimum security to Full Trust.

Smart Client with .NET Framework 1.1 470

Smart Client with .NET Framework 1.1 471

Select Finish and repeat the Increase Assembly Trust Task for all of these files in the shared folder.

Smart Client with .NET Framework 1.1 467

Step 4

You are now ready to run the application from all remote PCs that you performed Steps 2 and 3.

Simply run Example.exe from the shared network folder on the server PC.

From the Example application select Network Node from the pull down menu to enter the Node Name or IP Address of any system with OAS Service running.

Smart Client with .NET Framework 1.1 472

Select any of the menu buttons to view and control data from the source OAS Service.

Notice that the application is running on the remote PC without the files on the PC.

Also the communications to the source system is dynamically set with the Network Node dialog.  Feel free to change the Network Node to any system that is running the OAS Service with the DemotTags configuration.

With Open Automation Software you can easily build networked applications that connect to multiple licensed OAS Services. You can either programmatically set the Network Node as in the Example application or simply set the component Tag properties to include the desired Network Node.

The user interface is far superior to a web browser; you are truly running the application on the Remote system.

Now that all of the application files are in one directory it is very easy to make updates to the one directory and all remote systems run the same common updated application, versioning has never been easier.

Getting Started – Smart Client Click Once Deployment

The Example application installed with Open Automation Software is a Smart Client compatible application demonstrating remote connectivity to any Open Automation Software Service.  The application includes OPC Controls.NET, OAS Trend .NET, OAS Alarm .NET, and the OAS Configuration component.

When building your own Smart Client application make sure to include either the Network Node name or IP Address of the OAS Services you wish to connect to.  This would include the OPC Controls Tag properties, the OPC Trend pen Tag names, the OPC Alarm window network nodes, and any routines using the Open Automation Software programmatic interface.

Open Automation Software uses TCP port number 58724, so be sure to add your applications you deploy to any firewalls on your system with this TCP port number as an exception.  The TCP port number is adjustable in both the service and as the WCFPortNumber property in each .NET dll.

To deploy applications with Visual Studio 2005 with the .NET Framework 2.0 is extremely simple.

Step 1

Make sure IIS is installed and running on the system you wish to deploy to.

Step 2

In Visual Studio 2005 select the Properties of the project you wish to deploy.

Next select the Publish tab to view the Click Once deployment section.

Smart Client Click Once Deployment 456

Step 3

Set the Publish Location to the local or remote system that is running IIS.

Step 4

Set the initial Publish Version and either leave the automatic increment or disable the feature and set it manually each time you want to make an update to the application.

Step 5

Select the Publish Wizard button to begin the steps of deploying the application.

Smart Client Click Once Deployment 457

Step 6

Determine if the application will be installed remotely to run on each system even if the server is not reachable or if the application will only be available with the server is online.

Smart Client Click Once Deployment 458

Step 7

Confirm that the deployment virtual directory is correct and select Finish.

Smart Client Click Once Deployment 459

Step 8

Open port 58724 on all systems that will be communicating together that have a firewall enabled.

On each OAS Service system that you wish to connect to and each remote system you will be running the application from add TCP port number 58724 if a firewall is enabled. This port number is adjustable in the service and in all .NET dlls.

For Windows XP SP2 Select Control Panel-Windows Firewall.

Select the Add Port button.

Enter a Name and the Port Number 58724.

Smart Client Click Once Deployment 460

Use the Change scope button to limit the IP range to the systems that will be communicating together.

Smart Client Click Once Deployment 461

Step 9

From any remote client system simply open url of the deployment server publish page using a web browser and select the Install button.

Smart Client Click Once Deployment 462

With Smart Client deployment you can now easily deploy updates to one location and make updates just to the one deployment server and all remote users automatically receive the updates on the next time they run the system.

When the application is installed for offline/online deployment each time it runs it connects to the deployment server to see if there is a newer version available.  The user is prompted to install the update or ignore and continue to run the application.

Overview – Smart Client Deployment

Applications developed with 100% managed components can be executed on remote systems without installing the application itself on the remote systems.  This makes application updates extremely simple and provides a better user experience than web applications provide.

The .NET Framework provides built in security to limit remote application execution without proper authorization.

Visual Studio 2005, 2008, 2010, 2012, 2013, 2015, 2017, 2019, and 2022 make Smart Client deployment very easy with a deployment wizard for the Project you wish to deploy. This wizard allows you to set version information that the remote systems will use to determine if an update is available.

This deployment method requires the client systems to have version 2.0 of the .NET Framework if you are using Visual Studio 2005 and version 3.5 of the .NET Framework if you are using Visual Studio 2008.

Components that include COM or legacy ActiveX controls are not Smart Client compatible.

All .NET components of Open Automation Software are Smart Client compatible.

There are a few simple steps to deploy an application as a Smart Client.

The following examples walk you through a complete Smart Client execution.

NOTE: If you want to visualize your data in a desktop or mobile browser with zero programming, you may be interested in the OAS Open UIEngine .
The UIEngine is a robust no-code web application and HMI builder for developing rich user interfaces in a browser-based development environment.
See the UIEngine Documentation to learn more.

HTTP API Operations

/gettoken

Used to get an identity token from the server, which will then be used on every subsequent request to read or write data.

message

{
  "un":"<username>",
  "pw":"<password>"
}

response

Unless an error occurs, the gettoken response will always contain a token in the response with a status of “OK“. The token should then be included in every subsequent call to the API, identifying the user context for each request.

If the credentials are not valid, a token will still be created, but depending on the OPCSystems Service configuration, that token may not allow the user to gain access to read or write data.

{
  "message":"<token>",
  "status":"<OK | ERROR>"
}

/getdata

Used to get the most recent tag data from the server for real time data display.

message

The message should contain an array of “tags“, each representing a server tag. Each tag should contain an array of “props“, each representing a distinct property that you would like to retrieve from the server for that tag. For example, if you want to get the value for “Pump.Value“, the tag name would be “Pump“, and it would contain a single property with a name of “Value“.

If you wanted to retrieve both “Pump.Value” and “Pump.Description“, you would send a single tag with two elements in the props collection for “Value” and “Description“, respectively.

{
  "tags":[
    {
      "name":"<tag name>",
      "props":[
        {"name":"<tag property>"},
        ...
      ]
    },
    ...
  ],
  "status":"",
  "message":"",
  "token":"<token>"
}

response

The response follows the same structure as the request, with additional data populated in the property structure. A “datatype” is returned to assist with client-side data formatting, a boolean “quality” field is returned to indicate whether the data quality from the source is good or bad, and the raw value is populated in the “val” field. The value will always be populated as a string no matter which datatype the source is. Use the datatype to do any native client conversions.

{
  "message":"<blank if no error>",
  "status":"<OK | ERROR>",
  "tags":[
    {
      "name":"<tag name>",
      "props":[
        {
          "datatype":"<boolean|string|float|int>",
          "name":"<tag property>",
          "quality":<true | false>,
          "val":"<property value>"
        }
      ]
    },
    ...
  ],
  "token":"<token passed in request>"
}

/setdata

Used to set a tag value on the server, and ultimately on the data source itself. The message is similar to that used in the /getdata operation, with the addition of the “val” field on the property indicating the new value to set on the server.

message

{
  "tags":[
    {
      "name":"<tag name>",
      "props":[
        {
          "name":"<tag property>",
          "val":"<new property value>"
        }
      ]
    }
  ],
  "status":"",
  "message":"",
  "token":"<token>"
}

response

{
  "status":"<OK | ERROR>",
  "message":"",
}

/gettrenddata

Used to retrieve real time and historical alarm data points for rendering graphs and charts on a client.

message

The “requesttype” field determines the type and amount of data returned. For an full load of datapoints, pass an empty string. For only new data received since the last request, pass “NewData”. For historical data, first issue a request with using “HistoryRequest”, and pass in “HistoryData” for subsequent requests for data values.

Only use the “starthistorydate” and “endhistorydate” fields when requesting historical data. Omit these fields for all other requests. Also, these values are based on the Javascript Date format and represent the number of ticks since January 1, 1970, and other client ticks may need conversion.

The “chartinstanceguid” field is used to synchronize between client and server requests. When an initial data set is requested, pass in an empty string, and the server will assign a chartinstanceguid value in the response. For all subsequent messages within the context of that trend data, use the same chartinstanceguid and “NewData” in the requesttype field to reduce the amount of data transferred to the client on each request.

The “samplerate” and “timeframe” fields are used to determine the frequency of samples in seconds, and the timeframe for the full data set.

The “tagnames” array lists each individual tag that will be polled for trend data. These names are simple strings representing the each tag (e.g. “Random.Value”), and the order in which the data will be returned from the server.

The “historytagnames” field is a parallel array to the “tagnames” list. Include a blank entry for each entry in the tagnames array, unless the historical data for any tag is in a separate datalogging group. In that case, use the format datalogginggroupname.fieldname for each entry.

The “historystatprocessing” field is also a parallel array associated with the “tagnames” list. These entries indicate the method used to calculate the historical datapoints returned for each tag. In most cases, use “avg” for an average value of the data samples. You can also use “min” and “max” to get the minimum and maximum values for that data sample timeframe, or “lastsample” to use the most recent sample in that timeframe.

By default, when data is returned, only the raw data values are included in the result, without any timestamp information. When using the averaging method, this makes plotting very straightforward since the timestamp can be inferred from the start time, end time, and number of samples.

It also greatly reduces the amount of data transferred from the server by having the client perform the calculations for display. However, if you wish to include the actual timestamp with each sample, set the “returnalldatawithtimes” value to true.

{
  "token":"<token>",
  "requesttype":"<blank | NewData | HistoryRequest | HistoryData>",
  "chartinstanceguid":"",
  "samplerate":1,
  "timeframe":50,
  "tagnames":[
    "<tag.value>",
    ...
  ],
  "historytagnames":[
    "<datalogginggroupname.fieldname>",
    ...
  ],
  "historystatprocessing":[
    "<avg | min | max | lastsample>",
    ...
  ],
  "starthistorydate" : <ticks>,
  "endhistorydate" : <ticks>,
  "returnalldatawithtimes":false
}

response

The “chartinstanceguid” field is returned to help you coordinate data sets if you are displaying multiple sets with different parameters. The “firsttime” and “lasttime” fields are tick values indicating the timestamp of the first datapoint and last datapoint in the result, respectively, and combined with the “numberofvalues” can be used to generate timestamps for each datapoint.

If the “returnalldatawithtime” field was utilized in the request, then the “timesforreturnalldata” field in the response will contain actual timestamps for each individual datapoint.

The “penvalues” field will contain the raw datapoints. These are arranged in an array for each individual tag requested in the request message’s “tagnames” field. The penvalues are returned in the same order as tags requested.

{
  "chartinstanceguid":"<guid>",
  "firsttime":<ticks>,
  "lasttime":<ticks>,
  "numberofvalues":<int>,
  "penvalues":[
    [ <array of data points> ],
    ...
  ],
  "timesforreturnalldata":[
    [<array of ticks>],
    ...
  ]
  "status":"<OK | ERROR>",
  "message":"",
}

/getalarmdata

Used to retrieve real time and historical alarm data, optionally filtered by group, type, and status.

message

Similar the the gettrenddata request, there is a concept of an instance guid, referenced by the “alarminstanceguid” field. On an initial request using the “requesttype” of “RefreshAllData“, use a blank alarminstanceguid. The response will contain a guid assigned by the server to be used in all subsequent requests to synchronize data and modes between client and server.

The “requesttype” field is used to switch between modes. “RefreshAllData” will pull all current real time alarm data available in a single dataset. This is used to refresh data or get a full update after displaying historical data. Subsequent requests for real time alarms should use “NewData” as it will reduce bandwidth and only provide updated alarms since the last request.

To display historical alarms, send an initial message with a requesttype of “HistoryRequest” along the “starthistorydate” and “endhistorydate” fields containing ticks to define the timeframe for historical data. Then subsequent requests should be issued with the “HistoryData” requesttype to receive the dataset.

The “networknodes” is an array of network node strings used for determining the source of the data. Leave empty to assume “localhost” relative to the OPCSystems Service being contacted.

The “alarmfilter” field is used to determine the criteria for which alarms to include in the resulting dataset.

{
  "alarminstanceguid":"",
  "token":"<token>",
  "requesttype":"<RefreshAllData | NewData | HistoryRequest | HistoryData>",
  "networknodes":[],
  "alarmfilter":{
    "includealarmactive":<true|false>,
    "includealarmactiveacked":<true|false>,
    "includealarmnotactive":<true|false>,
    "includealarmnotactivenotacked":<true|false>,
    "maxpriority":<int>,
    "minpriority":<int>,
    "alarmgroups":[],
    "alarmtypes":[
      "Digital",
      "High",
      "High High",
      "Low",
      "Low Low",
      "ROC",
      "System"
    ]
  },
  "starthistorydate":<ticks>,
  "endhistorydate":<ticks>
}

response

The response for any request for alarms will contain the matching alarminstanceguid, along with an array of “alarmvalues“. Each alarm value itself is an array containing the values for the individual alarms. Use the AlarmID field when referencing any individual alarm for performing an Ack or Delete operation.

{
  "alarminstanceguid":"<guid>",
  "alarmvalues":[
    [
      "<NetworkNode>"
      "<AlarmID>"
      "<AlarmType>"
      "<Group>"
      "<Priority>"
      "<Text>"
      "<Active>"
      "<Acked>"
      "<TimeDelay>"
      "<AlarmValue>"
      "<AlarmLimit>"
      "<ClearedValue>"
      "<AlarmDateTime>"
      "<ClearedDateTime>"
      "<AckedDateTime>"
      "<AckedUser>"
      "<Units>"
      "<Document>"
      "<Comment>"
      "<OKToDelete>"
      "<OKToComment>"
    ],
    ...
  ],
  "message":"",
  "status":"<OK | ERROR>"
}

/updatealarm

Used to update an alarm, marking it as acknowledged or marking it for deletion.

message

Passing in a “requesttype” of “Ack” will mark the alarm identified with “alarmid” as acknowledged, and passing in “Delete” will mark the alarm for deletion.

{
  "token":"<token>",
  "alarmid":"<alarmid>",
  "networknode":"<networknode>",
  "requesttype":"<Ack | Delete>"
}

response

{
  "alarminstanceguid":"<guid>",
  "message":"",
  "status":"<OK | ERROR>"
}

HTTP API JSON Data Structures

Any client that can make HTTP calls using JSON data structures can call the API to perform any of the following functions. All urls are relative to the base OPCSystems Service address with a port designated for the HTTP calls. Urls follow the pattern:

<protocol>://<server>:<port>/OPCREST<operation>

Example:

http://your.server.com:58725/OPCREST/gettoken

The API and client library utilizes the JSONP pattern to allow for greater flexibility in deployment without the need for the OPCSystems Service and the web application to be on the same domain. As such, all calls to the API are HTTP GET commands with UrlEncoded data sent as parameters. The required parameters for all API calls are as follows:

callback : <string>

The JSONP callback name. If not implementing the JSONP pattern in the client itself, this can be any string and will be the function name returned by the server containing the response data.

message : <string>

A UrlEncoded string that is the JSON structure required for the particular request. So if you wanted to pass in the necessary structure for executing a call to gettoken, you would pass the following JSON into the message parameter:

{%22un%22:%22someuser%22,%22pw%22:%22somepassword%22}

So, a full example of a call to an OAS server to execute the gettoken operation would look like the following:

http://your.server.com:58725/OPCREST/gettoken?callback=mycallback&message={%22un%22:%22someuser%22,%22pw%22:%22somepassword%22}

Also following the JSONP pattern, the response will take on the form of a JavaScript function with a single parameter containing the JSON response data. For example, if the request parameter for callback was passed a value of “mycallback”, the response would take the following form:

mycallback(<JSON data>);

So using the full example above, you would get something similar to the following as a response:

mycallback({"message":"94ae2a8e-8c20-4578-88a8-bc8089dedb63","status":"OK"});

HTTP API Overview

NOTE: This is the underlying API used only by the Web HMI, Web Alarm, and Web Trend features. You are free to use this if you want to make some simple calls to the OAS server over HTTP for data, but if you are looking for a more fully-featured API for HTTP access, see the REST API.

Overview – Web User Interface Programming

 

Real-time Data JS Interface

Refer to the Web HMI – Programming Reference for reference and examples of accessing real-time data in a web client using Javascript

Real-time and Historical Trend JS Interface

Refer to the Web Trend – Programming Reference – Web Trend for reference and examples of accessing real-time and historical trend data in a web client using Javascript

Real-time and Historical Alarm JS Interface

Refer to the Web Alarm – Programming Reference –  Web Alarm for reference and examples of accessing real-time and historical alarm data in a web client using Javascript