Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If the Report is defined with three rows, representing three values, such as registers 40001 (UINT16 value=1001=0x03E9, No swapping), 41001 (UINT32 value=100,000=0x000186A0, with Word Swap), and 42001 (REAL32 value=3.1415=0x40490E56, with Byte and Word Swap), a 10-byte file will be created with the numeric values indicated. The "No Swapping" indicates using the bytes in little-endian order. The contents of the file (shown here in ASCII equivalents) would be:

E9 03
E9 86 A0 00 01 56 0E 49 04
01 00 A0 86 40 49 0E 56

 

XML (as Attributes Only) - Value is given as a "Value=" attribute.

<?xml version="1.0" encoding="UTF-8"?>
<REPORT Name=”ReportName”>
    <field Name="40001", Value="9999", Units="degF" />
    <array Name=”1stArray”>
       
<field Name="40002", Value="9999", Units="degC" />
        <1stObject>
            <field Name="MyFloat", Value="3.1415", Units="psi" />
            <field Name="MyString", Value="This is a String32 register", Units="none" />
        </1stObject>
    </array>
    <field Name="Calc-CRC-32", Value="0x0", Units="none" />
</REPORT>

 

XML (Values and Attributes) - Value is include between start and end <field> tags.

<?xml version="1.0" encoding="UTF-8"?>
<REPORT Name=”ReportName”>
    <field Name="40001", Units="degF" >9999</field>
    <array Name=”1stArray”>
        <field Name="40002", Units="degC" >9999</field>
        <1stObject>
            <field Name="MyFloat", Units="psi" >3.1415</field>
            <field Name="MyString", Units="none" >This is a String32 register</field>
        </1stObject> 
    </array>
    <field Name="Calc-CRC-32", Units="none" >0x0</field>
</REPORT>

 

JSON

{
    "40001": 9999,
    "1stArray":
    [
        "40002":9999,
        "1stObject":
        {
            "MyFloat": 3.1415,
            "MyString": "This is a String32 register"
        }
    ]
    "Calc-CRC-32": 0x0
}

 

CSV (Two rows, multiple columns)

40001,40002,MyFloat,MyString,Calc-CRC-32
9999,9999,3.1415,This is a String32 register,0x0

 

TXT (Property=Value)

40001=9999
40002=9999
MyFloat=3.1415
MyString="This is a String32 register"
Calc-CRC-32=0x0

 

Process-RTDB-Report

The Process-RTDB-Report object generally defines the structure of a packet of data to be reported using MQTT or some other process on a non-real-time basis. The Report may be defined as either a binary (byte) structure or text format (CSV, JSON, XML, etc.). The Automation “Process” objects contain one or more table rows which are responsible for triggering on certain conditions and calling the Report generation, using data from the Channel/RTU, and then publishing the report using a defined publisher process (in most cases). A Report may be called by more than one Process table row.

...

RTDB Report Definition TableValues
DataReg Offset

If the Process row that calls this Report uses a non-zero DataReg register address, then the Report will reference RTDB registers that are offset from that location. The DataReg Offset may be positive or negative (-65535 to 256,000).

For instance, if DataReg=40101, then if the Report includes rows with DataReg Offset = 0, 2, and -1, the Report data will be taken from RTDB registers 40101, 40103, and 40100.

If the Process row that calls this report has DataReg=0, then the Report must reference absolute RTDB register addresses.

For instance, if DataReg=0, then the Report's would reference DataReg Offset registers of 40101, 40103, and 40100 explicitly.

SrcReg Count

Number of source registers starting at DataReg Offset which are concatenated together into a single data value.

If the data value is a 32-bit integer and comes from two 16-bit registers, the SrcReg Count=2. If the data value is a String and the ASCII values of the string come from multiple registers, SrcReg Count is the number of registers making up a single text string.

Output Format 

Format of data to be stored into the Report output (not necessarily the format of the source data registers). Formats include:

TypeOutput Mode=BinaryOutput Mode=text (JSON, CSV, etc.)
BooleanOutput a whole 8-bit byte of 0 or 1.Boolean becomes a string value of "false" or "true", depending on a zero or non-zero source value.
Char-8 Store lower 8 bits of register (or a different set of 8 bits, depending on the Byte and Word swapping option Don't use this format option – use the Text String format instead.
Unsigned or Signed Integer, 16-bit or 32-bitOnly used in ACE for visual indication of the source data type. If reading 16 bits from a 32-bit register, use a 16-bit typeOutput either a 16-bit or 32-bit signed or unsigned number. 
32bit Floating Point Only used in ACE for visual indication of the source data type.Output a floating point number.
 Text String
  • If source is STRING-32 register(s), store 32*SrcReg_Count bytes.
  • If the source register type is an integer, use SrcReg_Count registers and apply byte/word swapping.
  • If source is STRING-32 register(s), concatenate SrcReg_Count registers together as one string.
  • For integer source register type, assume registers contain ASCII characters. Concatenate up to SrcReg_Count registers until reaching a Null character.
Hexadecimal Integern/a Represent 16-bit or 32-bit source registers as ASCII hex bytes "00" through "FF" in the text Report.
Unsigned or Signed Integer, 64-bit Same as above for 16-bit or 32-bit integers.Same as above for 16-bit or 32-bit integers. 
64bit Floating Point Same as above for 32-bit floating point. Same as above for 32-bit floating point. 
Hexadecimal 64bit Integern/aSame as above for 16-bit or 32-bit hexadecimal.
YYYY-MM-DDTHH:MM:00 from UINT32 EPOCH Seconds or (2) INT16n/aStore one UINT32 or two UINT16 registers as Linux ISO time with "00" seconds.
YYYY-MM-DDTHH:MM:00+TZN:00 from UINT32 EPOCH Seconds or (2) INT16n/aSame, with timezone.
YYYY-MM-DDTHH:MM:00 from (2)UINT32 Date(MMDDYYYY), Time(HHmm)n/aStore two UINT32 registers as Linux ISO time with "00" seconds (first register contains MMDDYYYY, second contains (HHmm). 
YYYY-MM-DDTHH:MM:00+TZN:00 from (2) UINT32 Date(MMDDYYYY), Time(HHmm)n/aSame, with timezone.
YYYY-MM-DDTHH:MM:SS from (2)UINT32 Date(MMDDYY), Time(HHmmSS)n/aStore two UINT32 registers as Linux ISO time with "SS" seconds (first register contains MMDDYY, second contains (HHmmSS).
YYYY-MM-DDTHH:MM:SS+TZN:00 from (2) UINT32 Date(MMDDYY), Time(HHmmSS)n/aSame, with timezone.
YYYY-MM-DDTHH:MM:SS from Omni STRING-16 MM-DD-YYHH:mm:SSn/aTake date from String register in Omni text report format ("MM-DD-YYHH:mm:SS") and store to Report as Linux ISO time with "SS" seconds.

YYYY-MM-DDTHH:MM:SS+TZN:00 from Omni STRING-16 MM-DD-YYHH:mm:SS

n/aSame, with timezone.

Text-8 Chars only
Text-16 Chars only
Text-24 Chars only
Text-32 Chars only
Text-48 Chars only
Text-64 Chars only
Text-128 Chars only
Text-All Chars

Output text fields in fixed length (8, 16 characters, etc.) to ensure the binary Report payload fixed width is not exceeded for a string.n/a - use Text String type.
NESTING STARTn/a

For JSON Report type, create a start of JSON object, using text from the ReplaceName column as the element name.

For XML Report type, create a nested XML start tag using ReplaceName.

Examples:
JSON:    MyTag: {
XML:     <MyTag>

SEARCH-TEXT is ignored for this row. The object or tag should be closed with a "NESTING END" row. All rows in between will be nested data elements in the structure.

NESTING END n/a 

Close a JSON or XML nested structure (SEARCH-TEXT is ignored).

Examples:
JSON:    }
XML:     </MyTag>

 ARRAY STARTn/a 

For JSON Report type only: create a JSON array object by adding an opening square bracket (SEARCH-TEXT is ignored). This array should be closed with an "ARRAY END" row. All rows in between will be comma-separated elements in the array, with values only (no keywords/tag names).

ARRAY END n/a For JSON Report type only: add closing square bracket to an array. SEARCH-TEXT is ignored.
IP-ADDRESSn/a Take four numeric octets (from 32-bit integer, or two 16-bit integer registers) and output IP address in dotted decimal notation. 
Swapping 

Swapping is sometimes needed to reverse byte or word order of the source registers in order to produce the correct byte order for a Binary Report type, or to display the correct value for a text Report type Report. Swapping options are:

  • No Swapping (little-endian byte order, LSB first)
  • Swap Bytes (within 16-bit words)
  • Swap 16-bit Words (applies to 32bit registers only)
  • Swap Bytes and Words (big-endian byte order, MSB first)
  • Swap DWords (64bit data, change order of high and low 32-bit words)
  • Swap DWords,Bytes (64bit data)
  • Swap DWords,Words (64bit data)
  • Swap DWords,Words,Bytes (64bit data, bit-endian byte order, MSB first)
Name 

Not used for Binary Report format.

For text Report types (JSON, XML, CSV, TXT), the following options are used:

  • "+"  indicates that the Tagname of the DataReg register will be used for identifying the data value. If no Tagname exists, the register number will be used for the tag.
  • Otherwise, the text in the Name column will be used to identify the data value.
Units Units code (in text) is added to XML Report as an Attribute. Not used for all other Report types.

Scale_1
Scale_2
Scale_3

Scale fields are used for all Report types to apply engineering scaling before storing the value into the Report. Only one operation is allowed per field, but up to three Scale fields may be used, which are applied sequentially. Scale should be entered with operator first, then a number. Operators include:

+ (add), - (subtract), * (multiply), / (divide), or  i  (invert source value, then multiple by a number)

Examples (Scale_1, 2, and 3 fields are shown):
Convert Celsius to Fahrenheit:    *9    /5    +32
Convert Fahrenheit to Celsius:    -32   /9    *5
Divide 5.9 over the register value, then add 20.3:   i5.9    +20.3   ____

Spare Unused property. 
Comment Optional column, allowing a descriptive comment to be entered for each row in the table. The Comment field is unused in the configuration.

...

Below is one example of using a Process row to generate a Report file from RTDB, followed by calling a Bash script (ProcessScript#) instead of publishing the file directly. Many other examples could be supplied. In this example, the following items are illustrated:

  1. A Field Unit is configured with several registers pre-defined with Tagnames and values.
  2. The Generic Registers automated process calls a Report with the "TXT (Property=Value)" text format.
  3. The Report creates a text file, using register tag names and values for its data content.
  4. After creating the Report, the ProcessScript0 is executed, which . In this example, the script uses the text TXT Report contents and the Report Header as Bash script parameters, which is unique to the TXT report type (Property=Value pairs are 'source'd by the script, which turns the properties into Bash variables).
  5. The ProcessScript executes some Bash logic and stores certain information into a different FieldUnit's RTDB.

...