Importing Calculations with Line Breaks into Historian

About this task

You can import calculations with line breaks into Historian when you use the File Collector or the Excel Add-in.

Procedure

  1. To create a line break in a .CSV file for the File Collector, you insert the *CR* character sequence where you want each line break to occur.
  2. To create a calculation with multiple lines in Excel, press Alt+Enter at the end of each line where you want a line break to occur within a cell.
    You can also use the *CR* character sequence to denote a line break in the formula.

    Example of a .CSV File that Includes a Calculation with Multiple Lines

    In the following example the bolded *CR* characters identify where the line breaks occur in the calculation formula.
    [Tags]
    
    Tagname,Description,DataType,HiEngineeringUnits,LoEngineeringUnits,Calculation,
    CollectorType,CollectorName,CollectionType,CalculationDependencies
    CalTag16,Multiline calc tag sample,SingleFloat,35000,0, "'multiline calc comment*CR*IF CurrentQuality
    (^Fixlab15.simulation00001^)=100 THEN*CR*Result=CurrentValue(^Fixlab15.simulation00002^)
    *CR*END IF",Calculation,Fixlab15_Calculation,Unsolicited,Fixlab15.simulation00001
    Important: For this example to work, only include three line breaks: one after the word [Tags], one after the word CalculationDependencies on line 3, and one at the very end of the example. It is important that the last 4 lines of this example all appear on the same line in the actual .CSV file. The example only includes extra line breaks so that the text is more easily readable, and does not flow off the page.