Support Forums
use JSON/XML Driver in VTScada A to read a tag from VTScada B.

I want use JSON/XML Driver in VTScada A to read a tag from VTScada B.

The VTScada B has configured the corresponding parts. So I can get tag1 data in browser with URL "http://192.168.1.2:8080/web/REST/SQLQuery?query=select timestamp,'MyTest\Machine1\CommDriver\Tag1:value' from history ORDER BY Timestamp DESC limit 5" from VTScada B.
6180d8d58e67d
The data is as below:
{"results":{"fieldNames":["timestamp","MyTest\Machine1\CommDriver\Tag1:value"],"fieldTypeNames":["TIMESTAMP","DOUBLE"],"values":[[1635834093.209,22512],[1635834092.201,22510],[1635834091.194,22509],[1635834090.209,22507],[1635834089.2,22506]]},"returnCode":0,"errorMessage":null,"nextPageToken":null,"paginationStats":{"numRetrieved":5,"numResults":5,"timestampRetrieved":1635834089.2}}

Now I want use the JSON/XML Driver in VTScada A to read the tag1 data. My config is as below:
6180d3545ed74
6180d9a29776d

But I can`t get the data. What is wrong? Maybe do I need a new "Processor"? Whould you like to give me a sample with my data structure?

Thank you.

I want use JSON/XML Driver in VTScada A to read a tag from VTScada B. The VTScada B has configured the corresponding parts. So I can get tag1 data in browser with URL "http://192.168.1.2:8080/web/REST/SQLQuery?query=select timestamp,'MyTest\Machine1\CommDriver\Tag1:value' from history ORDER BY Timestamp DESC limit 5" from VTScada B. ![6180d8d58e67d](serve/attachment&path=6180d8d58e67d) The data is as below: {"results":{"fieldNames":["timestamp","MyTest\\Machine1\\CommDriver\\Tag1:value"],"fieldTypeNames":["TIMESTAMP","DOUBLE"],"values":[[1635834093.209,22512],[1635834092.201,22510],[1635834091.194,22509],[1635834090.209,22507],[1635834089.2,22506]]},"returnCode":0,"errorMessage":null,"nextPageToken":null,"paginationStats":{"numRetrieved":5,"numResults":5,"timestampRetrieved":1635834089.2}} Now I want use the JSON/XML Driver in VTScada A to read the tag1 data. My config is as below: ![6180d3545ed74](serve/attachment&path=6180d3545ed74) ![6180d9a29776d](serve/attachment&path=6180d9a29776d) But I can`t get the data. What is wrong? Maybe do I need a new "Processor"? Whould you like to give me a sample with my data structure? Thank you.
edited Nov 2 '21 at 6:31 am

Firstly you will have to "escape" the URL by % encoding it, as per the URL in the browser.

Secondly you can only retrieve one of the values in the array and would need a custom processor to also retrieve the associated timestamp.

In general, to retrieve SQL data from VTScada (or elsewhere) you should use the SQL data driver and for VTScada this also requires the VTScada ODBC Driver.

Firstly you will have to "escape" the URL by % encoding it, as per the URL in the browser. Secondly you can only retrieve one of the values in the array and would need a custom processor to also retrieve the associated timestamp. In general, to retrieve SQL data from VTScada (or elsewhere) you should use the [SQL data driver](https://www.vtscada.com/help/Content/D_Tags/D_SQLDataQueryDriver.htm) and for VTScada this also requires the VTScada ODBC Driver.

Software Developer with Trihedral

46
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft