EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-18 10:47 PM
Hello,
I want to try import historical data from *.csv file.
I try to use this script:
sub AddDataFileAI22()
Set obj = Server.FindObject("2.Temperature.AI22")
Set His = obj.Interface.Historic
His.LoadDataFile "C:\GeoScada\Test.csv"
end sub
I put this script in New script library also I try to run this script via new button, Pick action -> Script.
But in both cases the data could not be uploaded to historical archive.
In csv file (created with Notepad++) I'm using this format
2024,02,14,09,25,05,15.2,192
I try to put this historical data to Modbus AI point.
Where could the problem be?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-29 03:44 AM
I've tried everything, but nothing has helped. But I've solved this problem with TransferHistory tool.
Thank you for help!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-19 02:36 AM
Double check the file encoding, should be ANSI whereas I suspect most text editors these days use Unicode by default.
* Should be ANSI according to https://community.se.com/t5/Geo-SCADA-Knowledge-Base/Importing-History-Using-LoadDataValue-and-LoadD...
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-19 04:04 AM
I checked one more time, encoding is ANSI.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-20 01:00 AM
When the LoadDataFile method fails what error message is reported?
As your using a mimic script it will be running on a ViewX client, but the filename passed to the LoadDataFile method is the name of a file on current main server where the method is executed. Have you copied the "Test.csv" file onto the correct server?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-20 04:29 AM
When I try to execute the script, I don't get any messages in event list, or in log txt files.
ViewX and server is in my computer, "Test.csv" file is also in my computer.
Maybe there are other ways to execute the script?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-23 01:53 AM
If the LoadDataFile method call fails then the error is returned back to the script and will be displayed in ViewX in an error dialog box. For example:
You can also see the method call and error message in the DB log on the server. For example:
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Request {POST, /webservices/scx, HTTP/1.1}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {Accept-Encoding: deflate}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {SCX6-Auth: *****;}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {Content-Type: text/xml; charset=utf-8}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {SOAPAction: "http://serck-controls.com/webservices/SCX6/Invoke"}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {SCX-Client-Version: 6.87.8812}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {User-Agent: ViewXScript}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {Host: localhost:8080}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {Content-Length: 289}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Header {Connection: Keep-Alive}
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 Request Content
A1AC <?xml version="1.0"?>
A1AC <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
A1AC <soap:Body>
A1AC <Invoke xmlns="http://serck-controls.com/webservices/SCX6/">
A1AC <Object>77</Object>
A1AC <DispId>1666208740</DispId>
A1AC <Context>get</Context>
A1AC </Invoke>
A1AC </soap:Body>
A1AC </soap:Envelope>
23-FEB-2024 09:40:48.447 A1AC [WEB] W01#00 ObjectId: 77
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Reply Content
A1AC <?xml version="1.0"?>
A1AC <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
A1AC <soap:Body>
A1AC <InvokeResponse xmlns="http://serck-controls.com/webservices/SCX6/">
A1AC <Result interface="true" interfaceDefined="true"/>
A1AC </InvokeResponse>
A1AC </soap:Body>
A1AC </soap:Envelope>
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Reply {HTTP/1.1 200 OK}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Header {Date: Fri, 23 Feb 2024 09:40:48 GMT}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Header {Expires: Fri, 23 Feb 2024 09:40:48 GMT}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Header {Cache-Control: no-cache}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Header {Content-Type: text/xml; charset=utf-8}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Header {Content-Length: 283}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Header {X-Frame-Options: SAMEORIGIN}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 UpdateStartRequestTime : Read Request
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Request {POST, /webservices/scx, HTTP/1.1}
23-FEB-2024 09:40:48.448 A1AC [WEB] W01#00 Header {Accept-Encoding: deflate}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {SCX6-Auth: *****;}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Content-Type: text/xml; charset=utf-8}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {SOAPAction: "http://serck-controls.com/webservices/SCX6/GetIDsOfNames"}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {SCX-Client-Version: 6.87.8812}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {User-Agent: ViewXScript}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Host: localhost:8080}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Content-Length: 314}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Connection: Keep-Alive}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Request Content
A1AC <?xml version="1.0"?>
A1AC <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
A1AC <soap:Body>
A1AC <GetIDsOfNames xmlns="http://serck-controls.com/webservices/SCX6/">
A1AC <Object>
A1AC <Interface>1666208740</Interface>
A1AC 77</Object>
A1AC <Name>LoadDataFile</Name>
A1AC </GetIDsOfNames>
A1AC </soap:Body>
A1AC </soap:Envelope>
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Reply Content
A1AC <?xml version="1.0"?>
A1AC <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
A1AC <soap:Body>
A1AC <GetIDsOfNamesResponse xmlns="http://serck-controls.com/webservices/SCX6/">
A1AC <DispId>1398803563</DispId>
A1AC </GetIDsOfNamesResponse>
A1AC </soap:Body>
A1AC </soap:Envelope>
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Reply {HTTP/1.1 200 OK}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Date: Fri, 23 Feb 2024 09:40:48 GMT}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Expires: Fri, 23 Feb 2024 09:40:48 GMT}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Cache-Control: no-cache}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Content-Type: text/xml; charset=utf-8}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {Content-Length: 274}
23-FEB-2024 09:40:48.449 A1AC [WEB] W01#00 Header {X-Frame-Options: SAMEORIGIN}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 UpdateStartRequestTime : Read Request
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Request {POST, /webservices/scx, HTTP/1.1}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {Accept-Encoding: deflate}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {SCX6-Auth: *****;}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {Content-Type: text/xml; charset=utf-8}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {SOAPAction: "http://serck-controls.com/webservices/SCX6/Invoke"}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {SCX-Client-Version: 6.87.8812}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {User-Agent: ViewXScript}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {Host: localhost:8080}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {Content-Length: 487}
23-FEB-2024 09:40:48.450 A1AC [WEB] W01#00 Header {Connection: Keep-Alive}
23-FEB-2024 09:40:48.451 A1AC [WEB] W01#00 Request Content
A1AC <?xml version="1.0"?>
A1AC <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
A1AC <soap:Body>
A1AC <Invoke xmlns="http://serck-controls.com/webservices/SCX6/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
A1AC <Object>77</Object>
A1AC <Interface>1666208740</Interface>
A1AC <DispId>1398803563</DispId>
A1AC <Context>method</Context>
A1AC <Arg xsi:type="xsd:string">D:\ClearSCADA\TestData.csv</Arg>
A1AC </Invoke>
A1AC </soap:Body>
A1AC </soap:Envelope>
23-FEB-2024 09:40:48.451 A1AC [WEB] W01#00 ObjectId: 77
23-FEB-2024 09:40:48.451 A1AC [TRANS] 0 WebExecute Time = 0.000097 seconds
23-FEB-2024 09:40:48.451 A1AC [TRANS] 0 WEB Invoke
23-FEB-2024 09:40:48.451 A1AC [TRANS] 0 User Guest
23-FEB-2024 09:40:48.452 A1AC [TRANS] 0 Overall Status 8007006E -> The system cannot open the device or file specified.
23-FEB-2024 09:40:48.452 A1AC [TRANS] 0 ObjectId 77
23-FEB-2024 09:40:48.452 A1AC [TRANS] 0 InterfaceId 1666208740
23-FEB-2024 09:40:48.452 A1AC [TRANS] 0 DispId 1398803563
23-FEB-2024 09:40:48.452 A1AC [TRANS] 0 Flags 0x1
23-FEB-2024 09:40:48.452 A1AC [TRANS] 0 ArgCount 1
23-FEB-2024 09:40:48.452 A1AC [TRANS] 0 Arg 0: VT_BSTR D:\ClearSCADA\TestData.csv
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Reply Content
A1AC <?xml version="1.0"?>
A1AC <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
A1AC <soap:Body>
A1AC <soap:Fault>
A1AC <faultcode>soap:Client</faultcode>
A1AC <faultstring>The system cannot open the device or file specified.</faultstring>
A1AC <detail>
A1AC <scx:errorcode xmlns:scx="http://serck-controls.com/webservices/SCX6/">8007006E</scx:errorcode>
A1AC </detail>
A1AC </soap:Fault>
A1AC </soap:Body>
A1AC </soap:Envelope>
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Reply {HTTP/1.1 500 Internal Server Error}
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Header {Date: Fri, 23 Feb 2024 09:40:48 GMT}
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Header {Expires: Fri, 23 Feb 2024 09:40:48 GMT}
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Header {Cache-Control: no-cache}
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Header {Content-Type: text/xml; charset=utf-8}
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Header {Content-Length: 406}
23-FEB-2024 09:40:48.453 A1AC [WEB] W01#00 Header {X-Frame-Options: SAMEORIGIN}
If you're not seeing an error then that suggests the method was successful so the data should have been loaded into the historian for the point.
My only other thought is any historic compression configured on the point - this might be filtering out the new data. See Historic Data Compression in the help.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-29 02:29 AM
Another potential issue - check that your data times are not older than the writable period for your historic points.
(And make sure Historic data is enabled for each point too).
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-29 03:44 AM
I've tried everything, but nothing has helped. But I've solved this problem with TransferHistory tool.
Thank you for help!
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.