0% found this document useful (0 votes)
334 views2 pages

Niagara Command Line

This document describes how to use Niagara's command line interface (CLI) mode to load and run basic Niagara operations from a terminal. CLI mode allows running a Tcl script and then exiting back to the terminal. It provides parameters for specifying a driver, script, device ID, and directory. Supported Niagara commands in CLI mode include tools for bits, devices, buffers, drives, and those listed in a table such as ETM decoder and log dump.

Uploaded by

pou18615
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
334 views2 pages

Niagara Command Line

This document describes how to use Niagara's command line interface (CLI) mode to load and run basic Niagara operations from a terminal. CLI mode allows running a Tcl script and then exiting back to the terminal. It provides parameters for specifying a driver, script, device ID, and directory. Supported Niagara commands in CLI mode include tools for bits, devices, buffers, drives, and those listed in a table such as ETM decoder and log dump.

Uploaded by

pou18615
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Niagara Cmdline

This article describes how to use Niagara's cmdline-only mode. This mode allows Niagara users to load and run basic Niagara operations from a
Windows Command Prompt or Linux Terminal. Additionally, cmdline mode allows users to execute a Tcl script and then exit back to the
command prompt. This functionality is available in all editions of Niagara starting with version 3.3.7.

Running cmdline mode:

To open Niagara in cmdline mode, navigate to the Niagara folder. Then run the appropriate command for the OS being used:

Windows: Niagara_Cmdline.bat -d <driver> -s <script> -r <drive> -p <path>

Linux: bash Niagara_Cmdline.sh -d <driver> -s <script> -r <drive> -p <path>

All parameters are optional and may be issued in any order. For example:

Niagara_Cmdline.bat -d wincil -s test.tcl

Niagara_Cmdline.bat -s test.tcl -d wincil -r 1

A quick reference can be accessed using:

Niagara_Cmdline.bat -h

bash Niagara_Cmdline.sh -h

Starting in version 3.3.8, users can enter "ncli" (Niagara Command Line Interface) instead of "Niagara_Cmdline" in both Windows and Linux. The
"ncli" command is simply a wrapper for the Niagara_Cmdline files.

Legacy Arguments:

To open Niagara in cmdline mode, navigate to the Niagara folder. Then run the appropriate command for the OS being used:

Windows: Niagara_Cmdline.bat <driver> <script> <dev_id> <directory>

Linux: bash Niagara_Cmdline.sh <driver> <script> <dev_id> <directory>

If <driver> is not specified, Windows will default to using WinCIL and Linux will default to using SG.

If <script> is not specified, Niagara will load and then prompt the user for commands. Users can enter "exit" to return to the Command Prompt.

If <script> is specified, Niagara will load, attempt to run the Tcl script provided, and then automatically exit back to the Command Prompt. A driver
must be specified in order to run a script. Also note that forward slashes must be used to specify a file path and that spaces in the file path are
not allowed. Valid: C:/temp/test.tcl. Not valid: C:\temp\test.tcl. Not valid: C:/my temp/test.tcl.

If <dev_id> is specified, then the variable ::env(dev_id) will be set to that value. If not specified, ::env(dev_id) will be set to 0. This variable can
then be used in Tcl scripts to specify a specific device for Niagara to select. For an example of how this can be used, see this Tcl file: cmdline_ex
ample.tcl

If <directory> is specified, Niagara will attempt to run in that directory. Any files that Niagara writes will be stored there including the user_prefs.tcl
file. This is useful when the install directory cannot be written to for one reason or another.

Please note that while all parameters are optional, if you specify one you must also give all earlier parameters. For example to specify the the
dev_id you must also give the driver and script.

Supported Niagara commands

Not every Niagara tool can run in cmdline mode just yet. Enter "help" while in cmdline mode to see a list of some of the supported commands.
All "uil", "device", "buff", and drive commands are supported, along with the commands that run the tools in this table:

Tool Command

BitFlip ::bitflip::plot

Download Code dwnldsv

ETM Decoder etm


Format fmt_unit

LogDump logdump::gather, logdump::parse, logdump::run

Prep Drive prep

SuperCSO scso; source *.scso

Enter <command> -help to learn more about how to use the commands in this table.

You might also like