Command line parameters
- Last UpdatedNov 23, 2022
- 6 minute read
Command-line arguments can begin with a / or with a -.
For example, the /ps=M and -ps=M command-line arguments are equivalent.
Command file names have a .bat extension. The NT continuation character (^) allows one to use multiple lines for the startup command. The maximum length of each line is 1024 characters (1 kilobyte). The number of flags is unlimited, and the maximum length of each flag is 1024 characters.
Note: The UniInt user guide includes details about other command line parameters, which may be useful.
Parameters table
|
Parameter |
Description |
|---|---|
|
/ps= x Required |
The /ps flag specifies the point source for the interface. x is not case sensitive and can be any single character. For example, /ps=P and /ps=p are equivalent. The point source that is assigned with the /ps flag corresponds to the PointSource attribute of individual PI points. The interface will attempt to load only those PI points with the appropriate point source. |
|
/f=SS or /f=SS,SS or /f=HH:MM:SS or /f=HH:MM:SS,hh:mm:ss Required for reading scan-based inputs |
The /f flag defines the time period between scans in terms of hours (HH), minutes (MM), and seconds (SS). The scans can be scheduled to occur at discrete moments in time with an optional time offset specified in terms of hours (hh), minutes (mm), and seconds (ss). If HH and MM are omitted, then the time period that is specified is assumed to be in seconds. Each instance of the /f flag on the command line defines a scan class for the interface. There is no limit to the number of scan classes that can be defined. The first occurrence of the /f flag on the command line defines the first scan class of the interface, the second occurrence defines the second scan class, and so on. PI points are associated with a particular scan class via the Location4 PI point attribute. For example, all PI points that have Location4 set to 1 will receive input values at the frequency defined by the first scan class. Similarly, all points that have Location4 set to 2 will receive input values at the frequency specified by the second scan class, and so on. Two scan classes are defined in the following example: /f=00:01:00,00:00:05 /f=00:00:07; or, equivalently: /f=60,5 /f=7. The first scan class has a scanning frequency of 1 minute with an offset of 5 seconds, and the second scan class has a scanning frequency of 7 seconds. When an offset is specified, the scans occur at discrete moments in time according to the formula: scan times = (reference time) + n(frequency) + offset where n is an integer and the reference time is midnight on the day that the interface was started. In the above example, frequency is 60 seconds and offset is 5 seconds for the first scan class. This means that if the interface was started at 05:06:06, the first scan would be at 05:06:10, the second scan would be at 05:07:10, and so on. Since no offset is specified for the second scan class, the absolute scan times are undefined. The definition of a scan class does not guarantee that the associated points will be scanned at the given frequency. If the interface is under a large load, then some scans may occur late or be skipped entirely. Subsecond Scan Classes One can also specify sub-second scan classes on the command line such as /f=0.5 /f=0.1 where the scanning frequency associated with the first scan class is 0.5 seconds and the scanning frequency associated with the second scan class is 0.1 seconds. Similarly, sub-second scan classes with sub-second offsets can be defined, such as /f=0.5,0.2 /f=1,0. |
|
/host= host:port Optional |
The /host flag is used to specify the PI Home node. host is the IP address of the PI Server node or the domain name of the PI Server node. port is the port number for TCP/IP communication. The port is always 5450 for a PI 3 Server and 545 for a PI 2 Server. It is recommended to explicitly define the host and port on the command line with the /host flag. Nevertheless, if either the host or port is not specified, the interface will attempt to use defaults. Defaults: The default port name and server name is specified in the pilogin.ini or piclient.ini file. The piclient.ini file is ignored if a pilogin.ini file is found. Refer to the PI-API Installation Instructions manual for more information on the piclient.ini and pilogin.ini files. Examples: The interface is running on a PI-API node, the domain name of the PI 3 home node is Marvin, and the IP address of Marvin is 206.79.198.30. Valid /host flags would be: /host=marvin /host=marvin:5450 /host=206.79.198.30 /host=206.79.198.30:5450 |
|
/stopstat or /stopatat= digstate Default: /stopstat= "Intf shut" Optional |
If the /stopstat flag is present on the startup command line, then the digital state I/O Timeout will be written to each PI point when the interface is stopped. If /stopstat= digstate is present on the command line, then the digital state, digstate, will be written to each PI point when the interface is stopped. For a PI 3 Server, digstate must be in the system digital state table. For a PI 2 Server, where there is only one digital state table available, digstate must simply be somewhere in the table. UniInt uses the first occurrence in the table. If neither /stopstat nor /stopstat= digstate is specified on the command line, then no digital states will be written when the interface is shut down. Examples: /stopstat="Intf shut" The entire parameter is enclosed within double quotes when there is a space in digstate. |
|
/ec= x Optional |
The first instance of the /ec flag on the command line is used to specify a counter number, x, for an I/O Rate point. If x is not specified, then the default event counter is 1. Also, if the /ec flag is not specified at all, there is still a default event counter of 1 associated with the interface. If there is an I/O Rate point that is associated with an event counter of 1, each copy of the interface that is running without /ec= x explicitly defined will write to the same I/O Rate point. This means that one should either explicitly define an event counter other than 1 for each copy of the interface or one should not associate any I/O Rate points with event counter 1. For interfaces that run on NT nodes, subsequent instances of the /ec flag may be used by specific interfaces to keep track of various input or output operations. One must consult the interface-specific documentation to see whether subsequent instances of the /ec flag have any effect. Subsequent instances of the /ec flag can be of the form /ec*, where * is any ASCII character sequence. For example, /ecinput=10, /ecoutput=11, and /ec=12 are legitimate choices for the second, third, and fourth event counter strings. |
|
/q Optional |
When the /q flag is present, snapshots and exceptions are queued before they are sent to the PI Server node. Extended API mode behavior: The maximum queue size is close to 4000 bytes. The queue is flushed between scans if it is not filled. Non-Extended API mode behavior: The maximum queue size is 255 bytes for a PI 3 Server and 36 bytes for a PI 2 Server. For example, if the interface is running on a node communicating to a PI 2 Server, then the maximum queue size is 36. The queue is flushed between scans if it is not filled. When the /q flag is specified in non-extended API mode, PI-API sends integer values as 16-bit integers instead of 32-bit integers. Therefore, integer points will be limited to values between 0 and 32767. Values higher than 32767 need to be sent to floating-point PI tags. |
|
/fs=x Optional, PI 2 PINet only, default: /fs=, If interface does not run on VMS, then delete this. |
The /fs flag is used to set the field separator in the files that are used for UniInt's automatic FTP mechanism for sending string tags from a PI2 PINET node to a PI 3 Server node. The default field separator is a comma (,). |
|
/nogap /nogap=20m /nogap=12h |
When the /nogap flag is present, the interface will, at startup, generate and backfill data for the time since the last shutdown. This is useful for demonstration systems that are stopped and started often (on a laptop, for example). A gap time can also be specified, which will cause the interface to generate data only as far back as is specified-for example, the command /nogap=2h will cause the interface to generate a maximum of 2 hours' worth of data from the time it is started. |