The URL Scanner Tag :
Typical uses of URL Scanner Tag include:
For an example of retrieving weather data see Fernhill SCADA Connection to OpenWeatherMap.
The File Tag supports the configuration properties of the Alarm Tag plus these properties:
Property | Type | Version | Description |
---|---|---|---|
ReadInterval | TIME | 3.33 | The interval between each read. An interval value of zero (T#0s) disables periodic query execution. See Interval and Offset for information on how timed activities are scheduled. |
ReadOffset | TIME | 3.33 | The offset added to the ReadInterval to get the actual read time. See Interval and Offset for information on how timed activities are scheduled. |
ReadTimeout | TIME | 3.33 | The maximum time allowed to read the file from the URL. |
URL | WSTRING | 3.33 | The Uniform Resource Locator (URL) of the file to read. |
FileType | USINT | 3.33 | The format of the data file. 0 = CSV, 1 = JSON. |
AlarmSeverity | UINT | 3.33 | The severity of the alarm raised when the data file can not be read. |
Password | WSTRING | 3.33 | An optional password value to send in the request. Note: The password value is encrypted and not stored as plain text. |
UserName | WSTRING | 3.33 | An optional user name to send in the request to read the file. |
The URL configuration property tells the driver where to locate the data file on the Internet or Intranet. The following example shows how to retrieve a file using the http protocol:
http://example.com/folder/data-file.csv
You can also use the https protocol for secure transfer:
https://example.com/folder/data-file.csv
You can also use FTP:
ftp://example.com/folder/data-file.csv
Note: Use the UserName and Password configuration properties to set the login credentials for the FTP service.
The FileType configuration property tells the driver the format of the Data File. These formats are supported:
Value | Format | Description |
---|---|---|
0 | CSV | Comma separated variables conforming to RFC 4180. |
1 | JSON | JavaScript Object Notation conforming to ECMA-404. |
The service providing the file may require authentication. Use the UserName and Password configuration properties to provide the login credentials for the service.
The URL Scanner supports the dynamic properties of the Alarm Tag, plus these additional dynamic properties:
Property | Type | Description |
---|---|---|
FileState | UINT | A code indicating the state of the external data File. The value 15 shows the data file was successfully read. Other values indicate an error. The ErrorMessage property may give additional information. |
ErrorMessage | WSTRING | An error message providing additional information. |
ReadTimer | TimerStatus | The status of the read timer. |
The FileState property can be used to diagnose problems with the data file:
ServerState | Description |
---|---|
0 | Initial state before the driver has started |
1 | The driver was unable to open the data file |
15 | The data file was successfully read |
The URL Scanner Tag supports the tag commands of the Alarm Tag plus these tag commands:
Tag Command | Version | Description |
---|---|---|
Refresh | 1.6 | Requests an immediate read of all of the tags associated with this URL Scanner. |
Note: Event triggered data reads (from the Refresh tag command) and periodic data reads (defined by the ReadInterval property) are independent. You can use the Refresh tag command, or the ReadInterval property, or both to determine when the tags are read.
The URL Scanner Tag builds on the features of these tag types:
Fernhill SCADA Connection to OpenWeatherMap
To learn how to retrieve data from the OpenWeatherMap service.
To learn how activities are scheduled using Interval and Offset.
To learn about the IO Analog Data Tag that can be associated with the URL Scanner Tag.
To learn about the IO Digital Data Tag that can be associated with the URL Scanner Tag.
To learn about the IO String Data Tag that can be associated with the URL Scanner Tag.
To learn about the IO Word Data Tag that can be associated with the URL Scanner Tag.
To learn about the IO Double Word Data Tag that can be associated with the URL Scanner Tag.
Data File DriverFor an overview of the Data File Driver.
For the meaning of terms used in Fernhill SCADA.