Adding a Python Expression Tag to Historian

About this task

You can now add a Python Expression Tag to Historian. Ensure the following for your Python Expression Tag:
  • CalcType is set to "PythonExpr".
  • SourceAddress contains the JSON configuration.

Adding the Python Expression Tag can be done using Historian File Collector or Historian Excel Add-in in the same way that you would add a regular tag.

For more information on adding tags, refer to Historian File Collector or Historian Excel Add-in.
  • File Collector (especially the CSV File Formats and XML File Formats sections)

    If you add your tag to the Historian via the File Collector and using the CSV format, you must enclose the JSON in quotation marks (") to satisfy CSV requirements for a column value containing commas (,).

    This means that you will also need to escape any quotation marks (") in the JSON. That is, " becomes "" (as " is used to escape another ").

  • Using the Historian Excel Add-in

    The Historian Excel Add-In has the advantage of being easiest to use for editing your JSON.