Discover our Clipsal Smart Home packages as seen on The Block 2018

in location

OR

I'm looking for

  • Wholesalers
    • Uncheck All Check All
  • EXPERTISE
    • Expand
    • Expand
    • Expand
    • Uncheck All Check All
  • Switchboard Manufacturers
    • Uncheck All Check All
OR

The best way to see what Clipsal electric products can do for your home is seeing them in action at a Clipsal Display Centre.

Product stock may vary according to location. If you're after a specific product range, please check with your chosen location before visiting.

10 Results
    Load More Load Complete
    Change Location

    How to import historic data using LoadDataValue, LoadDataValues and LoadDataFile methods

    DISCLAIMER

    The example below is intended to demonstrate one or more features or methods and is presented as a configuration example only. Schneider Electric assumes no liability for the use or application of this example or any portion thereof.

    Sometimes it is necessary to import historic data to ClearSCADA points. Several methods exist in the Historic aggregate class for that. The ones we are going to discuss in this article are: LoadDataValue, LoadDataValues, LoadDataFile.

    Below a brief description on how those methods can be used:

    LoadDataValue

     LoadDataValue( Reason{BYTE},
                    Quality{LONG},
                    Timestamp{TIME},
                    Value{VARIANT} )

    Values for Quality parameter (ClearSCADA uses standard OPC HDA quality definitions), e.g.:
    • 0 = Bad
    • 64 = Uncertain
    • 192 = Good
    Values for Reason parameter (Reason For Logging field available in the historic database):
    • 0 = Current Data
    • 1 = Value Change
    • 2 = State Change
    • 3 = Timed Report
    • 4 = End of Period
    • 5 = End of Period Reset
    • 6 = Override
    • 7 = Release Override
    • 8 = Modified/Inserted
    LoadDataValues

     LoadDataValues( Value{Array of Variant},
                     Timestamp{Array of Time},
                     Quality{Array of Long},
                     Reason{Array of Byte} )

    Same as LoadDataValue except the parameters passed in are arrays instead of single values. A maximum of 5,165 elements are allowed in the arrays, otherwise an error will be raised.
    The Reason argument is optional - when omitted defaults to 0 (Current Data).


    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.
    • Time stamps must be in chronological order, from older to newer.
    • Reason is set to 0 (Current Data) on import.
    Notes:
    - LoadDataFile is much faster at importing records than LoadDataValues.
    - You can invoke the methods from scripts, ST logic programs or external tools by using Automation Interface or .NET API.
     


     

    Didn’t find what you were looking for?

    Try Searching Again View Our Categories

    Need further assistance?

    Our Customer Care department provides total customer service solutions for our residential, industrial and commercial applications.

    Get Assistance