Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84608members
353904posts

C# loaddatafile

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
DavidSkilbeck
Lt. Commander
Lt. Commander
0 Likes
6
1131

C# loaddatafile

Hi, is it possible to load a data file in to the history of a point with c#. I have an example of loading a data value.

Thanks,


Accepted Solutions
tfranklin
Lt. Commander
Lt. Commander
3
1116

Re: C# loaddatafile

The more you know.  Thx

 

Looks like reason is still defaulted to 0 though.

 

Depending on the use case you may still consider LoadDataValues for the extra reason code parameter.

 

 

*Edited -- I RTFM*

See Answer In Context

6 Replies 6
tfranklin
Lt. Commander
Lt. Commander
5
1126

Re: C# loaddatafile

It should be the same process but calling a different method. 

  1. The file must be accessible by the user running the script
  2. The format of the file is drastically different than LoadDataValue, as there is no quality and the date is broken into separate columns.  If you need to include quality or a different reason, I'd advise using LoadDataValues

 

I'd reference this article here, but keep in mind that the Resource Center is going away. 

https://tprojects.schneider-electric.com/telemetry/display/public/CS/Importing+History+Using+LoadDat...

 

The below is shamelessly copied from the article above.

 

 

Spoiler

 

LoadDataFile
 LoadDataFile( FileName{String} )

The LoadDataFile method takes a filename as its single parameter. This is the name of a local CSV on the main server. Some points to note about the files to be imported:

  • Each line of the CSV file specifies a single record and has the format: YYYY,MM,DD,HH,MM,SS,Value
  • The file must be in ANSI format.
  • To insert comments into the file start the line with a semi-colon.
  • Reason is set to 0 (Current Data) on import.
AndrewScott
Commander
Commander
4
1122

Re: C# loaddatafile

The online help has two examples of using the LoadDataFile method, plus details of how to specify quality:

 

See https://tprojects.schneider-electric.com/GeoSCADAHelp/Geo%20SCADA%202020/Default.htm#ServerAdministr... (bottom of page)


Andrew Scott, Lead Engineer, AVEVA
tfranklin
Lt. Commander
Lt. Commander
3
1117

Re: C# loaddatafile

The more you know.  Thx

 

Looks like reason is still defaulted to 0 though.

 

Depending on the use case you may still consider LoadDataValues for the extra reason code parameter.

 

 

*Edited -- I RTFM*

AndrewScott
Commander
Commander
0
1106

Re: C# loaddatafile

The 'reason for logging' for each record is fixed as "Current Data" (0) when using LoadDataFile method.


Andrew Scott, Lead Engineer, AVEVA
DavidSkilbeck
Lt. Commander
Lt. Commander
0 Likes
1
1097

Re: C# loaddatafile

Hi, yes the line below is exactly one of things I was trying to determine.

Is there a big time saving with LoadDataFile to make it worth while investing the extra time and effort as to using LoadDataValues.

I already have code that iterates through with LoadDataValues.

 

"Depending on the use case you may still consider LoadDataValues for the extra reason code parameter"

 

I would still like to see the LoadDataFile work with C#.

But maybe at a later date.

 

 

Thanks,

BevanWeiss
Spock
Spock
0
1037

Re: C# loaddatafile

There were performance benefits, I think when I last did anything with the LoadDataFile it was on the order of 2-10x faster.

But the restrictions, and the requirement to generate the file in a particular format really meant that it wasn't worth it.

The overall process needed more steps, and hence it actually took longer in real world times.

 

Issues were things like:

  1. the file needing to exist on the server, so the data couldn't just come from the client
  2. file format isn't very standard from other platforms, so needed an entire process to generate it
  3. not able to customise the reason code
  4. not able to simultaneously 'process' the data (i.e. if the value was the same, LoadDataFile would import it always, with LoadDataValues we could easily have code do compression / skipping during loading

 

I'd say if LoadDataValues is working for you, it's easiest to just keep that as the backend load mechanism, and then you can easily tweak your front end loading code to do the things you want (like loading data from the client etc)


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..