0

Logging Data from InTouch OPC

How do I configure an InTouch OPC logging session to start automatically?

1 reply

null
    • Tweet tweet, I'm a bot
    • canarybot
    • 3 yrs ago
    • Reported - view

    If using an InTouch OPC server, some additional settings will need to be configured. Follow these steps: 

    1. Open the Canary Admin application, select the 'Logger' tile.
    2. Change the 'Run As' dialog to 'Interactive User'. Apply the changes.

    When these changes are applied the logger will not automatically start on system startup or failure.  Setting up the service to run on start up would then require some scripting in the OPC server. There are two ways to accomplish this.

    • Linking the script to CLIHistStart.exe
    • Linking the script to CLIInTouchHistStart.exe 

    CLIHistStart

    The CLIHistStart program provides options for starting and stopping log sessions through command line input by making calls to the CLILogger.exe which runs in the background. By placing a shortcut to the CLIHistStart with command line input into the Startup folder, log sessions can be started automatically as long as there is a user logged on to the machine. For auto starting without a user logon see below.

    Input to this program can be provided through command line options, switches and arguments. The names are case-sensitive and quotes must be used if there is a space in the option.

    Syntax:

    CLIHistStart [/delay:[seconds]] [/wait:[process]] [/silent] [/stop][/newfile] [/showpath] [fullpath .lcf] [filename .lcf]

     

    Parameter

    Description

    /delay:<seconds>

    Optional. The number of seconds the Logger should delay before requesting data from the OPC server.

    /wait:<process>

    Optional. An executable process including the '.exe' extension to wait for.  When the specified process shuts down the logging session(s) will stop and unload..

    /silent

    Optional.  Errors will not be displayed, but will be written into the error log file.

    /stop

    Optional. Stops the logging session(s).

    /newfile

    Optional. Creates a new file when the logging starts for all specified log sessions.

    /showpath

    Optional for development. Displays the short filename (8.3) path to the program. This is needed for scripting that does not except long filenames. Use this switch from the Run command to display the path in a dialog.

    <fullpath .lcf>

    The full path to the .lcf (Logger Configuration File) file.

    <filename .lcf>

    Optional. Additional .lcf files located in the same directory can be started with only the filename and extension.  Otherwise the full path is required.

     

    Example

    "C:\Program Files\Canary Labs\Logger\CLIHistStart.exe" /delay:30 "C:\Program Files\Canary Labs\History Data\Sample Data.lcf"

    CLIInTouchHistStart

    The CLIInTouchHistStart program provides options for starting and stopping an InTouch log session through command line input by making calls to the CLILogger.exe which runs in the background. Simply calling CLIInTouchHistStart from script when View.exe starts will create a Historian dataset, create a Logger session, read the tags checked for logging in the InTouch project and start the log session.  By default it will monitor View.exe and stop the log session when View is closing.

    Input to this program can be provided through command line switches and options. The names are case-sensitive and quotes must be used if there is a space in the option.

    Syntax:

    CLIInTouchHistStart [/session:[NameOfLoggerSession]] [/dataset:[NameOfLoggerSession]] [/delay:[seconds]] [/computer:[HistorianComputerName]] [/rate:[UpdateRate]] [/normalization:[UpdateRate]] [/batch:[InTouchTagname]] [/silent] [/nowait] [/stop] [/showpath]

     

    Parameter

    Description

    /session:<NameOfLoggerSession>

    Optional. Sets the name of the Canary Logger log session. This will default to the InTouch application name.

    /dataset:<NameOfLoggerSession>

    Optional.  Sets the name of the Enterprise Historian DataSet. This will default to the log session name.

    /delay:<seconds>

    Optional. The number of seconds the Logger should delay before requesting data from the OPC server.

    /computer:<HistorianComputerName>

    Optional. The name of the computer that the Historian is on. This defaults to the local Historian.

    /rate:<UpdateRate>

    Optional. The Update Rate for the OPC Group in milliseconds.  This will default to the setting read from the tag dictionary for the InTouch project.

    /normalization:<UpdateRate>

    Optional. The Normalization Time for the OPC Group in milliseconds.

    /batch:<InTouchTagname>

    Optional.  The tag name for the InTouch tag which identifies the batch ID.

    /silent

    Optional.  Errors will not be displayed, but will be written into the error log file.

    /nowait

    Optional. CLIInTouchHistStart  will exit WITHOUT waiting for InTouch to shutdown.  The log session remains loaded and started in the CLILogger until the user manually stops it.

    /stop

    Optional. Stops the logging session(s).

    /showpath

    Optional for development. Displays the short filename (8.3) path to the program. This is needed for scripting that does not except long filenames. Use this switch from the Run command to display the path in a dialog.

     

    Example:

    Below is an example of the short filename path used in the StartApp function of the 'On Startup' condition in the application script.

    StartApp "C:\PROGRA~1\CANARY~1\Logger\CLIINT~1.EXE";

Content aside

print this pagePrint this page
  • Status Answered
  • 3 yrs agoLast active
  • 1Replies
  • 161Views
  • 1 Following