intro_acl
The Accelerator Command Language (ACL) is a simple scripting
language for reading and setting ACNET devices. This is intended
to be very simple to use, and as a result there are many synonyms
for commands as well as qualifiers. Hopefully, if you enter
commands that make sense to you, they will make sense to ACL.
Devices are specified by their names with a couple of additions.
You can specify the property with the second character in the name.
A colon (:) or question mark (?) indicates the reading property,
while an underscore (_) indicates the setting property, a pipe (|)
character indicates basic status, an ampersand (&) character
indicates basic control, an at (@) character indicates the analog
alarm, and a dollar sign ($) character indicates the digital alarm
property. Properties can also be specified with a field notation,
a dot followed by the name of the property (.{property}). An array
index can be specified by appending the value to the end of the
device name enclosed in square brackets "[n]". The array index
value can be an integer constant, a variable, a symbol, or a device
reading. A range of array elements can be specified in a similar
way with the notation "[start:end]". If the ending array index is
omitted, the maximum array element for that property is used. You
can also request the entire property with the syntax "[]". You
can also specify what portion of a property you want in bytes with
the notation "{offset:length}". You can further specify a device
with the use of qualifiers.
Examples of device qualifiers:
/property=reading -> select the reading property (default)
/reading -> select the reading property (default)
/ftd=ftd_1hz -> set the reading frequency to 1 Hz
/ftd_1hz -> set the reading frequency to 1 Hz
/ftd_oneshot -> request a one shot reading
/ftd=evt02 -> request data on TCLK event 02
/ftd=2hz -> request data at a 2 Hz frequency
/raw_ftd=60 -> request data at a 1 Hz frequency
/event='p,1000,true' -> request data at a 1 Hz frequency
/period=2 -> request data every 2 seconds
/period_msec=500 -> request data every 500 milliseconds
/frequency=2 -> request data at a 2 Hz frequency
/length=n -> request n bytes of data
/num_elements=n -> request n array elements of data
/num_values=n -> request n array elements of data
/atomic_size -> request the atomic size for that property
/all -> request the maximum size for that property
/maximum_size -> request the maximum size for that property
/offset=n -> request data starting at a byte offset of n
/index=n -> request array element n (starts at 0)
/array_index=n -> request array element n (starts at 0)
/raw -> request raw (binary) data
/scaled -> request scaled data (default)
/primary -> request data in primary units
/volts -> request data in primary units
/common -> request scaled data (default)
/string -> request string data
/name -> request device name text
/text -> request device descriptive text
/bit_status -> request device bitwise status
/state -> request state text data (state devices only)
/state_text -> request state text data (state devices only)
/date -> request date string (raw data assumed to be
local time in seconds since Jan 1, 1970)
/date_gmt -> request date string (raw data assumed to be
GMT (UTC) time in seconds since Jan 1, 1970)
/date_clinks -> request date string (raw data assumed to be
local time in seconds since Jan 1, 1972)
/acnet_error -> request ACNET error string (raw data assumed
to be an ACNET error code)
/node -> request ACNET node string (raw data assumed
to be an ACNET node value)
/ip_address -> request IP address string
/ip_name -> request IP name string
/source=dp -> display data from the accelerator (default)
/source=db -> display data from the database
/source=sr:1 -> display data from save/restore file 1
/source=sda:1:"Inject Protons":1:ColliderShot -> display data from SDA
file 1, case Inject Protons,
subcase (set) 1,
usage ColliderShot
/source=dl:"01-Jan-2000 01:00" -> display data from a Lumberjack at
January 1, 2000 at 0100
/source=memory -> display data from a memory pool
/source=snpmgr:booster:'16-Sep-2011 15:00' -> display data from the
detached snapshot manager
Valid property strings:
reading -> reading property
read -> reading property
prread -> reading property
setting -> setting property
set -> setting property
prset -> setting property
basicStatus -> basic status property
basic_status -> basic status property
status -> basic status property
sts -> basic status property
prbsts -> basic status property
basicControl -> basic control property
basic_control -> basic control property
control -> basic control property
cntl -> basic control property
prbctl -> basic control property
analogAlarm -> analog alarm property
analog_alarm -> analog alarm property
analog -> analog alarm property
aa -> analog alarm property
pranab -> analog alarm property
digitalAlarm -> digital alarm property
digital_alarm -> digital alarm property
digital -> digital alarm property
da -> digital alarm property
prdabl -> digital alarm property
Property strings can also be expressed as device fields by using
dot notation ".{property}".
The fields of analog and digital alarm blocks can be
referenced through standard C/C++ structure notation with a
dot ('.') separating the device name and the alarm block
field name.
Valid alarm block field names:
.min[imum] -> analog alarm minimum value
.max[imum] -> analog alarm maximum value
.analog_nominal -> analog alarm nominal value
.tol[erance] -> analog alarm tolerance value
.nom[inal] -> digital alarm nominal value
.mask -> digital alarm mask value
.alarm_enable -> alarm enable status
.alarm_status -> alarm good/bad status
.tries_needed -> alarm tries needed
.tries_now -> alarm tries now
.alarm_ftd -> alarm scan rate
.abort -> alarm abort capability
.abort_inhibit -> alarm abort inhibit status
.limit_type -> analog alarm limit type
.flags -> alarm flags field
.block -> entire alarm block
Valid status field names:
.onOff -> device on/off status
.readyTripped -> device ready/tripped status
.remoteLocal -> device remote/local status
.polarity -> device polarity status
.rampDC -> device ramp/DC status
.isOn -> device on status
.isOff -> device off status
.isReady -> device ready status
.isTripped -> device tripped status
.isRemote -> device remote status
.isLocal -> device local status
.isPositive -> device positive status
.isNegative -> device negative status
.isRamp -> device ramp status
.isDC -> device DC status
.compositeStatus -> device composite (all attributes)
status
Valid database field names:
.name -> device name
.fullName -> device full name
.desc[ription] -> device description
.fullDescription -> device full description
.unitsText -> device engineering units text
.primaryUnitsText -> device primary units text
.deviceType -> device type
.shortDeviceType -> short device type text
.deviceMinimum -> device minimum possible scaled value
.deviceMaximum -> device maximum possible scaled value
.defaultSize -> device property default size in bytes
.atomicSize -> device property atomic size in bytes
.maximumSize -> device property maximum size in bytes
.numberOfElements -> device property maximum number of
array elements
.defaultFTD -> device property default FTD
.defaultDataEvent -> device property default data event
Valid device access field names:
.raw -> access raw device value
.primary -> access a device value in primary units
.scaled -> access scaled device value
.stateText -> access state text (state devices)
Some commands allow the caller to access multiple devices
through the specification of a family device or through the
use of list specifiers. List specifiers can be either an
ASCII text file name or a device database search specifier.
Valid device list specifiers:
file={file name} -> read devices from ASCII file
db={table name} -> read devices from a database table
containing device indices
dbname={table name} -> read devices from a database table
containing device names
dbquery={SQL string} -> list all devices from an
arbitrary database query
on tables containing device
indices
dbqueryname={SQL string} -> list all devices from an
arbitrary database query
on tables containing device
names
devices='{device},{device}' -> access an explicit list of devices
device_range={minDI}:{maxDI} -> access a range of device indices
node={node name} -> access all devices from the
requested node
node={wildcard node name} -> access all devices from nodes whose
names match the requested string
node={node}/crate={crate} -> access all devices from the
requested crate
node={node}/crate={crate}/slot={slot} -> access all devices from the
requested slot
node={node}/madc={madc number} -> access all devices from the
requested MADC
node={node}/property={property} -> access all devices from a node which
have the requested property
trunk={trunk number} -> access all devices from the
requested ACNET trunk
name={string} -> access all devices containing a
particular string in their name
full_name={string} -> access all devices containing a
particular string in their full name
name={string}/type={type} -> access all devices containing a
particular string in their name
with a given device type
family={string} -> access all devices in a family device
text={string} -> access all devices containing a
particular string in their
descriptive text
full_text={string} -> access all devices containing a
particular string in their
full descriptive text
device_type={type} -> access all devices with the
requested device type
device_type={type}/node={node} -> access all devices with the
requested device type from a
given node
device_type={type}/name={string} -> access all devices with the
requested device type which
a given string in their name
device_class={class} -> access all devices with the
requested device class
device_class={class}/node={node}-> access all devices with the
requested device class from
a given node
save_list={list} -> access all devices from the
requested save list
user_save_list={list} -> access all devices from the
requested user save list (usl)
driver={driver} -> access all devices with the
requested CAMAC driver type
driver={driver}/node={node} -> access all devices with the
requested CAMAC driver type
from a given node
virtual_machine={device} -> access all devices related to
a requested state device
units={units_text} -> access all devices having a given
units text
alarm_list={list} -> access all devices from the
requested alarm list (database) (al)
actual_alarm_list={list} -> access all devices from the
requested alarm list (actual) (aal)
user_alarm_list={system[\list]} -> access all devices from the
requested user alarm list (ual)
alarm_group={device} -> access all devices from the
requested alarm group
alarm_consolidators={name} -> access all consolidator devices
having a given name pattern
alarm_handler={handler} -> access all devices having a
given alarm handler
controlling_device={device} -> access all devices controlled by
a given device
expr[ession]={string} -> access all devices containing
a given string in its
reading expression
expr_device={device} -> access all devices containing
a given device in its
reading expression
ssdn={SSDN pattern} -> access all devices having an SSDN
matching a pattern
download_list={node}[\{crate}] -> access all devices from the
requested node download list (dl)
save_file={file_number} -> list all devices saved in a
particular save file (sf)
sda_case={usage}[:{case}] -> list all devices configured for a
particular SDA case
sda_set={file}:{case}:{set} -> list all devices saved in a
particular SDA set
logger_list={node}[:{list}] -> list all devices on a given
data logger list
siblings={device} -> list all siblings descended from
a given device
param_page={page}[:{subpage}] -> list all devices on a given
parameter page
lex_sa={Lex SA name} -> list all devices on a given
Lex SA display
synoptic={Synoptic name} -> list all devices on a given
Synoptic display
wg_list={list_name} -> list all devices from a
waveform generator list (I14/I15)
console_class={class} -> list all devices which are
settable by a console class
user={user name} -> list all devices modified by a
given user
user_created={user name} -> list all devices created
by a given user
foreign_device={name} -> list all devices mapped to a
particular foreign device
structure={name} -> list all devices which are described
by a given data structure
department={department name} -> list all devices which belong
to a given department
maintainer={user name} -> list all devices which connect
to equipment maintained by a
given user
device_query={query string} -> list all devices which match
a generic query string
obs_device_query={query string} -> list all devices which match
a generic query string
(include obsolete devices)
The device query and obsolete device query list specifiers
require a device database search criterion. Each term of a
search specification should be separated by a slash (/) character.
Valid device query list specifiers:
device_range={minDI}:{maxDI} -> access a range of device indices
name={string} -> access all devices containing a
particular string in their name
full_name={string} -> access all devices containing a
particular string in their full name
text={string} -> access all devices containing a
particular string in their
descriptive text
full_text={string} -> access all devices containing a
particular string in their
full descriptive text
property={property} -> access all devices which have the
requested property
has_property={prop|prop2|...} -> access all devices which have at
least one of the requested properties
has_all_properties={prop|...} -> access all devices which have all
of the requested properties
doesnt_have_property={prop|...} -> access all devices which don't have
at least one of the requested
properties
doesnt_have_all_props={prop|...}-> access all devices which don't have
any of the requested properties
node={node name} -> access all devices from the
requested node
node={wildcard node name} -> access all devices from nodes whose
names match the requested string
trunk={trunk} -> access all devices from the
requested trunk
crate={crate} -> access all devices from the
requested crate (CAMAC devices only)
slot={slot} -> access all devices from the
requested slot (CAMAC devices only)
madc={madc number} -> access all devices from the
requested MADC
madc_channel={channel number} -> access all devices having the
requested MADC channel number
default_size={number} -> access all devices having a
matching default data size (*)
atomic_size={number} -> access all devices having a
matching atomic data size (*)
maximum_size={number} -> access all devices having a
matching maximum data size (*)
default_data_event={event} -> access all devices having a matching
default data event
has_event_data_event={logical} -> access all devices having a clock
event default data event
default_ftd={ftd} -> access all devices having a matching
default FTD
has_event_ftd={logical} -> access all devices having a clock
event default FTD
common_transform={number} -> access all devices using a common
transform
primary_transform={number} -> access all devices using a primary
transform
common_units={text} -> access all devices matching a common
units text string
primary_units={text} -> access all devices matching a primary
units text string
scaling_constant_n={value} -> access all device having a
scaling constant "n" (0-5) value
convert_type={CNV_xxx} -> access all devices using a special
scaling conversion type
scaling_data_handling={DIO_xxx} -> access all devices using a special
scaling data handling type
device_type={type} -> access all devices with the
requested device type
device_class={class} -> access all devices with the
requested device class
save_list={list} -> access all devices from the
requested save list (*)
restore_code={value} -> access all devices having the
requested restore code (*)
restore_subcode={value} -> access all devices having the
requested restore subcode (*)
save_display_code={value} -> access all devices having the
requested save display code (*)
save_property_mask={mask} -> list all devices whose save property
mask matches a value
alarm_list={list} -> access all devices from the
requested alarm list (database)
alarm_group={device} -> access all devices from the
requested alarm group
is_alarm_consolidator={logical} -> access all alarm consolidator devices
alarm_handler={handler} -> access all devices having a
given alarm handler
analog_alarm_priority={number} -> access all devices having a
given analog alarm priority (*)
digital_alarm_priority={number} -> access all devices having a
given digital alarm priority (*)
analog_alarm_text={string} -> access all devices having a
matching analog alarm text
has_analog_alarm_text={logical} -> access all devices having
analog alarm text
digital_alarm_text={string} -> access all devices having a
matching digital alarm text
has_digital_alarm_text={logical}-> access all devices having
digital alarm text
analog_alarm_url={string} -> access all devices having a
matching analog alarm URL
alarm_ack_mask={class} -> list all devices whose alarms can be
acknowledged by a console class
is_bypassed_alarm={logical} -> access all devices having bypassed
alarms
is_never_used_alarm={logical} -> access all devices whose alarms
have never been used
is_suppressed_alarm={logical} -> access all devices whose alarms
are suppressed
family={device} -> access all devices belonging to
a family
families={device} -> access all families that a device
belongs to
is_family_device={logical} -> access all family devices
controlling_device={device} -> access all devices controlled by
a given device
is_controlling_device={logical} -> access all devices which control
other devices
expr[ession]={string} -> access all devices containing
a given string in its
reading expression
ssdn={SSDN pattern} -> access all devices having an SSDN
matching a pattern
emc={EMC pattern} -> access all devices having an EMC
matching a pattern
sibling={device} -> access all devices which are siblings
of a given device
has_sibling={logical} -> access all devices which have
siblings
is_sibling={value} -> access all devices which are siblings
(true, false, next, previous)
console_class={class} -> list all devices which are
settable by a console class
user={user name} -> list all devices modified by a
given user
user_created={user name} -> list all devices created
by a given user
foreign_device={name} -> list all devices mapped to a
particular foreign device
structure={name} -> list all devices which are described
by a given data structure
department={department name} -> list all devices which belong
to a given department
maintainer={user name} -> list all devices which connect
to equipment maintained by a
given user
virtual_machine={device} -> access all devices related to
a requested state device
vm_property_mask={mask} -> list all devices whose virtual
machine property mask matches a value
is_virtual_machine={logical} -> access all state devices which
control other devices
has_status_attr={value} -> access all devices which have
status attributes
(true, false, on_off, ready_tripped,
remote_local, polarity, ramp_dc)
has_inverted_status_attr={value}-> access all devices which have
inverted status attributes
(true, false, on_off, ready_tripped,
remote_local, polarity, ramp_dc)
has_status_attr_alt_char={value}-> access all devices which have
alternate status characters
(true, false, on_off, ready_tripped,
remote_local, polarity, ramp_dc)
has_onoff={logical} -> access all devices which have
an on/off status attribute
has_readytripped={logical} -> access all devices which have
a ready/tripped status attribute
has_remotelocal={logical} -> access all devices which have
a remote/local status attribute
has_polarity={logical} -> access all devices which have
a polarity status attribute
has_rampdc={logical} -> access all devices which have
a ramp/DC status attribute
has_control_command={value} -> access all devices which have
controls commands
(true, false, reset, on, off,
positive, negative, ramp, dc)
has_reset_command={logical} -> access all devices which have
a reset command attribute
has_on_command={logical} -> access all devices which have
an on command attribute
has_off_command={logical} -> access all devices which have
an off command attribute
has_positive_command={logical} -> access all devices which have
a positive command attribute
has_negative_command={logical} -> access all devices which have
a negative command attribute
has_ramp_command={logical} -> access all devices which have
a ramp command attribute
has_dc_command={logical} -> access all devices which have
a DC command attribute
has_scaling={property|all} -> access all devices which have
scaling information
has_fe_scaling={property|all} -> access all devices which have
front end scaling information
is_controlled_setting={value} -> access all devices which have
controlled settings
(true, false, setting, control)
bit_text={string} -> access all devices having a
matching bit (extended) text
has_bit_text={logical} -> access all devices having
bit (extended) text
is_broken={logical} -> access all devices either marked
as broken or not
broken_user={user name} -> access all devices marked as broken
by a given user
broken_date={date} -> access all devices marked as broken
at a given date
broken_comment={string} -> access all devices with broken
comments matching a string
is_obsolete={logical} -> access all devices either marked
as obsolete or not
obsolete_user={user name} -> access all devices marked as obsolete
by a given user
obsolete_date={date} -> access all devices marked as obsolete
at a given date
obsolete_comment={string} -> access all devices with obsolete
comments matching a string
sql={string} -> insert an SQL string to be inserted
into the where clause of the
database query
table={table name(s)} -> reference one or more tables in the
database query
(*) -> indicates that the corresponding search can be done using
comparators (lt, le, gt, ge) which must be appended to
the search field name
In addition to the search specifiers, you can also specify the
following operators:
ne
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Generic device names can also be entered wherever a valid ACNET
device name can be. These names have the form "G:DEVnnn". When
the code is parsed, the generic device names are replaced with
actual ACNET device names which are passed by the caller to
the parsing routine. The "nnn" is the index (starting at 0) of
the name in the caller's device list that should be used to
take the place of that generic device name.
Lists of devices can also be established with the device_list
command. These lists can be accessed through pseudo device
names of the form "Q:xxxxxx" where xxxxxx is the name given
the list. They can also be accessed with the syntax
"device_list:{list name}".
There is also the concept of a "changeable" device. A changeable
device has a name of the form "G:CDVnn". A changeable device
can also be referred to by the syntax "changeable_device:{nn}".
The actual device that is accessed by one of these pseudo devices
can be set by the "change_device" command.
Some commands allow the caller to access multiple ACNET nodes
through the use of list specifiers. List specifiers specify
a node database search criterion. Each term of a search
specification should be separated by a slash (/) character.
Valid node list specifiers:
name={node name} -> access nodes matching a given name
keeper={user name} -> access nodes belonging to a keeper
backup={user name} -> access nodes having a backup keeper
descr={description} -> access nodes having a particular
string in their description
location={location} -> access nodes having a particular
string in their location
system={system type} -> access nodes with a particular
system type
hardware={hardware type} -> access nodes with a particular
hardware type
software={software type} -> access nodes with a particular
software type
status={status type} -> access nodes with a particular
node status type
status_not={status type} -> access nodes not having a particular
node status type
area={area type} -> access nodes with a particular
area type
opsys={OS type} -> access nodes with a particular
operating system type
is_fe={boolean} -> access front end (or not) nodes
is_oac={boolean} -> access OAC (or not) nodes
is_console={boolean} -> access console (or not) nodes
is_central={boolean} -> access central (or not) nodes
supports_alarms={boolean}-> access nodes which support (or not) alarms
supports_ftp={boolean} -> access nodes which support (or not) the
fast time plot protocol
supports_tclk={boolean} -> access nodes which support (or not)
returning device values on clock events
supports_gets32={boolean}-> access nodes which support (or not) the
GETS32/SETS32 protocol
alarm_list={list} -> access nodes on a given alarm list
download_list={list} -> access nodes in a given download group
trunk={trunk} -> access nodes on a given trunk (*)
node={node number} -> access nodes having a given node number (*)
(*) -> indicates that the corresponding search can be done using
comparators (lt, le, gt, ge) which must be appended to
the search field name
In addition to the search specifiers, you can also specify the
following operators:
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Some commands allow the caller to access multiple ACNET errors
through the use of list specifiers. List specifiers specify
an error database search criterion. Each term of a search
specification should be separated by a slash (/) character.
Valid error list specifiers:
name={error name} -> access errors matching a given name
text={error text} -> access errors matching a given error
text string
facility={facility} -> access errors having a given facility code (*)
error_code={error code} -> access errors having a given error code
sql={string} -> insert an SQL string to be inserted
into the where clause of the
database query
table={table name(s)} -> reference one or more tables in the
database query
(*) -> indicates that the corresponding search can be done using
comparators (lt, le, gt, ge) which must be appended to
the search field name
In addition to the search specifiers, you can also specify the
following operators:
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Some commands allow the caller to access multiple clock events
through the use of list specifiers. List specifiers specify
a clock event database search criterion. Each term of a search
specification should be separated by a slash (/) character.
Valid clock event list specifiers:
name={event name} -> access events matching a given symbolic name
descr={description} -> access events having a particular
string in their description
triggerText={trigger} -> access events having a particular
string in their trigger text
number={event number} -> access events having a given event number (*)
type={clock type} -> access events with a particular
clock system type
(*) -> indicates that the corresponding search can be done using
comparators (lt, le, gt, ge) which must be appended to
the search field name
In addition to the search specifiers, you can also specify the
following operators:
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Some commands allow the caller to access multiple MDAT frames
through the use of list specifiers. List specifiers specify
MDAT frame database search criteria. Each term of a search
specification should be separated by a slash (/) character.
Valid MDAT frame list specifiers:
name={frame name} -> access frames matching a given symbolic name
descr={description} -> access frames having a particular
string in their description
number={frame number} -> access frames having a given frame number (*)
isUnipolar={logical} -> access frames with a particular polarity type
(*) -> indicates that the corresponding search can be done using
comparators (lt, le, gt, ge) which must be appended to
the search field name
In addition to the search specifiers, you can also specify the
following operators:
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Some commands allow the caller to access multiple users
through the use of list specifiers. List specifiers specify
a user database search criterion. Each term of a search
specification should be separated by a slash (/) character.
Valid user list specifiers:
name={name} -> access users with a user name matching
a given string
fullName={user name} -> access users with a full name matching
a given string
userId={id} -> access users by user ID
phone={phone number} -> access users by phone number
pager={pager number} -> access users by pager number
email={email address} -> access users with an email address matching
a given string
mailStation={mail} -> access users by mail station
location={location} -> access users having a particular
string in their location
affiliation={affiliation}-> access users having a particular
string in their affiliation
consoleUserId={id} -> access users by console user ID
inactive={boolean} -> access inactive (or not) users
nonuser={boolean} -> access nonuser (or not) users
dabbelUser={boolean} -> access DABBEL user (or not) users
aclUser={boolean} -> access ACL user (or not) users
addDate={date} -> access users by the date that they
were added to the database (*)
modifyDate={date} -> access users by the date that their
database entry was last modified (*)
consoleClass={class(es)} -> access users by what console class
permissions they have
(*) -> indicates that the corresponding search can be done using
comparators (lt, le, gt, ge) which must be appended to
the search field name
In addition to the search specifiers, you can also specify the
following operators:
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Some commands allow the caller to access multiple programs
through the use of list specifiers. Searches can be made
for both MECCA-based and Java-based programs. List specifiers
specify a program database search criterion. Each term of a
search specification should be separated by a slash (/) character.
Valid program list specifiers:
java -> search for Java-based programs
mecca -> search for MECCA-based programs
name={name} -> access programs with a name matching
a given string (MECCA or Java)
keeper={user name} -> access programs with a keeper name matching
a given string (MECCA or Java)
backup={user name} -> access programs with a backup keeper name
matching a given string (MECCA only)
author={user name} -> access programs with an author name matching
a given string (MECCA or Java)
description={descr} -> access programs with a description matching
a given string (MECCA or Java)
title={title} -> access programs with an index page title
matching a given string (MECCA only)
modifier={user name} -> access programs with the last modifier name
matching a given string (MECCA only)
modifyDate={date} -> access programs by the date that they
were last modified (MECCA only) (*)
affiliation={dept} -> access programs with a keeper with an
affiliation matching a given string
(MECCA only)
[status=]{status} -> access programs with a given status
(MECCA only)
[location=]{location} -> access programs with a given location
(MECCA only)
[type=]{type} -> access programs with a given type
(MECCA only)
subscriber={user name} -> access programs subscribed to by a
given user (MECCA only)
reference={ref} -> access programs with a reference string
matching a given string (Java only)
codeType={type} -> access programs with a given code type
(Java only)
(*) -> indicates that the corresponding search can be done using
comparators (lt, le, gt, ge) which must be appended to
the search field name
In addition to the search specifiers, you can also specify the
following operators:
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Some commands allow the caller to access multiple consoles
through the use of list specifiers. List specifiers specify
a console search criterion. Each term of a search
specification should be separated by a slash (/) character.
Valid console list specifiers:
user={name} -> access consoles with a user name matching
a given string
location={loc} -> access consoles with a location matching
a given string
server={server} -> access consoles with a server matching
a given string
phone={number} -> access consoles with a given phone number
console_class={class} -> access consoles with a given console class[es
program={name} -> access consoles running a given program
In addition to the search specifiers, you can also specify the
following operators:
and -> logically "and" the adjacent specifiers
or -> logically "or" the adjacent specifiers
leftParen -> begin a logical grouping of terms
rightParen -> end a logical grouping of terms
Generic strings can also be entered for values in most commands.
These replacement strings are similar to the replacement device
names and have the form "stringnnn". The "nnn" is the index
(starting at 0) of the string in the caller' substitute string
list that should be used to take the place of that generic string.
This supports more generic scripts which have parameters that can
be changed from one execution of the script to the next. If a
replacement string is to be interpreted as a string by the script,
it should be enclosed in a string() function (ex. string(string0)).
Values in the script can be stored in either variables which are
destroyed when the script has completed or symbols which exist
across script executions until they are deleted by a call to
'acl_delete_symbol' or the calling program exits. Symbol values
can be read by the calling program through the routine
'acl_read_symbol_c' or 'acl_read_symbol_as_string_c' and set
through 'acl_set_symbol_c'. Symbols must begin with a "$" character.
Variable and symbol data types:
double -> double precision real
float (or real) -> single precision real
string -> ASCII string
byte -> 1 byte signed integer
ubyte -> 1 byte unsigned integer
short -> 2 byte signed integer
ushort -> 2 byte unsigned integer
int[eger] -> 4 byte integer
ulong (or uint) -> 4 byte unsigned integer
logical (or boolean) -> 4 byte logical integer (0 or 1)
date -> 4 byte unsigned integer to be interpreted
as a date in clinks (seconds since 1/1/1972)
error -> 4 byte integer to be interpreted as an
ACNET error
node -> 4 byte integer to be interpreted as
an ACNET node and trunk specification
event -> 4 bye integer to be interpreted as
a clock event specification
device_index -> 4 byte integer to be interpreted as an
ACNET device index
device -> ACNET device specification
There are special symbols which are created and updated by ACL itself.
Intrinsic ACL symbols:
$_value - typically contains the value of the last assignment
$_status - typically contains the status of the last ACL command
executed
$_string - contains the last string produced by one of the string
manipulation commands
$_line_number - contains the current source line number
$_execution_index - contains the current index into the list of
commands
$_error_string - contains the current verbose error string that will
ultimately be returned to the ACL caller unless an
error handler is invoked
$_error_status - is only updated when an error handler is called and
contains the error that caused the error handler
to be invoked
$_error_device - contains the device index for the last device having
a read, set, or database access error
$_error_line - source line number where the current error
occurred
$_error_execution_index - index in the list of commands where the
current error occurred
$_error_command - name of command where the current error occurred
$_error_source_text - source code for the line where the
current error occurred
$_generic_error_count - indicates how many times the current error
has occurred consecutively
$_error_count - indicates how many times the current device has
returned the present error status
$_pending_count - indicates how many consecutive times the last
read device has returned a status of pending
$_last_error_status - is also updated in an error handler and stores
the last error status seen
$_last_error_device - contains the device index for the previous
device having a read, set, or database
access error
$_return_value - contains the value returned by the last return
statement (This symbol is only valid during the
execution of the statement following the return.)
$_eof - is a logical value indicating whether or not the most recent
input request resulted in an end of file error
$_proc_status - contains the status from the last call_proc statement
$_num_device_args - contains the number of device arguments passed
to the current script
$_num_string_args - contains the number of string arguments passed
to the current script
$_num_devices - contains the number of devices processed by the last
command
$_num_values - contains the number of values processed by
the last command
$_script_name - contains the name of the currently running script
Both variables and symbols contain single values by default, but
arrays of both types can be created through the use of the "declare"
command. Arrays of any dimension are supported. Array indices use
the common square bracket style used by C/C++. Array indices can be
specified by integer constants, variables, symbols, or device values.
You can request an entire array with the notation "[]". Assignment
command lvalues also support a wildcard notation to indicate automatic
resizing the variable (either "[*]" or "[n:*]").
Multiple commands can be entered on a single line by separating
them with semicolons (;) or a a single command may span several
lines by inserting a back slash (\) at the end of each line to
be continued. Otherwise, it is assumed that each source line
defines one command. In any case, a single command line cannot
exceed 1008 characters including white spaces. Comments can be
inserted anywhere in a line indicated by an exclamation point (!)
or a pound (#) character. All text in a line following a comment
character is ignored.
By default, integer constants are assumed to be decimal except
in a few special cases such as the timer_events command where
clock events are assumed to be expressed in hex. A hexadecimal
constant can be specified by preceding the value with the
string "0x" as in C/C++. A binary constant can be specified by
preceding the value with the string "0b". It should be noted
that preceding an integer value with a "0" does NOT indicate an
octal value as in C/C++ but will be interrupted as a decimal
constant.
Several commands plus some data source specifications take
dates as arguments. The default format for dates is
"dd-mmm-yyyy[ hh:mm]". There are also several special
formats. The "past" format specifies a time a certain
interval before the present time (e.g. "past_30min"). The
"store" format indicates the date that a particular shot
was started (e.g. "store_1000"). The "event" format indicates
the last time a given event occurred (e.g. "event_4e").
There are also various special date keywords. These include
"now" (present time), "today" (the start of the present day),
"yesterday" (midnight yesterday), "tomorrow" (midnight
tomorrow), "thisHour" (start of the present hour), "lastHour"
(start of the last hour), "thisWeek" (the start of this week),
"thisYear" (the start of this year), plus several others.
There are also a few reserved strings that have special
interpretations:
myConsoleNumber -> returns the caller's console number
mySlot -> returns the caller's console slot
myNodeName -> returns the caller's ACNET node name
myNodeNumber -> returns the caller's ACNET node (integer)
myTrunk -> returns the caller's ACNET trunk number
myConsoleClass -> returns the caller's console class mask
isMcrClass -> returns 1 if the console is MCR class
myUserName -> returns the current user name
myProcessName -> returns the current process name
myExecutableName -> returns the current executable image name
myFullExecutableName -> returns the current executable image name
including the path
myProgramName -> returns the current program name
myGenericProgramName -> returns the generic name of the
current program
myPage -> returns the current page name
clibDate -> returns the date of the current CLIB
{console color strings} -> return the corresponding color value
currentTime -> returns the current time of day
currentDate (now) -> returns the current date
clinksNow -> returns the current date in clinks
ctimeNow -> returns the current date in C time
utcNow -> returns the current date in UTC seconds
today -> returns the time for today at midnight
yesterday -> returns the time for yesterday at midnight
tomorrow -> returns the time for tommorow at midnight
thisMinute -> returns the time for the start of the
present minute
lastMinute -> returns the time for the start of the
last minute
nextMinute -> returns the time for the start of the
next minute
thisHour -> returns the time for the start of the
present hour
lastHour -> returns the time for the start of the
last hour
nextHour -> returns the time for the start of the
next hour
thisShift -> returns the time for the start of the
present shift
lastShift -> returns the time for the start of the
last shift
nextShift -> returns the time for the start of the
next shift
thisWeek -> returns the time for the start of the
present week
lastWeek -> returns the time for the start of the
last week
nextWeek -> returns the time for the start of the
next week
thisMonth -> returns the time for the start of the
present month
lastMonth -> returns the time for the start of the
last month
nextMonth -> returns the time for the start of the
next month
thisYear -> returns the time for the start of the
present year
lastYear -> returns the time for the start of the
last year
nextYear -> returns the time for the start of the
next year
currentYear -> returns the current year number
currentMonth -> returns the current abbreviated month string
currentFullMonth -> returns the current month string
currentDay -> returns the current day of the month number
currentDayOfWeek -> returns the current day of the week number
currentDayOfWeekName -> returns the current day of the week string
currentHour -> returns the current hour number
currentMinute -> returns the current minute number
currentSecond -> returns the current second number
scriptTime -> returns the total script execution time
deltaScriptTime -> returns the script execution time since
the last reference to 'deltaScriptTime'
{ACNET error strings} -> return the corresponding ACNET error value
version -> returns the current ACL version
lastBigSave -> last big save file number
lastShotSave -> last shot save file number
lastCircularSave -> last circular save file number
currentStore -> current store number
lastStore -> last store number
currentPbarShot -> current pbar shot number
lastPbarShot -> last pbar shot number
currentRecyclerShot -> current Recycler shot number
lastRecyclerShot -> last Recycler shot number
mdatTime -> current time transmitted over MDAT
currentOutput -> returns the value of standard output
currentError -> returns the value of standard error
onLinux -> returns a value of 1 if ACL is being
executed on Linux, and value of 0 otherwise
newline -> newline string (useful in print command)
formfeed -> formfeed string (useful in print command)
tab -> tab string (useful in print command)
pi -> value of pi
ACL expressions contain values which may be constants, variables
or symbols, and device values. They support operators which
include the normal arithmetic operators (+, -, *, and /) as well
as '^' for exponentiation and '%' for integer modulus. They also
support logical operators '||' or 'or' and '&&' or 'and'. They
support the bitwise operators '|', '&', and 'xor'. In addition,
the special device-related operators 'is', 'is not', 'has', and
'doesnt have' are also supported. The regular expression string
string comparator operator 'like' is also supported. A number of
instrinsic functions which are listed below are also supported.
Expressions are used in the assignment, if, elseif, while, and
do_while commands.
Arithmetic operators:
addition : '+', 'plus'
increment : '++'
subtraction : '-', 'minus'
decrement : '--'
multiplication : '*', 'times'
division : '/'
integer modulus: '%'
remainder : '%%'
exponentiation : '^', '**'
left shift : '<<'
right shift : '>>'
Bitwise operators:
or : '|', 'bitor'
exclusive or : 'xor'
and : '&', 'bitand'
invert : '~', 'compl', 'complement'
Logical operators:
or : '||', 'or', '.or.'
exclusive or : '.xor.'
and : '&&', 'and', '.and.'
negate : '!', 'not', '.not.'
Comparison operators:
equals : '=', '==', 'equals', 'eq', '.eq.', 'is equal to'
not equal : '!=', '<>', 'ne', '.ne.', 'is not equal to', 'does not equal'
greater than : '>', 'gt', '.gt.', 'greater than'
greater/equal : '>=', 'ge', '.ge.', 'greater than or equal to'
less than : '<', 'lt', '.lt.', 'less than'
less/equal : '<=', 'le', '.le.', 'less than or equal to'
String operators:
equals : '=', '==', 'equals', 'eq', '.eq.', 'is equal to'
concatenation : '+', 'plus'
regexp compare : 'like', 'is like'
Special device operators:
is : device is in a particular status (on, off, etc.)
is not : device is NOT in a particular status (on, off, etc.)
has : device has a particular type of database information
doesnt have : device doesn't have a particular type of database
information
Intrinsic functions:
Arithmetic functions:
log : base 10 log
ln : natural log
sqrt : square root
sin : sine
sind : sine (argument in degrees)
cos : cosine
cosd : cosine (argument in degrees)
tan : tangent
tand : tangent (argument in degrees)
asin : arc sine
asind : arc sine (result in degrees)
acos : arc cosine
acosd : arc cosine (result in degrees)
atan : arc tangent
atand : arc tangent (result in degrees)
atan2 : arc tangent of the quotient of the arguments
atan2d : arc tangent of the quotient of the arguments
(result in degrees)
sinh : hyperbolic sine
cosh : hyperbolic cosine
tanh : hyperbolic tangent
asinh : arc hyperbolic sine
acosh : arc hyperbolic cosine
atanh : arc hyperbolic tangent
secant : secant
cosecant : cosecant
cotan : cotangent
cotand : cotangent (argument in degrees)
hypot : square root of the sum of the squares of the arguments
round : round (to a specified number of digits)
ceil : smallest integer greater than or equal to its argument
floor : largest integer less than or equal to its argument
trunc : truncate
fmod : remainder of the arguments
fract : fractional component
abs : absolute value
min : minimum of two values
max : maximum of two values
exp : base e exponentiation (e^n)
isInfinity : tests to see if a value is infinite
isNaN : tests to see if a value is a NaN
Bitwise functions:
or : bitwise or
and : bitwise and
xor : bitwise exclusive or
lshft : circular left shift
rshft : circular right shift
bit : bit test
setBit : set a bit in a value
clearBit : clear a bit in a value
bitComplement : complement (invert) bits in a value
bitField : extracts a bit field value
deviceBitField : extracts a bit field value from a device reading
setBitField : sets a bit field value
circularShift : bit field circular shift
bitCount : returns the number of bits set in a value
lowestBit : returns the lowest bit set in a value (or -1)
highestBit : returns the highest bit set in a value (or -1)
valueToLogicalArray : converts bit values into a logical array
Array value functions:
sum : sum of an array of values
mean : mean of an array of values
median : median of an array of values
minimum : minimum of an array of values
maximum : maximum of an array of values
range : range of an array of values
stddev : standard deviation of an array of values
rms : RMS of an array of values
variance : variance of an array of values
mode : returns the most commonly occurring value in an array
(If there are multiple mode values, the smallest
value is returned.)
identical : checks to see if all values in an array are identical
histogram : divides an array of values into buckets
String functions:
head : returns the beginning of a string
tail : returns the end of a string
substring : returns a substring of a string
strncmp : compares the first n characters of two strings
trim : removes leading and trailing blanks from a string
leftTrim : removes leading blanks from a string
rightTrim : removes trailing blanks from a string
case : changes the case of a string
toUpper : converts a string to upper case
toLower : converts a string to lower case
capitalize : capitalizes the first character in each word of
a string
toString : converts a value to its corresponding string
toTrimmedString : converts a value to a string with no spaces
stringCopy : copies one string to another
stringSetChar : overwrite a substring of one string with another
(similar to stringCopy)
stringGetChar : retrieve a substring from a string
(similar to substring but with different defaults)
stringConcatenate : concatenate two strings
stringCompare : compares one string to another (case sensitive)
stringCompareNocase : compares one string to another (case insensitive)
regexpCompareString : compares a string to a pattern (case sensitive)
regexpCompareStringNocase : compares a string to a pattern
sprintf : formats output strings like sprintf with the
additional functionality of toString
formatDateString : format a date string using the format specifiers
in strftime
sscanf : functions like sscanf with the additional
functionality of toNumeric
toNumeric : converts a string to its numeric value
stringToDouble : converts a string to a double precision
floating point value
stringToInteger : converts a string to an integer
stringLength : returns the length of a string
delimitedStringLength : returns the length of a string using delimiters
nonblankLength : returns the nonblank length of a string
findChar : returns the first location of one of a set
of characters in a string
findNotChar : returns the first location of a character which is
not a member of a set of characters in a string
getFirstChar : retrieve the first or last nonblank character
getLastChar : retrieve the last nonblank character in a string
firstCharPos : find the first or last nonblank character position
lastCharPos : find the last nonblank character position in a string
characterCount : returns the number of characters in a string
wordCount : returns the number of words in a string
findString : returns the position of one string within another
regexpFindString : returns the position of one string within another
using regular expressions for the search
stringStartsWith : determines if a string starts/ends with a substring
stringEndsWith : determines if a string ends with a substring
insertString : inserts a string within another string
replaceString : replaces one string with another string in a string
regexpReplaceString: replaces one string with another string in a
string using regular expressions for the search
replaceBracketedString : replace a bracketed substring
replaceChar : replaces any of a set of characers wih another
character
split : splits up a string based upon finding a delimiter
string
regexpSplit : splits up a string based upon finding a delimiter
string which is a regular expression
splitByCharSet : splits up a string based upon finding any of a
set of delimiter characters
stringToken : returns the next token from a string and removes
it from the original string
stringGetValue : returns the next token of the specified type from
a string and removes it from the original string
stringType : returns a string describing the argument string's
type
pos : pads with spaces/truncates a string to a specified
length
pad : pads a string with a specified character to a
specified length
justify : left justify, right justify, or center a string
center : center a string
leftJustify : left justify a string
rightJustify : right justify a string
strShift : left or right shift a string
leftShift : left shift a string
rightShift : right shift a string
reverse : reverses a string
repeatString : repeats a substring a number of times
decimal : returns a value as a decimal string
hex : returns a value as a hexadecimal string
binary : returns a value as a binary string
octal : returns a value as an octal string
radix : returns a value as an arbitrary radix (2-36) string
stripSpaces : strips any whitespace from a string
stripCharacters : strips a requested set of characters from a string
stripEolCharacters : strips end of line characters from a string
stripNonprintables : strips nonprintable characters from a string
stripHtml : strips HTML tags from a string
stripBrackets : strips beginning and ending brackets from a string
stripQuotes : strips beginning and ending quotes from a string
quoteString : adds beginning and ending quotes to a string
unescapeString : replaces escape characters in a string with
their original characters
escapeString : replaces characters in a string with their
corresponding escape characters
findTagString : finds and extracts delimited tags from a string
getTaggedValue : extracts a tag/value pair from a string
makePrintable : expand any tabs and remove or replace any
nonprintable characters in a string
isLowerCase : determines whether or not a string is in all
lower case characters
isUpperCase : determines whether or not a string is in all
upper case characters
isQuotedString : determines whether or not a string is quoted
isBracketedString : determines whether or not a string is bracketed
isAlphabeticString : determines whether or not a string is composed
entirely of alphabetic characters (plus optional
white space)
isAlphanumericString : determines whether or not a string is composed
entirely of alphanumeric characters
(plus optional white space)
isBlankString : determines whether or not a string is composed
entirely of white space
isFloatString : determines whether or not a string represents
a floating point number
isIntegerString : determines whether or not a string represents
an integer number
isHexString : determines whether or not a string represents
a hexadecimal number
isPrintableString : determines whether or not a string is composed
entirely of printable characters
isStringFilledWithChar : determines whether or not a string is
composed entirely of a single character
isDeviceString : determines whether or not a string represents
a device specification
isPropertyString : determines whether or not a string is a
device property name
isNodeString : determines whether or not a string is a
node name
isErrorString : determines whether or not a string is
an error name
isEventString : determines whether or not a string
represents a clock event
isDateString : determines whether or not a string
represents a date
isRad50String : determines whether or not a string is
composed entirely of valid rad50 characters
stringLineInfo : determines how many lines are in a string
stringExtractLine : extract a line from a string
consoleClassMaskToString : convert a console class mask to a string
stringToConsoleClassMask : converts a string to a console class mask value
Data manipulation functions:
arrayInvert : inverts the order of an array
arrayInsert : inserts a new element in an array
arrayAppend : append a new entry at the end of an array
arrayPrepend : insert a new entry at the beginning of an array
arrayDelete : deletes an existing entry from an array
arrayDeleteDuplicates : deletes duplicate entries from an array
arrayFill : fill an array with a value
compareWithTolerance : compares one or more values with another
with a tolerance
Device oriented functions:
device : converts an ACNET device to a device index value
deviceIndex : converts an ACNET device to a device index value
deviceSpec : converts a value to a device specification
name : returns a device name string
fullName : returns a device full name string
text : returns a device descriptive text string
fullText : returns a device full descriptive text string
units : returns a device units string
deviceValue : returns a numeric device value
deviceValueText : returns a device value as a string
deviceDigitalStatus : returns a device digital status value
alarmBlockFieldValue : returns individual alarm block field values
deviceType : returns the type of a device property
hasProperty : determines whether or not a device has a
specified property
hasReading : determines whether or not a device has a
reading property
hasSetting : determines whether or not a device has a
setting property
hasStatus : determines whether or not a device has a
status property
hasControl : determines whether or not a device has a
control property
hasAnalogAlarm : determines whether or not a device has an
analog alarm property
hasDigitalAlarm : determines whether or not a device has a
digital alarm property
stateText : returns the text for the current state of a
state device
deviceNode : returns the source node for a device property
deviceDefaultLength : returns the default length of a device property
in bytes
deviceAtomicLength : returns the atomic length of a device property
in bytes
deviceMaximumLength : returns the maximum length of a device property
in bytes
deviceScalingLength : returns the scaling length of a device property
in bytes
deviceState : returns the state of a device
(valid, obsolete, or invalid)
isObsoleteDevice : determines whether or not a device is obsolete
isArrayDevice : determines whether or not a device/property
is an array
isStructureDevice : determines whether or not a device/property
is a structure
deviceProperties : returns the properties associated with a device
deviceDownloadProperties : returns the download properties associated
with a device
deviceIsDownloaded : determines if a device property is downloaded
upon front end reboot
numReadableProperties : returns the number of readable properties for
a device (optionally also returns the array
of properties)
numSettableProperties : returns the number of settable properties for
a device (optionally also returns the array
of properties)
deviceSsdn : returns the SSDN for a device property
deviceEmc : returns the EMC for a device property
deviceSsdr : returns the SSDR for a device
deviceProtectionMask : returns the device setting protection mask
deviceAlarmList : returns the device alarm list
deviceAlarmGroupInfo : returns device alarm group information
previousSibling : returns the device's previous sibling (or 0)
nextSibling : returns the device's next sibling (or 0)
controllingDevice : returns the device's controlling device (or 0)
bitText : returns the descriptive text for a specified bit
bitTextAll : returns the bit information for a device
bitDataText : returns the data text for a specified bit
analogAlarmText : returns the analog alarm text for a device
analogAlarmPriority : returns the analog alarm priority for a device
digitalAlarmText : returns the digital alarm text for a device
digitalAlarmTextAll : returns all of the digital alarm text for
a device
deviceCurrentAlarmText : returns the current alarm text for a device
ftpMaxFreq : returns the maximum fast time plot frequency
for a device or plot class
snapshotMaxFreq : returns the maximum snapshot plot frequency
for a device or plot class and optionally
the number of points as well
deviceStructureName : returns the structure name for a device property
deviceExpression : returns the expression for a device
deviceDepartment : returns the department responsible for a device
deviceMaintainer : returns the person responsible for
maintaining a device
alarmAcknowledgeMask : returns a device's alarm acknowledge mask
deviceCreator : returns the user who created a device
deviceLastModifier : returns the user who last modified a device
deviceLastModifiedDate : returns the date when a device was last
modified
stringToDeviceName : finds device names matching a search string
deviceNameToFullName : returns the full device name corresponding
to a name
deviceFullNameToName : returns the device name corresponding to a
full name
deviceIsSettableByClass : determines if a device can be set by a
console class
deviceVirtualMachine : returns device virtual machine information
deviceNodeType : returns the node type for a device property
isIrmDevice : determines whether a device property is
sourced by an IRM node
isLabviewDevice : determines whether a device property is
sourced by a LabView node
isMoocDevice : determines whether a device property is
sourced by a MOOC node
isOacDevice : determines whether a device property is
sourced by an OAC
isAcsysFefDevice : determines whether a device property is
sourced by an Acsys/FEF node
cacheDeviceInfo : cache device database information for
later retrieval
deviceFamilyMembers : returns the members of a family device
deviceInFamilies : returns families that a device is a member of
deviceInCompositeDevices : returns composite devices which use a
given device
deviceControlledDevices : returns the devices controlled by a device
virtualMachineDevices : returns the devices belonging to a
virtual machine
deviceListing : creates formatted device information strings
deviceListToDevices : retrieves the devices from a device list
duplicateSsdnProperties : returns any duplicate SSDN properties
to a given property on the same node
deviceParameterPageMapping : returns device parameter page mapping
instances
fileDevices : returns the devices specified in a file
sqlQueryDevices : returns devices from a SQL query
userAlarmListDevices : returns the devices in a user alarm list
userSaveListDevices : returns the devices in a user save list
downloadDevices : returns front end download devices
parameterPageDevices : returns the devices on a parameter page
lexSaDevices : returns devices in a Lex SA display
synopticDevices : returns devices in a Synoptic display
Device search functions:
genericDeviceSearch : searches for devices matching various parameters
deviceNameSearch : searches for all devices whose names match
a string
deviceFullNameSearch : searches for all devices whose full names
match a string
deviceDescriptionSearch : searches for all devices whose descriptions
match a string
deviceFullDescriptionSearch : searches for all devices whose full
descriptions match a string
deviceNodeSearch : searches for all devices from a given node
deviceSsdnSearch : searches for all devices whose SSDNs match
a pattern
Device scaling functions:
deviceRawToScaled : scale a raw device value
deviceRawToScaledCustom : scale a raw device value using
caller-supplied scaling parameters
deviceRawToHistoricScaled : scale a raw device value using historic
scaling
deviceRawToValueText : scale a raw value to its corresponding
string
deviceRawToValueTextCustom : scale a raw value to its corresponding
string using caller-supplied scaling
deviceScaledToRaw : convert a scaled device value to a raw value
deviceScaledToRawCustom : reverse scale a scaled device value using
caller-supplied scaling parameters
deviceRawToStatusText : scale a raw status value to a text string
deviceRawToStatusValue : scale a raw status value to a boolean
attribute value
deviceRawToControlText : scale a raw control value to a text string
deviceRawToEnumText : scale a raw enumerated reading value
to a text string
devicePrimaryToScaled : scales a primary device value
deviceScaledToPrimary : convert a scaled device value to
a primary value
devicePrimaryToScaledCustom : scale a primary device value using
caller-supplied scaling parameters
deviceReadSetScaling : return reading or setting scaling
information
deviceReadSetExtScaling : return extended reading or setting scaling
information
deviceReadSetHistoricScaling : return reading or setting historic
scaling information
deviceStatusScaling : returns status scaling information
for a device
deviceStatusScalingAll : returns all status scaling information for
a device
hasStatusAttribute : determines whether or not a device has a
status attribute
digitalControlInfo : returns digital control info for a device
digitalControlInfoAll : returns all of the digital control info
for a device
hasControlAttribute : determines whether or not a device has
a control attribute
deviceControlAttributes : returns the control attributes for a device
Time functions:
stringToDate : converts a string to a date value
dateToString : converts a date value to a string
convertSeconds : converts dates in seconds between date types
julianDate : converts a date value to a julian date
julianDateToDate : converts a julian date value to a date
15hzCount : returns 15Hz count since the calling process
started
millisecondsNow : returns the current time in milliseconds
since the Epoch
currentTime : current time in seconds and milliseconds
since the Epoch
currentTimeInClinks : current time in seconds and milliseconds
since January 1, 1972 00:00 CST
systemTime : returns system time in milliseconds since
ACL was initialized
cpuTime : returns CPU time in milliseconds since
ACL was initialized
timeAgo : returns date which is some number of
time units before a base time
timeFromDate : returns date which is some number of
time units after a base time
localtime : break down a date value into its component
values
Clock event functions:
eventOccurred : determines if a clock event has occurred
clearEventOccurred : clear the detection status for a clock event
timeSinceEvent : returns the elapsed time since an event
has occurred
eventDate : returns the date in clinks when an event last
occurred
eventCount : returns the current count for an event
Save/restore file functions:
oldestSrFile : returns the oldest save/restore file number
newestSrFile : returns the newest save/restore file number
saveFileInfo : returns information about a single save/restore
file
SDA functions:
currentSdaFile : returns the current SDA file number for a given
usage
dateToSdaFile : returns the SDA file number corresponding to
a given date
sdaFileDate : returns the starting or ending date for an
SDA file
isValidSdaFile : determines whether or not a value is a valid
SDA file number (file instance actually exists)
isValidSdaCase : determines whether or not a value is a valid
SDA case (case instance actually exists)
isValidSdaSet : determines whether or not a value is a valid
SDA set (set instance actually exists)
Node oriented functions:
node : converts a node name to a value
nodeIs : determines whether or not the specified
node has a particular status or type
nodeIsUp : determines whether or not the specified
node is up
nodeAttributeValue : returns ACNET node attribute values
cacheNodeInfo : cache node database information for
later retrieval
ipNameToNode : converts an IP name to an ACNET node value
trunkNodeToNode : converts a trunk and node number into a
node value
nodeToTrunkNode : converts an ACNET node value to its component
trunk and node number
nodeAcnetTasks : retrieves the ACNET tasks for a given node
isIrmNode : determines whether a node is an IRM node
isLabviewNode : determines whether a node is a LabView node
isMoocNode : determines whether a node is a MOOC node
isOacNode : determines whether a node is an OAC node
isAcsysFefNode : determines whether a node is an Acsys/FEF node
acnetPing : performs an ACNET ping on a node
coresidentNodes : returns the coresident nodes on an ACNET node
loggersOnNode : returns the data loggers running on an
ACNET node
oacsOnNode : returns the names of OACs running on an
ACNET node
nodeConsolidator : returns the consolidating node(s) for a node
Console oriented functions:
consoleExists : determines whether or not a specified
console exists (is defined) (may not be running)
consoleIsUp : determines whether or not a specified
console is running
consoleSlotExists : determines whether or not a console slot exists
consoleProcessName : retrieves the name of a console process
running in a specified console and slot
consoleTaskName : returns a console slot specific task name
consoleToNode : converts a console number to its corresponding
ACNET node
consoleToInstance : converts a console number to its corresponding
instance
findConsoleWindowTitle : find console window titles matching a string
File oriented functions:
fileExists : determines whether or not a file exists
fileLength : returns the length of a file in bytes
fileDate : returns the date of a file
fileOwner : returns the owner of a file
fileOwnerId : returns the owner ID for a file
filePermissions : returns the complete file permission set
for a file
fileHasPermission : returns a specific permission for a file
fileCopy : copies an existing file
(requires file copy privilege)
fileRename : renames an existing file
(requires file rename privilege)
fileDelete : deletes an existing file
(requires file delete privilege)
openFile : opens a file for reading and/or writing
closeFile : closes a file opened by an earlier call to
openFile
fileGetString : reads a string from a file opened by openFile
filePrintf : functions like fprintf with the additional
functionality of toString
printf : functions like printf with the additional
functionality of toString
printfNoNewline : functions like printf with the additional
functionality of toString (no newline added)
fscanf : functions like fscanf with the additional
functionality of toNumeric
fileRead : reads binary values from a file
fileRewind : rewinds a file to its beginning
fileWrite : writes binary values to a file
parseFileName : parses a file name into its component pieces
expandFileName : expands a file name starting with a tilde (~)
fileDirectory : returns file names for a directory
findInFile : searches for a text string in a file
findFileInPath : determines whether a file name points to an
existing file
fileNumLines : returns the number of lines (also characters
and words) in a file
fileFlush : flush any unwritten information to the file
flushOutputFile : flush any unwritten information to an
output file
flushLogFile : flush any unwritten information to the log file
Program environment functions:
myConsole : returns the caller's console number
myConsoleClass : returns the caller's console class
myConsoleInstance : returns the caller's console instance number
myConsoleSlot : returns the caller's console slot
myExecutableName : returns the caller's executable name
myHostName : returns the caller's host name
myNode : returns the caller's ACNET node
myProcessName : returns the caller's process name
myGenericProcessName : returns the caller's generic process name
mySystemInfo : returns basic system information
myUserName : returns the caller's user name
Data logger functions:
oldestLoggerTime : returns the oldest timestamp for a logged device
loggerNameToNode : converts a data logger name to its
corresponding node
nodeToLoggerName : convert a node value to a data logger name
loggerListInfo : returns general logger list information
loggerListDeviceStats : returns logger list device configuration stats
loggerListWrapTime : returns a logger list wrap time in hours
whereDeviceIsLogged : returns where a device is logged
whereDeviceWasLogged : returns where a device was logged in the past
allLoggerNodes : returns the names of all data loggers
loggerListDevices : returns the devices in a data logger list
MISCELLANEOUS functions:
exists : determines if a device or variable/symbol exists
sizeof : returns the number of elements in a device,
device list, input, or variable
byteSizeof : returns the size of a device or variable
in bytes (static)
sizeofVariable : returns the number of elements in a variable
byteSizeofVariable : returns the size of a variable in bytes
numElements : returns the number of elements in a variable
or a device specification
byteCompare : performs a byte comparison of two values
byteCopy : performs a byte copy of one value to another
condif : returns the second argument if the first has a
value of true or the third argument if it has
a value of false
scondif : returns the second argument as a string if the
first has a value of true or the third argument
as a string if it has a value of false
lor : logical or
land : logical and
floatToBinary : converts a single precision floating point
value to its equivalent binary value
binaryToFloat : converts a binary value to its equivalent
single precision floating point value
cast : return the equivalent value to a value
castDouble : return the equivalent double precision value
to a value
castFloat : return the equivalent single precision value
to a value
castInteger : return the equivalent integer value to a value
castLogical : return the equivalent logical (boolean) value
to a value
castLongLong : return the equivalent long integer value
to a value
castUnsignedInt : return the equivalent unsigned integer value
to a value
castUnsignedLongLong : return the equivalent unsigned long integer
value to a value
bcdToString : convert a BCD-encoded value into decimal string
bcdToDecimal : convert a BCD-encoded value into decimal integer
random : returns pseudo random numbers from 0 to 2^31 - 1
randomSeed : sets the seed value for the random function
prec : output precision
(eg. prec(value,fraction_digits))
stringToRad50 : convert a string to a radix 50 value
rad50ToString : converts a radix 50 value to a string
stringToColor : converts a string to a color value
stringToProperty : converts a string to a property value
stringToConvertType : converts a string to a convert type value
convertTypeToString : converts a convert type value to a string
totalNumberOfDevices : returns the total number of devices in the
control system
ssdnToString : converts an SSDN value to a standard string
stringToSsdn : converts a string to an SSDN value
emcToString : converts an EMC value to a standard string
stringToEmc : converts a string to an EMC value
timer : returns the current value of a timer
error : converts an ACNET error string to a value
errorToFacilityError : converts an ACNET error value to its component
facility and error number
userAlarmList : returns the state of a user alarm list
(enabled, bypassed, or empty)
setUserAlarmListStatus : sets the status of a user alarm list
settingsAreEnabled : determines if settings are enabled
(supports optional device name argument)
getLogicalName : returns the string corresponding to a
logical name
setLogicalName : sets a logical name to a value
deleteLogicalName : deletes a logical name
getenv : returns the string corresponding to an
environment variable
setenv : sets an environment variable to a value
delenv : deletes an environment variable
readLock : retrieves information about a lock
readProgramLocks : retrieves the locks held by a program
consoleSlotToWindow : convert a console slot to a primary window ID
consoleWindowToSlot : convert a console window ID to a slot
playBeep : plays a beep sound
playSound : plays an existing sound file
taskExists : determines if an ACNET task exists
taskId : returns an ACNET task ID
taskPid : returns an ACNET task process ID
taskIdToName : converts an ACNET task ID to a name
taskPidToName : converts an ACNET task process ID to name(s)
isServerTask : determines whether or not an ACNET task is
a server
processExists : determines if a process exists
processInfo : retrieves information about a process
consoleUserNameToFullName : converts a console user name to a full name
fullNameToConsoleUserName : converts a full name to a console user name
pageTitle : returns the title for a page
programMapping : returns the pages that a program is mapped to
concatenateStringArguments : concatenate the script string arguments
fshareFileInfo : returns information about a Filesharing file
genericStructInfo : returns information about a generic structure
appdsTableInfo : returns information about an APPDS table
feClassInfo : returns front end device class information
feSsdnClassLocation : returns the byte index of the device class
in an SSDN
stepMotorIsMoving : determines whether or not a stepping motor
is currently moving
networkServiceToPort : converts a network service name to a port
snapManagerDataDirectory : returns snapshot manager data file
information
dipoleThreeBumpInfo : returns dipole three bump information
dipoleFourBumpInfo : returns dipole four bump information
gifImageSize : determines the dimensions of a GIF image
Debugging functions:
variableNumReadings : returns the number of times a variable
has been read
variableNumSettings : returns the number of times a variable
has been set
variableType : returns the type of a variable as a string
valueType : returns the type of a value as a string
ifLevel : returns the current 'if' level of the script
loopLevel : returns the current loop level of the script
A block of code can be marked so that it is always executed
regardless of errors or program execution flow. This is called
an "always" block. It must be situated at the end of the script,
and it is started with a label statement of "always". The always
block cannot contain on_error, exit, gosub, goto, or return
commands. The always block never affects the overall returned
status from the script.
-------------------------------------------------------------------------------
Alphabetic list of ACL commands:
-------------------------------------------------------------------------------
acl_option - specify ACL compiling options
acnet_request - send an ACNET request
activate - activate a device
alarm_info - returns alarm information including current alarms
alarm_limit - read or set analog alarm limits
alarm_log - display alarm history log
alarm_message - either post an alarm or clear an existing one
assignment - assign a value to a variable or symbol
audit_log - query the ACNET device audit log
beam_switch - read the status of a beam switch
blm_data - retrieves BLM loss information
blm_frame_data - retrieves BLM loss information for a single detector
bpm_data - retrieves BPM position and intensity information
bpm_frame_data - retrieves BPM position and intensity information for a single detector
break - jump out of a simple program loop
bypass - bypass an alarm
call_proc - execute a non-ACL procedure
camac - execute individual CAMAC commands
cancel_request - cancel a request for one or more ACNET devices
ch13_message - display the current channel 13 message
change_device - change the device that a changeable device refers to
check - check to see if a control system service is ready
check_status - check the basic status of devices
clib_info - display CLIB information
cnswin - move, resize, or iconify a console window
cns_message - send a console message
comment_char - disable a comment character
compare - compare device readings
console_info - display console information
console_log - display console log entries
continue - jump to the bottom of a simple program loop
copy - copy one device to another
copy_variable - copy a value or an array of values into a variable
cpld_log - display CPLD program log entries
crate - access CAMAC crate information
data_event - set the default data event for future data requests
data_source - establish a data source for future data requests
database_info - returns database monitoring information
dbset - set the database setting record for an ACNET device
deactivate - deactivate a device
declare - declare a variable or symbol
decrement - decrement an ACNET device
delete - delete cached database information or a file
delete_cache - delete cached database information
delta_set - apply a delta to the setting of an ACNET device
device_arg - specify a description and/or default value for a device
device_list - specify a list of devices for processing
digital_control - send a basic control command to a device
disable - disable a device, a clock event, or another parameter
download - download the most recent database setting for a device
downtime_log - display downtime log entries
do_while - begin a do/while loop
else - implement default case for a an if/elseif block
elseif - execute simple nested conditional structure
enable - enable a device, a clock event, or another parameter
endif - end a simple conditional structure
endloop - end a simple program loop
endwhile - end a simple while loop
end_do_while - end a do/while loop
error_log - query the ACNET error log
error_text - display ACNET error text
event_info - display clock event information
event_log - display event log entries
execute - execute ACL code
exit - end the script
exitloop - jump out of a simple program loop
fft - perform an FFT on a set of points
file_info - display flat file information
fill - fill a device setting with a value
find_in_file - search for one or more strings in a file
find_program - find running instances of a program
fit - perform a polynomial, exponential, or Gaussian fit on a set of points
fshare_info - display Filesharing file information
ftd - set the default Frequency Time Descriptor for future data requests
ftp - copy a file or files using file transfer protocol (FTP)
ftp_read - read ACNET device using the fast time plot protocol
gas - read or write GAS commands
gosub - jump to a labeled subroutine
goto - jump to a given label
gpib - execute GPIB commands
host_request - pass a request to the host program
if - execute simple conditional structure
image_draw - display a graphic image
import - includes a file of variable declarations
increment - increment an ACNET device
input - define a data input
library_info - display library information
list - list device parameters
list_strings - displays control system lists of strings
lock - lock a script
log_device - log a device value
logger_get - read data logger values
logger_get_array - read data logger array values
loop - execute a simple program loop
madc - access MADC information
mail - mail a file to a user
mdat_info - display MDAT frame information
measurement_spec - read or set a measurement specification
negative - set an ACNET device to negative polarity
node - perform operations on an ACNET node
node_audit_log - query the ACNET node audit log
node_info - display ACNET node information
nominal_mask - read or set digital alarm nominals/masks
off - turn off an ACNET device
off_list - turn off a list of ACNET devices
on - turn on an ACNET device
on_error - establish an error handling routine
on_list - turn on a list of ACNET devices
output - define the output for future commands
output_value - send a value to a selected output
path - set the default file path
polarity - set the polarity of an ACNET device
positive - set an ACNET device to positive polarity
print - print a line of output
program_info - display program information
program_log - display program (shared) log entries
program_status - retrieve the status of a program instance
ramp - ramp a setting to a desired value
read - read an ACNET device and display the value
read_dir - read the contents of a file directory
read_field - read an individual field from an ACNET device
read_file - read all or part of a file
read_list - read a list of ACNET devices
read_struct - read an ACNET device structure
reboot - reboot an ACNET node
request_device - make a reading request for one or more ACNET devices
reset - reset an ACNET device
reset_list - reset a list of ACNET devices
resize - resize (reallocate) an array variable or symbol
restore - restore an ACNET device setting
retry - retry a command which has invoked an error handler
return - return from a subroutine or error handler
run - run a program
save - save devices in a save/restore file
save_screen_image - saves a console screen image to a file
saverestore_get - read values across save/restore files
scan - scan (set) one device while reading one or more others
sda_config - display SDA configuration information
sda_dir - display SDA directory information
sda_get - read values across SDA samples
search - search device readings for a pattern
set - set an ACNET device
set_field - set an individual field in an ACNET device
set_list - set a list of ACNET devices
set_struct - set an ACNET device structure
setting_history - display the setting values for a device or a list of devices
setting_log - display setting log entries
shot_log - make an entry in the Shot Scrapbook
show - display database information for a device
slot - access CAMAC slot information
snap_read - read ACNET device using the snapshot plot protocol
sort - sort an array of values or an array device
sql - send a database modification command or read database values
sr_dir - display save/restore file directory information
sr_set - set the value for an ACNET device in a save file
state_log - display state log entries
stats - perform simple statistics on device readings or a variable
status_list - read status values for a list of ACNET devices
step_motor - set a stepping motor
string_arg - specify a description and/or default value for a string
str_case - change the case of a string
str_cat - concatenate two strings together
str_compare - compare two strings
str_convert - convert a string value
str_copy - copy one string to another
str_find - search for one string in another
str_format - build a formatted string
str_length - return the length of a string
str_replace - replace a substring with another
str_split - split a string into substrings
str_tail - extract the tail of a string
str_trim - trim spaces from a string
substring - extract a substring from a string
swap - swap a set of values in a variable or a device
switch_info - display network switch information
system - execute a system command
table_device - read or set table device values
tcp_request - send a TCP/IP request
timeout - set data acquisition timeout values
timer - determine time intervals
timer_event - read or set timer events
tlg_info - read information about events generated by the TLG
toggle - toggle a status attribute of an ACNET device
trigger - trigger a clock event
turn - turn an ACNET device on or off
unescape - replace escape characters in a string
unlock - unlock a script
url_display - display a URL in a web browser
user_info - display console user or console node information
version - display the version of ACL that is being run
wait - wait for a period of time, an event, a state, or a device
web_log - make an entry in a web-based log book
while - execute simple while loop
write_file - write data to a file
-------------------------------------------------------------------------------
ACL Command help:
-------------------------------------------------------------------------------
read : read an ACNET device and display the value
read[/{qualifier...}][/output={spec}] {device|device list}[[n]][/{qualifier...}] [{var}]
This command outputs the name of the requested device, it's current
value, and the corresponding units text. One or more elements of
an array device can be displayed. Note that a device index can be
supplied rather than a device name. This command also supports
an array index notation which allows you to specify the beginning
and ending array indices (ex. read t_ha11[3:5]). This command
also supports family devices and list specifiers (see above).
Examples of read qualifiers:
scaled -> read the scaled data (default)
raw -> read the raw data in hex
raw_bs -> read the raw data in hex (byte swapped)
raw_ws -> read the raw data in hex (word swapped)
dec[imal] -> read the raw data in decimal
dec_bs -> read the raw data in decimal (byte swapped)
dec_ws -> read the raw data in decimal (word swapped)
primary -> read the data in primary units (volts)
string (ascii) -> read raw data as a string (ASCII)
string_bs -> read raw data as a string (ASCII)
and byte swap it
ascii_no_nulls -> read raw data as a string with embedded
(but not trailing) nulls replaced with
a pipe (|) character
state -> read raw data and display as state text
date -> read raw data and display as a date string
(raw data assumed to be local time in
seconds since Jan 1, 1970)
date_gmt -> read raw data and display as a date string
(raw data assumed to be GMT (UTC) time in
seconds since Jan 1, 1970)
date_clinks -> read raw data and display as a date string
(raw data assumed to be local time in
seconds since Jan 1, 1972)
acnet_error -> read raw data and display as an ACNET
error string
node -> request ACNET node string (raw data assumed
to be an ACNET node value)
property=analog_alarm -> read whether or not the device is in alarm
setting -> read the setting value
ftd_oneshot -> request a one shot reading
length=2 -> request 2 bytes of data
atomic_size -> request the atomic size for this property
maximum_size -> request the maximum size for this property
num_elements=4 -> request 4 values
num_values=4 -> request 4 values
num_elements=all -> request all values for this property
all_elements -> request all values for this property
offset=0 -> request data starting at a byte offset of 0
index=2 -> request data starting at array index 2
array_index=2 -> request data starting at array index 2
bit_status -> request device bitwise status
state_text -> request state text data (state devices only)
source=dp -> display data from the accelerator (default)
source=db -> display data from the database
source=sr:1 -> display data from save/restore file 1
source=sda:1:"Inject Protons":1:ColliderShot -> display data from SDA
file 1, case Inject Protons,
subcase (set) 1,
usage ColliderShot
source=dl:"01-Jan-2000 01:00" -> display data from a Lumberjack at
January 1, 2000 at 0100
source=memory -> display data from a memory pool
source=snpmgr:booster:'16-Sep-2011 15:00' -> display data from the
detached snapshot manager
family -> read an entire family
whole(all) -> indicates that you want to read the whole
property (only valid when used with 'family')
row -> display values in a single row
column -> display values in a single column
no_name -> don't display device name(s)
no_units -> don't display device units text
nodisplay -> don't display the reading, only errors
check_if_node_up -> check to see if the device's node is up
before attempting to read the device
waitnew -> wait for a new value to be returned (default)
nowaitnew -> don't wait for a new value to be returned
pendwait -> wait for a nonpending status
ignore_errors -> display the data even if it is in error
num_values={variable} -> returns the number of values read
values={array variable} -> returns the values read
dynamic[_arrays] -> dynamically reallocate output value variable
to match the number of values read
obsolete -> support handling of obsolete devices
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
binary:{file_name} -> send output to a binary file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
The supported properties for this command are:
reading, setting, basic status, analog alarm, digital alarm
Examples:
read z:acltst
read z:acltst/output=symbol:symbol1
read z:acltst/raw
read z:acltst/source=db
read 27235 # make reading from device index
read v:cldrst/state
read g:0b29v0/string/all
read t_ha11[3:5] # read elements 3, 4, and 5
read z:acltst[] # read an entire array device
read/family/all z:acltsz # read a family device
read node=tev/crate=A1/prread
read/pendwait m:outtmp/ftd=evt02 # wait for data on event 02
read m:outtmp/src=sr:last_big_save # read from last big save
read m:outtmp/src=dl:"01-Jan-2000 01:00" # read from data logger
read m:outtmp/src=sda:9158:"Inject Protons":1:ColliderShot
read m:outtmp.min # read alarm minimum
Synonyms: get, readDevice, getDevice
Related commands:
read_list, read_field, read_struct, set, alarm_limit, nominal_mask,
list, show, compare data_event, ftd, data_source, device_list,
request_device, cancel_request
-------------------------------------------------------------------------------
set : set an ACNET device
set[/{qualifier}] {device|device list}[[n]][/{qualifier...}] {constant|variable|symbol}
The constant value is either a numeric constant in the case
of the setting property or a basic control string in the case
of the basic control property. For the setting property,
multiple scaled or raw values can be supplied. If multiple
values are entered, they should be separated by spaces or
commas. If a string value is supplied, it should be enclosed
in either single or double quotes. Setting values can also be
supplied in a delimited text file. This command also supports
an array index notation which allows you to specify the beginning
and ending array indices (ex. set z:acltst[1:2]=13,3.5). This
command also supports family devices and list specifiers (see above).
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of set qualifiers:
scaled (common) -> make a scaled (common) setting (default)
raw -> make a raw setting
primary (volts) -> make a setting in primary (volts) units
string -> make a setting with a string
state -> make a setting with state text
(state devices only)
length=2 -> set 2 bytes of data
atomic_size -> set the atomic size for this property
maximum_size -> set the maximum size for this property
num_elements=4 -> set 4 values
num_values=4 -> set 4 values
all -> set all values for this property
all_elements -> set all values for this property
offset=0 -> set data starting at a byte offset of 0
index=2 -> set data starting at array index 2
array_index=2 -> set data starting at array index 2
source=memory -> set data in a memory pool
[alarm_]minimum -> set the analog alarm minimum
[alarm_]maximum -> set the analog alarm maximum
min_max -> set the analog alarm minimum and maximum
analog_nominal -> set the analog alarm nominal
analog_alarm_nominal -> set the analog alarm nominal
[alarm_]tolerance -> set the analog alarm tolerance
nom_tol -> set the analog alarm nominal and tolerance
[alarm_]nominal -> set the digital alarm nominal
[alarm_]mask -> set the digital alarm mask
[alarm_]tries -> set the number of alarm tries
[alarm_]ftd -> set the alarm scan rate (for MOOC devices)
limit_type -> set analog alarm limit type
init_alarm_flags -> initialize alarm display/logging flags
motor -> set a motor device
hex -> setting value is in hexadecimal
decimal -> setting value is in decimal (default)
file -> read setting values from a file
(default file extension is ".dat")
byte_swap -> used with a raw setting to swap the setting
bytes on word boundaries
word_swap -> used with a raw setting to swap the setting
words
family -> set an entire family
Examples of control strings:
reset -> reset device
on -> turn on device
off -> turn off device
toggle_onoff -> toggle on/off status
positive -> set the device to positive polarity
negative -> set the device to negative polarity
toggle_polarity -> toggle polarity
ramp -> set the device to ramp mode
dc -> set the device to DC mode
toggle_rampdc -> toggle ramp/DC mode
enable_alarm -> enable an alarm
bypass_alarm -> bypass an alarm
enable_abort -> enable an alarm abort flag
abort_inhibit -> disable an alarm abort flag
enable_display -> enable an alarm display flag
disable_display -> disable an alarm display flag
enable -> enable a device (frig FSMs and loops only)
disable -> disable a device (frig FSMs and loops only)
activate -> activate a device (frig and GFSDA FSMs only)
deactivate -> deactivate a device (frig and GFSDA FSMs only)
Examples:
set z:acltst 5
set z:acltst $symbol1
set z:acltst/raw 0xA9
set z:acltst=1,2,3,4
set z:acltst[2]/raw 3 4
set z:acltst[3] 'abcd'
set t:ha11 reset
set t:ha11 on
set m@outtmp enable_alarm # enable analog alarm
set m@outtmp/minimum 32 # set alarm minimum
set m@outtmp/maximum 100 # set alarm maximum
set v:cdfmod/state 'Colliding Beams On'
set z:acltst[1:2]=16,3.5
set z:acltst[]=0,16,3.5,11 # set an entire array
set z:acltst[2:3]=z:aclts3[1:2] # set multiple array elements
set z:acltst[2:3]=array[1] # set multiple array elements
set/family z:acltsz[1:2] = 16, 17.5 # set a family device
set m:outtmp.min = 20 # set alarm minimum
Synonyms: setDevice
Related commands:
read, enable, disable, bypass, activate, deactivate
turn, reset, toggle, alarm_limit, nominal_mask
fill, copy, decrement, increment, delta_set, set_field,
device_list
-------------------------------------------------------------------------------
acl_option : specify ACL compiling options
acl_option[/qualifier] {tag}={value}
This command allows the writer of a script to set compiling options.
One option allows the writer to disable automatic variable creation.
By default, all output variables whether they are associated with a
command or an intrinsic function are automatically created.
Disabling this feature will allow the script writer to more easily
discover typos. Another option is to disable one of the predefined
ACL comment characters for the parsing of the present script. By
default, both the exclamation point (!) and the pound (#) characters
are treated as end of line comment characters unless they are found
in a quoted string. There are cases where it would be convenient to
disable one of these characters. After the script has been parsed,
the disabled comment character is reenabled for the next script.
Examples of acl_option qualifiers:
convert -> convert embedded device and variable
values in the option string
verbose -> display verbose output
output -> specify output
Examples of acl_option types:
auto_variables={boolean} -> enable/disable automatic variable
creation (default is TRUE)
default_variable_type={type} -> set default variable type
(default is double)
comment_char={#|!} -> set the desired comment character
(# or !) (default is both)
default_clock_type={clock type} -> set the default clock type
(tclk (default), hins, nml)
flush_output_file={boolean} -> enable/disable flushing of
output files (default is FALSE)
flush_log_file={boolean} -> enable/disable flushing of the
log file (default is FALSE)
simple_error_strings={boolean} -> enable/disable the output of
simple errors strings
(default is FALSE)
Examples:
acl_option auto_variables=no # disable automatic creation of variables
acl_option comment_character=# # disable the '!' comment character
acl_option clock_type=hins # use the HINS clock by default
Synonyms: aclOption
Related commands:
comment_char, import
-------------------------------------------------------------------------------
cancel_request : cancel a request for one or more ACNET devices
cancel_request/{qualifier}] {all|lastErrorDevice|device|device list}
This command cancels a request for one or more ACNET devices.
This is useful if you want to cancel a request that has been
"lost" for some reason. This command supports an array index
notation which allows you to specify the beginning and ending
array indices (ex. cancel_request t_ha11[3:5]). This command
also supports family devices and list specifiers (see above).
Examples of cancel_request qualifiers:
all[_devices] -> cancel all device requests for this script
last_error_device -> cancel the request for the last device with
a reading error
reading -> cancel a reading request (default)
setting -> cancel a setting request
family -> read an entire family
data_event={string} -> requested data event string
output={spec} -> specify output destination
Examples:
cancel_request m:outtmp/evt00
cancel_request last_error_device
Synonyms: cancelRequest
Related commands:
request_device, read, read_list, read_field, read_struct, device_list,
data_event, ftd, data_source, device_list, status_list
-------------------------------------------------------------------------------
change_device : change the device that a changeable device refers to
change_device[/{qualifier}] {changeable device} [to] {new device}
This command allows the caller to change which actual device
that a "changeable" device actually points to. A changeable
device has a name of the form "G:CDVnn".
Examples of change_device qualifiers:
{property} -> set the property for the device
property={property} -> set the property for the device
alias={string} -> set an alias for this changeable device
obsolete -> allow obsolete devices
verbose -> display verbose output
Examples:
change_device g:cdv0 to z:acltst
declare str string="m:outtmp"
change_device g:cdv0 to str
Related commands:
device_list, read, set
-------------------------------------------------------------------------------
decrement : decrement an ACNET device
decrement {device}[[n]]{/qualifier...} {constant|variable|symbol}
This command decrements a device's setting by a specified amount.
This command is only valid for a device's setting property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of decrement qualifiers:
family -> decrement an entire family
verbose -> generate verbose output
Examples:
decrement z:acltst 2
decrement z:acltst $symbol1
decrement name=z:aclts% .1
Synonyms: dec
Related commands:
increment, delta_set, set, device_list
-------------------------------------------------------------------------------
delete_cache : delete cached database information
delete_cache [{device}]
This command will delete cached database information. If a
device name is specified, only information for that device
will be deleted. Otherwise, all cached database information
will be deleted.
(Note: Arguments enclosed in square brackets are optional.)
Examples:
delete_cache
delete_cache z:acltst
Related commands:
delete
-------------------------------------------------------------------------------
delta_set : apply a delta to the setting of an ACNET device
delta_set {device}[[n]]{/qualifier...} {constant|variable|symbol}
This command applies a specified delta to a device's setting.
This command is only valid for a device's setting property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of delta_set qualifiers:
family -> apply a delta to an entire family
verbose -> generate verbose output
Examples:
delta_set z:acltst 2
delta_set z:acltst $symbol1
delta_set name=z:aclts% -.1
Synonyms: deltaset
Related commands:
increment, decrement, set, device_list
-------------------------------------------------------------------------------
device_list : specify a list of devices for processing
device_list/[/{qualifier}] {name} [{list}={list_specifier}]
This command allows the user to specify a list of devices
which can later be accessed one at a time through a pseudo
device name of "Q:xxxxxx" where xxxxxx is the name given
to the list. The lists of devices are established through
the use of any of the standard ACL list specifiers. List
names must consist of from 1 to 6 characters. This command
also allows the caller to increment or decrement through
the list. Care should be taken in the use of device lists
to make sure to specify property values in the event that
the list is used in a context where properties must be
specified. Either specify the property explicitly in this
command or choose the mutable_property option so that the
property can be selected by the context. Most device lists
are static and are built during script compile time. Changeable
lists are the exception to that rule. They have dynamic contents
and are created and modified by using the "change" qualifier.
The contents of a changeable device list are supplied through
a string variable with one device specification per array
element.
Examples of device_list qualifiers:
create -> creates a device list
change[able] -> creates/changes the contents of
a changeable device list
inc[rement] -> increments to point to the next device
in the list
dec[rement] -> decrements to point to the previous device
in the list
rewind -> resets the list pointer to the beginning
of the list
set_index={index} -> sets the list pointer to a specific index
size (length) -> outputs the number of devices in the list
cancel_requests -> cancels data requests for the devices
in the list
delete -> deletes an existing device list
{property} -> specifies the default property for devices
in the list
property={property} -> specifies the default property for devices
in the list
event={event value} -> specifies a time since event timer
autoinc -> specifies that the list pointer should be
automatically incremented each time the
list is accessed
dont_cull -> don't cull devices from the list which
don't have the requested property
cache={prop1,prop2,...} -> establish properties which should have
their database information cached for
more efficient execution
sort={sort type} -> sort the devices in a particular order
(name_asc, name_desc, di_asc, or di_desc)
update_list={value} -> logical flag indicating whether or not the
list contents should be updated
(default is TRUE)
(only supported for changeable device lists)
output={spec} -> specify output destination
num_devices={var} -> returns number of devices in the list
device_names={var} -> returns the names of devices in the list
index_value={var} -> returns the current list index
Special device qualifiers for device_list:
mutable_property -> indicates that the properties used for
the devices can be changed at use time
mutable_length_offset -> indicates that the lengths and/or offsets
used for the devices can be changed at
use time
mutable_data_source -> indicates that the data source used for
the devices can be changed at use time
mutable_data_event -> indicates that the data event/FTD used for
the devices can be changed at use time
mutable_access_type -> indicates that the access type used for
the devices can be changed at use time
Examples:
device_list/create fg devices='z_aclts2,z_aclts3' # create list
loop 2 cnt=0
print name(q:fg) ' = ' q:fg
device_list/inc fg
endloop
device_list/create/read fg name=m:out% # create list
device_list/size/output=variable:list_length fg
loop list_length
logger_get/start=thismin/node=fastest q:fg
device_list/inc fg
endloop
device_list/create/read fg file=device_file.txt # create list from file
declare names string[] = 'm:outtmp', 'm:outhum'
device_list/change devs device_names=names # changeable device list
Related commands:
read, set, show, logger_get, ramp
-------------------------------------------------------------------------------
download : download the most recent database setting for a device
download[/{qualifier}] {device|device list|node}[[n]][/{qualifier...}] [{location}]
This command will restore a setting value to the value it
has in the settings database. This command can be used for the
setting, basic control, analog alarm, and digital alarm properties.
Properties can be downloaded regardless of whether or not they are
in the front end download list. This command also supports an array
index notation which allows you to specify the beginning and ending
array indices (ex. download z:acltst[1:2]). This command also
supports family devices and list specifiers (see above). Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of download qualifiers:
family -> download an entire family
verbose -> generate verbose output
props=all -> download all settable properties
props=prop1:prop2:prop3:prop4 -> download specific properties
init -> initial download (used for alarm blocks only to
make sure that they start out disabled and with
display enabled)
node -> download all devices for a node
node={node} -> download all devices for a node
location={loc} -> download location (node mode only)
Examples:
download z:acltst # download the entire property
download z:acltst[1:2]
download m@outtmp # download an analog alarm block
download/props=pranab:prdabl z:acltst # download both alarm properties
download download_list=pnut01 # download devices in download list
download/init m@outtmp # download initialized analog alarm
download/init t$ha11 # download initialized digital alarm
Related commands:
node, reboot, restore, set, device_list
-------------------------------------------------------------------------------
increment : increment an ACNET device
increment {device}[[n]]{/qualifier...} {constant|variable|symbol}
This command increments a device's setting by a specified amount.
This command is only valid for a device's setting property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of increment qualifiers:
family -> increment an entire family
verbose -> generate verbose output
Examples:
increment z:acltst 2
increment z:acltst $symbol1
increment name=z:aclts% .1
Synonyms: inc
Related commands:
decrement, delta_set, set, device_list
-------------------------------------------------------------------------------
fill : fill a device setting with a value
fill[/{qualifier}] {device}[[n]][/{qualifier...}] {constant|variable|symbol}
This command will fill the requested number of values in a
setting property with the same value. This command also supports
an array index notation which allows you to specify the beginning
and ending array indices (ex. fill z:acltst[1:2]=16.1).
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of fill qualifiers:
scaled (common) -> make a scaled (common) setting (default)
raw -> make a raw setting
primary (volts) -> make a setting in primary (volts) units
length=2 -> set 2 bytes of data
atomic_size -> set the atomic size for this property
maximum_size -> set the maximum size for this property
num_elements=4 -> set 4 values
num_values=4 -> set 4 values
all -> set all values for this property
all_elements -> set all values for this property
offset=0 -> set data starting at a byte offset of 0
index=2 -> set data starting at array index 2
array_index=2 -> set data starting at array index 2
hex -> setting value is in hexadecimal
decimal -> setting value is in decimal (default)
Examples:
fill z:acltst 5
fill z:acltst $symbol1
fill z:acltst/raw 0xA9
fill z:acltst[2]/raw 3
fill z:acltst[2]/num_values=2 16
fill z:acltst[1:2]=16.1
Related commands:
set, copy
-------------------------------------------------------------------------------
digital_control : send a basic control command to a device
digital_control[/{qualifier}] {device|device list} {command}
This command supports sending any basic control command to
one or more devices. It is only valid for a device's basic
control property. This command also supports family devices
and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of digital_control qualifiers:
family -> turn on an entire family
verbose -> generate verbose output
Examples:
digital_control i:q701 on
Related commands:
on, on_list, off, off_list, reset, reset_list, positive, negative,
polarity, set, turn, toggle, device_list
-------------------------------------------------------------------------------
negative : set an ACNET device to negative polarity
negative[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports setting one or more devices to negative
polarity. It is only valid for a device's basic control property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of negative qualifiers:
check[_status] -> only set the device to a negative polarity
if it's not already in negative polarity
family -> set an entire family to negative polarity
verbose -> generate verbose output
Examples:
negative i:q701
Related commands:
polarity, positive, on, off, reset, set, turn, toggle, digital_control,
device_list
-------------------------------------------------------------------------------
off : turn off an ACNET device
off[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports turning off one or more devices. It is only
valid for a device's basic control property. This command also
supports family devices and list specifiers (see above).
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of off qualifiers:
check[_status] -> only turn off the device if it's not off
family -> turn off an entire family
verbose -> generate verbose output
Examples:
off i:q701
Related commands:
off_list, on, on_list, reset, reset_list, positive, negative,
polarity, set, turn, toggle, digital_control, device_list
-------------------------------------------------------------------------------
off_list : turn off a list of ACNET devices
off_list[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports turning off one or more devices. This command
supports family devices and list specifiers (see above). Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of off_list qualifiers:
family -> turn on an entire family
verbose -> generate verbose output
Examples:
device_list/create devs devices='z:acltst,z:aclts5,z:aclts6'/control
off_list device_list=devs
Related commands:
off, on, on_list, reset_list, positive, negative, polarity, set,
turn, toggle, digital_control, device_list
-------------------------------------------------------------------------------
on : turn on an ACNET device
on[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports turning on one or more devices. It is only
valid for a device's basic control property. This command also
supports family devices and list specifiers (see above).
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of on qualifiers:
check[_status] -> only turn on the device if it's not on
reset -> reset the device before giving it an on command
family -> turn on an entire family
verbose -> generate verbose output
Examples:
on i:q701
Related commands:
on_list, off, off_list, reset, reset_list, positive, negative,
polarity, set, turn, toggle, digital_control, device_list
-------------------------------------------------------------------------------
on_list : turn on a list of ACNET devices
on_list[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports turning on one or more devices. This command
supports family devices and list specifiers (see above). Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of on_list qualifiers:
reset -> reset the device before giving it an on command
family -> turn on an entire family
verbose -> generate verbose output
Examples:
device_list/create devs devices='z:acltst,z:aclts5,z:aclts6'/control
on_list device_list=devs
Related commands:
on, off, off_list, reset_list, positive, negative, polarity, set,
turn, toggle, digital_control, device_list
-------------------------------------------------------------------------------
polarity : set the polarity of an ACNET device
polarity[/{qualifier}] {pos|neg} {device|device list}[[n]]{/qualifier...} {pos|neg}
This command supports setting the polarity of one or more devices.
The specific command value can be placed before or after the device.
This command is only valid for a device's basic control property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of polarity qualifiers:
toggle -> toggle the polarity
family -> control an entire family
verbose -> generate verbose output
Examples:
polarity t:ozf positive
polarity positive t:ozf
polarity t:ozf negative
polarity negative t:ozf
polarity toggle t:ozf
Related commands:
positive, negative, turn, on, off, set, toggle, reset, digital_control,
device_list
-------------------------------------------------------------------------------
positive : set an ACNET device to positive polarity
positive[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports setting one or more devices to positive
polarity. It is only valid for a device's basic control property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of positive qualifiers:
check[_status] -> only set the device to a positive polarity
if it's not already in positive polarity
family -> set an entire family to positive polarity
verbose -> generate verbose output
Examples:
positive i:q701
Related commands:
polarity, negative, on, off, reset, set, turn, toggle, digital_control,
device_list
-------------------------------------------------------------------------------
ramp : ramp a setting to a desired value
ramp[/time={secs}] {device|device list}[[n]][/{qualifier...}] {constant|variable|symbol}
This command will ramp a setting value from its present value
to the requested value. If no ramp duration is specified,
a ramp duration of zero will be used. In this case, the ramp
command functions like the set command. This command can also
be used to ramp a setting using a fixed step size and delay
between settings. This command can also be configured for
ramping back to the original value. Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of ramp qualifiers:
time={secs} -> ramp duration in seconds
duration={secs} -> ramp duration in seconds
step_size={size} -> constant ramp step size
step_delay={msecs} -> delay between successive settings in
milliseconds
flattop_length={secs} -> number of seconds to wait before ramping
back to the original setting value
ramp_back -> ramp back to the original setting value
max_step_size={maxstep} -> maximum allowable step size
(only used in ramp by time method)
monitor_device={device} -> device to monitor the status of the ramp
(primarily useful for certain types of
stepper motor devices)
scaled (common) -> make a scaled (common) setting (default)
raw -> make a raw setting
primary (volts) -> make a setting in primary (volts) units
offset=0 -> set data starting at a byte offset of 0
index=2 -> set data starting at array index 2
array_index=2 -> set data starting at array index 2
Examples:
ramp/time=2 z:acltst 5
ramp/time=2 z:acltst to 5
ramp z:acltst = 5 /time=2
ramp/time=2 z:acltst $symbol1
ramp/duration=2 z:acltst/raw 0xA9
ramp/duration=2 z:acltst[2] 16
ramp/duration=2/flattop_length=1 z:acltst[2] 16
ramp/step_size=0.01 z:aclts3 to 2
deviceList/create devs devices='Z:ACLTST,Z:ACLTS3'
declare targets double[2]=15,5
ramp/time=5 deviceList=devs targets # ramp 2 devices at once
Related commands:
increment, decrement, delta_set, set, device_list
-------------------------------------------------------------------------------
read_field : read an individual field from an ACNET device
read_field[/{qualifier}] {device|device list}[[n]][/{qualifier...}]
This command is primarily used to read fields in a device's
setting property that are otherwise indivisible by the control
system. An example of this would be a time table entry in a
waveform generator. This command discards the portion of the
setting field that is not being read. This command also supports
an array index notation which allows you to specify the beginning
and ending array indices (ex. read_field z:acltst[1:2]). This
command also supports family devices and list specifiers (see above).
Examples of read_field qualifiers:
scaled (common) -> make a scaled (common) reading
(default and only available if field offset
is zero))
raw -> make a raw reading
(default if field offset is nonzero)
primary (volts) -> make a reading in primary (volts) units
offset={offset} -> field offset in bytes
length={length} -> field length in bytes
source=memory -> read data in a memory pool
hex -> display values in hexadecimal
dec[imal] -> display values in decimal (default)
byte_swap -> used with a raw reading to swap the reading
bytes on word boundaries
word_swap -> used with a raw reading to swap the reading
words
family -> read an entire family
row -> display values in a single row
column -> display values in a single column
nodisplay -> don't display the reading, only errors
waitnew -> wait for a new value to be returned (default)
nowaitnew -> don't wait for a new value to be returned
pendwait -> wait for a nonpending status
timeout={seconds} -> set reading timeout in seconds
ignore_errors -> display the data even if it is in error
read_value={variable} -> variable to hold reading data
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
obsolete -> support handling of obsolete devices
output={spec} -> specify output destination
Examples:
read_field/length=2 s_4530t[2]
read_field/offset=2/dec s_4530t[2]
read_field/offset=2/dec s_4530t[2:3] # read two values
Related commands:
set_field, read, read_list, read_struct, set, device_list,
request_device, cancel_request
-------------------------------------------------------------------------------
read_list : read a list of ACNET devices
read_list[/{qualifier}] {device|device list}
This command reads a list of ACNET devices. The difference
between this command and the read command is that this command
requests all of the devices simultaneously rather than one at a
time. One or more elements of an array device can be displayed.
This command also supports an array index notation which allows
you to specify the beginning and ending array indices
(ex. read_list t_ha11[3:5]). This command also supports family
devices and list specifiers (see above).
Examples of read_list qualifiers:
scaled -> read the scaled data (default)
raw -> read the raw data in hex
raw_bs -> read the raw data in hex (byte swapped)
raw_ws -> read the raw data in hex (word swapped)
dec[imal] -> read the raw data in decimal
dec_bs -> read the raw data in decimal (byte swapped)
dec_ws -> read the raw data in decimal (word swapped)
primary -> read the data in primary units (volts)
string (ascii) -> read raw data as a string (ASCII)
string_bs -> read raw data as a string (ASCII)
and byte swap it
ascii_no_nulls -> read raw data as a string with embedded
(but not trailing) nulls replaced with
a pipe (|) character
state -> read raw data and display as state text
date -> read raw data and display as a date string
(raw data assumed to be local time in
seconds since Jan 1, 1970)
date_gmt -> read raw data and display as a date string
(raw data assumed to be GMT (UTC) time in
seconds since Jan 1, 1970)
date_clinks -> read raw data and display as a date string
(raw data assumed to be local time in
seconds since Jan 1, 1972)
acnet_error -> read raw data and display as an ACNET
error string
node -> request ACNET node string
(raw data assumed to be an
ACNET node value)
bit_status -> request device bitwise status
state_text -> request state text data
(state devices only)
source=dp -> display data from the accelerator
(default)
source=db -> display data from the database
source=sr:1 -> display data from save/restore file 1
source=sda:1:"Inject Protons":1:ColliderShot -> display data from SDA
file 1, case Inject Protons,
subcase (set) 1,
usage ColliderShot
source=dl:"01-Jan-2000 01:00" -> display data from a Lumberjack at
January 1, 2000 at 0100
source=memory -> display data from a memory pool
source=snpmgr:booster:'16-Sep-2011 15:00' -> display data from the
detached snapshot manager
pendwait -> wait for a nonpending status
family -> read an entire family
strings -> want device readings as strings
row -> display values in a single row
column -> display values in a single column
no_name -> don't display device name(s)
no_units -> don't display device units text
nodisplay -> don't display the reading, only errors
num_values={variable} -> returns the number of values read
values={var,...} -> variable(s) to hold reading data
(one per reading device)
errors={variable} -> variable to return the individual
data acquisition status
dynamic[_arrays] -> dynamically reallocate output value
variables to match the number of
values read
obsolete -> support handling of obsolete devices
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
binary:{file_name} -> send output to a binary file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
device_list/create devs devices='m:outtmp,m:outhum'
read_list device_list=devs
Synonyms: readList
Related commands:
read, read_field, read_struct, device_list, data_event, ftd,
data_source, device_list, status_list, request_device, cancel_request
-------------------------------------------------------------------------------
read_struct : read an ACNET device structure
read_struct[/{qualifier}] {device|device list}[[n]][/{qualifier...}]
This command is used to read back ACNET device data as a structure.
The structure of the data can be explicitly defined in the command
itself or a named structure can be specified. This command also
supports an array index notation which allows you to specify the
beginning and ending array indices (ex. read_struct z:acltst[1:2]).
This command also supports family devices and list specifiers
(see above).
Examples of read_struct qualifiers:
struct[ure]={name} -> specify a named structure
reading={type}={value},... -> reading structure specification
read_string -> read data as a string
reading_length={bytes} -> specified the number of bytes to read
source=memory -> read data in a memory pool
ieee_to_dec -> convert IEEE floats to DEC
hex -> display values in hexadecimal
dec[imal] -> display values in decimal (default)
byte_swap -> used with a raw reading to swap the
reading bytes on word boundaries
word_swap -> used with a raw reading to swap the
reading words
family -> read an entire family
nodisplay -> don't display the reading,
only errors
waitnew -> wait for a new value to be returned
(default)
nowaitnew -> don't wait for a new value to be
returned
pendwait -> wait for a nonpending status
timeout={seconds} -> set reading timeout in seconds
ignore_errors -> display the data even if it is
in error
read_values={var,...} -> variable(s) to hold reading data
(one per field of the structure)
dynamic[_arrays] -> dynamically reallocate output data
variables to match the number
of values read
obsolete -> support handling of obsolete devices
output={spec} -> specify output destination
Examples:
read_struct/struct='Devices.Recycler BPM Readout Spec' r_bp1cos
Related commands:
read_field, read, read_list, device_list, set_struct, request_device,
cancel_request
-------------------------------------------------------------------------------
request_device : make a reading request for one or more ACNET devices
request_device[/{qualifier}] {device|device list}
This command makes a reading request for one or more ACNET devices.
This is useful if you want to read a device on an event and you
want to perform other processing while for the event to occur.
This command supports an array index notation which allows
you to specify the beginning and ending array indices
(ex. request_device t_ha11[3:5]). This command also supports
family devices and list specifiers (see above).
Examples of request_device qualifiers:
family -> read an entire family
data_event={string} -> requested data event string
output={spec} -> specify output destination
Examples:
request_device m:outtmp/evt00
Synonyms: requestDevice
Related commands:
cancel_request, read, read_list, read_field, read_struct, device_list,
data_event, ftd, data_source, device_list, status_list
-------------------------------------------------------------------------------
restore : restore an ACNET device setting
restore {device|device list}[[n]][/{qualifier...}] [from] {source}[:{arg1}:{arg2}:{arg3}:{arg4}]
This command will restore a setting value to the value it
had in either the database, a save/restore file, an SDA file,
a data logger (Lumberjack), or a memory pool. If no length or
offset is specified, the entire property will be restored.
This command can be used for the setting, basic status,
analog alarm, and digital alarm properties. This command also
supports an array index notation which allows you to specify
the beginning and ending array indices
(e.g.. restore z:acltst[1:2] from db). This command also supports
family devices and list specifiers (see above). Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Type Syntax
---- ------
database db
save/restore sr:{file number}
SDA sda:{file number}:{case}[:{subcase}:{usage}]
data logger dl:{start date}[:{node}:{accuracy in seconds}]
memory memory[:{pool_name|pool_id}]
(Note: Arguments enclosed in square brackets are optional.)
Examples of restore qualifiers:
family -> restore an entire family
verbose -> generate verbose output
props=all -> restore all restorable properties
props=prop1:prop2:prop3:prop4 -> restore specific properties
save_properties_only -> used in conjunction with "props"
to limit each device to properties
that are indicated in its save
property
motor -> restore a motor's position
ignore_save_info -> ignore any database save information
and perform a default restore
Relevant special constants:
last_linac_save -> newest Linac save file
last_booster_save -> newest Booster save file
last_mi_save -> newest Main Injector save file
last_tev_save -> newest Tevatron save file
last_extbeams_save -> newest external beams save file
last_pbar_save -> newest Pbar save file
last_recycler_save -> newest Recycler save file
last_misc_save -> newest MISCELLANEOUS save file
last_big_save -> newest big save file
last_shot_save -> newest shot save file
last_circular_save -> newest circular save file
last_miniboone_save -> newest MiniBooNE save file
Examples:
restore z:acltst from db
restore z:acltst sr:1
restore z:acltst from sda:9158:"Inject Protons":1:ColliderShot
restore z:acltst dl:"01-Jan-2000 00:00":fastest:3600
restore z:acltst[1:2] from sr:1
restore/props=all node=pnut01 from sr:last_big_save
restore/props=setting:status node=pnut01 from sr:last_big_save
Related commands:
save, download, copy, set, fill, device_list
-------------------------------------------------------------------------------
save : save devices in a save/restore file
save[/{qualifier}] {file number} ['{title}'] {parameters to save}
This command will save devices in a save/restore file or in a
memory pool. Individual devices, family devices, and/or any of
the list specifications (see above) that ACL supports can be saved.
If there are multiple items to be saved, they should be separated
by commas. Specific save files in the 900, 1100, and 1200 ranges
can not be selected since file numbers in these ranges are
automatically selected by the BIGSAV and SCHSAV processes. If a
title is not specified, a generic title will be used. Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of save qualifiers:
operator -> save file with operator protection
file={file number} -> specify save file number
title="{title}" -> specify file title
items={item1,item2,...} -> specify items to save
protect={protection} -> specify file protection
(none (default), operator, archive)
memory[={pool}|{id}] -> save values in a memory pool
props=all -> save all savable properties
(memory saves only)
props=prop1:prop2:prop3:prop4 -> save specific properties
(memory saves only)
save_properties_only -> used in conjunction with "props"
to limit each device to properties
that are indicated in its save
property
node={node} -> node to send save request to
wait_for_save -> wait for current save to complete
if one is in progress
no_send -> inhibit the actual save
check_status -> check to see if a save is in progress
($_value will be to a value of 1 if
a save is in progress or a value of
0 otherwise.)
cancel -> cancel the current save
verbose -> display verbose command status
Relevant special constants:
oldest_linac_file -> oldest Linac save file
oldest_booster_file -> oldest Booster save file
oldest_mi_file -> oldest Main Injector save file
oldest_tev_file -> oldest Tevatron save file
oldest_extbeams_file -> oldest external beams save file
oldest_pbar_file -> oldest Pbar save file
oldest_recycler_file -> oldest Recycler save file
oldest_misc_file -> oldest MISCELLANEOUS save file
oldest_miniboone_file -> oldest MiniBooNE save file
Examples:
save 821 "test save" z:acltst,z:aclts2
save oldest_booster_file "test save" user_save_list=booster\400_mev\vert
save 821 "test save" node=baker,node=ap1001
save 821 "test save" query=name="m:out%"
save/file=821/title="test save"/items="family=t:horzfg,query='name=t:h*'"
save/memory query='name=t:ha*'
Related commands:
restore, download, set
-------------------------------------------------------------------------------
saverestore_get : read values across save/restore files
saverestore_get[/qualifier][/start={date}/end={date}] {device}[[n]]{/qualifier...}
This command reads and displays save/restore device values
across files. This command supports family devices and list
specifiers (see above).
Examples of saverestore_get qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
start_file={file number}-> starting file number
end_file={file number} -> ending file number
system={{sys 1}, ...} -> specify a system or systems to limit the
search to ("all", "global", "linac",
"booster", "main_injector", "tevatron",
"external_beams", "pbar", "cryo", "ecool",
"recycler", "archive", "shots", "circular",
"miniboone", "numi", "spare1")
device={device_name} -> device to display
value={value} -> matching value
cond={condition_value} -> used in conjunction with the value
argument to determine which entries
are displayed
text -> display basic status and state text
no_text -> don't display basic status or state text
units -> display units text
ignore_db_format -> don't use the device database value
formatting information
node -> display values as ACNET node values
error -> display values as ACNET error values
device -> display values as ACNET device name values
clinks -> display values as dates in clinks
date -> display values as dates in local time
gmt -> display values as dates in GMT/UTC
nodisplay -> don't display the values, only errors
count[_only] -> only display the number of matching entries
max_entries={n} -> maximum number of entries to display
first -> used in conjunction with "max_entries"
to retrieve the first n matches (default)
last -> used in conjunction with "max_entries"
to retrieve the last n matches
family -> display values for an entire family
num_points={variable} -> returns the number of points read
num_values={variable} -> returns the number of values read
values_per_point={var} -> returns the number of values read per point
values={array variable} -> returns the values read
timestamps={date array} -> returns the timestamps read
file_numbers={int array}-> returns the file_numbers read
errors={int array} -> returns the error values read
lengths={int array} -> returns the length values read
sum={variable} -> returns the sum of all values read
minimum={variable} -> returns the minimum of all values read
maximum={variable} -> returns the maximum of all values read
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
bit_number={bit number} -> process status data to return a value of
1 if the requested bit number is set and
a value of 0 otherwise
bit_mask={value} -> mask to apply to raw data to check for
a match
masked_value={value} -> mask to apply to raw data
on_off -> process status data to return a value of
1 if the original value indicates a status
of on and a value of 0 otherwise
ready_tripped -> process status data to return a value of
1 if the original value indicates a status
of ready and a value of 0 otherwise
remote_local -> process status data to return a value of
1 if the original value indicates a status
of remote and a value of 0 otherwise
polarity -> process status data to return a value of
1 if the original value indicates a status
of positive and a value of 0 otherwise
ramp_dc -> process status data to return a value of
1 if the original value indicates a status
of ramp and a value of 0 otherwise
verbose -> generate verbose output
output={spec} -> specify output destination
The condition value strings are as follows:
all -> show all matches (default)
equal (eq) -> show entries that equal the requested
value (default if value is requested)
not_equal (ne) -> show entries that do not equal the
requested value
less_than (lt) -> show entries whose value is less
than the requested value
less_equal (le) -> show entries whose value is less
than or equal to the requested value
greater_than (gt) -> show entries whose value is greater
than the requested value
greater_equal (ge) -> show entries whose value is greater
than or equal to the requested value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
saverestore_get/start=today m:outtmp
saverestore_get/start=16-sep-2008/end=16-set-2009/output=mail:hendricks m:outtmp
saverestore_get/start=today/count_only m:outtmp
saverestore_get/start=today/value=60/cond=lt m:outtmp
saverestore_get/start=today/error t:chrlst
saverestore_get/start=today/max_count=10/output=mail:hendricks m:outtmp
Synonyms: srGet, sr_get, saveRestoreGet, save_restore_get
Related commands:
logger_get, sda_get, sr_dir, sr_set, device_list
-------------------------------------------------------------------------------
scan : scan (set) one device while reading one or more others
scan[/{qualifier}] {set device} while reading {device|device list}
This command is used to set one device to a series of values and
to read one or more other devices after each setting to determine
how their reading change with the setting of the first device.
The original setting value for the setting device is restored
when this command completes. Use of this command may require
special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of scan qualifiers:
minimum={value} -> minimum setting value
maximum={value} -> maximum setting value
increment={value} -> setting increment value
(command calculates the number of
steps)
num_steps={value} -> number of setting/reading steps
(command calculates the setting
increment)
read_delay={value} -> number of seconds to wait after the
setting before making the reading(s)
(default is 0)
read_delay_milliseconds={value} -> number of milliseconds to wait after
the setting before making the
reading(s) (default is 0)
event={clock event} -> clock event to sample the data on
(default is no event)
data_event={data event} -> data event (clock event or state
event only) when reading data
should be sampled)
nodisplay -> don't display the reading,
only errors
values={var,...} -> variable(s) to hold reading data
(one per reading device)
setting_values={var} -> variable to hold setting data
dynamic[_arrays] -> dynamically reallocate output data
variables to match the number
of values read
no_set -> suppress actual setting devices
(still makes readings)
verbose -> verbose output
output={spec} -> specify output destination
Examples:
scan/event=2/minimum=32/maximum=64/increment=5\
/values=val/setting_values=setval z:acltst while reading m:outtmp
Related commands:
read, set, device_list
-------------------------------------------------------------------------------
sda_get : read values across SDA samples
sda_get[/qualifier][/start={date}/end={date}] {device}[[n]]{/qualifier...}
This command reads and displays SDA device values across files,
case, and sets. This command supports family devices and list
specifiers (see above).
Examples of sda_get qualifiers:
sda_usage={usage string}-> SDA usage string (default is ColliderShot)
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
file={file number} -> desired single file number
start_file={file number}-> starting file number
end_file={file number} -> ending file number
case={case value} -> desired single case value (string or number)
start_case={case value} -> starting case value (string or number)
end_case={case value} -> ending case value (string or number)
device_cases -> only search cases which are currently
configured to save the requested device
set={set number} -> desired single set number
start_set={set number} -> starting set number
end_set={set number} -> ending set number
device={device_name} -> device to display
value={value} -> matching value
cond={condition_value} -> used in conjunction with the value
argument to determine which entries
are displayed
text -> display basic status and state text
no_text -> don't display basic status or state text
units -> display units text
ignore_db_format -> don't use the device database value
formatting information
node -> display values as ACNET node values
error -> display values as ACNET error values
device -> display values as ACNET device name values
clinks -> display values as dates in clinks
date -> display values as dates in local time
gmt -> display values as dates in GMT/UTC
nodisplay -> don't display the values, only errors
count[_only] -> only display the number of matching entries
max_entries={n} -> maximum number of entries to display
first -> used in conjunction with "max_entries"
to retrieve the first n matches (default)
last -> used in conjunction with "max_entries"
to retrieve the last n matches
family -> display values for an entire family
num_points={variable} -> returns the number of points read
num_values={variable} -> returns the number of values read
values_per_point={var} -> returns the number of values read per point
values={array variable} -> returns the values read
timestamps={date array} -> returns the timestamps read
file_numbers={int array}-> returns the file numbers read
case_numbers={int array}-> returns the case numbers read
set_numbers={int array} -> returns the set numbers read
errors={int array} -> returns the error values read
lengths={int array} -> returns the length values read
sum={variable} -> returns the sum of all values read
minimum={variable} -> returns the minimum of all values read
maximum={variable} -> returns the maximum of all values read
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
bit_number={bit number} -> process status data to return a value of
1 if the requested bit number is set and
a value of 0 otherwise
bit_mask={value} -> mask to apply to raw data to check for
a match
masked_value={value} -> mask to apply to raw data
on_off -> process status data to return a value of
1 if the original value indicates a status
of on and a value of 0 otherwise
ready_tripped -> process status data to return a value of
1 if the original value indicates a status
of ready and a value of 0 otherwise
remote_local -> process status data to return a value of
1 if the original value indicates a status
of remote and a value of 0 otherwise
polarity -> process status data to return a value of
1 if the original value indicates a status
of positive and a value of 0 otherwise
ramp_dc -> process status data to return a value of
1 if the original value indicates a status
of ramp and a value of 0 otherwise
verbose -> generate verbose output
output={spec} -> specify output destination
The condition value strings are as follows:
all -> show all matches (default)
equal (eq) -> show entries that equal the requested
value (default if value is requested)
not_equal (ne) -> show entries that do not equal the
requested value
less_than (lt) -> show entries whose value is less
than the requested value
less_equal (le) -> show entries whose value is less
than or equal to the requested value
greater_than (gt) -> show entries whose value is greater
than the requested value
greater_equal (ge) -> show entries whose value is greater
than or equal to the requested value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
sda_get/start=today m:outtmp
sda_get/start=16-sep-2008/end=16-set-2009/output=mail:hendricks m:outtmp
sda_get/start=today/count_only m:outtmp
sda_get/start=today/value=60/cond=lt m:outtmp
sda_get/start=today/error t:chrlst
sda_get/start=today/max_count=10/output=mail:hendricks m:outtmp
sda_get/start_file=7061/case='Inject Pbars' m:outtmp
sda_get/start_file=7061/case=6 m:outtmp
sda_get/start_file=7061/case='Inject Pbars'/set=3 m:outtmp
Synonyms: sdaGet
Related commands:
logger_get, saverestore_get, device_list
-------------------------------------------------------------------------------
set_field : set an individual field in an ACNET device
set_field[/{qualifier}] {device|device list}[[n]][/{qualifier...}] {constant|variable|symbol}
This command is primarily used to set fields in a device's
setting property that are otherwise indivisible by the control
system. An example of this would be a time table entry in a
waveform generator. This command preserves the portion of the
setting field that is not being changed. Multiple scaled or
raw values can be supplied for the setting. If multiple
values are entered, they should be separated by spaces or
commas. Setting values can also be supplied in a delimited
text file. This command also supports an array index notation
which allows you to specify the beginning and ending array indices
(ex. set z:acltst[1:2]=13,3.5). This command also supports family
devices and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of set_field qualifiers:
scaled (common) -> make a scaled (common) setting
(default and only available if field offset
is zero))
raw -> make a raw setting
(default if field offset is nonzero)
primary (volts) -> make a setting in primary (volts) units
offset={offset} -> field offset in bytes
length={length} -> field length in bytes
source=memory -> set data in a memory pool
hex -> setting value is in hexadecimal
dec[imal] -> setting value is in decimal (default)
file -> read setting values from a file
(default file extension is ".dat")
byte_swap -> used with a raw setting to swap the setting
bytes on word boundaries
word_swap -> used with a raw setting to swap the setting
words
family -> set an entire family
Examples:
set_field/length=2 s:4530t[2] 5
set_field/offset=2/dec s:4530t[2] 100
set_field/offset=2/dec s:4530t[2] 100, 100 # set two values
set_field/length=2 s:4530t[2] $symbol1
Synonyms: setField
Related commands:
read_field, set, set_struct, set_list, read, enable, disable, bypass,
activate, deactivate turn, reset, toggle, alarm_limit, nominal_mask,
fill, copy, decrement, increment, delta_set, device_list
-------------------------------------------------------------------------------
set_list : set a list of ACNET devices
set_list[/{qualifier}] {device|device list}[[n]][/{qualifier...}] {constant|variable|symbol}
This command permits the setting of a list of devices
simultaneously. Multiple values (either scaled or raw)
can be set for each device. If multiple values are entered,
they should be separated by spaces or commas. Setting values
can also be supplied in a delimited text file. This command
also supports an array index notation which allows you to
specify the beginning and ending array indices. This command
also supports family devices and list specifiers (see above).
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of set_list qualifiers:
scaled (common) -> make a scaled (common) setting (default)
raw -> make a raw setting
primary (volts) -> make a setting in primary (volts) units
values_per_device={num} -> specify the number of values to set for
each device
values={val,...} -> specify the setting values
hex -> setting value is in hexadecimal
decimal -> setting value is in decimal (default)
file -> read setting values from a file
(default file extension is ".dat")
byte_swap -> used with a raw setting to swap the setting
bytes on word boundaries
word_swap -> used with a raw setting to swap the setting
words
Examples:
device_list/create devs devices='z:aclts5,z:aclts6,z:aclts7'
declare vals float[]={1,2,3}
set_list device_list=devs vals
device_list/create devs devices='z:aclts5,z:aclts6,z:aclts7'
set_list device_list=devs 1,2,3
Synonyms: setList
Related commands:
set, set_field, set_struct, read, device_list, declare, fill, copy,
decrement, increment, delta_set
-------------------------------------------------------------------------------
set_struct : set an ACNET device structure
set_struct[/{qualifier}] {device|device list}[[n]][/{qualifier...}]={{type}={value},...}
This command is used to set ACNET device data as a structure.
The structure of the data can be explicitly defined in the command
itself or a named structure can be specified. This command also
supports an array index notation which allows you to specify the
beginning array index (ex. set_struct r_bp1acq[1]).
This command also supports family devices and list specifiers
(see above).
Examples of set_struct qualifiers:
struct[ure]={name} -> specify a named structure
setting={{type}={value},...} -> setting structure specification
fill={fill method} -> can be used with a named structure
to initialize the setting buffer
from the device reading or from the
structure default values
reading_fill -> initialize the setting buffer
from the device reading
default_fill -> initialize the setting buffer
from the structure default values
file -> read structure information from
a file
ieee_to_dec -> convert IEEE floats to DEC
dec_to_ieee -> convert DEC floats to IEEE
byte_swap -> swap the setting bytes on word
boundaries
word_swap -> swap the setting words on longword
boundaries
family -> set an entire family
output={spec} -> specify output destination
Examples:
set_struct/struct='Devices.Recycler BPM Acquisition Spec'/ieee\
/word_swap/reading_fill g_dev0 = {'arm event'=0x29,'trigger event'=0xda}
set_struct/ieee/word_swap g_dev0 = \
{int=0,int=1,int=2,int=0,int=0,int=0x29,int=0xda,int=0,int=100,\
int=0,float=0.0,int=300} # use specified data types and values
Synonyms: setStruct
Related commands:
set_field, set, set_list, device_list, read_struct
-------------------------------------------------------------------------------
sort : sort an array of values or an array device
sort[/{qualifier}] {variable|device}[[n]][/{qualifier...}]
This command is used to sort the values in an array variable or
the values in an array device. Sorts can be either ascending or
descending. For some data types such as device index, node, error,
and event, the sorts can even be done on the ASCII form of the
values (e.g. 27235 -> M:OUTTMP). The sorts are done in place for
variables. For sorts of both variables and devices, the sorted
array can be output to another array variable. This command
also supports an array index notation which allows you to specify
the beginning and ending array indices (ex. sort z:acltst[0:3]).
This command also supports family devices and list specifiers
(see above). Use of this command on devices may require special
privileges. See Brian Hendricks (hendricks@fnal.gov) for more
information.
Examples of sort qualifiers:
asc[ending] -> ascending sort (default)
ascii_asc[ending] -> ascending ASCII sort
desc[ending] -> descending sort
ascii_desc[ending] -> descending ASCII sort
start={start index} -> starting index for string sorts (starts at 0)
end={end index} -> ending index for string sorts (starts at 0)
string_type={type} -> specify the type of string for string
variable sorts
(normal, date, integer, numeric)
num_values={variable} -> returned number of values value
values={values} -> either the input array variable
or the returned sorted device values
family -> read an entire family
waitnew -> wait for a new value to be returned (default)
nowaitnew -> don't wait for a new value to be returned
pendwait -> wait for a nonpending status
timeout={seconds} -> set reading timeout in seconds
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
no_set -> suppress actual setting devices
verbose -> verbose output
output={spec} -> specify output destination
Examples:
declare strings string[3]="bob","al","kevin"
sort strings # array of strings
declare floats float[3]=2,3,1
sort/desc floats # array of floats
declare floats float[1]
sort/desc/dynamic/values=floats z:acltst # array device
Related commands:
swap, stats, fit, read
-------------------------------------------------------------------------------
stats : perform simple statistics on device readings or a variable
stats[/{qualifier}] [{device|identifier}[[n]][/{qualifier...}]]
This command is used to perform simple statistics on device readings
from either the reading or setting property or an array variable.
Device readings can either come from a list of devices or from a
single array device. The resultant values are displayed by default.
They can also optionally be deposited into variables. This command
also supports an array index notation which allows you to specify
the beginning and ending array indices (ex. stats z:acltst[1:2]).
This command also supports family devices and list specifiers
(see above).
Examples of stats qualifiers:
num_values={value} -> number of values to process
values={values} -> either the input array variable
or the returned device values used
in the calculations
num_values_used={var} -> returned number of values value
sum={variable} -> returned sum value
mean={variable} -> returned mean value
median={variable} -> returned median value
stddev={variable} -> returned standard deviation value
rms={variable} -> returned RMS value
minimum={variable} -> returned minimum value
maximum={variable} -> returned maximum value
range={variable} -> returned range value
variance={variable} -> returned variance value
num_modes={variable} -> returned number of modes value
mode={variable} -> returned mode value(s)
family -> read an entire family
nodisplay -> don't display the reading, only errors
waitnew -> wait for a new value to be returned (default)
nowaitnew -> don't wait for a new value to be returned
pendwait -> wait for a nonpending status
timeout={seconds} -> set reading timeout in seconds
ignore_errors -> display the data even if it is in error
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
verbose -> verbose output
output={spec} -> specify output destination
Examples:
stats name=m:out% # list of devices
stats t:beamcb # single array device
stats/mean=var1 name=m:out% # list of devices
stats/min=var1/max=var2 t:beamcb # single array device
declare vals float[3]=2,5,11
stats/values=vals # perform statistics on
# array variable
Related commands:
fit, read, sort, swap
-------------------------------------------------------------------------------
status_list : read status values for a list of ACNET devices
status_list[/{qualifier}] {device|device list}
This command reads status values for a list of ACNET devices.
The primary difference between this command and the read command
is that this command requests all of the devices simultaneously
rather than one at a time. One or more elements of an array
device can be displayed. This command also supports an array
index notation which allows you to specify the beginning and
ending array indices (ex. read_list t_ha11[3:5]). This command
also supports family devices and list specifiers (see above).
Examples of status_list qualifiers:
scaled -> read the scaled data (default)
raw -> read the raw data in hex
raw_bs -> read the raw data in hex (byte swapped)
raw_ws -> read the raw data in hex (word swapped)
source=dp -> display data from the accelerator
(default)
source=db -> display data from the database
source=sr:1 -> display data from save/restore file 1
source=sda:1:"Inject Protons":1:ColliderShot -> display data from SDA
file 1, case Inject Protons,
subcase (set) 1,
usage ColliderShot
source=dl:"01-Jan-2000 01:00" -> display data from a Lumberjack at
January 1, 2000 at 0100
source=memory -> display data from a memory pool
pendwait -> wait for a nonpending status
family -> read an entire family
row -> display values in a single row
column -> display values in a single column
no_name -> don't display device name(s)
display_expanded -> display expanded status strings
(default is parameter page style status)
display_on_off -> display on/off status strings
display_ready_tripped -> display ready/tripped status strings
display_remote_local -> display remote/local status strings
display_polarity -> display polarity status strings
display_ramp_dc -> display ramp/DC status strings
nodisplay -> don't display the reading, only errors
num_values={variable} -> returns the number of values read
values={var,...} -> returns the raw reading data
(one per reading device)
on_off={var,...} -> returns the on/off status
(true -> device is on,
false -> device is off,
DIO_NOATT -> no on/off attribute)
(one per reading device)
ready_tripped={var,...} -> returns the ready/tripped status
(true -> device is ready,
false -> device is tripped,
DIO_NOATT -> no ready/tripped attribute)
(one per reading device)
remote_local={var,...} -> returns the remote/local status
(true -> device is in remote,
false -> device is in local,
DIO_NOATT -> no remote/local attribute)
(one per reading device)
polarity={var,...} -> returns the polarity status
(true -> device is positive,
false -> device is negative,
DIO_NOATT -> no polarity attribute)
(one per reading device)
ramp_dc={var,...} -> returns the ramp/DC status
(true -> device is ramping,
false -> device is DC,
DIO_NOATT -> no ramp/DC attribute)
(one per reading device)
errors={variable} -> returns the individual data acquisition
status
dynamic[_arrays] -> dynamically reallocate output value
variables to match the number of
values read
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
binary:{file_name} -> send output to a binary file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
device_list/create devs devices='t:ha11,t:ha13'
status_list/on_off=onOffValues device_list=devs
Synonyms: statusList
Related commands:
read, read_field, read_struct, device_list, data_event, ftd,
data_source, device_list, read_list
-------------------------------------------------------------------------------
swap : swap a set of values in a variable or a device
swap[/{qualifier}] {variable|device}[[n]][/{qualifier...}]
This command is used to swap the values in an array variable or
the values in an array device. The swaps are done in place for
variables. For swaps of devices, the swapped values can be output
to another array variable. This command also supports an array
index notation which allows you to specify the beginning and ending
array indices (ex. swap/words z:acltst[0:3]). This command also
supports family devices and list specifiers (see above). Use of
this command on devices may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of swap qualifiers:
bytes -> swap adjacent bytes
words -> swap adjacent words
longwords -> swap adjacent longwords
invert_longwords -> invert the bytes in longwords
invert_bytes -> invert a byte array
invert_words -> invert a word array
invert_longword_array -> invert a longword or float array
invert_longlong_array -> invert a long long or double array
invert_array -> invert an array of values
host_to_network -> host to network byte order
network_to_host -> network to host byte order
num_values={variable} -> returned number of values value
values={values} -> either the input array variable
or the returned swapped device values
family -> read an entire family
waitnew -> wait for a new value to be returned (default)
nowaitnew -> don't wait for a new value to be returned
pendwait -> wait for a nonpending status
timeout={seconds} -> set reading timeout in seconds
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
no_set -> suppress actual setting of devices
verbose -> verbose output
output={spec} -> specify output destination
Examples:
declare my_words word[3] = {0x1234, 0x5678, 0x9abc}
swap/bytes my_words
declare my_string string = "123456"
swap/invert my_string
Related commands:
sort, stats, fit, read
-------------------------------------------------------------------------------
table_device : read or set table device values
table_device/table_type={type}[/{qualifier}] {device|device list} [{settings}]
This command supports reading or setting of tables contained
in table devices. These are most commonly waveform generator
devices which provide ramps for power supplies. The device to
read or set can be specified in one of two ways. You can either
enter the explicit component device of interest, or the generic
device for that card can be entered along with a desired table
type. This command supports an array index notation which allows
you to specify the beginning and ending array indices
(ex. table_device t_ha11t[1:5]). This command supports family
devices and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of table_device qualifiers:
read -> read table values
(default if no values specified)
set -> set table values
(default if values are specified)
scaled (common) -> make a scaled (common) reading
raw -> make a raw reading
hex -> display values in hexadecimal
dec[imal] -> display values in decimal (default)
row -> display values in a single row
column -> display values in a single column
type={table_type} -> type of table to access
(time, g_table, h_table, gi_table, hi_table,
clock, scale_factor, sf_pointer,
ramp_pointer, mdat_pointer, archive_data,
clock_int_history, diag_counters, version,
mdat_selection_table, offset_table,
offset_pointer, delay_table,
frequency_table, frequency_pointer,
phase_table, phase_pointer,
calculation_data)
number={table_number} -> table number to access
start_slot=(slot} -> starting slot number
num_slots={num_slots} -> number of slots to access
slot_type={type} -> type of slot access
(whole, independent (x), dependent (y))
x_scaling={scale_type} -> X coordinate scaling type
(seconds, milliseconds, summary_secs,
summary_msec)
milliseconds -> scale the X coordinate as milliseconds
summary_msec -> scale the X coordinate as summary
milliseconds
seconds -> scale the X coordinate as seconds
summary_secs -> scale the X coordinate as summary seconds
x_values={val1,...} -> specify X coordinate setting values
y_values={val1,...} -> specify Y coordinate setting values
ft_tables={tbl1,...} -> specify f(t) table numbers
gi_tables={tbl1,...} -> specify g(i) table numbers
hi_tables={tbl1,...} -> specify h(i) table numbers
ft_sf_ptrs={ptr1,...} -> specify f(t) scale factor pointer numbers
gi_sf_ptrs={ptr1,...} -> specify g(i) scale factor pointer numbers
hi_sf_ptrs={ptr1,...} -> specify h(i) scale factor pointer numbers
ft_mdat_ptrs={ptr1,...} -> specify f(t) MDAT pointer numbers
gi_mdat_ptrs={ptr1,...} -> specify g(i) MDAT pointer numbers
hi_mdat_ptrs={ptr1,...} -> specify h(i) MDAT pointer numbers
file -> read setting values from a file
(default file extension is ".dat")
enable_ramp -> enable the ramp
disable_ramp -> disable the ramp
is_ramp_enabled -> determine if the ramp is enabled
enable_clock_ints -> enable clock event interrupts
disable_clock_ints -> disable clock event interrupts
are_clock_ints_enabled -> determine if clock event interrupts
are enabled
enable_sine_wave_mode -> enable sine wave mode
disable_sine_wave_mode -> disable sine wave mode
is_sine_wave_enabled -> determine if sine wave mode is enabled
trigger_level={level} -> manually trigger a level (waveform)
add_event={event} -> add an event to the clock table
level={level (0-n)} -> clock table level to add a clock event
add_event_to_event={evt}-> add an event to the clock table on the
same level as a requested event
remove_event={event} -> remove an event from the clock table
replace_event={event} -> replace an event in the clock table
new_event={event} -> replacement event
find_event={event} -> find an event in the clock table
find_time_slot={time} -> find the slot in a time table where the
the summary time is less than or equal to
a given time
find_time_slot_ge={time}-> find the slot in a time table where the
the summary time is greater than or equal to
a given time
check_for_errors -> check a card for errors
clear_diag_counters -> clear diagnostic counters
read_value={variable} -> variable to hold reading data
read_value_2={variable} -> variable to hold Y reading data
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
family -> operate on an entire family
nodisplay -> don't display the reading, only errors
waitnew -> wait for a new value to be returned (default)
nowaitnew -> don't wait for a new value to be returned
pendwait -> wait for a nonpending status
ignore_errors -> display the data even if it is in error
verbose -> display verbose output
noheader -> suppress table header
retries={retries_value} -> specify CAMAC no-Q retries value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
table_device i_h100t[] # read time table 0
table_device/time i_h100[] # read time table 0
table_device i_h100[2]={1.0,2.0,3.0} # set G(I) table values
table_device/ft_tables={1,2}/hi_tables={1,1} s:466m[4]
table_device/ft_sf_ptrs={2,2}/hi_sf_ptrs={1,1} s:466m[4]
table_device/add_event=c2/level=3 s:465
table_device/find_event=c2/return_level=level s:465
table_device/remove_event=c2 s:465
table_device/mdat_selection_table s:4530
table_device/mdat_selection_table s:4530=m30,m31
table_device/time/read_value=times/read_value_2=values b:ql24 # read time table
Synonyms: tableDevice, rampcard
Related commands:
read, set, read_field, set_field, ftd, data_source, device_list
-------------------------------------------------------------------------------
turn : turn an ACNET device on or off
turn[/{qualifier}] {on|off} {device|device list}[[n]]{/qualifier...} {on|off}
This command supports turning one or more devices either on or off.
The specific command value can be placed before or after the device.
This command is only valid for a device's basic control property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of turn qualifiers:
toggle -> toggle the on/off status
family -> control an entire family
verbose -> generate verbose output
Examples:
turn i:q701 on
turn on i:q701
turn i:q701 off
turn off i:q701
turn i:q701 toggle_onoff
Related commands:
on, on_list, off, off_list, set, toggle, reset, reset_list, polarity,
positive, negative, digital_control, device_list
-------------------------------------------------------------------------------
reset : reset an ACNET device
reset[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports reseting one or more devices. It is only
valid for a device's basic control property. This command also
supports family devices and list specifiers (see above).
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of reset qualifiers:
family -> reset an entire family
verbose -> generate verbose output
Examples:
reset i:q701
Related commands:
reset_list, on, on_list, off, off_list, set, turn, toggle, device_list
-------------------------------------------------------------------------------
reset_list : reset a list of ACNET devices
reset_list[/{qualifier}] {device|device list}[[n]]{/qualifier...}
This command supports resetting one or more devices. This command
supports family devices and list specifiers (see above). Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of reset_list qualifiers:
family -> turn on an entire family
verbose -> generate verbose output
Examples:
device_list/create devs devices='z:acltst,z:aclts5,z:aclts6'/control
reset_list device_list=devs
Related commands:
reset, on, on_list, off, off_list, positive, negative, polarity, set,
turn, toggle, digital_control, device_list
-------------------------------------------------------------------------------
toggle : toggle a status attribute of an ACNET device
toggle {onoff|polarity|rampdc} {device|device list}[[n]]{/qualifier...} {onoff|polarity|rampdc}
The specific command value can be placed before or after the device.
This command is only valid for a device's basic control property.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of toggle qualifiers:
on_off -> toggle on/off status
onoff -> toggle on/off status
polarity -> toggle polarity status
ramp_dc -> toggle ramp/DC status
rampdc -> toggle ramp/DC status
enable_disable -> toggle enable/disable status
(If an alarm property is selected, the
alarm status will be toggled.)
enabledisable -> toggle enable/disable status
(If an alarm property is selected, the
alarm status will be toggled.)
Examples:
toggle i:q701 onoff
toggle onoff i:q701
toggle m@outtmp enable_disable
Related commands:
turn, set, reset, on, off, polarity, positive, negative, device_list
-------------------------------------------------------------------------------
enable : enable a device, a clock event, or another parameter
enable [{identifier|device}[[n]]{/qualifier...}] {[constant|identifier]}
This command can be used to enable devices belonging to certain
device types as well as analog and digital alarms of any device
type. It can also be used to enable clock events and the
notification of stale data. This command also supports family
devices and list specifiers (see above). Use of this command
may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of enable command identifiers:
stale_errors -> enable stale data notification
exit_on_error -> enable errors to cause the script to exit
event -> enable a clock event
{event string} -> enable a clock event
tclk -> enable a TCLK event
mibs -> enable an MIBS event
rrbs -> enable an RRBS event
tvbs -> enable a TVBS event
analog_alarm -> enable an analog alarm
digital_alarm -> enable a digital alarm
alarm -> enable alarm indicated by property
analog_abort -> enable an analog alarm abort flag
digital_abort -> enable a digital alarm abort flag
abort -> enable an alarm abort flag
analog_display -> enable an analog alarm display flag
digital_display -> enable a digital alarm display flag
alarm_display -> enable an alarm display flag
analog_logging -> enable an analog alarm logging flag
digital_logging -> enable a digital alarm logging flag
alarm_logging -> enable an alarm logging flag
analog_alarm_used -> mark analog alarm as having been used
digital_alarm_used -> mark digital alarm as having been used
alarm_used -> mark alarm as having been used
dbnews -> enable database change notification
obsolete_devices -> allow access to obsolete devices
embedded_errors -> enable embedded error messages
library_errors -> enable library error messages
family -> enable an entire family
Examples:
enable stale_errors
enable s:ssbrst
enable m:outtmp analog_alarm
enable event EVENT_TEV_SUDDEN_LOSS
enable EVENT_TEV_SUDDEN_LOSS
enable/clock=mibs 7B
Related commands:
disable, bypass, set, activate, deactivate, device_list
-------------------------------------------------------------------------------
disable : disable a device, a clock event, or another parameter
disable [{identifier|device}[[n]]{/qualifier...}] {[constant|identifier]}
This command can be used to disable devices belonging to certain
device types as well as analog and digital alarms of any device
type. It can also be used to disable clock events and the
notification of stale data. This command also supports family
devices and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of disable command identifiers:
stale_errors -> disable stale data notification
exit_on_error -> disable errors from causing the script
to exit
event -> disable a clock event
{event string} -> disable a clock event
tclk -> disable a TCLK event
mibs -> disable an MIBS event
rrbs -> disable an RRBS event
tvbs -> disable a TVBS event
analog_alarm -> disable an analog alarm
digital_alarm -> disable a digital alarm
alarm -> disable alarm indicated by device property
analog_abort -> disable an analog alarm abort flag
digital_abort -> disable a digital alarm abort flag
abort -> disable an alarm abort flag
analog_display -> disable an analog alarm display flag
digital_display -> disable a digital alarm display flag
alarm_display -> disable an alarm display flag
analog_logging -> disable an analog alarm logging flag
digital_logging -> disable a digital alarm logging flag
alarm_logging -> disable an alarm logging flag
analog_alarm_used -> mark analog alarm as never having been used
digital_alarm_used -> mark digital alarm as never having been used
alarm_used -> mark alarm as never having been used
obsolete_devices -> disable access to obsolete devices
embedded_errors -> disable embedded error messages
library_errors -> disable library error messages
family -> disable an entire family
Examples:
disable stale_errors
disable s:ssbrst
disable m:outtmp analog_alarm
disable event EVENT_TEV_SUDDEN_LOSS
disable EVENT_TEV_SUDDEN_LOSS
disable/clock=mibs 7B
Related commands:
bypass, enable, set, activate, deactivate, device_list
-------------------------------------------------------------------------------
bypass : bypass an alarm
bypass {device|identifier}[[n]][/{qualifier}...]
This command can be used to bypass analog and digital alarms.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of bypass command identifiers:
abort -> bypass an alarm abort flag
family -> bypass an entire family
verbose -> display verbose output
Examples:
bypass m:outtmp
bypass/verbose user_alarm_list=booster\sparks
Related commands:
disable, enable, set, device_list
-------------------------------------------------------------------------------
trigger : trigger a clock event
trigger[/clock={clock_type}] {constant|variable|symbol}
This command will trigger a clock event. You can also trigger beam
synch events by specifying the type of event. Use of this command
may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of trigger command identifiers:
tclk -> trigger a TCLK event (default)
mibs -> trigger an MIBS event
rrbs -> trigger an RRBS event
tvbs -> trigger a TVBS event
Examples:
trigger D9
trigger EVENT_TEV_SUDDEN_LOSS
trigger/clock=mibs 7B
Related commands:
set, reset
-------------------------------------------------------------------------------
activate : activate a device
activate {device}[[n]]{/qualifier...}
This command can be used to activate devices belonging to certain
device types. Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples:
activate t:a1fs00
Related commands:
deactivate, set, enable, disable
-------------------------------------------------------------------------------
deactivate : deactivate a device
deactivate {device}[[n]]{/qualifier...}
This command can be used to deactivate devices belonging to certain
device types. Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples:
deactivate t:a1fs00
Related commands:
activate, set, disable, enable
-------------------------------------------------------------------------------
check : check to see if a control system service is ready
check[/{qualifier}] {check type} [{node} or {device}[[n]][/{qualifier...}]]
This command will check to see if various control system
services are functioning properly. Services that can be
checked include clock events, state events, and ACNET nodes.
This command sets the global symbol, $_value, to a value of
true (1) if the requested service is functioning properly
and a value of false (0) otherwise.
Examples of check qualifiers:
clock_events -> check that clock events are being received
state_events -> check that state events are being received
node -> check that a given node is functioning
verbose -> display verbose output
value={variable} -> specify a variable to return the final
command status (true (ready)/false)
Examples:
check clock_events # check clock events
check state_events # check state events
check node teva # check the status of node TEVA
Related commands:
check_status, device_list
-------------------------------------------------------------------------------
check_status : check the basic status of devices
check_status[/{qualifier}] {device}[[n]][/{qualifier...}] {status_type}
This command will check the basic status of a device or a list
of devices to see if they match a particular status. The status
values that can be tested for include on, off, ready, tripped,
remote, local, positive, negative, ramping, and DC.
This command also supports family devices and list specifiers
(see above). This command sets the global symbol, $_value, to
a value of true (1) if all devices checked match the requested
status and a value of false (0) otherwise.
Examples of check_status qualifiers:
status={status value} -> status to check for (on, off, etc.)
on -> check for a status of on
off -> check for a status of off
ready -> check for a status of ready
tripped -> check for a status of tripped
remote -> check for a status of remote
local -> check for a status of local
positive -> check for a status of positive
negative -> check for a status of negative
ramp[ing] -> check for a status of ramping
dc -> check for a status of DC
family -> compare an entire family
verbose -> display verbose output
value={variable} -> specify a variable to return the final
command status (true (matched)/false)
suppress_errors -> suppress the error if a mismatch is found
Examples:
check_status z:acltst on # check if on
check_status/family t:horzfg ready # check if family is ready
Related commands:
compare, read, device_list, check
-------------------------------------------------------------------------------
compare : compare device readings
compare {device}[[n]][/{qualifier...}] [to] {source}[:{arg1}:{arg2}:{arg3}:{arg4}]
This command will compare reading values for a device from
two different data sources (accelerator, database, a
save/restore file, an SDA file, a data logger (Lumberjack), or
a memory pool). If no length or offset is specified, the entire
property will be compared. If the "device" qualifier is used,
it can also be used to compare two different devices. This
command can be used for the reading, setting, basic status,
analog alarm, and digital alarm properties. This command also
supports an array index notation which allows you to specify the
beginning and ending array indices
(e.g. compare z:acltst[1:2] to sr:last_big_save).
This command also supports family devices and list specifiers
(see above). If no tolerance is specified, a tolerance of zero
is assumed, and a raw data comparison is made. If a nonzero
tolerance is specified, scaled values are compared. This command
sets the global symbol, $_value, to a value of true (1) if the
compare is successful and a value of false (0) otherwise.
Type Syntax
---- ------
database db
save/restore sr:{file number}
SDA sda:{file number}:{case}[:{subcase}:{usage}]
data logger dl:{start date}[:{node}:{accuracy in seconds}]
memory memory[:{pool_name}|{pool_id}]
(Note: Arguments enclosed in square brackets are optional.)
Examples of compare qualifiers:
tol(erance)={tolerance} -> absolute tolerance (scaled data comparison)
%tol={percent tolerance} -> percent tolerance (scaled data comparison)
mask={mask value} -> mask to apply to data before comparison
(raw comparison)
scaled -> perform a comparison of scaled data
(default if tolerance is not zero)
raw -> perform a comparison of raw data
(default if tolerance is zero)
on_off -> compare on/off status only
ready_tripped -> compare ready/tripped status only
remote_local -> compare remote/local status only
polarity -> compare polarity status only
ramp_dc -> compare ramp/DC status only
family -> compare an entire family
verbose -> display verbose output
device -> compares one device to another
value={variable} -> specify a variable to return the final
command status (true (matched)/false)
suppress_errors -> suppress the error if a mismatch is found
Examples:
compare z:acltst sr:1 # raw data comparison
compare/value=status z:acltst sr:1 # raw data comparison
compare/tol=1.5 z:acltst sr:1 # scaled data comparison
compare/%tol=10 z:acltst sr:1 # scaled data comparison
compare z:acltst to sda:9158:"Inject Protons":1:ColliderShot
compare z:acltst dl:"01-Jan-2000 00:00":fastest:3600
compare z:acltst[1:2] to sr:1
compare node=tev/crate=A1/prset to sr:last_big_save
Related commands:
read, search, check_status, device_list
-------------------------------------------------------------------------------
copy : copy one device to another
copy {src_device}[[n]][/{qualifier...}] [to] {dest_device}[[n]][/{qualifier...}]
This command will copy setting values from one device to another.
If no length or offset is specified, the entire property will be
copied. This command can be used for the setting, basic status,
analog alarm, and digital alarm properties. This command also
supports an array index notation which allows you to specify the
beginning and ending array indices
(ex. copy z:acltst[1:2]/src=sr:last_big_save to z:aclts3[2:3]).
This command also supports family devices and list specifiers
(see above) so that one device can be copies to many devices.
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of copy qualifiers:
scaled -> copy scaled data (default is raw)
family -> copy to an entire family
verbose -> display verbose output
Examples:
copy z:acltst/src=sr:1 to z:aclts3 # copy entire array device
copy z:acltst to z:aclts3 # copy entire array device
copy z:acltst[1:2] to z:aclts3[2:3]
copy/family t_ha11 to t:horzfg
Related commands:
set, fill, restore, download, device_list
-------------------------------------------------------------------------------
copy_variable : copy a value or an array of values into a variable
copy_variable[/{qualifier}] {variable} {copy_value} [{num_values}]
This command copies values or arrays of values to a variable
whether or not they are of the same type. If the "overlay"
option is selected, this command can do a "one to many" or
"many to one" mapping. This is particularly useful when
parsing or building byte buffers. The output variable will
be created by this command if it doesn't already exist.
Examples of copy_variable qualifiers:
overlay -> allow a simple memory overlay which will
support "many to one" and "one to many"
mappings
{value_type} -> value type to use if the output variable
must be created
verbose -> display verbose output
output -> specify output
Examples:
declare val int[4]=1,2,3,4
copyvar val2[0] val[0] 4 # simple array copy
declare val int[4]=1,2,3,4
copyvar/string val2[2] val[0] 2 # copy to another data type
readfile/binary/maxbytes=128/values=rawdata/byte \
'/usr/local/xaps/clg/utility_1.fmt'
copyvar/overlay/string str rawdata[0:117] # many to one
copyvar/overlay/int maxrecords rawdata[118:121] # many to one
copyvar/overlay/short recordsize rawdata[122:123] # many to one
Synonyms: copy_var, copyVar
Related commands:
str_copy
-------------------------------------------------------------------------------
search : search device readings for a pattern
search {device}[[n]][/{qualifier...}] [for] {value 1}[ {value 2} ... {value n}]
This command will search reading values for a device for a
specific pattern. If no length or offset is specified, the entire
property will be searched. This command can be used for the
reading, setting, basic status, analog alarm, and digital
alarm properties. For basic status, analog alarm, and digital
alarm properties only raw data searches are supported. This command
also supports an array index notation which allows you to specify
the beginning and ending array indices (ex. search z:acltst[1:2] for 1,2).
This command also supports family devices and list specifiers
(see above). If no tolerance is specified for a scaled search,
a tolerance of zero is assumed. Values to be searched can be
entered directly on the command line or can be supplied in a
delimited text file. This command sets the global symbol, $_value,
to a value of true (1) if the search is successful and a value of
false (0) otherwise.
Examples of search qualifiers:
tol(erance)={tolerance} -> absolute tolerance (scaled data comparison)
raw -> perform a raw search (default)
auto -> treat search values as the default data
type for the device being searched (default)
byte -> treat the search values as bytes
word -> treat the search values as words
long -> treat the search values as longwords
scaled -> perform a comparison of scaled data
(default if tolerance is not zero)
family -> search an entire family
file -> read search values from a file
(default file extension is ".dat")
verbose -> display verbose output
value={variable} -> specify a variable to return the final
command status (true/false)
index={variable} -> specify a variable to return the match
index value (-1 if no match)
Examples:
search i_34rc5c for 2b fe # raw data search
search name=i_34rc*c for 2b fe
search/file/verbose name=i_34rc*c for search_values.dat
search i_34rc5c[1:2] for 2b
search/scaled z:acltst for 1.5 # scaled data search
search/scaled/value=status z:acltst for 1.5
search/scaled/tol=1.5 z:acltst for 1.5
Related commands:
read, compare
-------------------------------------------------------------------------------
show : display database information for a device
show[/output={spec}] {device|device list}[[n]][/{qualifier...}] {/parameter...}
Multiple parameters can be specified so that multiple types of
database information can be displayed together. Note that a
device index can be supplied rather than a device name. For
some parameters, the symbol $_num_values may be set indicating
how many matching values were found.
Examples of show qualifiers:
block=2 -> request alarm block starting at array index 2
start_block=2 -> request alarm block starting at array index 2
block=active -> request active alarm block index
num_blocks=4 -> request 4 alarm blocks
source=dp -> display data from the accelerator (default)
source=db -> display data from the database
source=sr:1 -> display data from save/restore file 1
source=sda:1:"Inject Protons":1:ColliderShot -> display data from SDA
file 1, case Inject Protons,
subcase (set) 1,
usage ColliderShot
source=dl:"01-Jan-2000 01:00" -> display data from a Lumberjack at
January 1, 2000 at 0100
source=memory -> display data from a memory pool
obsolete -> support handling of obsolete devices
verbose -> display verbose output
noheader -> suppress device name header
nodisplay -> don't display the data, only errors
status={variable} -> returns the retrieval status
num_values={variable} -> returns the number of values found
values={variable} -> returns the values found as strings
output={spec} -> specify output destination
Examples of parameters are:
name -> display device's name
device_index -> display device index
full_name -> display device's full name
fermi_name -> display FermiName(s) for a device
fermi_index -> display FermiName atom indices for a device
text -> display device's descriptive text
full_text -> display device's full descriptive text
node -> display device property's source node
default_node -> display the default node for a device
consolidator -> display device property's consolidator node(s)
summary -> display summary database information
property -> display individual property information
property_info -> display individual property information
ssdn -> display individual property SSDN
sizes -> display individual property sizes
location -> display device's location information
alarm_block -> display alarm block information from the front end
db_alarm_block -> display alarm block information from the database
alarm_flags -> display alarm display and logging enabled flags
alarm_handling -> display alarm handling information
dbset -> display saved database setting values
dbset_raw -> display raw saved database setting values
audit -> display device's audit history
created -> display device creator and creation date
last_modified -> display last device modifier and modify date
bitnames -> display bit descriptions for the status property
extended_text -> display bit descriptions for the status property
bit_status -> display current bit status text
status_text -> display current bit status text
save -> display save/restore information
save_info -> display save/restore information
save_list -> display save/restore list information
user_save_lists -> displays all user save lists which contain
this device
device_type -> display device's type (database type)
live_device_type -> display device's type (calculated)
analog_text -> display analog alarm text
digital_text -> display digital alarm text
alarm_text -> display analog or digital alarm text depending
on the selected property
scaling -> display scaling information
scaling_info -> display scaling information
structure_name -> display data structure name
structure -> display data structure information
enum_value_info -> display enumerated value information
digital_control -> display digital control information
units -> units text
primary_units -> primary units text
status_attr -> display basic status attributes
status_attributes -> display basic status attributes
control_attr -> display basic control attributes
control_attributes -> display basic control attributes
virtual_machine -> display virtual machine information
setting_protection -> display setting protection information
controlled_set -> display controlled setting status
emc -> display EMC information
data_type -> display property data type information
sibling -> display sibling information
family -> display family information (family devices only)
state_text -> display state text (state devices only)
out_of_service -> display out of service (broken) information
oos(broken) -> display out of service (broken) information
obsolete_info -> display obsolete device information
plot_class -> display FTP and snapshot plot class information
alarm_list -> display alarm list information
alarm_lists -> display alarm lists containing the device
alarm_group -> display alarm group information
alarm_ack_classes -> display console classes that can acknowledge
an alarm
latest_alarm -> display information about the most recent
alarm message for a device
latest_setting -> display information about the most recent
setting for a device
properties -> list the existing properties for a device
download -> display device download information
download_props -> display device download properties
families -> list the families that a device is a member of
composites -> list the composite devices that a device is a
member of
ssdr -> display SSDR (SubSystem Device Record) data
extrema -> displays the minimum and maximum scaled values
for a property
controlling_device -> displays the device which controls the
requested device
controlled_devices -> displays the list of devices which the
requested device controls
help -> displays the help for the device
url -> displays the help URL for a device
expr[ession] -> displays device reading expression
(for calculational devices only)
logger_lists -> displays all data logger list entries for
the device
where_was_logged -> displays all data logger list entries for
the device which have been deleted
param_pages -> displays all parameter pages containing the
device
lex_sas -> displays all Lex SAs containing the device
synoptics -> displays all Synoptic displays containing
the device
foreign_device -> displays foreign device mapping information
device_access -> displays all programs accessing the device
alarm_users -> displays all users monitoring an alarm
department -> displays the department responsible for
the device
maintainer -> displays the equipment maintainer for the device
duplicate_ssdns -> displays devices on the same node which share
the same SSDN
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
show m:outtmp/name/analog_text
show t:ha11/name/digital_text/status_attr/control_attr/property_info
Synonyms: deviceInfo
Related commands:
read, delete_cache, list, device_list
-------------------------------------------------------------------------------
list : list device parameters
list[/option={value}] {device[[n]]{/qualifier...}|tag=value|file}
'{format_string}' [/output={spec}]
This command produces a formatted listing of parameters for one
or more devices. Note that a device index can be supplied rather
than a device name.
Examples of the tag=value pairs:
file={file} -> list all devices from an ASCII file
dbdi={table} -> list all devices specified by the column
named "di" (int) in a DB table
dbname={table} -> list all devices specified by the column
named "name" (char(8)) in a DB table
devices={dev1,dev2,...} -> list devices from an explicit delimited
list of names
device_query={query} -> list devices from a generic device
database query
obs_device_query={query} -> list devices from a generic device
database query (allow obsolete devices)
node=tev -> list all devices from the Tevatron front end
trunk={trunk} -> list all devices on a given trunk
name=t:ha% -> list all devices whose names start with
"T:HA"
full_name=m:outdoor% -> list all devices with full names
matching a string
family=t:ha11z -> list all devices in the family T:HA11Z
text=ha% -> list all devices whose descriptive text
starts with "HA"
full_text=%temperature% -> list all devices with full descriptive text
matching a string
save_list=1 -> list all devices attached to save/restore
list number 1 (sl)
usl=booster\400_mev\vert -> list all devices in a user save list
(user_save_list)
save_code=1 -> list all devices having a save/restore
save code of 1 (sc)
type=377 -> list all C377 devices
type='CAMAC C377' -> list all C377 devices
class=dio_camac_device -> list all CAMAC devices
transform=2 -> list all devices using common transform 2
primary_transform=16 -> list all devices using a given
primary transform
crate=a1,node=tev -> list all devices from Tev crate A1
slot=1,crate=a1,node=tev -> list all devices from Tev crate A1, slot 1
madc=1,node=tev -> list all devices from Tev MADC #1
driver=0xD -> list all devices with driver code 0D
vm=v:falma1 -> list all devices belonging to virtual
machine V:FALMA1
units="sec " -> list all devices having units text of "sec "
alarm_list=FixTgt -> list all devices from alarm list "FixTgt"
(al)
actual_alarm_list={list} -> list all devices from a given alarm list
(aal)
ual=booster\sparks -> list all devices from a user alarm list
(user_alarm_list)
alarm_group=Z:ALMGRP -> list all devices from an alarm group
alarm_consolidators=% -> access all alarm consolidator devices
ah=Normal -> list all devices having a given alarm
handler (alarm_handler)
cd={device} -> list all devices controlled by a given
device (controlling_device)
expr[ession]=%t:rn% -> list all devices containing a given string
in its reading expression
expr_device=t:rn000a -> list all devices containing a given device
in its reading expression
ssdn={SSDN patern} -> list all devices having an SSDN
matching a pattern
logger_list={list[:n]} -> list all devices in a given data logger list
download_list=baker -> list all download devices for node BAKER
(dl)
save_file=821 -> list all devices saved in save file 821 (sf)
sda_case=1587:2 -> list all devices configured for a
particular SDA case
sda_set=1587:2:1 -> list all devices saved in SDA file 1587,
case 2, set 1
siblings={device} -> list all siblings descended from a
given device (sibling_list)
parameter_page={page} -> list all devices on a specific parameter
page subpage
lex_sa={file name} -> list all devices on a specific Lex SA
display
wg_list={list} -> list all devices from a waveform generator
list (I14/I15) (wgList)
console_class={class} -> list all devices which are settable
by a given console class
user={user name} -> list all devices modified by a given user
user_created={user name} -> list all devices created by a given user
foreign_device={name} -> list all devices mapped to a particular
foreign device
structure={name} -> list all devices which are described by
a given data structure
department={dept name} -> list all devices which belong
to a given department
maintainer={user name} -> list all devices which connect
to equipment maintained by a given user
device_range={min:max} -> list all devices in a given
device index range
Examples of options are:
/title=yes -> display a default title (default)
/title=no -> don't display a title
/notitle -> don't display a title
/title="My Title" -> display a specific title
/headings=yes -> display column headings (default)
/headings=no -> don't display column headings
/noheadings -> don't display column headings
/summary -> display the number of devices listed
/comment="This is a comment."
/skipbad -> skips invalid entries in a device file
/filter=analog_alarm -> only display devices in alarm (analog)
/filter=digital_alarm -> only display devices in alarm (digital)
/filter=broken -> only display devices marked as out of service
/filter=analog_bypassed -> only display devices with analog alarm bypassed
/filter=digital_bypassed -> only display devices with digital alarm bypassed
/filter=read_array -> only display devices with an array reading property
/filter=set_array -> only display devices with an array setting property
/filter=status_array -> only display devices with an array status property
/filter=read_size_mismatch -> only display devices with a reading size mismatch
/filter=set_size_mismatch -> only display devices with a setting size mismatch
/filter=has_reading -> only display devices having a reading property
/filter=has_setting -> only display devices having a setting property
/filter=has_status -> only display devices having a status property
/filter=has_control -> only display devices having a control property
/filter=has_analog_alarm -> only display devices having an analog alarm property
/filter=has_digital_alarm -> only display devices having a digital alarm property
/source=dp -> display data from the accelerator (default)
/source=db -> display data from the database
/source=sr:1 -> display data from save/restore file 1
/source=sda:1:"Inject Protons":1:ColliderShot -> display data from SDA
file 1, case Inject Protons,
subcase (set) 1,
usage ColliderShot
/source=dl:"01-Jan-2000 01:00" -> display data from a Lumberjack at
January 1, 2000 at 0100
/source=memory -> display data from a memory pool
/output={spec} -> specify output destination
/num_strings={variable} -> saves the number of strings in a variable
/strings={array} -> saves the output strings in a variable
/dynamic[_arrays] -> dynamically reallocate output data string
to match the number of output strings
notitle -> suppress overall title
noheader -> suppress column headers
obsolete -> support handling of obsolete devices
Examples of format specifiers:
%nm -> display device name (name)
%fn -> display full device name (fullName, full_name)
%previous_name -> display previous device name (pn, prev_name)
%di -> display device index
%device_state -> display device state (cnv_device_state)
%tx -> display device descriptive text
(txt, text, cnv_device_description)
%full_text -> display full device descriptive text
(fd, full_descr)
%type_p -> display device type
%type_long_p -> display device type (long description)
%type_id_p -> display device type ID
(device_type_id, cnv_device_type_id)
%db_type_p -> display database device type
(db_device_type, cnv_db_device_type)
%db_type_long_p -> display database device type (long description)
(db_device_type_long, cnv_db_device_type_long)
%db_type_id_p -> display database device type ID
(db_device_type_id, cnv_db_device_type_id)
%class_p -> display device class
%class_long_p -> display device class (long text)
(cnv_device_class_long)
%cnv_device_driver_p -> display device driver value
%rd -> display current device reading (read)
%rd_units -> display reading units (read_units)
%set -> display current device setting
%set_units -> display device setting units
%sts -> display current device basic status (status)
%raw_p -> display a raw reading value
%primary_p -> display a reading value in primary units
%help_url -> device help URL (cnv_device_help_url),
%aa -> display analog alarm (analog_alarm)
%aa_min -> display analog alarm minimum (analog_alarm_min)
%aa_max -> display analog alarm maximum (analog_alarm_max)
%aa_nom -> display analog alarm nominal (analog_alarm_nom)
%aa_tol -> display analog alarm tolerance (analog_alarm_tol)
%aa_ll -> display analog alarm limit length
(analog_alarm_limlen)
%aa_lt -> display analog alarm limit type (analog_alarm_lt)
%aa_ldt -> display analog alarm limit data type
(analog_alarm_ldt)
%aa_status -> display analog alarm status (analog_alarm_status)
%aa_hl -> display analog alarm high/low status
(analog_alarm_highlow)
%aa_ena -> display analog alarm enable status
(analog_alarm_ena)
%aa_abort -> display analog alarm abort status
(analog_alarm_abort)
%aa_abtena -> display analog alarm abort enable status
(analog_alarm_abtena)
%aa_pri -> display analog alarm priority (analog_alarm_pri)
%aa_text -> display analog alarm text (analog_alarm_text)
%aa_display -> display analog alarm display enable status
(aa_disp, analog_alarm_disp)
%aa_logging -> display analog alarm logging enable status
(aa_log, analog_alarm_log)
%aa_tries_needed -> display analog alarm tries needed
(analog_alarm_tries_needed)
%aa_tries_now -> display analog alarm tries now
(analog_alarm_tries_now)
%aa_evt1 -> display analog alarm event 1 (analog_alarm_event_1)
%aa_evt2 -> display analog alarm event 2 (analog_alarm_event_2)
%aa_ftd -> display analog alarm FTD (analog_alarm_ftd)
%aa_pm -> display analog alarm post method
(analog_alarm_pm)
%aa_data -> display analog alarm special data
(analog_alarm_data)
%aa_flags -> display analog alarm flags word (analog_alarm_flags)
%analog_alarm_url-> analog alarm URL (cnv_analog_alarm_url),
%da -> display digital alarm (digital_alarm)
%da_nom -> display digital alarm nominal (digital_alarm_nom)
%da_mask -> display digital alarm mask (digital_alarm_mask)
%da_ll -> display digital alarm limit length
(digital_alarm_limlen)
%da_status -> display digital alarm status (digital_alarm_status)
%da_ena -> display digital alarm enable status
(digital_alarm_ena)
%da_abort -> display digital alarm abort status
(digital_alarm_abort)
%da_abtena -> display digital alarm abort enable status
(digital_alarm_abtena)
%da_display -> display digital alarm display enable status
(da_disp, digital_alarm_disp)
%da_logging -> display digital alarm logging enable status
(da_log, digital_alarm_log)
%da_tries_needed -> display digital alarm tries needed
(digital_alarm_tries_needed)
%da_tries_now -> display digital alarm tries now
(digital_alarm_tries_now)
%da_evt1 -> display digital alarm event 1
(digital_alarm_event_1)
%da_evt2 -> display digital alarm event 2
(digital_alarm_event_2)
%da_ftd -> display digital alarm FTD (digital_alarm_ftd)
%da_pm -> display digital alarm post method (digital_alarm_pm)
%da_data -> display digital alarm special data
(digital_alarm_data)
%da_flags -> display digital alarm flags word
(digital_alarm_flags)
%dbset_p -> display saved database setting values
%dbset_raw_p -> display raw saved database setting values
%units_p -> display common units text
%primary_units_p -> display primary units text
(pu, cnv_primary_units_text)
%pt_p -> display primary transform (text)
%pt_index_p -> display primary transform (number)
%ct_p -> display common transform (text)
%ct_index_p -> display common transform (number)
%const_p(_n) -> display scaling constants (If "n" is specified,
only the corresponding constant will be displayed.
Otherwise, all of the constants will be displayed.)
%fe_units_p -> display front end common units text
(fe_cu, cnv_fe_units_text)
%fe_primary_units_p -> display front end primary units text
(fe_pu, cnv_fe_primary_units_text)
%fe_pt_p -> display front end primary transform
(cnv_fe_primary_transform)
%fe_pt_index_p -> display front end primary transform index
(cnv_fe_primary_transform_index)
%fe_ct_p -> display front end common transform
(cnv_fe_common_transform)
%fe_ct_index_p -> display front end common transform index
(cnv_fe_common_transform_index)
%fe_const_p(_n) -> display front end scaling constants
(cnv_fe_scaling_constant)
(If "n" is specified, only the corresponding
constant will be displayed. Otherwise, all
of the constants will be displayed.),
%dl_p -> display scaled display length
%df_p -> display scaled display format
%struct_p -> display structure name (structure_p)
%nd[_p] -> display device source node (node, cnv_node)
%tn[_p] -> display device source trunk and node
(trunk_node, cnv_trunk_node)
%fa_date -> display first audit date (first_audit_date)
%fa_author -> display first audit author (first_audit_author)
%la_date -> display last audit date (last_audit_date)
%la_author -> display last audit author (last_audit_author)
%ps -> display previous sibling (previous_sibling)
%ns -> display next sibling (next_sibling)
%sl -> display save/restore save list (save_list)
%sln -> display save/restore save list number
(save_list_number)
%sc -> display save/restore save code (save_code)
%sp -> display save properties (save_properties)
%sm -> display save property mask (save_mask)
%dc -> display save/restore display code (display_code)
%pm -> display device setting protection mask
(protection_mask)
%vm -> display device virtual machine information
(virtual_machine)
%oos -> display device out of service (broken) status
(broken, broken_status)
%broken_user -> display the user who marked the device as broken
%broken_process -> display the process which marked the device
as broken
%broken_date -> display the date when the device was marked
as broken
%broken_comment -> display the comment entered when the device
was marked as broken
%obsolete_user -> display the user who marked the device as obsolete
%obsolete_date -> display the date when the device was marked
as obsolete
%obsolete_comment-> display the comment entered when the device was
marked as obsolete
%ssdn_p(_n) -> display device SSDN (If "n" is specified, only
the corresponding word will be displayed.)
%ds_p -> display device default size (default_size)
%as_p -> display device atomic size (atomic_size)
%ms_p -> display device maximum size (maximum_size)
%ss_p -> display device scaling size (scaling_size)
%fe_ss_p -> display front end device scaling size
(fe_scaling_size, cnv_fe_scaling_size)
%ne_p -> display device number of elements (num_elements)
%struct_p -> display device structure name
(structure, cnv_device_structure_name)
%emc_p -> display device EMC
%cr_p -> display device crate (crate)
%slt_p -> display device slot (slot)
%ch_p -> display device MADC channel
%madc_ch_p -> display device MADC channel (madc_channel)
%madc_num_p -> display device MADC number (madc_number)
%location_string_p -> display the device location string (ls)
%rack_text_p -> display the device rack text (rt)
%ftd_p -> display device default FTD
%data_event_p -> display device default data event
(dataevent, cnv_data_event),
%state_value -> display state value text (sv)
%fermi_name -> display device FermiName (fermiName)
%fi -> display device FermiName atom index (fermi_index)
%ftp_class -> display FTP (Fast Time Plot) class (text)
%ftp_class_index -> display FTP (Fast Time Plot) class (number)
%snp_class -> display SNP (Snapshot) class (text)
%snp_class_index -> display SNP (Snapshot) class (number)
%cs -> display controlled setting status
%is_cntrl_set[_p]-> display controlled setting status
(is_controlled_set)
%is_motor -> display motor controller status
%data_type_p -> display device data type (cnv_device_data_type)
%data_type_id_p -> display device data type ID
%al -> display alarm list (alarm_list)
%aal -> display actual alarm list (actual_alarm_list)
%aln -> display alarm list number (alarm_list_number)
%aaln -> display actual alarm list number
(actual_alarm_list_number)
%ag -> display alarm group (alarm_group)
%agn -> display alarm group number (alarm_group_number)
%iac -> display alarm consolidator flag
(is_alarm_consolidator)
%acl -> display alarm control list (alarm_control_list)
%ah_p -> display alarm handler (alarm_handler)
%ahn_p -> display alarm handler number (alarm_handler_number)
%asid_p -> display alarm sound ID (alarm_sound_id)
%aspid_p -> display alarm speech ID (alarm_speech_id)
%aam -> display alarm acknowledge mask (alarm_ack_mask),
%cd -> display controlling device (controlling_device)
%expr -> display expression used to calculate
the device's reading value (expression)
%status_xxx -> display basic status mask values where
"xxx" is replaced by "onoff", "readytripped",
"localremote", "polarity" or "rampdc"
%command_xxx -> display basic control command values
where "xxx" is replaced by "reset", "on", "off",
"positive", "negative", "ramp", or "dc"
%foreign_name_p -> display the foreign device name that
an ACNET device is mapped to
%fst_p -> display the system type of a foreign device mapping
(foreign_system)
%fdt_p -> display the data type of a foreign device mapping
(foreign_data_type)
%dept -> display the department responsible for the device
(department)
%maintainer -> display the equipment maintainer's user name
%cnv_device_driver_p -> display device driver value
(Suffixes of "_p" mean that a property string should be inserted in
place of the "p". The property strings for this are "rd", "set",
"sts", "ctl", "aa", and "da".)
(for more help see the help for the CLIB routine 'device_listing_c')
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
list m:outtmp "%nm %tx %set %rd %rd_units %sts"
list transform=38 "%nm"
list data_file.txt "%nm %la_date %la_author"
list 27235 "%nm" # get device name from device index
Related commands:
read, show, alarm_limit, nominal_mask, device_list
-------------------------------------------------------------------------------
alarm_info : returns alarm information including current alarms
alarm_info[/{qualifier}[={value}]]
This command simply reads and displays current alarm information.
Examples of alarm_info qualifiers:
current_alarms -> show current alarms (default)
num_current_alarms -> show number of current alarms
bypassed -> show bypassed alarms
enabled -> show enabled alarms
never_used -> show never used alarms
suppressed -> show suppressed alarms
device={string} -> matching device string (*)
node={node} -> alarm source node (*)
alarm_list={list} -> matching alarm list (*)
alarm_group={group} -> matching alarm group (*)
analog -> return analog alarm messages only
digital -> return digital alarm messages only
count_only -> message count
max_entries={n} -> maximum number of entries to display
show_value -> display the device values
scaled -> display scaled device values
raw -> display raw device values
num_values={variable} -> returns the number of alarms
device_names={variable} -> returns the device names
properties={variable} -> returns the device properties
alarm_text={variable} -> returns the alarm text
timestamps={variable} -> returns the alarm timestamps
nodes={variable} -> returns the device nodes
alarm_values={variable} -> returns the alarm values
verbose -> display verbose command status
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
alarm_info
alarm_info/output=mail:hendricks
alarm_info/analog/count_only
alarm_info/device=%out%
alarm_info/node=CACHE
alarm_info/alarm_group=Z:CL38A0
alarm_info/device_names=names/alarm_text=text/timestamps=dates
Synonyms: alarmInfo
Related commands:
alarm_log, alarm_limit, nominal_mask
-------------------------------------------------------------------------------
alarm_limit : read or set analog alarm limits
alarm_limit[/{qualifier}] {device|device list}[[n]][=][{minimum},{maximum}]
This command supports reading or setting of analog alarm limits.
One or more blocks of multiple alarm block devices can be displayed
or set. This command supports an array index notation which allows
you to specify the beginning and ending alarm blocks
(ex. alarm_limit t:a1spwe[3:5]). This command also supports family
devices and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of alarm_limit qualifiers:
read -> read alarm limits
(default if no limits specified)
set -> set alarm limits
(default if one or both limits are specified)
minmax -> treat limits as minimum/maximum
(default for setting)
nomtol -> treat limits as nominal/tolerance
min[imum]={minimum} -> specifies minimum value for setting mode
max[imum]={maximum} -> specifies maximum value for setting mode
nominal={nominal} -> specifies nominal value for setting mode
tolerance={tolerance} -> specifies tolerance value for setting mode
minval={minimum} -> specifies a variable to return the minimum
maxval={maximum} -> specifies a variable to return the maximum
nomval={nominal} -> specifies a variable to return the nominal
tolval={tolerance} -> specifies a variable to return the tolerance
num_elements=4 -> request 4 blocks
num_values=4 -> request 4 blocks
num_elements=all -> request all alarm blocks
all_elements -> request all alarm blocks
family -> operate on an entire family
verbose -> display verbose output
nodisplay -> don't display the reading, only errors
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
binary:{file_name} -> send output to a binary file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
alarm_limit m:outtmp # read alarm limits for M:OUTTMP
alarm_limit m:outtmp = -5, 100 # set alarm limits
alarm_limit t:a1spwe[] # read all alarm limits
alarm_limit t:a1spwe[4:5] # read selected alarm limits
alarm_limit user_alarm_list=booster\sparks # read list of alarms
Related commands:
nominal_mask, alarm_info, alarm_log, read, set, enable, bypass, list,
show, data_event, ftd, data_source, device_list
-------------------------------------------------------------------------------
alarm_message : either post an alarm or clear an existing one
alarm_message[/{qualifier}] {alarm device} [{alarm text}] [{alarm value}]
This command supports either posting new alarm messages or
clearing existing alarm messages. This command also supports
changeable devices and list specifiers (see above). Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of alarm_message qualifiers:
post -> post a new alarm (default)
clear -> clear an existing alarm
analog -> analog alarm
digital -> digital alarm
exception -> exception (normal good/bad) alarm (default)
event -> event (one shot) alarm
(times out in 30 seconds)
not_low_or_high -> alarm reading is neither low nor high
(default)
low -> alarm reading is low
high -> alarm reading is high
no_set -> suppress actual sending the alarm message
verbose -> display verbose output
Examples:
alarm_message G:ACLALM 'This is a test.' # post a new alarm
alarm_message/clear G:ACLALM # clear alarm
Related commands:
enable, bypass, device_list, change_device
-------------------------------------------------------------------------------
camac : execute individual CAMAC commands
camac[/{qualifier}={value}][/node={node}][/crate={crate}]
[/slot={slot}][/cnaf={c}:{n}:{a}:{f}] [{data}]
This command will execute individual CAMAC commands.
The qualifier specifies which type of command to execute.
The node, crate, slot, function, and subaddress values
can be specified via a 'camac/select' command or can be
included in each command. Use of this command may require
special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of camac qualifiers:
select -> specify some subset of node, crate, slot,
function, and subaddress for future
CAMAC commands (values will remain in
effect until changed or the current
script ends)
static_select -> specify some subset of node, crate, slot,
function, and subaddress for future
CAMAC commands (values will remain in
effect until changed or the calling process
exits)
node={node_value} -> specify CAMAC node
crate={crate_value} -> specify CAMAC crate
slot={crate_value} -> specify CAMAC slot
crate={crate_value} -> specify CAMAC crate
func={function_value} -> specify CAMAC function code
subaddr={subaddress} -> specify CAMAC subaddress
data={data_value} -> specify data value to send
retries={retries_value} -> specify CAMAC no-Q retries value
cnaf={c:n:a:f} -> specify colon separated CNAF value
fa={f:a} -> specify colon separated function code and
subaddress values
format={decimal|hex} -> specify data format (hex or decimal)
id -> read the CAMAC module's ID number
version -> read the CAMAC module's software
version number
reset -> reset the module
hex -> interpret data as hexadecimal
dec[imal] -> interpret data as decimal
queue -> allows queueing up multiple commands to
send at the same time
verbose -> display verbose output
output -> specify output
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
camac/select/node=MI/crate=A1/slot=9
camac/func=6/subaddr=0 # read CAMAC module ID
camac/node=MI/cnaf=A1:9:6:0 # read CAMAC module ID
camac/node=MI/crate=a1/slot=9/id # read module ID
Related commands:
none
-------------------------------------------------------------------------------
gas : read or write GAS commands
gas[/{type}][/node={node}][/house={hse}][/modtyp={modtyp}]
[/stanc={t}:{a}:{n}:{c}:{bc}]
This command will execute individual GAS commands.
The type qualifier specifies which type of command to execute.
The node, house, module type, and STANC values can be specified
via a 'gas/select' command or can be included in each command.
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of gas qualifiers:
select -> specify some subset of node, house,
module type, and STANC for future
GAS commands (values will remain in
effect until changed or the current
script ends)
static_select -> specify some subset of node, house,
module type, and STANC for future
GAS commands (values will remain in
effect until changed or the calling process
exits)
node={node} -> specify GAS node
house={house} -> specify GAS house
modtyp={module type} -> specify GAS module type
type={type} -> specify GAS type
aspect={aspect} -> specify GAS aspect
entry={entry} -> specify GAS entry
count={count} -> specify GAS count
byte_count={byte count} -> specify GAS byte count
stanc={t:a:n:c:bc} -> specify GAS colon separated STANC
(type, aspect, entry, count, and byte count)
tan={t:a:n} -> specify GAS type, aspect, and entry
data={data value} -> specify data value to send
value={variable} -> specify variable to return GAS reading value
format={decimal|hex} -> specify data format (hex or decimal)
id -> read the GAS module's ID string
age -> read the GAS module's age (time up)
hex -> interpret data as hexadecimal
dec[imal] -> interpret data as decimal
queue -> allows queueing up multiple commands to
send at the same time
verbose -> display verbose output
output -> specify output
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
gas tev a1 bpm age # read GAS age
gas/node=tev/house=a1/modtyp=bpm age # read GAS age
gas tev a1 bpm id # read GAS ID string
gas/select/node=TEV/house=A1/modtyp=BPM
Related commands:
none
-------------------------------------------------------------------------------
gpib : execute GPIB device commands
gpib{/command}[/{qualifier}={value}] [{node|IP}] [{addr}] [{command_string}]
This command will execute GPIB device commands. The command type
qualifier specifies which type of command to execute. The node
and address values can be specified via a 'gpib/select' command
or can be included in each command. Use of this command may require
special privileges. See Brian Hendricks (hendricks@fnal.gov) for
more information.
gpib command types:
select -> specify node and address for future
GPIB commands (values will remain in
effect until changed or the current
script ends)
static_select -> specify node and address for future
GPIB commands (values will remain in
effect until changed or the calling process
exits)
write (or set) -> send an ASCII GPIB command string
read -> make a GPIB device reading (ASCII or binary)
value={variable} -> specifies a variable to receive GPIB
reading data
local -> put a GPIB device in local
serial_poll -> retrieves the GPIB serial poll status byte
clear -> clears a GPIB device
trigger -> triggers a GPIB device
Special value strings:
last_node -> use the last specified GPIB node
last_address -> use the last specified GPIB address
Examples of gpib qualifiers:
static -> convert a select command to a static one
node={node_value} -> specify GPIB node
address={address} -> specify GPIB address
ip[_name]={ip_name} -> specify the IP name of the GPIB device
port={port} -> specify the IP port number of the GPIB device
length={num_bytes} -> number of bytes to read
all -> read maximum number of bytes
strip_nl -> strips trailing newline from a reading
byte_swap -> swap the setting bytes on word boundaries
word_swap -> swap the setting words on longword
boundaries
raw (or binary) -> return binary data
string (or ascii) -> return ASCII data
node -> address the request by ACNET node (default)
ip[_name] -> address the request by IP address
verbose -> display verbose output
Examples:
gpib/select ap1001 1
gpib/write "*IDN?"
gpib/read # read GPIB ID string
Related commands:
none
-------------------------------------------------------------------------------
nominal_mask : read or set digital alarm nominals and masks
nominal_mask[/{qualifier}] {device|device list}[[n]][=][{nominal},{mask}]
This command supports reading or setting of digital alarm nominals
and masks. One or more blocks of multiple alarm block devices can
be displayed or set. This command supports an array index notation
which allows you to specify the beginning and ending alarm blocks
(ex. nominal_mask t:a1spcc[3:5]). This command also supports family
devices and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of nominal_mask qualifiers:
read -> read alarm nominals and masks
(default if no nominals/masks specified)
set -> set alarm nominals and masks
(default if one or both nominals/masks are
specified)
nominal={nominal} -> specifies nominal value for setting mode
mask={mask} -> specifies mask value for setting mode
nomval={nominal} -> specifies a variable to return the nominal
maskval={mask} -> specifies a variable to return the mask
num_elements=4 -> request 4 blocks
num_values=4 -> request 4 blocks
num_elements=all -> request all alarm blocks
all_elements -> request all alarm blocks
family -> operate on an entire family
verbose -> display verbose output
nodisplay -> don't display the reading, only errors
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
binary:{file_name} -> send output to a binary file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
nominal_mask t:ha11 # read digital alarm for T:HA11
nominal_mask t:ha11 = 3ff, 3ff # set alarm nominal and mask
nominal_mask t:a1spcc[] # read all nominals and masks
nominal_mask t:a1spcc[4:5] # read selected nominals/masks
nominal_mask user_alarm_list=booster\sparks # read list of alarms
Synonyms: nominalMask
Related commands:
alarm_limit, alarm_info, alarm_log, read, set, enable, bypass, list,
show, data_event, ftd, data_source, device_list
-------------------------------------------------------------------------------
step_motor : set a stepping motor
step_motor[/{qualifier}] {motor_device} [=] {setting} [steps]
This command supports setting stepper motors. The motor can
be set t a particular position, or a number of steps can be
requested. This command supports family devices and list
specifiers (see above). Use of this command may require special
privileges. See Brian Hendricks (hendricks@fnal.gov) for more
information.
Examples of step_motor qualifiers:
steps -> setting is in steps (default is to set
a particular position)
lock -> lock a motor to its partner
unlock -> unlock a motor from its partner
locked_move -> lock a motor to its partner, move both
motors, and unlock the motor from its partner
family -> operate on an entire family
noset -> don't actually send the setting
verbose -> display verbose output
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
step_motor s:psepal = 20 # set S:PSEPAL to 20
step_motor/steps s:psepal = 20 # set S:PSEPAL 20 steps
step_motor s:psepal 20 steps # set S:PSEPAL 20 steps
Synonyms: stepMotor
Related commands:
set, device_list
-------------------------------------------------------------------------------
timer_event : read or set timer events
timer_event[/{qualifier}] {device} [=] [{event 1}, {event 2}, ...]
This command supports reading or setting of timer events.
When setting events, all present events can be replaced,
added, or removed. This command supports family devices
and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of timer_event qualifiers:
read -> read timer events
(default if no events specified)
set -> set timer events
(default if events are specified)
replace -> replace all present events with supplied
events (default for setting)
add -> add event(s) to present events
remove -> remove specified event(s)
family -> operate on an entire family
num_values={variable} -> returns the number of values read
values={array variable} -> returns the values read
dynamic[_arrays] -> dynamically reallocate output value variable
to match the number of values read
verbose -> display verbose output
nodisplay -> don't display the reading, only errors
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
timer_event g:timer7 # read events for G:TIMER7
timer_event name=g:timer* # read multiple timers
timer_event g:timer7 = 20, 21, 29 # set events for G:TIMER7
timer_event/add g:timer7 = 2A # add event 2A to G:TIMER7
timer_event/remove g:timer7 = 2A # remove event 2A from G:TIMER7
Synonyms: timerEvent
Related commands:
read, set, data_event, ftd, data_source, device_list
-------------------------------------------------------------------------------
print : print a line of output
print[/output={spec}] {string|device|symbol} {string|device|symbol} ...
A print statement is made up of a sequence of terms separated by
spaces. Special terms include the name() operator which causes
the name rather than the value of a device to be output, the
pos() operator which allows you to set the output line text
column for tabular data, and 'date' which will output the current
date and time string. The present output length limit for a print
command is 8192 characters.
Examples of print qualifiers:
no_newline -> suppress the new line character
stdout -> send output to standard output
output={spec} -> specify output destination
output_index={index} -> specify output index (for variable output)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
variable:{variable} -> send the output to a string variable
symbol:{symbol} -> send the output to a string symbol
shared_log:{log_name} -> send the output to a shared/program log file
Special functions:
width({value},{width}) -> formats the output of a value to
a specified width
name({device}) -> causes the name rather than the value
of the device to be printed
gen_name({device}) -> causes the generic name (no property
or array index) rather than the value
of the device to be printed
text({device}) -> prints the descriptive text for
the device
units({device}) -> prints the units text for the device
units({device},{common|primary})
state_text({device}) -> prints the text for the current state
(state devices only)
state_text({device}[,{state},{trunc}])
clinks({date|integer}) -> displays date to clinks or clinks
to date
ctime({date|integer}) -> displays date to C time or C time
to date
gmt({date|integer}) -> displays date to GMT (UTC) time or
GMT (UTC) time to date
seconds(secs,{type1},{type2}) -> converts between types of seconds
(clinks, C time, or GMT (UTC))
julian({date|integer}) -> displays the corresponding Julian date
toHex(integer|variable|symbol -> displays the hexadecimal equivalent
[,output_length]) of the requested value
hex(integer|variable|symbol -> displays the hexadecimal equivalent
[,output_length]) of the requested value
toDec(integer|variable|symbol -> displays the decimal equivalent
[,convert_length]) of the requested value
dec(integer|variable|symbol -> displays the decimal equivalent
[,convert_length]) of the requested value
rad50(string) -> displays hexadecimal radix 50
value corresponding to the
requested string
rad50(integer) -> displays the string corresponding
to the requested value
ascii(hex or decimal integer) -> displays the corresponding ASCII
characters (up to 4)
ascii(string) -> displays the corresponding ASCII
numeric values (up to 4)
error(integer|string|variable) -> displays the corresponding ACNET
error value
node(integer|string|variable) -> displays the corresponding ACNET
node value
device(integer|device|variable) -> displays the corresponding ACNET
device value
[!]exists(device|variable) -> displays a 0 or 1 depending on
whether or not the requested
entity exists
sizeof(device|variable|symbol) -> displays the number of elements in
the requested entity
rtl_error(integer) -> displays the corresponding RTL
error string
system_error(integer) -> displays the corresponding system
error string
float(float|hex) -> displays floating point values
as either floats or raw hex
Examples:
print "M:OUTTMP is in alarm."
print "T:HA11[0] = " t_ha11[0]
print "Symbol #1 = " $symbol1
print name(G:DEV000) " = " G:DEV000 # print device name and value
print "Today's date is " date "." # print the present date
print "The present time is " time "." # print the present time
print "This shift started at " this_shift "."
print "Execution time = " script_time # print total script execution time
print "Delta time = " delta_script_time # print delta script execution time
print "1234" pos(10) "5678" # position second string at column 10
print "The first argument is " string(string0) "."
print "First line" newline "Second line"
Related commands:
output, output_value, mail
-------------------------------------------------------------------------------
mail : mail a file to a user
mail {/file=file_name} {/user=user_name} [/subj={subject}] [/body={body}]
If the file designation is omitted or has a value of "nofile",
an empty message with the supplied subject will be sent.
Examples of mail qualifiers:
subject={subject} -> specify the subject line
user={user name} -> specify the user to send mail to
file={file name} -> specify file name to mail
body={text} -> specify the body text
Examples:
mail/subject="ACL test" nofile hendricks
mail/subject="A Message" mail.txt hendricks
mail/subject="A Message" mail.txt/user=hendricks/body="This is a test."
Related commands:
output, print, output_value
-------------------------------------------------------------------------------
loop : execute a simple program loop
loop[/qualifier] {constant|variable|symbol} [{variable}[=][{device|constant|variable}]
This command starts a simple loop. The loop count can be specified
by an integer constant, a variable, or a symbol. The loop must be
terminated by an 'endloop' command. An optional variable can be
specified that will be initialized to either zero or a specified
value and will be incremented (or decremented if the decrement option
is selected) at the end of each iteration of the loop. (Note: If the
decrement option is chosen and no initial value is specified, the
variable will be initialized to a value of the loop count minus one.)
A loop can be terminated prematurely by an 'exitloop' command. An
iteration of a loop can be ended prematurely through the use of a
'continue' command.
Examples of loop qualifiers:
inc[={delta value}] -> specifies that the loop variable be
incremented during each iteration (default)
dec[={delta value}] -> specifies that the loop variable be
decremented during each iteration
(If the initial value of the loop variable
is not specified, the initial value will be
set to the loop count minus one.)
Examples:
loop 4
endloop
loop $symbol1
endloop
loop variable1
endloop
loop 3 counter
endloop
loop 3 counter = 7
if counter > 3
exitloop
endif
print counter
endloop
loop forever # infinite loop
if ($_eof) then # end of file encountered
break
endif
endloop
loop eof # loop until an EOF is detected
endloop
loop/dec my_loop_counter ii # decrement ii during loop iteration
endloop
Related commands:
endloop, exitloop, break, continue, while, endwhile, do_while,
end_do_while, goto
-------------------------------------------------------------------------------
endloop : end a simple program loop
endloop
This command ends a simple loop that was started with a 'loop' command.
Examples:
(see loop above)
Related commands:
loop, exitloop, break, continue, while, endwhile, goto,
do_while, end_do_while
-------------------------------------------------------------------------------
exitloop : jump out of a simple program loop
exitloop
This command allows the programmer to exit a loop prematurely.
Examples:
loop 3 counter = 7
if counter > 3
exitloop
endif
print counter
endloop
Synonyms: break
Related commands:
loop, endloop, continue, while, endwhile, do_while, end_do_while,
goto
-------------------------------------------------------------------------------
break : jump out of a simple program loop
break
This command allows the programmer to exit a loop prematurely.
Examples:
loop 3 counter = 7
if counter > 3
break
endif
print counter
endloop
Synonyms: exitloop
Related commands:
loop, endloop, continue, while, endwhile, do_while, end_do_while, goto
-------------------------------------------------------------------------------
continue : jump to the bottom of a simple program loop
continue
This command allows the programmer to prematurely end an
iteration of a loop.
Examples:
loop 3 counter = 7
if counter = 3
continue
endif
print counter
endloop
Related commands:
loop, endloop, exitloop, break, while, endwhile, do_while, end_do_while,
goto
-------------------------------------------------------------------------------
if : execute simple conditional structure
elseif : execute simple nested conditional structure
if {logical expression}
elseif {logical expression}
If the value on the left hand side of the expression is the basic
status of a device, the comparators to use are "is" or "isnot",
and the right hand side expression can be a basic status string.
Any valid ACL expression can be used in this statement. To see a
more complete description of expressions, see the help for the
assignment command.
Valid comparators:
= or eq -> is equal
!= or ne -> not equal
> or gt -> greater than
>= or ge -> greater than or equal to
< or lt -> less than
<= or le -> less than or equal to
is -> is in state (device status only)
isnot -> is not in state (device status only)
has -> has database attribute
doesnt_have -> doesn't have database attribute
Valid status strings (basic status) (use with is/isnot operators):
on -> device is on
off -> device is off
ready -> device is ready
tripped -> device is tripped
remote -> device is in remote
local -> device is in local
positive -> device's polarity is positive
negative -> device's polarity is negative
ramp[ing] -> device is in ramp mode
dc -> device is in DC mode
enabled -> device is enabled (cryo devices only)
disabled -> device is disabled (cryo devices only)
active -> device is active (cryo devices only)
inactive -> device is inactive (cryo devices only)
defined -> device is defined (cryo devices only)
undefined -> device is undefined (cryo devices only)
Valid status strings (analog alarm and digital alarm) (use with is/isnot operators):
bypassed -> alarm is bypassed
good -> device is not in alarm
alarming -> device is alarming
Valid status strings (MISCELLANEOUS) (use with is/isnot operators):
family -> device is a family device
out_of_service -> device is out of service
broken -> device is out of service
controlled_set -> device/property is a controlled setting
step_motor -> device is a step motor
timer_reference -> device is a timer reference
never_save -> never save device
multiple_alarm_block -> device/property is a multiple alarm block
multiple_analog_alarm -> analog alarm is a multiple alarm block
multiple_digital_alarm -> digital alarm is a multiple alarm block
structure -> device/property is a structure
reading_structure -> reading property is a structure
setting_structure -> setting property is a structure
Valid database attribute strings (use with has/doesnt_have operators):
reset[_control] -> has reset basic control attribute
on_control -> has "on" basic control attribute
off_control -> has "off" basic control attribute
positive[_control] -> has "positive" basic control attribute
negative[_control] -> has "negative" basic control attribute
ramp_control -> has "ramp" basic control attribute
dc_control -> has "DC" basic control attribute
on_status -> has "on/off" basic status attribute
ready_status -> has "ready/tripped" basic status attribute
remote_status -> has "remote/local" basic status attribute
polarity_status -> has "polarity" basic status attribute
ramp_status -> has "ramp/DC" basic status attribute
reading -> has reading property
setting -> has setting property
[basic_]status -> has basic status property
[basic_]control -> has basic control property
analog[_alarm] -> has analog alarm property
digital[_alarm] -> has digital alarm property
save[_property] -> has save property
extended_text -> has extended text
analog_text -> has analog alarm text
digital_text -> has digital alarm text
setting_record -> has a database setting record
setting_setting_record -> has a database setting record (setting)
control_setting_record -> has a database setting record (control)
previous_sibling -> has previous sibling
next_sibling -> has next sibling
controlling_device -> has controlling device
virtual_machine -> device belongs to a virtual machine
scaling_info -> device/property has scaling information
reading_scaling -> reading property has scaling information
setting_scaling -> setting property has scaling information
status_scaling -> status property has scaling information
control_scaling -> control property has scaling information
expression -> has device expression
Special functions:
exists({variable|symbol}) -> determines whether or not a variable
or symbol exists
file_exists({file}) -> determines whether or not a
file exists
Examples:
if m@outtmp is alarming
print "M:OUTTMP is in alarm."
elseif m@outtmp is disabled
print "M:OUTTMP is disabled."
else
print "M:OUTTMP is not alarming."
endif
if m:outtmp > 80
print "It's really getting hot!"
elseif m:outtmp < 50
print "It's getting cold."
else
print "It's quite comfortable now."
endif
if t:evtd9 has reset
print "T:EVTD9 has a reset attribute."
else
print "T:EVTD9 doesn't have a reset attribute."
endif
if !exists($array)
declare $array float[10]
endif
Related commands:
endif, else, goto, device_list
-------------------------------------------------------------------------------
else : implement default case for a an if/elseif block
else
This command implements the default case in an if block.
Examples:
(see if/elseif above)
Related commands:
if, elseif, endif, goto
-------------------------------------------------------------------------------
endif : end a simple conditional structure
endif
This command ends an if block.
Examples:
(see if/elseif above)
Related commands:
if, elseif, else, goto
-------------------------------------------------------------------------------
assignment : assign a value to a variable or symbol
{variable_name|symbol_name}[[{array_index}]] = {expression}
The assignment expression can be any simple algebraic expression
and can contain ACNET devices as well as other ACL symbols and
variables as terms. The algebraic symbols include "+", "-", "*",
"/", "^" (exponentiation), "%" (modulo), "<<" (arithmetic left shift),
">>" (arithmetic right shift), "++", and "--". The logical operator
"not" is also supported. Basic math functions including log
(base 10 log), ln (natural log), sqrt (square root), sin, cos, tan,
asin, acos, atan, sinh, cosh, tanh, round (round), trunc (truncate),
fract (fraction), abs (absolute value), exp (e^n), or (bitwise or),
and (bitwise and), xor (bitwise exclusive or),
lshft (circular left shift), rshft (circular right shift),
"bit" (bit test), "min" (minimum), "max" (maximum), and prec
(output precision eg. prec(value,fraction_digits)) can also be
included in these expressions. There are also a number of aggregate
functions which can act on an array of values. These functions
include sum, mean, median, minimum, maximum, range, stddev (standard
deviation), rms, variance, and identical (checks to see if all
values are identical). There are two other special intrinsic
functions. The first of these is exists which takes a device
specification or a variable or symbol name as an argument and
returns a value of 1 if the requested entity exists and a value of 0
otherwise. The other special function is sizeof which takes a single
argument which is a device specification or a variable or symbol name.
It returns the number of elements in the requested entity. Bitwise
operators "&" (and) and "|" (or) are supported. Comparison operators
".gt." (greater than), ".ge." (greater than or equal), ".lt."
(less than), ".le." (less than or equal), ".eq." or "==" (equal),
and ".ne." or "!=" (not equal) are supported. Logical operators are
also supported in expressions. These operators include "&&" (and),
".and." (and), "||" (or), ".or." (or), and ".xor." (exclusive or).
There are also logical functions including "lor" (logical or) and
"land" (logical and). The operator 'like' compares a string to a
a regular expression. The function "eventOccurred" takes a clock
event as an argument and returns a value of 1 if that event has
occurred since the last call to that function or a value of 0
otherwise. The function "timeSinceEvent" returns the elapsed time
since an event has occurred. The function "eventDate" returns the
date in clinks when the event last occurred. The function "timer"
returns the current value of a timer. There are also data conversion
functions to convert a string to a numeric value. These functions
include "node" to convert a node name to a value, "error" to convert an
ACNET error string to a value, and "device" to convert an ACNET
device to a value. There are also a few functions which return
string values. "name" returns a device name string while "text"
returns a device descriptive text string, and "units" returns
a device units string. "stateText" returns the text for the
current state of a state device while "head" returns the beginning
of a string and "tail" returns the end of a string. The function
"trim" removes leading and trailing blanks from a string. The
"toUpper", "toLower", and "capitalize" functions convert a string to
upper case, lower case, and capitalize it respectively. The "toString"
function converts a value to its corresponding string. The
"toTrimmedString" function works in the same way as "toString"
except that any spaces are removed from the resultant string. The
"stringLength" function returns the length of a string. The
"userAlarmList" function returns the state of a user alarm list
(enabled, bypassed, or empty) and can be used in an "is" expression.
The "file_exists" function returns a value of 1 if the requested file
exists or a value of 0 otherwise. Values from a previously defined
input can also be used in expressions. To do this, enclose the name of
the input in angle brackets (<>). Accessing an input value in this way
will set the end of file ($_eof) symbol to a value of 1 if an end of
file error occurs or 0 otherwise.
Examples:
$symbol1 = 2 * m:outtmp
variable1 = t_qf[1]
variable1 = 16
diff = abs(t_qf[1]-t_qf[2])
$symbol2 = $symbol1 + 4
bit_value = bit(t|ha11,8) # read value of bit #8
log_value = ln(m:outtmp)
it_is = exists(variable)
num_elements = sizeof(array)
array[2] = t:store
declare array float[5]
input/file xxx "myfile.txt"
array[] = <xxx> # assign values from defined input
declare array float[sizeof(z:acltst)]
array[] = z:acltst # assign array values from a device
array[*] = z:acltst[] # resize the variable to match the device
array[2:*] = z:acltst[] # resize the variable to match the device
declare my_string string
my_string = 'The temperature is ' + toString(m:outtmp) + '.'
val = stateText(v:cldrst) is like '.*hep$' # regexp comparison
Related commands:
declare, import, request_device, cancel_request
-------------------------------------------------------------------------------
declare : declare a variable or symbol
declare {variable|symbol} [{data_type}][[{dimension}]] [=] [{initializers}]
The declare command can be used to create either single value or
array variables and symbols. Symbol names must begin with a dollar
sign ($) and cannot conflict with any global symbols created by ACL
itself (see above). The data type field is optional. If a data type
is not specified, the data type will be set to double. If the value
being created is an array and initializers are specified, they should
be separated by white space or commas. In this case, you can specify
a number of initializers less than or equal to the size of the array.
Values not set by initializers will be set to zero. The notation
{n}*{value} can be used to set 'n' consecutive initializers to the same
value. No algebraic expressions can be used as an initializer, but
initializers can be other previously declared variables or symbols or
even device readings. A variable can also be initialized with the
contents of a file, a pipe, a device reading, or even the result of
a database query. Individual array elements can be set in assignment
statements while entire arrays can be filled by read commands with
the appropriate variable or symbol as its output.
Examples of declare qualifiers:
constant -> can be set only once
dynamic -> will automatically resize if an out of
range array index is set
device -> initializer is a device reading
file -> initializer is a file
db -> initializer is a database query
Data types:
double -> double precision real
float (or real) -> single precision real
string -> ASCII string
byte -> 1 byte signed integer
ubyte -> 1 byte unsigned integer
short -> 2 byte signed integer
ushort -> 2 byte unsigned integer
int[eger] -> 4 byte integer
ulong (or uint) -> 4 byte unsigned integer
logical (or boolean) -> 4 byte logical integer (0 or 1)
date -> 4 byte unsigned integer to be interpreted
as a date in clinks (seconds since 1/1/1972)
error -> 4 byte integer to be interpreted as an
ACNET error
node -> 4 byte integer to be interpreted as
an ACNET node and trunk specification
event -> 4 bye integer to be interpreted as
a clock event specification
device_index -> 4 byte integer to be interpreted as an
ACNET device index
device -> ACNET device specification
Special functions:
sizeof({device|variable}) -> determines the number of elements
in a device property or variable
Examples:
declare array[10] # declare 10 element float array
declare array[10] = 1,2,3,4,5,6,7,8,9,10
declare array float[10] = 1,2,3,4,5,6,7,8,9,10
declare array float[10] = 1,2,4*1,7,8,9,10
declare value double = 16.6
declare int_array int[5] # declare 5 element integer array
declare array[sizeof(z:acltst)]
declare str string[3] = 'string 1', 'string 2', 'string 3'
declare str string[] = 'string 1', 'string 2', 'string 3'
declare var double[]=device:z:acltst[]
declare var double[]=file:my_file.dat
declare var string[]=db:adbs:appdb:'select field_1 from hendricks.acl_test'
declare $test_array float[sizeof(z:acltst)]
read z:acltst/all/output=symbol:$test_array
declare temperature device=m:outtmp
device_list/create devs devices='m:outtmp,m:outhum'
declare readings float[sizeof(device_list=devs)]
Related commands:
assignment, import
-------------------------------------------------------------------------------
resize : resize (reallocate) an array variable or symbol
resize[/{qualifier}] {variable|symbol} {num_elements}
The resize command can be used to change the size of an existing
variable or symbol.
Examples of resize qualifiers:
static -> only resize once
relative -> relative resize (current size + num_elements)
allow_down_sizing -> allow resizing smaller
(default is to ignore down sizing requests)
resize_by_rows -> resize to a given number of "rows"
(only supported for multidimensional arrays)
actual_size={variable} -> returns the actual number of elements
in the variable after resizing
Examples:
declare array[10] # declare 10 element float array
resize array 20 # reallocate array to hold 20 elements
Related commands:
declare
-------------------------------------------------------------------------------
timeout : set the timeout in seconds for device readings,
device settings or database access
timeout {/timeout_type} {constant|variable|symbol}
timeout types:
reading -> device reading timeout (default)
setting -> device setting timeout
database -> database access timeout
Examples:
timeout/reading 5
timeout/setting 10
timeout/database = 10
Related commands:
read, set, show, setting_log, alarm_log
-------------------------------------------------------------------------------
wait : wait for a period of time, a clock event, a state transition,
or a device to reach a value range or status value
wait {/wait_type} {/qualifier} {constant|variable|symbol|device}
If the timeout qualifier is not specified or has a value of zero
for clock event, state transition, or device waits, this command
will wait forever.
Examples of wait types:
event -> TCLK event
events -> wait for an expression containing one or
more clock events
seconds -> number of seconds
milliseconds -> number of milliseconds
minute -> number of minutes
hour -> number of hours
absolute_time -> wait for an absolute time
time_of_day -> wait till a given time of day
state -> specific state value
states -> wait for an expression containing one or
more state conditions
device -> device in a particular value range
or at a particular status value
devices={devices} -> multiple devices in a particular value range
or at a particular status value
device_compare -> two devices at the same value
device_compare={devices}-> multiple devices at the same value
device_setting -> wait for a device or devices to be set
alarm -> wait for a device or devices to alarm
analog_alarm -> wait for a device or devices to go into
analog alarm
digital_alarm -> wait for a device or devices to go into
digital alarm
user -> user response
lock -> wait for a lock to be available
node_up -> wait for a node to be up (responding)
program_start -> wait for a program to start
program_end -> wait for a program to end
acnet_message -> wait for the arrival of an ACNET message
on a given handle
tcp_message -> wait for the arrival of a tcp message
on a given port
Examples of wait qualifiers:
timeout -> set a timeout time in seconds
delay -> set a delay time in milliseconds
minimum -> set minimum value for a device wait
maximum -> set maximum value for a device wait
status -> set device status for a device wait
state_value -> set target state value for a state wait
state_text -> set target state text for a state wait
new -> wait for the next occurrence of the
requested state transition
condition={condition} -> establish the condition for a state or
normal device wait
("=", "!=", "<", "<=", ">", ">=",
"any", "*") (default is "=")
equals -> set the condition to equal for a state
or normal device wait
not_equals -> set the condition to not equal for a state
or normal device wait
tclk -> wait for TCLK event (default)
hins -> wait for HCLK (HINS) event
nml -> wait for NCLK (NML) event
test -> wait for test clock event
properties={prop|prop2} -> select which setting properties to wait for
return_value={variable} -> return the message string from a
device setting, device alarm,
an ACNET message, or a tcp message wait
device_value={variable} -> return the device name from a device setting
or device alarm wait
property_value={var} -> return the device property from a device
setting or device alarm wait
timestamp={variable} -> return the timestamp for a device setting
or device alarm wait
Examples:
wait/sec 2 # wait for 2 seconds
wait/event 0 # wait for event 00 to occur
wait/events 0 and 2 # wait for 00 and 02 events
wait/state/timeout=5 v:cldrst 1 # wait for state 1 with timeout
wait/state/state_value=1 v:cldrst # wait for state 1 forever
wait/state/state_value=-1 v:cldrst # wait for state not equal 1
wait/state/state_value=any v:cldrst # wait for any state transition
wait/state=v:cldrst/condition="!=" 1 # wait for state not equal 1
wait/states v:test1=* or v:test2=* # wait for v:test1 or v:test2
wait/device m:outtmp 60 80 # wait for 60 <= M:OUTTMP <= 80
wait/device/minimum=60/maximum=80 m:outtmp 60 80
wait/device/minimum=$symbol1/maximum=$symbol2 m:outtmp
wait/devices=z_acltst,z_aclts2 60 80 # wait for 60 <= devices <= 80
wait/device/status=on t:ha11 # wait for T:HA11 to turn on
wait/device_compare g:sctime g:sctime/prset
wait/device_compare=z_acltst,z_aclts2 2 # wait for devices to compare
wait/absolute_time 16-sep-2006 15:00
wait/time_of_day 15:00
wait/program_start D80 local PB # wait for D80 to start
wait/setting/properties=PRSET any # wait for the next device setting
wait/setting/properties=PRSET Z:ACLTST # wait for Z:ACLTST to be set
wait/alarm any # wait for the next alarm
wait/alarm Z:ACLTST # wait for Z:ACLTST to go into alarm
Related commands:
read, program_status
-------------------------------------------------------------------------------
execute : execute ACL code
execute[/{qualifier}] {ACL code}
This command allows the programmer to build a string containing
ACL code and execute it within the same script. This can be useful
if one wants build commands with varying arguments and execute
them. If you want to specify mutiple ACL commands, they need to be
separated by new lines or semicolons. By default, the output
specifier used by commands executed in this way is the current
output specifier at the time the execute command is executed.
Examples of execute qualifiers:
error_exit -> exit the ACL script if the code executed
returns an error (default)
no_error_exit -> do not exit the ACL script if the
code executed returns an error
spawn -> spawn the ACL code off in another process
reset_output -> do not use the current output specifier
Examples:
declare code string # declare variable to hold code
code = 'read' + ' ' + 'm:outtmp' # build code string
execute code # execute the code
code += new_line + 'read m:outhum' # add a second command
execute code # execute both commands
Related commands:
run
-------------------------------------------------------------------------------
exit : end the script
exit [{text}] [{expression}]
If this command is not used, the script will run to the end.
If the optional status expression is supplied, this is the
status value returned for the script. Otherwise, a status
value of zero is returned. Any valid ACL expression can be
used in this statement. To see a more complete description
of expressions, see the help for the assignment command.
Examples of exit qualifiers:
error_status -> return the current value of $_error_status
force_text -> return the text supplied to this command
even if the global error string has already
been filled (default is to return the
global error string)
text={text} -> descriptive text for exit message
(This form is needed if the text is
contained in a string variable.)
error -> treat the exit value as an ACNET error code
integer -> treat the exit value as a simple integer
Examples:
exit
exit (CLIB_NO_SUCH)
exit 'Requested object not found' CLIB_NO_SUCH
exit/force_text 'Requested object not found' CLIB_NO_SUCH
exit/error_status
exit 0
exit $_value * 2
Related commands:
return
-------------------------------------------------------------------------------
goto : jump to a given label
goto {label}
A label is inserted by entering its name followed by a colon (:).
The colon should not be included in the reference in the goto command.
Examples:
goto label1
label1:
Related commands:
on_error, gosub, return, loop, endloop, continue, break, while, endwhile
do_while, end_do_while, if, elseif, else, endif
-------------------------------------------------------------------------------
gosub : jump to a labeled subroutine
gosub {label}
A label is inserted by entering its name followed by a colon (:).
The colon should not be included in the reference in the gosub command.
The end of a subroutine should be marked by a return command.
Examples:
gosub label1
label1:
return
Related commands:
return, goto, on_error, loop, endloop, continue, break, while, endwhile
do_while, end_do_while, if, elseif, else, endif, retry, exit
-------------------------------------------------------------------------------
on_error : establish an error handling routine
on_error[/{qualifier...}] {label}
This command establishes an error handling routine which will be
invoked if an ACL statement results in an error condition. If
no error handler is established, the ACL script will exit. If
the error handler determines (perhaps by examining the symbol
$_error_status which contains the error status which led to the
error handler being invoked) that the script should exit, it can
execute the exit command itself. Otherwise, as soon as the error
handler has finished, execution resumes at the statement following
the one which caused the error handler to be invoked.
A label is inserted by entering its name followed by a colon (:).
The colon should not be included in the reference in the on_error
command. The end of the error handler should be marked by a return
command.
You can also insert a retry statement in the error handler to
conditionally retry the statement causing the error.
There are two special kinds of virtual labels supported by this
command. The first is no label at all. This will cancel any
previously defined error handler. The second is the label
"do nothing". If this label is used, error status is updated but
no change to the script execution flow occurs. This requires the
programmer to check for errors explicitly by checking the value of
the symbol "$_error_status".
Examples of on_error qualifiers:
show_errors -> display current global error string
before invoking the error handler
Intrinsic symbols that are useful in error handlers:
$_error_status -> error code which triggered error handler
$_error_count -> number of times that the current error
has occurred consecutively (device errors)
$_generic_error_count -> number of times that the current error
has occurred consecutively (any error)
$_pending_count -> if the current error is a device pending
error, this is the number of consecutive
times that this status has been returned
$_error_device -> device which caused the current error
(if applicable)
$_error_line -> source line number where the current error
occurred
$_error_execution_index -> index in the list of commands where the
current error occurred
$_error_command -> name of command where the current error
occurred
$_error_source_text -> source code for the line where the
current error occurred
$_last_error_status -> previous error code
$_last_error_device -> previous device error device
Examples:
on_error error_label1
read m:outtmp
exit
error_label1:
print "An error occurred - status = " $_error_status
return
# with conditional retry
on_error error_label1
read m:outtmp
exit
error_label1:
print "An error occurred at line " $_error_line " - status = " $_error_status
if $_error_status = DPM_PEND and $_error_count < 3
retry # try to read the data again
endif
return
on_error do nothing # script must check for errors
on_error # cancel previous handler
Synonyms: onError
Related commands:
return, retry, goto, gosub, exit, if, elseif, else, endif
-------------------------------------------------------------------------------
retry : retry a command which has invoked an error handler
retry
This command can only be called from within an error handler.
It will cause control to be returned to the command which
caused the error handler to be invoked. This allows you to
retry a transient error condition.
Examples:
(see on_error above)
Related commands:
on_error, goto, return, exit
-------------------------------------------------------------------------------
return : return from a subroutine or error handler
return [{expression}]
This command returns control to the line following a gosub command.
It also can be used to return from an error handler. In this case,
it returns control to the line following the line which caused the
error handler to be invoked. If the optional expression is supplied,
it's value will be stored in the symbol $_return_value. This value
is only valid for the first statement executed after the return
statement. Any valid ACL expression can be used in this statement.
To see a more complete description of expressions, see the help for
the assignment command.
Examples:
(see gosub and on_error above)
gosub example
print 'return value = ' $_return_value
exit
example:
return 16
Related commands:
gosub, on_error, retry, exit
-------------------------------------------------------------------------------
run : run a program
run[/qualifier] "{program} [{arguments}]"
If the file to be run has an extension of ".acl", it will be
treated as another ACL file stored as a flat file. If it has
an extension of ".db", it will be treated as another ACL
file stored in the database. If it has an extension of ".scr",
it will be treated as a console application to be run using a
script. If it has an extension of ".cns", it will be treated as
a console application to be run with a remote method request or
in the case of fast time plots ("ftp") and snapshot plots
("snapshot"), with a saved plot setup specification.
Otherwise, it will be treated as a normal executable file.
Arguments can be passed in addition to the file to be run.
For console applications, these arguments can either take the
form of ASCII remote program methods or binary command buffers
with the use of the "cmdbuf" key word.
Examples of run qualifiers:
error_exit -> exit the ACL script if the program
returns an error (default)
no_error_exit -> do not exit the ACL script if the
program returns an error
exit -> called program should exit when
it's finished (default)
no_exit -> called program should continue
running indefinitely
spawn -> spawn the script off in another process
(ACL scripts only)
struct={struct name} -> structure name for data to be passed to
a console application
speed={value} -> replay speed for console application scripts
console_value={var} -> returns the actual console used for
a console application
slot_value={var} -> returns the actual slot used for
a console application
cnsapp -> execute as a console application
shell -> execute as a shell script
jws -> execute as a Java web start program
url -> execute as a URL
edm -> execute as an EDM display
Examples:
run/no_error_exit myprogram # run an executable file
run "myprogram arg1 arg2" # run an executable file
run shell_file.sh # run a shell script
run "shell_file.sh arg1 arg2" # run a shell script
run acl_file.acl # run another ACL file
run "acl_file.acl m:outtmp g:sctime" # run another ACL file with device arguments
run "acl_file.acl arg1 arg2" # run another ACL file with arguments
run "read a device.db m:outtmp" # run an ACL file from the database
run "d110.scr 134 PA yan's script" # run a console app with a script
run "m4.cns 134 PB go to subpage\12\0" # run a console app (M4) with a remote method
run/noexit 'f9.cns 134 pc "go to subpage\tunnel,es\0"'
run/noexit 'f73.cns 134 pc "go to subpage\resc,qpm_sta,b2\0"'
run "sa1082.cns 134 SA display image\XXXXXXXX" # run a console app with a remote method
run "lexsa.cns 134 SA display image\XXXXXXXX" # run a console app with a remote method
run "ftp.cns 134 SA collider\3" # run a fast time plot with the Collider #3 plot setup
run "snp.cns 134 SA recycler\1" # run a snapshot plot with the Recycler #1 plot setup
run "sa1135.cns 134 SA cmdbuf={int=10,float=3.7,float=0}"
run "p188.cns 134 PA seqnet={int=10,float=3.7,float=0}"
declare subpage int = 4
declare row int = 10
run/struct='pa0052.Go to subpage/row' 'm4.cns 134 PA values={1,subpage,row}'
run/struct='pa0052.Go to subpage/row' 'm4.cns 134 PA field_values={\
"Subpage number"=subpage,"Row number"=row}' # partially specified buffer
run 'm4.cns 134 PA values={1,subpage,row}' # simple values
run 'synoptic.jws "/HTS/hts13_overview"' # Java web start
run/jws 'synoptic "/HTS/hts13_overview"' # Java web start
run 'synoptic.url 134 "/HTS/hts13_overview"' # run Java program locally
run/url 'synoptic 134 "/HTS/hts13_overview"' # run Java program locally
run '"hts/HTS_overview".edm' # run EDM display
run/edm "hts/HTS_overview" # run EDM display
Related commands:
execute
-------------------------------------------------------------------------------
lock : lock a script
lock[/qualifier] {lock string}
This command allows you to lock a script such that it can only
be run from one location at a time. The lock can be held for
the lifetime of the calling process, or it can be released by
calling the unlock command.
Examples of lock qualifiers:
wait -> wait until the lock is available
Examples:
lock "my lock name"
Related commands:
unlock
-------------------------------------------------------------------------------
unlock : unlock a script
unlock {lock string}
This command allows you to unlock a script that was locked by
an earlier lock command. Of course, the lock name used in the
unlock command must be the same one used in the lock command.
Examples:
unlock "my lock name"
Related commands:
lock
-------------------------------------------------------------------------------
while : execute simple while loop
while {logical expression}
If the value on the left hand side of the expression is the basic
status of a device, the comparators to use are "is" or "isnot",
and the right hand side expression can be a basic status string.
Any valid ACL expression can be used in this statement. To see a
more complete description of expressions, see the help for the
assignment command.
Examples of comparators:
= or eq -> is equal
!= or ne -> not equal
> or gt -> greater than
>= or ge -> greater than or equal to
< or lt -> less than
<= or le -> less than or equal to
is -> is in state (device status only)
isnot -> is not in state (device status only)
Examples of status strings (basic status):
on -> device is on
off -> device is off
ready -> device is ready
tripped -> device is tripped
remote -> device is in remote
local -> device is in local
positive -> device's polarity is positive
negative -> device's polarity is negative
ramp(ing) -> device is in ramp mode
dc -> device is in DC mode
enabled -> device is enabled (cryo devices only)
disabled -> device is disabled (cryo devices only)
active -> device is active (cryo devices only)
inactive -> device is inactive (cryo devices only)
defined -> device is defined (cryo devices only)
undefined -> device is undefined (cryo devices only)
Examples of status strings (analog alarm and digital alarm):
bypassed -> alarm is bypassed
good -> device is not in alarm
alarming -> device is alarming
Examples:
while m:outtmp > 80
wait/milliseconds 66
endwhile
while forever # infinite loop
endwhile
Related commands:
endwhile, exitloop, break, continue, do_while, end_do_while,
loop, endloop, assignment, device_list
-------------------------------------------------------------------------------
endwhile : end a simple while loop
endwhile
This command marks the end of a while loop.
Examples:
(see while command)
Related commands:
while, exitloop, break, continue, do_while, end_do_while, loop, endloop
-------------------------------------------------------------------------------
do_while : begin a do/while loop
do_while
This command marks the beginning of a do/while loop.
Examples:
(see end_do_while command)
Related commands:
end_do_while, while, endwhile, exitloop, break, continue, loop, endloop
-------------------------------------------------------------------------------
end_do_while : end a do/while loop
end_do_while {logical expression}
This is the statement that ends a do/while loop. It evaluates
a logical expression, and if that expression has a value of true,
it loops back to the most recent do_while statement. Otherwise,
it continues with the next statement. Any valid ACL expression
can be used in this statement. To see a more complete description
of expressions, see the help for the assignment command.
Examples of comparators:
= or eq -> is equal
!= or ne -> not equal
> or gt -> greater than
>= or ge -> greater than or equal to
< or lt -> less than
<= or le -> less than or equal to
is -> is in state (device status only)
isnot -> is not in state (device status only)
Examples of status strings (basic status):
on -> device is on
off -> device is off
ready -> device is ready
tripped -> device is tripped
remote -> device is in remote
local -> device is in local
positive -> device's polarity is positive
negative -> device's polarity is negative
ramp(ing) -> device is in ramp mode
dc -> device is in DC mode
enabled -> device is enabled (cryo devices only)
disabled -> device is disabled (cryo devices only)
active -> device is active (cryo devices only)
inactive -> device is inactive (cryo devices only)
defined -> device is defined (cryo devices only)
undefined -> device is undefined (cryo devices only)
Examples of status strings (analog alarm and digital alarm):
bypassed -> alarm is bypassed
good -> device is not in alarm
alarming -> device is alarming
Examples:
do_while
{loop body}
end_do_while (z:acltst is on)
do_while
{loop body}
end_do_while (m:outtmp > 60)
Synonyms: endDoWhile
Related commands:
do_while, while, endwhile, exitloop, break, continue, loop,
endloop, assignment, device_list
-------------------------------------------------------------------------------
ftd : establish an FTD for future data requests
ftd {FTD string}
The Frequency Time Descriptor (FTD) established by this call
remains in effect until another data_event or 'ftd' command is
encountered. Individual commands can override the information
established by this command for that individual command only.
Examples:
ftd 1 hz # 1 Hz request
ftd 1_shot # one shot
ftd evt 02 # read on event 02
ftd dbdflt # use default FTD
Related commands:
data_event, data_source, read
-------------------------------------------------------------------------------
data_event : establish a data event for future data requests
data_event {data event string}
The data event established by this call remains in effect until
another data_event or 'ftd' command is encountered. Individual
commands can override the information established by this command
for that individual command only.
Examples:
data_event p,1000,true # 1 Hz request
data_event i # one shot
data_event e,02,h,0 # read on event 02
Synonyms: dataEvent
Related commands:
ftd, data_source, read
-------------------------------------------------------------------------------
data_source : establish a data source for future data requests
data_source {type}:{arg1}:{arg2}:{arg3}:{arg4}
There are six data sources defined by ACL: accelerator, database,
save/restore, SDA, data logger (Lumberjack), and memory.
Type Syntax
---- ------
accelerator dp
database db
save/restore sr:{file number}
SDA sda:{file number}:{case}[:{subcase}:{usage}]
data logger dl:{start date}[:{node}:{accuracy in seconds}]
memory memory[:{pool_name or pool_id}]
snap manager snpmgr:{system}:{date or record}
(Note: Arguments enclosed in square brackets are optional.)
The data source established by this call remains in effect until
another data_source command is encountered. It does not affect
any setting commands. Individual commands can override the
information established by this command for that individual
command only.
Examples:
data_source dp # default data source
data_source db
data_source sr:1
data_source sda:9158:"Inject Protons":1:ColliderShot
data_source dl:"01-Jan-2000 00:00":fastest:3600
data_source memory
Synonyms: source, dataSource
Related commands:
data_event, ftd, read
-------------------------------------------------------------------------------
device_arg : specify a description and/or default value for a device
argument
device_arg {arg_num} [descr={description}] [default={default_value}]
This command allows the writer of a script to define a description
string and/or a default value string for a device argument. The
description can be used as a prompt for the user to enter a value
for the string. The default value can also be used in a user
dialog and can even be used if the caller does not specify a value
for the corresponding device argument. Argument numbers for this
comand start at zero. Argument descriptions can be supplied for
none, some, or all of the device arguments to a script.
(Note: Arguments enclosed in square brackets are optional.)
Examples:
device_arg 0 descr="Enter device value" default="z:acltst"
Synonyms: deviceArg
Related commands:
string_arg
-------------------------------------------------------------------------------
string_arg : specify a description and/or default value for a string
argument
string_arg {arg_num} [descr={description}] [default={default_value}]
This command allows the writer of a script to define a description
string and/or a default value string for a string argument. The
description can be used as a prompt for the user to enter a value
for the string. The default value can also be used in a user
dialog and can even be used if the caller does not specify a value
for the corresponding string argument. Argument numbers for this
comand start at zero. Argument descriptions can be supplied for
none, some, or all of the string arguments to a script.
(Note: Arguments enclosed in square brackets are optional.)
Examples:
string_arg 0 descr="Enter string value" default="z:acltst"
Synonyms: stringArg
Related commands:
device_arg
-------------------------------------------------------------------------------
input : define a data input
input[/type={type}][/data_type={type}] {handle} {input_specifier}
An input statement specifies the source for future data. This
input can be referenced in future commands by placing the handle
string between angle braces (<{handle}>). Data can be input from
ASCII files, binary files, SQL database queries, or by the user.
When using a database query, you can optionally specify the
server and database by separating the components with colon(s)
("[{server}:{database}:]{SQL string}"). Assignment statements can
support reading multiple values from an input through the use of
array notation. Accessing an input value in an assignment command
will set the end of file ($_eof) symbol to a value of 1 if an end
of file error occurs or 0 otherwise.
Examples of input qualifiers:
user -> input from the user
stdin -> input from the user
sql -> input from a database query
file -> input from an ASCII file (default)
binary -> input from a binary file
pipe -> input from a pipe
fshare -> input from a Filesharing file
environment_variable -> input from an environment variable
appds -> input from an APPDS table
float -> input float values
double -> input double precision float values
integer -> input integer (long) values
unsigned_integer -> input unsigned integer values
long_long -> input long long integer values
unsigned_long_long -> input unsigned long long integer values
boolean (logical) -> input boolean/logical values
date -> input date values
string -> input string values
string={input length} -> input string values and set the
input field length
compound_string -> input compound (including spaces)
string values
compound_string={length} -> input compound string values and set the
input field length
file_name -> input a file name from the user
acknowledge -> pause the script and wait for a user
acknowledgment
record={record value} -> input record number
(only used for binary and Filesharing files)
record_size={size} -> input record size
(only used for binary files)
values_per_row={num} -> number of values per row
(only used for SQL input)
default={default value} -> default value (only for user input)
minimum={minimum value} -> minimum value (only for user input)
maximum={maximum value} -> maximum value (only for user input)
env={environment string} -> environment string (This is the file search
string for file name user input.)
modify -> change the input string for an existing
input
close -> close the associated input stream
suppress_eof_error -> suppresses end of file errors by returning
success if one occurs ($_eof symbol is set)
enum_strings={variable} -> specifies enumerated strings for user input
enum_values={value(s)} -> specifies enumerated values for user input
(The default is 1 to n. If a single value
is passed, that will specify the base
enumerated value.)
num_enum_values={value} -> specifies the number of enumerated values
for user input
Examples:
input xxx myfile.txt # input from ASCII file
value = <xxx> # read in one float value
input/sql xxx "ADBS:appdb:exec annala.getc49" # read from database
declare values float[21]
values[] = <xxx>
loop 21 counter
print "Values[" counter "] = " values[counter]
endloop
input/user/default=42 xxx "Enter value" # have user enter value
value = <xxx> + 16
input/close xxx # close input handle "xxx"
input/environment_variable xxx PATH
Related commands:
assignment
-------------------------------------------------------------------------------
output : set the output for future commands
output[/{qualifier}] [{spec}]
An output statement specifies the output destination for future
commands. Commands affected include: read, show, list, print,
and many others. If an individual command specifies an output,
that output will be used (for that command only) rather than the
one specified by the most recent output command. The default
output is to the screen. Output to files and database tables
is normally closed when the ACL script ends. An optional qualifier
can change this behavior so that the output remains open until
another output command is executed or the calling program terminates.
Examples of output qualifiers:
close -> close the current output
keep_open -> keep this output open until the calling
program exits
outter -> remains the default output for scripts
run by the present script
subject={subject} -> specifies the subject line for mail messages
Examples of output specifications:
default -> output to the screen (default)
stdout -> output to the screen (default)
stderr -> output to standard error
mail:{user name} -> send mail to a user
file:{file name} -> send output to a text file
fileAppend:{file name} -> send output to a text file (append mode)
binary:{file_name} -> send output to a binary file
binaryOverwrite:{file} -> send output to a binary file
without truncating the file
pipe:{pipe name} -> send output to a pipe
variable:{variable name} -> send output to a variable
symbol:{symbol name} -> send output to a symbol
sharedLog:{log name} -> send output to a shared/program log file
consoleLog[:{console}] -> send output to a console log file
textDevice:{device} -> send output to a device
textDevice:{device}:0 -> send output to a device and
announce any updates with V:ACLO0
pasteBuffer[:{console}] -> send output to a console paste buffer
Examples:
output file:myfile.txt
output myfile.txt
output/keep_open myfile.txt # keep file open when script ends
output mail:myname@fnal.gov
output stdout
output symbol:$symbol1
output $symbol1
output variable:variable1
output sharedLog:testalog
output consoleLog # output to the console log
output textDevice:G:ACLOUT # output to device G:ACLOUT
output textDevice:G:ACLOUT:0 # output to a device with state update
output pasteBuffer # output to the console paste buffer
output/close # close current output
Related commands:
print, output_value, mail, read, show, list
-------------------------------------------------------------------------------
output_value : send a value to a selected output
output_value[/{qualifier}] {value}
This command will output values to a specified output. Output can
be either treated as binary devices (default) or text devices.
This is primarily used to output binary values since text values
can be handled by the print command.
Examples of output_value qualifiers:
text -> treat as a text output
(default is binary)
data={data} -> simple data to write
data_type={data type} -> desired data type for binary data
num_bytes={num bytes} -> number of bytes to write to a
binary file
structure={name} -> output structure name
values={{type}={value},...} -> output structure specification
values={{value1},{value2},...} -> output structure specification
(predefined generic structure)
values={{field}={value},...} -> output structure specification
(predefined generic structure)
values={{field num}={value},...}-> write structure specification
(APPDS table)
fill={fill method} -> can be used with a named structure
to initialize the write buffer
from the structure default values
file -> read structure information from
a file
no_newlines -> suppress new line characters
(text mode only)
ieee_to_dec -> convert IEEE floats to DEC
dec_to_ieee -> convert DEC floats to IEEE
byte_swap -> swap the setting bytes on word
boundaries
word_swap -> swap the setting words on longword
boundaries
verbose -> display verbose output
output={spec} -> specify output destination
output_index={index} -> specify output index
(for variable output)
Examples:
declare values integer[4] = 1, 2, 3, 4
output_value values[] # output binary data
Synonyms: outputValue
Related commands:
output, print, mail
-------------------------------------------------------------------------------
version : display the version of ACL that is being run
version[/output={spec}]
This command simply outputs a string describing the version of
ACL which is being executed.
Examples of version qualifiers:
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
version
version/output=mail:hendricks
Related commands:
none
-------------------------------------------------------------------------------
acnet_request : send an ACNET request
acnet_request/node={node}/process={name}/request_data={{type}={value},...}[/qualifier]
This command sends an ACNET request to a specified node and process.
The request can be a simple USM (no reply requested) or can receive
a reply. The request buffer can be specified as a series of tag/value
pairs separated by commas where the tag specifies the data type of
its accompanying value. Reply buffers can be specified by a series
data type strings separated by commas or by a named generic structure.
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of acnet_request qualifiers:
node={node} -> ACNET node to send request to
process={name} -> ACNET process to send request to
request={type}={value},... -> request buffer specification
string -> request is a simple string
null_terminate -> null terminate the request
reply_data={type},... -> reply buffer specification
reply_length={length} -> reply buffer length
reply_struct={struct} -> specify named reply structure
string_reply -> reply is a simple string
reply_value={variable} -> specify a variable to return
the reply value
reply_length_value={variable} -> specify a variable to return
the length of the reply in bytes
no_display -> don't display the reply
swap_bytes -> swap bytes in the request and reply
swap_words -> swap words in the request and reply
ieee_to_dec -> convert between IEEE and DEC floating
point formats
allow_truncated -> allow replies that are smaller than
what was requested with the
missing bytes set to zero
timeout={seconds} -> ACNET timeout
usm|no_reply -> specify a USM (no reply)
(default is nonUSM)
output={spec} -> specify output destination
Examples:
acnet_request/node=cns34/process=sf1082\
/request="{string='a1refrig',int=0,int=4,int=3*0,string=' ',\
string=' ',int=7*0}"\
/reply_data="{int,string6,string8,2*int}"
Synonyms: acnetRequest
Related commands:
tcp_request
-------------------------------------------------------------------------------
alarm_log : display alarm history log
alarm_log[/start={date}/end={date}/device={string}/text={string}/analog/digital][/output={spec}]
This command simply reads and displays entries from the alarm
history log. You can search the log by device strings and
message strings. You can also search by source node and
alarm priority. In addition, by using the "max_count" qualifier
you can display the most frequently occurring alarms.
Examples of alarm_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
device={string} -> matching device string (*)
text={string} -> matching text string (*)
node={node} -> alarm source node (*)
priority={n} -> matching alarm priority (+)
analog -> return analog alarm messages only
digital -> return digital alarm messages only
count_only -> message count
max_entries={n} -> maximum number of entries to display
max_count={n} -> return the "n" most frequently alarming
devices along with their alarm counts
show_value -> display the device values
scaled -> display scaled device values
raw -> display raw device values
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier,
+ -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier and that additionally a less than
search can be performed by adding a suffix of "_lt" and a
greater than search can be performed by adding a suffix
of "_gt". (Less than or equal to (_le) and greater than or
equal to (_ge) searches are also supported.))
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
alarm_log/start=today
alarm_log/start=16-sep-2001/end="16-sep-2001 00:10"/output=mail:hendricks
alarm_log/start=today/analog/count_only
alarm_log/start=today/device=%out%
alarm_log/start=today/text=%high%
alarm_log/start=today/max_count=10/output=mail:hendricks
alarm_log/start=today/device=b:mp02/value
Synonyms: alarms, alarmLog
Related commands:
error_log, setting_log, event_log, state_log, audit_log, alarm_info,
alarm_limit, nominal_mask
-------------------------------------------------------------------------------
audit_log : query the ACNET device audit log
audit_log[/{qualifier}] [{device}]
This command simply reads and displays entries from the ACNET
device edit history log. You can search the log by device strings,
properties, field names, and much more.
Examples of audit_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
timeout={seconds} -> database timeout in seconds
property={property} -> matching device property (*)
{property} -> matching device property (*)
props={p1,p2,p3} -> matching list of properties (*)
alarms -> matching alarm property (*)
user_name={name} -> matching user name (*)
field={field} -> matching modified field (*)
previous_value={val} -> matching previous value (*)
device_node={node} -> matching a given source node (*)
count_only -> return matching entry count
max_entries={n} -> maximum number of entries to display
verbose -> display verbose output
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
audit_log/start=today
audit_log/start=16-sep-2010/end="16-sep-2010 00:10"/output=mail:hendricks
audit_log/start=today/count_only
audit_log/interval=1hr g:% # list G: devices in last hour
Synonyms: auditLog, deviceEditHistory
Related commands:
error_log, setting_log, alarm_log, event_log, state_log, cpld_log,
downtime_log
-------------------------------------------------------------------------------
beam_switch : read the status of a beam switch
beam_switch[/{qualifier}[={value}]] {switch} [on/off]
This command supports reading or setting of software beam
switches. In reading mode, this command updates $_value
with a value of 0 if the switch is off or a value of 1 if
the switch is on. Use of this command may require special
privileges. See Brian Hendricks (hendricks@fnal.gov) for
more information.
Examples of beam_switch qualifiers:
value={variable} -> reads the current state of the switch
into the requested variable
(0 -> off, 1 -> on)
noset -> don't actually send the command
verbose -> display verbose output
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
binary:{file_name} -> send output to a binary file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
beam_switch pbar # read the Pbar beam switch state
Synonyms: beamSwitch
Related commands:
none
-------------------------------------------------------------------------------
blm_data : retrieves BLM loss information
blm_data[/{qualifier}] {machine} [{frame type}] [{frame number}] [{num frames}]
This command supports reading BLM loss values for an entire machine.
Examples of blm_data qualifiers:
file={file number} -> specify a file number to read from
file_name={file name} -> specify the master file name to read from
difference={file num} -> file number of data to subtract from
current data or another file
diff_file_name={name} -> specify the difference master file name
frame={frame number} -> specify starting frame number
(default is 0)
num_frames={num frames} -> specify number of frames to read
(default is 1)
readout_spec={val1:...} -> readout specification values
num_blms={var} -> returns number of BLMs
names={var} -> returns BLM names
losses={var} -> returns BLM loss values
loss_status={var} -> returns BLM loss status
timestamps={var} -> returns timestamps for when data was taken
nanoseconds={var} -> returns nanoseconds after the timestamp
when data was taken
time_in_cycle={var} -> returns time in cycle when data was taken
verbose -> display verbose output
Examples:
blm_data/losses=losses mi8 flash # read MI-8 line flash frame
Synonyms: blmData
Related commands:
blm_frame_data, bpm_data, bpm_frame_data
-------------------------------------------------------------------------------
blm_frame_data : retrieves BLM loss information for a single detector
blm_frame_data[/{qualifier}] {machine} {detector} [{frame type}]
[{frame number}] [{num frames}]
This command supports reading BLM loss values for a single detector
over one or more frames.
Examples of blm_frame_data qualifiers:
file={file number} -> specify a file number to read from
file_name={file name} -> specify the master file name to read from
difference={file num} -> file number of data to subtract from
current data or another file
diff_file_name={name} -> specify the difference master file name
frame={frame number} -> specify starting frame number
(default is 0)
num_frames={num frames} -> specify number of frames to read
(default is 1)
readout_spec={val1:...} -> readout specification values
loss={var} -> returns BLM losses
loss_status={var} -> returns BLM loss status
timestamps={var} -> returns timestamps for when data was taken
nanoseconds={var} -> returns nanoseconds after the timestamp
when data was taken
verbose -> display verbose output
Examples:
blm_frame_data/loss=loss tevatron t:lme11 profile 0 5 # read Tev profile
Synonyms: blmFrameData
Related commands:
blm_data, bpm_data, bpm_frame_data
-------------------------------------------------------------------------------
bpm_data : retrieves BPM position and intensity information
bpm_data[/{qualifier}] {machine} [{frame type}] [{frame number}] [{num frames}]
This command supports reading BPM position and intensity
values for an entire machine.
Supported machine values:
400Mev
booster
mi8Line
mainInjector
mainInjectorDevelopment
miAbort
recycler
recyclerDevelopment
recyclerAbort
r20Line
r30Line
ap1Line
ap1LineDevelopment
ap2Line
ap3Line
tev[atron]
tevatronDevelopment
p1Line
p2Line
p3Line
a1Line
miniboone
electronCooling
electronCoolingDevelopment
Supported frame type values:
flash -> flash frame data
display -> display frame data
snapshot -> snapshot frame data
profile -> profile frame data
dfg -> closed orbit at DFG breakpoint (Booster only)
averaged -> averaged data frame (MI8 line only)
calibration -> calibration frame data (Main Injector only)
rms -> RMS frame data (Recycler only)
backgroundFlash -> background flash frame data (Recycler only)
injection -> injection frame data (Tevatron only)
slowSnapshot -> slow snapshot frame data (Tevatron only)
userFrame -> user frame data (Tevatron only)
Examples of bpm_data qualifiers:
file={file number} -> specify a file number to read from
file_name={file name} -> specify the master file name to read from
difference={file num} -> file number of data to subtract from
current data or another file
diff_file_name={name} -> specify the difference master file name
frame={frame number} -> specify starting frame number
(default is 0)
num_frames={num frames} -> specify number of frames to read
(default is 1)
readout_spec={val1:...} -> readout specification values
{{particleType},{calibrate},{tbtType}} (Tevatron)
{{state},{calibrate},{tbtType},{buffer}} (Main Injector)
num_frames_returned={var}->returns number of frames returned
num_horz_bpms={var} -> returns number of horizontal BPMs
num_vert_bpms={var} -> returns number of vertical BPMs
horz_names={var} -> returns horizontal BPM names
vert_names={var} -> returns vertical BPM names
horz_pos={var} -> returns horizontal BPM positions
horz_pos_status={var} -> returns horizontal BPM position status
vert_pos={var} -> returns vertical BPM positions
vert_pos_status={var} -> returns vertical BPM position status
num_horz_ints={var} -> returns number of horizontal intensities
num_vert_ints={var} -> returns number of vertical intensities
horz_int_names={var} -> returns horizontal BPM intensity names
vert_int_names={var} -> returns vertical BPM intensity names
horz_int={var} -> returns horizontal BPM intensities
horz_int_status={var} -> returns horizontal BPM intensity status
vert_int={var} -> returns vertical BPM intensities
vert_int_status={var} -> returns vertical BPM intensity status
timestamps={var} -> returns timestamps for when data was taken
nanoseconds={var} -> returns nanoseconds after the timestamp
when data was taken
time_in_cycle={var} -> returns time in cycle when data was taken
verbose -> display verbose output
Examples:
bpm_data/horz_pos=hpos/vert_pos=vpos mi profile 0 # read MI profile 0
Synonyms: bpmData
Related commands:
bpm_frame_data, blm_data, blm_frame_data
-------------------------------------------------------------------------------
bpm_frame_data : retrieves BPM position and intensity information
for a single detector
bpm_frame_data[/{qualifier}] {machine} {detector} [{frame type}]
[{frame number}] [{num frames}]
This command supports reading BPM position and intensity
values for a single detector over one or more frames.
Supported machine values:
booster (turn by turn only)
mainInjector
mainInjectorDevelopment
mainInjectorBlt (turn by turn only)
recycler (turn by turn only)
recyclerDevelopment (turn by turn only)
recyclerBlt (turn by turn only)
tev[atron]
tevatronDevelopment
Supported frame type values:
tbt -> turn by turn data
snapshot -> snapshot frame data
profile -> profile frame data
slowSnapshot -> slow snapshot frame data (Tevatron only)
userFrame -> user frame data (Tevatron only)
Examples of bpm_frame_data qualifiers:
file={file number} -> specify a file number to read from
file_name={file name} -> specify the master file name to read from
difference={file num} -> file number of data to subtract from
current data or another file
diff_file_name={name} -> specify the difference master file name
frame={frame number} -> specify starting frame number
(default is 0)
num_frames={num frames} -> specify number of frames to read
(default is 1)
readout_spec={val1:...} -> readout specification values
{{particleType},{calibrate},{tbtType}} (Tevatron)
{{state},{calibrate},{tbtType},{buffer}} (Main Injector)
num_frames_returned={var}->returns number of values returned
pos={var} -> returns BPM positions
pos_status={var} -> returns BPM position status
int={var} -> returns BPM intensities
int_status={var} -> returns BPM intensity status
timestamps={var} -> returns timestamps for when data was taken
nanoseconds={var} -> returns nanoseconds after the timestamp
when data was taken
verbose -> display verbose output
Examples:
bpm_frame_data/pos=pos tevatron t:hpe11 profile 0 5 # read Tev profile
Synonyms: bpmFrameData
Related commands:
bpm_data, blm_data, blm_frame_data
-------------------------------------------------------------------------------
call_proc : execute a non-ACL procedure
call_proc[/shared={shared image}] {procedure name|index}
This command executes a non-ACL procedure. If this is a procedure
from the calling program, its address must be passed in the call to
'acl_execute_c'. In this case, it can be referenced either by its
name or its index in the list of passed procedures. An argument
can also be passed to this procedure. If the procedure is in a
shared image, the reference must be by name and the name of the
shared image must be specified.
Examples of call_proc qualifiers:
shared={shared image} -> call procedure in a shared image
Examples:
call_proc my_procedure
Synonyms: callProc
Related commands:
none
-------------------------------------------------------------------------------
ch13_message : display the current channel 13 message
ch13_message[/type={message_type}][/output={spec}]
This command simply displays the current channel 13 message
and displays it. It can also display a set of Sequencer
messages, and it can even send new messages.
Examples of ch13_message qualifiers:
main -> main channel 13 message (default)
sequencer -> last Sequencer message
type={message type} -> message type to retrieve
(main, sequencer, notify_send)
(default is "main")
start={date} -> starting date (Sequencer messages only)
end={date} -> ending date (Sequencer messages only)
text={string} -> matching text string (Sequencer messages only)
count_only -> message count (Sequencer messages only)
max_entries={n} -> maximum number of entries to display
(Sequencer messages only)
message={message} -> message string to be sent
name={name} -> name of message to be sent
(default is "Store {T:STORE}")
category={category} -> category of message to be sent
(Linac, Booster, MainInjector, Tevatron,
AntiProton, Recycler, Switchyard, Store,
"Accelerator Messages", "Site Messages",
"tmpAccelerator Messages")
(default is "Accelerator Messages")
priority={priority} -> priority of message to be sent
(low, normal, exception, announcement)
(default is "normal")
convert -> convert embedded device and variable
values in the message and name strings
no_set -> suppress actual sending the message
verbose -> verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
ch13_message
ch13_message/output=mail:hendricks
ch13_message/type=main
ch13_message/type=sequencer/start=today
Synonyms: ch13, channel13, ch13Message
Related commands:
none
-------------------------------------------------------------------------------
clib_info : display CLIB information
clib_info[/{qualifier}][/output={spec}] [{routine name}]
This command displays CLIB information including
type and date of the currently running CLIB. If a
CLIB routine name is supplied, it will output help
for that routine.
Examples of clib_info qualifiers:
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
clib_info
clib_info dio_set_dev_c
Synonyms: clibInfo
Related commands:
library_info, program_info
-------------------------------------------------------------------------------
comment_char : disable a comment character
comment_char [/qualifier] [is/=] [not] {comment character}
This command allows the writer of a script to disable one of the
predefined ACL comment characters for the parsing of the present
script. By default, both the exclamation point (!) and the pound
(#) characters are treated as end of line comment characters unless
they are found in a quoted string. There are cases where it would
be convenient to disable one of these characters, and this is the
way to do it. After the script has been parsed, the disabled
comment character is reenabled for the next script.
Examples of comment_char qualifiers:
not -> negates the sense of the command
Examples:
comment_char is not '!' # disable the '!' comment character
comment_char = '#' # disable the '!' comment character
comment_char is '#' # disable the '!' comment character
Synonyms: commentChar
Related commands:
acl_option
-------------------------------------------------------------------------------
console_info : display console information
console_info[/{qualifier}][/output={spec}] {console|console list}
This command simply displays console information including
the list of currently running applications.
Examples of console_info qualifiers:
user_name -> search for a matching user name
location -> search for a matching location
server -> search for a matching server
phone -> search for a matching phone number
console_class -> search for a matching console class
program -> search for a matching program
exact -> search only for exact matches
inactive -> include nonrunning consoles
(default is running consoles only)
suppress_errors -> suppress the error if a nonexistent
console is requested
pool_log -> display today's console pool log
pool_log={day spec} -> display the console pool history for
a given day or the cummulative history
for a number of days
pool[_status] -> display the current status of the
console pool
overall[_status] -> display the overall number of consoles
and running applications
[window_]titles -> display the window titles for a console
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
console_info 1
console_info cns1
console_info/user hendricks
console_info/server minos
console_info/phone 2448
console_info/titles 1
console_info/pool
console_info/pool_log
console_info/pool_log=yesterday
console_info/pool_log=2_days_ago
console_info/pool_log=last_2_days
console_info user=console/and/class=MCRCrewChief
loop 10 console=1
console_info/suppress_errors console
endloop
Synonyms: cns_info, cnsInfo, consoleInfo
Related commands:
node_info, program_info, user_info, event_info, mdat_info, cpld_log
-------------------------------------------------------------------------------
console_log : display console log entries
console_log[/start={date}/end={date}/search={string}] [{console}] [{slot}]
This command simply reads and displays console log entries.
You can search the log by entry text.
Examples of console_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
console={number} -> console number (default is caller's console)
slot={slot} -> console slot (default is caller's slot)
search={string} -> matching text string (*)
count_only -> message count only
max_entries={n} -> maximum number of entries to display
last={n} -> display the last n entries
last -> display the last entry
asc[ending] -> display in time ascending order (default)
desc[ending] -> display in time descending order
messages={var} -> returns the matching log messages
dates={var} -> returns the matching log message dates
num_messages={var} -> returns the number of matching log messages
verbose -> display verbose output
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
console_log/start=today 134 PA
console_log/start=16-sep-2001/end="16-sep-2001 00:10"/output=mail:hendricks 134 PA
console_log/start=today/count_only 134 PA
console_log/start=today/search=high 134 PA
Synonyms: consoleLog
Related commands:
program_log, cpld_log
-------------------------------------------------------------------------------
cpld_log : display CPLD program log entries
cpld_log[/qualifier/start={date}/end={date}/program={pgm}/page={page}]
This command simply reads and displays entries from the CPLD
program log. You can search the log by program strings, page strings,
user strings, console numbers, slots, termination status and console
type. Please, note that CPLD logs are only updated once a day. So,
you typically cannot view CPLD log data for the present day.
Examples of cpld_log qualifiers:
start={date} -> starting date
end={date} -> ending date (default is now)
interval={time_spec} -> set end date to interval after the start time
timeout={seconds} -> database timeout in seconds
program={program} -> matching program name (*)
index_page={page} -> matching index page name (*)
user={user_name} -> matching user name (*)
console={console_num} -> matching console number (*)
slot={slot} -> matching console slot (*)
duration={time_spec} -> matching program duration (+)
normal_exit -> show programs with a normal exit
user_abort -> show programs aborted by a user
program_crash -> show programs which crashed
count_only -> execution count
max_entries={n} -> maximum number of entries to display
show_end_time -> display the program end times instead
of the program exit type
sort={sort type} -> sort the log entries in a particular order
(asc[ending], desc[ending])
verbose -> display verbose output
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier,
+ -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier and that additionally a less than
search can be performed by adding a suffix of "_lt" and a
greater than search can be performed by adding a suffix
of "_gt". (Less than or equal to (_le) and greater than or
equal to (_ge) searches are also supported.))
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
cpld_log/start=yesterday
cpld_log/start=yesterday pa0052
cpld_log/start=yesterday m4
cpld_log/start=16-sep-2004/end="16-sep-2004 00:10"/output=mail:hendricks
cpld_log/start=yesterday/count_only
Synonyms: cpldLog
Related commands:
program_info, console_info, program_log, setting_log, alarm_log,
event_log, state_log
-------------------------------------------------------------------------------
crate : access CAMAC crate information
crate[/{qualifier}] {node} {crate} [{retries}]
This command will access information about individual CAMAC crates.
Examples of crate qualifiers:
node={node} -> specify CAMAC node
crate={crate} -> specify CAMAC crate
retries={retries_value} -> specify CAMAC no-Q retries value
format={decimal|hex} -> specify data format (hex or decimal)
ids -> read the CAMAC module ID numbers
devices[={string}] -> read the devices in the crate
lam -> read the module LAM status values
hex -> interpret data as hexadecimal
dec[imal] -> interpret data as decimal
queue -> allows queueing up multiple commands to
send at the same time
verbose -> display verbose output
output -> specify output
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
crate/ids tev a1 # read module IDs
crate/devices tev a1 # read crate devices
crate/lam tev a1 # read module LAM status
Related commands:
slot, madc, camac
-------------------------------------------------------------------------------
database_info : returns database monitoring information
database_info[/{qualifier}] [{database}]
This command simply reads and displays database monitoring
information, primarily involving the existing connections.
You can search this information by user name, client name,
node name, command string, and status.
Examples of database_info qualifiers:
adbs -> read information for the ADBS server
bdbs -> read information for the BDBS server
match_user={user name} -> matching user name (*)
match_client={client} -> matching client name (*)
match_node={node} -> matching node name (*)
match_command={command} -> matching command string (*)
match_status={status} -> matching status string (*)
match_database={db} -> matching database name (*)
order_by={field} -> order output by a data field
(node, user_name, client_name,
database, command, status)
asc[ending] -> display in time ascending order (default)
desc[ending] -> display in time descending order
count_only -> return matching entry count
max_entries={n} -> maximum number of entries to display
num_values={variable} -> returns number of entries found
connectionsInUse={var} -> returns number of connections in use
remainConnections={var} -> returns number of remaining connections
values={variable} -> returns matching entries as text strings
user_names={variable} -> returns matching user name values
client_names={variable} -> returns matching client name values
nodes={variable} -> returns matching node values
commands={variable} -> returns matching command strings
status={variable} -> returns matching status strings
db_value={variable} -> returns matching database names
pids={variable} -> returns matching pid values
verbose -> display verbose output
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
database_info adbs
database_info/output=mail:hendricks adbs
database_info/count_only adbs
database_info/match_client=.*auto.* adbs
Synonyms: databaseInfo
Related commands:
node_info, program_info, user_info, event_info, mdat_info, cpld_log,
console_info
-------------------------------------------------------------------------------
dbset : set the database setting record for an ACNET device
dbset[/{qualifier}] {device}[[n]][/{qualifier...}] {constant|variable|symbol}
This command sets values in the device setting database only.
The constant value is either a numeric constant in the case
of the setting property or a basic control string in the case
of the basic control property. For the setting property,
multiple scaled or raw values can be supplied. If multiple
values are entered, they should be separated by spaces or
commas. Setting values can also be supplied in a delimited text
file. This command also supports an array index notation which
allows you to specify the beginning and ending array indices
(ex. set z:acltst[1:2]=13,3.5). This command also supports family
devices and list specifiers (see above). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of dbset qualifiers:
scaled (common) -> make a scaled (common) setting
raw -> make a raw setting
length=2 -> set 2 bytes of data
atomic_size -> set the atomic size for this property
maximum_size -> set the maximum size for this property
num_elements=4 -> set 4 values
num_values=4 -> set 4 values
all -> set all values for this property
all_elements -> set all values for this property
offset=0 -> set data starting at a byte offset of 0
index=2 -> set data starting at array index 2
array_index=2 -> set data starting at array index 2
(alarm_)minimum -> set the analog alarm minimum
(alarm_)maximum -> set the analog alarm maximum
min_max -> set the analog alarm minimum and maximum
analog_nominal -> set the analog alarm nominal
(alarm_)nominal -> set the digital alarm nominal
(alarm_)mask -> set the digital alarm mask
(alarm_)tries -> set the number of alarm tries
file -> read setting values from a file
(default file extension is ".dat")
family -> set an entire family
Examples of control strings:
reset -> reset device
on -> turn on device
off -> turn off device
positive -> set the device to positive polarity
negative -> set the device to negative polarity
ramp -> set the device to ramp mode
dc -> set the device to DC mode
Examples:
dbset z:acltst 5
dbset z:acltst $symbol1
dbset/raw z:acltst A9
dbset z:acltst=1,2,3,4
dbset/raw z:acltst[2] 3 4
dbset t:ha11 reset
dbset t:ha11 on
dbset/minimum m@outtmp 32 # set alarm minimum
dbset/maximum m@outtmp 100 # set alarm maximum
dbset z:acltst[1:2]=16,3.5
dbset z:acltst[]=0,16,3.5,11 # set an entire array
dbset z:acltst[2:3]=z:aclts3[1:2] # set multiple array elements
dbset z:acltst[2:3]=array[1] # set multiple array elements
dbset/family z:acltsz[1:2] = 16, 17.5 # set a family device
Synonyms: dbSet
Related commands:
set, read, enable, disable, bypass, activate, deactivate
turn, reset, toggle, alarm_limit, nominal_mask
fill, copy, decrement, increment, delta_set, device_list
-------------------------------------------------------------------------------
delete : delete cached database information or a file
delete[/{qualifier}] [{cache|device|devicelist|file}]
This command will delete cached database information and files.
If the word cache is used, all cached database information will
be deleted. If a device name is specified, only information for
that device will be deleted. If a file name is specified, that
file will be deleted.
Examples of delete qualifiers:
cache -> delete all cached database
information
device -> delete all cached database
information for a device or list
of devices
file -> delete a file
Examples:
delete cache # delete all cached database information
delete z:acltst # delete cached database info for Z:ACLTST
delete myfile.txt # delete a file
Related commands:
delete_cache
-------------------------------------------------------------------------------
downtime_log : display downtime log entries
downtime_log[/start={date}/end={date}/minimum_length={min}/text={string}] {accelerator|cdf} [/output={spec}]
This command simply reads and displays downtime log entries.
You can search the log by entry text, category/system, group,
and minimum length.
Examples of downtime_log qualifiers:
type={acc|cdf} -> choose downtime log to read from
acc -> read from accelerator downtime log (default)
cdf -> read from CDF downtime log
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
text={string} -> matching text string (*)
category={string} -> matching category string (*)
system{string} -> matching category string (*)
group={string} -> matching group string (*)
minimum_length={mins} -> minimum length in minutes
highlight_length={mins} -> highlight length in minutes
display_total -> display the total downtime length
order_by_length -> orders entries by length (default is by time)
order_by_group -> orders entries by group (default is by time)
count_only -> message count only
max_entries={n} -> maximum number of entries to display
max_time={n} -> return the "n" categories having
the most downtime accrued
list_categories={string}-> list matching category names
list_systems={string} -> list matching category names
list_groups={string} -> list matching group names
systems -> list all category/system names
groups -> list all group names
num_entries={var} -> returns number of matching downtime log
entries
strings={var} -> returns matching output strings
total={var} -> returns the total downtime in seconds
timestamps={var} -> returns matching timestamps
durations={var} -> returns matching durations in seconds
categories={var} -> returns matching category strings
entry_text={var} -> returns matching user entered text
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
downtime_log/start=today
downtime_log/start=16-sep-2001/end="16-sep-2001 00:10"/output=mail:hendricks
downtime_log/start=today/count_only
downtime_log/start=today/group=%con%
downtime_log/start=today/text=%high%
downtime_log/list_groups=%con%
downtime_log/list_categories=%rf%
Synonyms: downtime, downtimeLog
Related commands:
setting_log, alarm_log, cpld_log, event_log, state_log, program_log
-------------------------------------------------------------------------------
error_log : query the ACNET error log
error_log[/{qualifier}] [{device}] [{error}]
This command simply reads and displays entries from the ACNET error
history log. You can search the log by device strings, properties,
errors, programs, and much more. In addition, by using
the "max_count" qualifier you can display the most frequently set
devices.
Examples of error_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
timeout={seconds} -> database timeout in seconds
error={error} -> error code to match
facility={facility} -> error facility to match
device={string} -> matching device string (*)
property={property} -> matching device property (*)
{property} -> matching device property (*)
props={p1,p2,p3} -> matching list of properties (*)
alarms -> matching alarm property (*)
program={program} -> matching program receiving the error (*)
eitherProgram={program} -> matching program receiving the error (*)
node={node} -> matching node receiving the error (*)
eitherNode={node} -> matching node receiving the error (*)
device_node={node} -> matching a given source node (*)
device_type={type} -> matching a given device type (*)
error_class={class} -> matching error class (*)
error_set={set} -> matching error set (normal, BigSave, SDA) (*)
file={file_number} -> matching file number (BigSave or SDA only)
sda_usage={usage} -> matching SDA usage (used with error_set/file)
is_setting={true/false} -> matching error type
crate={crate} -> matching crate number (*)
slot={slot} -> matching slot number (*)
channel={channel} -> matching channel number (*)
count_only -> error count
max_entries={n} -> maximum number of entries to display
max_count={n} -> return the "n" devices most frequently
in error along with their error counts
fill_char='{character}' -> fill character for empty fields
(default is blank)
show_device_type -> include the device type in the output
show_device_node -> include the device node in the output
show_location -> include the device location in the output
show_first_task -> include the first task in the output
show_first_node -> include the first node in the output
show_first_time -> include the first time in the output
show_is_setting -> include the read/setting flag in the output
show_error_class -> include the error class in the output
verbose -> display verbose output
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
error_log/start=today
error_log/start=16-sep-2009/end="16-sep-2009 00:10"/output=mail:hendricks
error_log/start=today/count_only
error_log/interval=1hr camac_fe_noq # list noQ errors in last hour
error_log/interval=1hr m:out% # list device errors in last hour
error_log/start=today/device=%out%
error_log/start=today/max_count=10/output=mail:hendricks
error_log/start=today/device=b:mp02
error_log/file=945 # list errors from Big Save file 945
error_log/sda_usage=ColliderShot/file=7612 # list errors from SDA file 7612}}}
Synonyms: errorLog
Related commands:
setting_log, alarm_log, event_log, state_log, cpld_log, downtime_log
-------------------------------------------------------------------------------
error_text : display ACNET error text
error_text[/output={spec}] {constant|device|variable|symbol|query spec}
This command displays the verbose error text corresponding to
an ACNET error code. It can also be used to look up a list of
errors matching various specified characteristics.
Examples of error_text qualifiers:
acnet -> ACNET error (default)
system -> system error
rtl -> C Run Time Library (RTL) error
facility={facility} -> display all errors for a facility
name={string} -> display all errors whose ASCII names
match a search string
text={string} -> display all errors whose descriptions
match a search string
num_errors={variable} -> specify a variable to return the number
of errors processed
errors={variable} -> specify a variable to return the array
of error values processed
text_values={variable} -> specify a variable to return the array
of error text strings processed
verbose -> display verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
error_text 17 1
error_text/output=mail:hendricks DPM_PEND
error_text 273
error_text t:chrlst
error_text $symbol
error_text/name=PEND
error_text/verbose/num_errors=numErrors name=inv/text=device
Synonyms: errhelp, error_help, errorText
Related commands:
none
-------------------------------------------------------------------------------
event_info : display clock event information
event_info[/{qualifier}][/output={spec}] {event}
This command displays detailed information about a clock event.
Examples of event_info qualifiers:
tclk -> display TCLK event (default)
mibs -> display MIBS event
rrbs -> display RRBS event
tvbs -> display TVBS event
hins -> display HCLK (HINS) event
nml -> display NCLK (NML) event
event={value} -> specify event to return information for
clock_type={type} -> specify type of clock event from the
options above
name -> display the symbolic name of the event only
description -> display the description of the event only
time_since -> display the time since the event
last_time -> display the last time that the event occurred
suppress_errors -> suppress the error if a nonexistent
clock event is requested
name={value} -> search for events whose symbolic names match
a string
description={value} -> search for events whose descriptions match
a string
trigger_text={value} -> search for events whose trigger text match
a string
num_events={variable} -> specify a variable to return the number
of events processed
events={variable} -> specify a variable to return the array
of event values processed
values={variable} -> specify a variable to return data values
no_display -> suppress display of event information
(useful if using command to generate
an array of event values)
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
event_info 31
event_info/name=FLY
event_info name=mi%/and/descr=%ramp%
loop 10 event=0
event_info/suppress_errors event
endloop
Synonyms: evt_info, evtInfo, eventInfo
Related commands:
tlg_info, event_log, mdat_info, node_info, console_info, program_info,
user_info
-------------------------------------------------------------------------------
event_log : display event log entries
event_log[/start={date}/end={date}] {constant|variable|symbol}
This command reads and displays clock event history.
Examples of event_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
event={event} -> clock event to search for
tclk -> display TCLK event (default)
hins -> display HINS clock event
nml -> display NML clock event
time={value} -> matching time in the supercycle value
cond={condition_value} -> used in conjunction with the time
argument to determine which log entries
are displayed
nodisplay -> don't display the values, only errors
count[_only] -> only display the number of matching
log entries
max_entries={n} -> maximum number of entries to display
last -> used in conjunction with "max_entries"
to retrieve the last n matches
num_values={variable} -> returns the number of values read
values={array variable} -> returns the values read
timestamps={date array} -> returns the timestamps read
milliseconds={array} -> returns the fractional milliseconds
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
verbose -> generate verbose output
output={spec} -> specify output destination
The condition value strings are as follows:
all -> show all matches (default)
equal (eq) -> show entries that equal the requested
time value (default if value is requested)
not_equal (ne) -> show entries that do not equal the
requested time value
less_than (lt) -> show entries whose time value is less
than the requested time value
less_equal (le) -> show entries whose time value is less
than or equal to the requested time value
greater_than (gt) -> show entries whose time value is greater
than the requested time value
greater_equal (ge) -> show entries whose time value is greater
than or equal to the requested time value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
event_log/start=today 02
event_log/start=16-sep-2003/end="16-sep-2003 00:10"/output=mail:hendricks 02
event_log/start=today/time=10/cond=lt 02
event_log/start=today/max_count=10/output=mail:hendricks 02
Synonyms: eventLog
Related commands:
event_info, state_log, setting_log, alarm_log, downtime_log, cpld_log,
program_log
-------------------------------------------------------------------------------
fft : perform an FFT on a set of points
fft/{type}/npts={num_points}/y={variable}/real={variable}[/{qualifier}={value}...}]
This command performs an FFT on a set of points. The input values
must be supplied in an array of the same length as the output values.
Examples of fft qualifiers:
npts={value} -> specify the number of points
(required)
x={variable|symbol} -> array of X input values (optional)
y={variable|symbol} -> array of Y input values (required)
real={variable|symbol} -> array of output real values
(required)
imag={variable|symbol} -> array of output imaginary values
(optional)
amp={variable|symbol} -> array of output amplitude values
(optional)
num_values={variable|symbol} -> returned number of values (optional)
normalized -> return normalized discrete Fourier
transform
inverse -> return the inverse discrete Fourier
transform
xcut_min={value} -> X cut minimum value
xcut_max={value} -> X cut maximum value
ycut_min={value} -> Y cut minimum value
ycut_max={value} -> Y cut maximum value
verbose -> display calculated values
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
declare y float[8] = 4.8828,10.834,17.853,410.77,639.95,1539.8,1841.9
declare real float[8]
fft/npts=8/y=y/real=real/verbose
Related commands:
declare, fit, stats
-------------------------------------------------------------------------------
file_info : display flat file information
file_info[/{qualifier}] {file name string}
This command displays information about a flat file or
a list of files including programs that access them. This
request can also be qualified by a time window to only return
matching files last opened in that period of time.
Examples of file_info qualifiers:
obsolete -> display information for obsolete files
exact -> make an exact match to the file name provided
usage -> show program usage information
start={date} -> starting date (default is January 1, 1972)
end={date} -> ending date (default is now)
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
file_info '/usr/local/cbs_files/sequencer/acl/demo.acl'
file_info/usage '/usr/local/cbs_files/sequencer/acl/demo.acl'
Synonyms: fileInfo
Related commands:
fshare_info
-------------------------------------------------------------------------------
find_in_file : search for one or more strings in a file
find_in_file[/{qualifier}[={value}]] {file name} {search string}
This command will search for one or more strings in a file.
This command sets the $_value symbol to the matching status
(0 -> no match, 1 -> complete match, 2 -> partial match).
Examples of find_in_file qualifiers:
text -> treat as a text file (default)
web_page -> treat as a web page
acl_db_script -> treat as an ACL script from the
database repository
search={string} -> establish search string(s)
num_search_strings={val}-> establish the number of search strings
skip_blank_lines -> do not include blank lines in the output
text={variable} -> saves the matching lines of text
in a variable
line_numbers={variable} -> saves the line numbers in a variable
num_matches={variable} -> saves the match counts in a variable
match_status={variable} -> saves the match status in a variable
dynamic[_arrays] -> dynamically reallocate output data string
to match the number of matching strings
max_lines={n} -> maximum number of lines to read (text file)
offset={n} -> starting byte offset to read at
stream -> start reading where the previous call to
this command left off
head[={num_lines}] -> read only the first n lines (default is 10)
tail[={num_lines}] -> read only the last n lines (default is 10)
convert -> convert embedded device and variable
values in the file name string
trim -> trim leading and trailing blanks from each
line
dont_trim -> do not trim leading and trailing blanks from
each line (default)
retain_html_tags -> don't remove embedded HTML tags
remove_html_tags -> remove embedded HTML tags (default)
case_sensitive -> make a text file compare case sensitive
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
wildcard={char} -> set wildcard match character for a search
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in a regular expression
search
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in a regular
expression search
verbose -> display verbose output
output -> specify output
Examples:
find_in_file myfile.txt 'text'
find_in_file/head myfile.txt 'text'
find_in_file/tail=20 myfile.txt 'text'
declare searchStrings string[2] = 'text 1', 'text 2'
find_in_file/numSearchStrings=2 myfile.txt searchStrings
Synonyms: findInFile
Related commands:
read_file, read_dir
-------------------------------------------------------------------------------
find_program : find running instances of a program
find_program[/{qualifier}][/output={spec}] {program}
This command simply displays where instances of an application
program are presently running. This command sets the global symbol,
$_value, to the count of running instances found.
Examples of find_program qualifiers:
console={number} -> only display information for one console
slot={slot} -> only display information for one slot
count={variable} -> returned instance count
consoles={variable} -> returned console numbers
slots={variable} -> returned console slots
nodisplay -> don't display the results, only errors
verbose -> display verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
find_program pa0052
find_program/console=134 pa0052
find_program t39
find_program sa1002
Synonyms: find_process, find_pgm, findProgram
Related commands:
program_info, console_info, cpld_log, program_status, program_log
-------------------------------------------------------------------------------
fit : perform a polynomial, exponential, or Gaussian fit on a
set of points
fit/{type}/npts={num_points}/x={variable}/y={variable}[/{qualifier}={value}...}]
This command performs various types of mathematical fits to a
set of points. The X and Y values must be supplied in separate
arrays of the same length. Polynomial fits are presently
limited to sixth order.
Examples of fit types:
poly[nomial] -> up to sixth order polynomial fit
exp[onential] -> exponential fit
gaussian -> Gaussian fit
Examples of qualifiers:
npts={value} -> specify the number of points (required)
x={variable|symbol} -> array of X values to fit (required)
y={variable|symbol} -> array of Y values to fit (required)
order={value} -> order of fit (polynomial fit only)
coefficients={variable} -> returned coefficients
(polynomial and exponential fits)
mean={variable} -> returned mean value (Gaussian fit only)
sigma={variable} -> returned sigma value (Gaussian fit only)
amp={variable} -> returned amplitude value (Gaussian fit only)
chi_square={variable} -> returned chi square value
verbose -> display calculated values
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
declare x float[7] = 6.6978,8.8872,11.896,29.997,49.992,120,150
declare y float[7] = 4.8828,10.834,17.853,410.77,639.95,1539.8,1841.9
declare coeff float[4]
fit/poly/npts=7/x=x/y=y/order=3/coefficients=coeff/verbose
declare x float[7] = 6.6978,8.8872,11.896,29.997,49.992,120,150
declare y float[7] = 4.8828,10.834,17.853,410.77,639.95,1539.8,1841.9
declare coeff float[2]
fit/exp/npts=7/x=x/y=y/coefficients=coeff/verbose
declare x float[7] = 6.6978,8.8872,11.896,29.997,49.992,120,150
declare y float[7] = 4.8828,10.834,17.853,410.77,639.95,1539.8,1841.9
declare mean
declare sigma
declare amplitude
declare chi_square
fit/gaussian/npts=7/x=x/y=y/mean=mean/sigma=sigma/chisquare=chi_square\
/amp=amplitude/verbose
Related commands:
declare, fft, stats
-------------------------------------------------------------------------------
fshare_info : display Filesharing file information
fshare_info[/{qualifier}] {file name string}
This command displays information about a Filesharing file or
a list of files including programs that access them. This
request can also be qualified by a time window to only return
matching files last opened in that period of time.
Examples of fshare_info qualifiers:
obsolete -> display information for obsolete files
exact -> make an exact match to the file name provided
usage -> show program usage information
start={date} -> starting date (default is January 1, 1972)
end={date} -> ending date (default is now)
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
fshare_info controls_graphics:xxxxxxxx.dat
fshare_info/usage controls_graphics:xxxxxxxx.dat
Synonyms: fshareInfo
Related commands:
file_info
-------------------------------------------------------------------------------
ftp : copy a file or files using file transfer protocol (FTP)
ftp[/{qualifier}][/{qualifier}={value}] {host} [{command_file}]
This command copies files using file transfer protocol (FTP).
You can specify the operation with a complete command file
or you can specify source and destination files. With the
latter option, you can embed ACNET device values in the
destination file name by enclosing the device name in curly
braces (eg. file_{t:store}.dat).
Examples of ftp qualifiers:
binary -> perform a binary file transfer
ascii -> perform an ASCII file transfer
passive -> enable passive mode
get -> get a file
put -> put a file
host={host name} -> specify FTP host
command={file} -> specify file containing FTP commands
source_file={file} -> source file (file to be copied)
source_dir={directory} -> source file directory
(directory to be copied from)
dest_file={file} -> destination file
dest_dir={directory} -> destination file directory
user={user name} -> specify the user name for the
transfer (default is anonymous)
password={password} -> specify the password for the
transfer
no_send -> inhibit the actual transfer
verbose -> display transfer log file
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
ftp vsamcr ftp_commands.dat # use FTP command file
ftp/get/binary/source_dir=data\
/dest_dir="/usr/local/cbs_files/cns_write/tevatron/vsamcr"\
/source_file="wtrace3.dat"/dest_file="{t:store}_ramp.dat"/verbose vsamcr
Related commands:
none
-------------------------------------------------------------------------------
ftp_read : read ACNET device using the fast time plot protocol
ftp_read[/rate={rate}][/event={event}][/delay={secs}][/duration={secs}] {device|device list}[[n]]
This command reads and displays device readings acquired using
the fast time plot protocol. Data return frequencises of up to
1440 Hz can be requested. This command supports family devices
and list specifiers (see above).
Examples of ftp_read qualifiers:
rate={rate} -> data acquisition rate in Hz
event={event} -> event to trigger the beginning of acquisition
(If this is missing, acquisition will begin
immediately.)
delay={secs} -> delay from event (or immediate) in seconds
before beginning data acquisition
duration={secs} -> duration of data acquisition in seconds
device={device_name} -> device to display
src={data source spec} -> select the data source for the plot data
(only accelerator and SDA are supported)
(sda:{file number}:{case}[:{subcase}:{usage}])
data_event={event} -> specify collection data event of data to be
read (standard ftp data event format)
{scaling type} -> desired scaling type for the returned values
(raw, primary, scaled)
status_type={type} -> desired status type for status properties
(raw, status_text, bit_number, on_off,
ready_tripped, remote_local,
positive_negative, ramp_dc, bit_mask,
masked_value)
bit_number={value} -> bit number to test for status values
(starts at 1)
bit_mask={value} -> mask to apply to raw data to check for
a match
masked_value={value} -> mask to apply to raw data
value={value} -> matching value for condition handling
cond={condition_value} -> used in conjunction with the value
argument to determine which values
are displayed
count[_only] -> only display the number of values read
max_entries={n} -> maximum number of values to display
first -> used in conjunction with "max_entries"
to retrieve the first n matches (default)
last -> used in conjunction with "max_entries"
to retrieve the last n matches
family -> display values for an entire family
num_values={variable} -> returns the number of values read
values={array} -> returns the values read
timestamps={date_array} -> returns the timestamps read
sum={variable} -> returns the sum of all values read
minimum={variable} -> returns the minimum of all values read
maximum={variable} -> returns the maximum of all values read
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
usecs -> return timestamps in units of 100 usecs
diag -> turns on verbose diagnostics to try
to trouble shoot problems
no_display -> don't display (output) the returned values
verbose -> generate verbose output
output={spec} -> specify output destination
The condition value strings are as follows:
all -> show all matches (default)
equal (eq) -> show entries that equal the requested
value (default if value is requested)
not_equal (ne) -> show entries that do not equal the
requested value
less_than (lt) -> show entries whose value is less
than the requested value
less_equal (le) -> show entries whose value is less
than or equal to the requested value
greater_than (gt) -> show entries whose value is greater
than the requested value
greater_equal (ge) -> show entries whose value is greater
than or equal to the requested value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
ftp_read m:outtmp
ftp_read/event=2/delay=1/duration=1 m:outtmp
ftp_read/event=2/value=60/cond=lt m:outtmp
ftp_read/event=2/max_count=10/output=mail:hendricks m:outtmp
ftp_read t:lma11/src=sda:9158:Acceleration:0 # read from SDA
ftp_read m:outtmp@'f,type=ftp,rate=60,dur=1,smpl=p;trig=e,2,1000'
device_list/create devs devices='m:outtmp,m:outhum'
ftp_read/event=2/duration=1 device_list=devs # read multiple devices
Synonyms: ftpRead, ftpplt, fstplt
Related commands:
snap_read, logger_get, saverestore_get, sda_get
-------------------------------------------------------------------------------
host_request : pass a request to the host program
host_request [/qualifier] {request string}
This command allows the writer of a script to pass a request
expressed as a text string to the program which is executing
the ACL script. This can include things like configuring the
appearance of the ACL output. The text of the request is
dependent on the syntax supported by the host program.
Examples of host_request qualifiers:
allow_messages -> enables the display of messages
concerning the success or failure
of the request (default is to suppress
messages)
allow_errors -> causes the script to exit if the
request fails (default is to continue)
once -> only affect the next operation
Parameter page (and parameter window and ACL IDE) supported requests:
window_height={size} -> set the height of the ACL output window
(default, large, or number of rows)
window_width={size} -> set the width of the ACL output window
(default, large, or number of rows)
suppress_scrollbar -> disable the scrollbar and scroll status
display for the ACL output window
text_color={color} -> set the ACL output text color
text_align={alignment} -> set the ACL output text alignment
(default, center, or right)
scroll_text={yes|no} -> enable or disable scrolling of ACL output
clear screen -> erases the ACL output window
text_row={row} -> sets the output text row for nonscrolling
output
text_column={column} -> sets the output text column for nonscrolling
output
clear_text_field={len} -> erases a field in the ACL output window
text_row_increment={inc} -> sets the output text row automatic increment
for nonscrolling output
text_column_increment={} -> sets the output text column automatic
increment for nonscrolling output
suppress_completion_message -> disable the script completion message
Sequencer supported requests:
text_color={color} -> set the ACL output text color
text_align={alignment} -> set the ACL output text alignment
(default, center, or right)
scroll_text={yes|no} -> enable or disable scrolling of ACL output
clear screen -> erases the ACL output window
text_row={row} -> sets the output text row for nonscrolling
output
text_column={column} -> sets the output text column for nonscrolling
output
clear_text_field={len} -> erases a field in the ACL output window
text_row_increment={inc} -> sets the output text row automatic increment
for nonscrolling output
text_column_increment={} -> sets the output text column automatic
increment for nonscrolling output
Examples:
host_request WINDOW_HEIGHT=LARGE # enable large output windows on the
# parameter page
Synonyms: hostRequest
Related commands:
none
-------------------------------------------------------------------------------
import : includes a file of variable declarations or script options
import {file name}
This command includes a file of variable declarations much
like a C/C++ header (.h) file. The difference is that an
import file can only contain comments, variable declarations,
and script options. Enclosing the file name with angle brackets
indicates that the file should be found in the standard ACL import
file directory. Import files should have an extension of ".import".
Examples of import qualifiers:
use_default_path -> use the default input file path
Examples:
import <params> # import the standard file params.import
import <dbprops> # import the standard file dbprops.import
import my_file # import the local file my_file.import
Synonyms: include
Related commands:
declare, assignment, acl_option
-------------------------------------------------------------------------------
library_info : display library information
library_info[/{qualifier}] {library_name} [{routine name}]
This command displays library information including
type and date of the currently running library. If a
library routine name is supplied, it will output help
for that routine.
Examples of library_info qualifiers:
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
library_info clib
library_info clib dio_set_dev_c
Synonyms: libraryInfo
Related commands:
clib_info, program_info
-------------------------------------------------------------------------------
list_strings : displays control system lists of strings
list_strings[/qualifier[={value}]] [{path}] [{search_string}] [{output_strings}]
This command will list various sets of control system specific
strings. These strings can be listed to standard output or can
be copied to a variable. Search strings can also be specified
to return only a matching subset of a set of strings.
This command sets the $_value symbol to the number of strings
matching the request.
Examples of list_strings qualifiers:
acl_db_scripts -> list all of the ACL scripts in the database
repository
alarm_lists -> list standard alarm lists
user_alarm_lists -> list user defined alarm lists (*)(+)
save_lists -> list standard save lists
user_save_lists -> list user defined save lists (*)
device_types -> list device types
long_device_types -> list device types (long text)
device_classes -> list device classes
long_device_classes -> list device classes (long text)
primary_transforms -> list primary scaling transforms
common_transforms -> list common scaling transforms
interpolation_tables -> list interpolation tables used for
device scaling
convert_types -> list CLIB output conversion types
input_types -> list CLIB input conversion types
save_codes -> list save/restore save codes
display_codes -> list save/restore display codes
display_subcodes -> list save/restore display subcodes
ftp_classes -> list fast time plot classes
snapshot_classes -> list snapshot plot classes
tclk_events -> list TCLK events
long_tclk_events -> list TCLK events (long text)
mibs_events -> list MIBS events
long_mibs_events -> list MIBS events (long text)
tvbs_events -> list TVBS events
long_tvbs_events -> list TVBS events (long text)
rrbs_events -> list RRBS events
long_rrbs_events -> list RRBS events (long text)
mdat_frames -> list MDAT frames
long_mdat_frames -> list MDAT frames (long text)
acnet_errors -> list ACNET errors
long_acnet_errors -> list ACNET errors (long text)
error_categories -> list ACNET error categories
vms_errors -> list VMS-style errors
long_vms_errors -> list VMS-style errors (long text)
filesharing_files -> list Filesharing files accessed by programs
flat_files -> list flat files accessed by programs
machines -> list machine names
long_machines -> list machine names (long text)
device_names -> list ACNET device names
device_text -> list ACNET device descriptive text
families -> list family devices
sda_usages -> list SDA usages
sda_cases -> list SDA case names (*)
properties -> list property names
long_properties -> list property names (long text)
colors -> list color names
long_colors -> list color names (long text)
graphic_colors -> list graphic window color names
long_graphic_colors -> list graphic window color names (long text)
state_devices -> list ACNET state devices
state_values -> list state value names (*)
logger_names -> list data logger names
nodes -> list ACNET nodes
operational_nodes -> list operational ACNE nodes
mooc_nodes -> list MOOC nodes
irm_nodes -> list IRM nodes
lcs_nodes -> list LCS nodes
java_nodes -> list Java-based nodes
console_nodes -> list ACNET console nodes
central_nodes -> list central server nodes
pseudo_nodes -> list pseudo nodes
front_end_nodes -> list front end nodes
camac_nodes -> list CAMAC front end nodes
gpib_nodes -> list GPIB nodes
bpm_nodes -> list BPM nodes
blm_nodes -> list BLM nodes
qpm_nodes -> list QPM nodes
frig_nodes -> list frig (cryo) nodes
motion_control_nodes -> list motion controller nodes
swic_nodes -> list SWIC nodes
vacuum_nodes -> list vacuum nodes
dae_nodes -> list DAE nodes
tecar_nodes -> list TECAR nodes
mecar_nodes -> list MECAR nodes
llrf_nodes -> list LLRF nodes
hlrf_nodes -> list HLRF nodes
instr[umentation]_nodes -> list instrumentation
clock_nodes -> list clock nodes
tlg_nodes -> list TLG nodes
qxr_nodes -> list QXR nodes
ecool_nodes -> list electron cooling nodes
damper_nodes -> list damper nodes
flying_wire_nodes -> list flying wire nodes
util[ity]_nodes -> list utility nodes
d0_nodes -> list D0 nodes
exp_nodes -> list experimental control nodes
linac_nodes -> list Linac nodes
netutil_nodes -> list network utility nodes
twt_nodes -> list TWT nodes
elens_nodes -> list electron lens nodes
fbi_nodes -> list FBI nodes
sbd_nodes -> list SBD nodes
mdat_nodes -> list MDAT nodes
photoinj_nodes -> list photo injector nodes
muoncool_nodes -> list muon cooling nodes
coll[imator]_nodes -> list collimator nodes
alarm_handlers -> list alarm handler codes
long_alarm_handlers -> list alarm handler codes (long text)
sr_systems -> list save/restore systems
long_sr_systems -> list save/restore systems (long text)
raw_data_types -> list device field raw data types
device_data_types -> list device property data types
alarm_data_types -> list MOOC alarm raw data types
lex_sas -> list Lex SA names
long_lex_sas -> list Lex SA names (long text)
lex_draw_files -> list Lex Draw files
long_lex_draw_files -> list Lex Draw files (long text)
lex_objects -> list Lex Objects
console_classes -> list console classes
logger_names -> list data logger names
lj_nodes -> list Lumberjack nodes
shared_logs -> list shared program log files
windows -> list console windows
tv_windows -> list console TV windows
graphic_windows -> list console graphic windows
pa_graphic_windows -> list console PA graphic windows
[console_]slots -> list console slots
pa_slots -> list console PA slots
sa_slots -> list console SA slots
data_sources -> list device reading data sources
node_systems -> list node system types
node_hardware -> list node hardware types
node_software -> list node software types
node_status -> list node status types
node_areas -> list node area types
node_opsys -> list node operating system types
sr_files -> list save/restore file titles (*)
sda_files -> list SDA file titles (*)
comparators -> list standard comparators
wire_chamber_status -> list wire chamber status values
users -> list console users
long_users -> list console users (long text)
wg_list -> list waveform generator device list titles
control_systems -> list control system types
foreign_data_types={type}-> list foreign data types for a given system
epics_data_types -> list EPICS data types
apacs_data_types -> list APACS data types
labview_data_types -> list LabView data types
opc_data_types -> list OPC data types
snmp_data_types -> list SNMP data types
siemens_s7_data_types -> list Siemens S7 data types
lex_prog_object_types -> list Lex Prog (Lex SA) object types
lex_draw_object_types -> list Lex Draw object types
lex_object_object_types -> list Lex Object object types
device_bit_names -> list bit names for a device
device_enum_values -> list enumerated values for a device/property
long_device_enum_values -> list enumerated values for a device/property
(long strings)
device_control_values -> list control values for a device
long_control_values -> list control values for a device
(long strings)
no_numbers -> suppress numbering of lists
no_wildcard -> suppress wildcarding of searches
path={string} -> establish string path
search={string} -> establish search string
num_strings={variable} -> saves the number of strings in a variable
strings={array} -> saves the matching strings in a variable
alternate -> use alternate source for strings
dynamic[_arrays] -> dynamically reallocate output data string
to match the number of matching strings
max_entries={n} -> maximum number of entries to display
order={order} -> specify the way the strings are ordered
long_text -> specify the longer text option (if available)
no_display -> don't display (output) the returned strings
verbose -> display verbose output
output -> specify output
(* -> indicates that the requested type makes use of a path string
to specify which strings will be listed,
+ -> indicates that the requested type supports an alternate
source for the string information)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
list_strings/user_alarm_lists booster # list all Booster user alarm lists
list_strings/devices/no_numbers m:out% # list all matching device names
list_strings/console_class/no_numbers
Synonyms: listStrings
Related commands:
none
-------------------------------------------------------------------------------
log_device : log an ACNET device value
log_device[/node={node}] {device}[[n]]{/qualifier...} [{constant|variable|symbol}]
This command logs a value for a device for later retrieval.
This command also supports family devices and list specifiers
(see above). Use of this command may require special privileges.
See Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of log_device qualifiers:
node={node} -> choose which datalogger node receives
the value
timestamp={time} -> set the timestamp that the data will be
logged at (default is now)
milliseconds={msec} -> fraction of a second in milliseconds to
be added to the timestamp (default is 0)
status={status} -> ACNET error status to be attached to the
logged data (default is OK)
family -> log values for an entire family
verbose -> generate verbose output
Examples:
log_device z:acltst 2
log_device z:acltst $symbol1
log_device/node=dse01 z:acltst
log_device/node=stats z:acltst
log_device/node=qary1 z:acltst=1,2,3,4 # log array values
Synonyms: logDevice
Related commands:
logger_get, logger_get_array
-------------------------------------------------------------------------------
logger_get : read datalogger values
logger_get[/start={date}/end={date}][/node={node}] {device|device list}[[n]]{/qualifier...}
This command reads and displays datalogger device values.
This command supports family devices and list specifiers
(see above).
Examples of logger_get qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
min_delta={seconds} -> minimum time between points in seconds
num_skip={number} -> number of points to skip before returning
one
skip_duplicates -> skip duplicate values
node={logger_node} -> logger node to retrieve values from
(default is to choose the node with the
fastest logging rate)
data_event={event} -> specify collection data event (FTD) of data
to be read (standard data event format)
list={list number} -> specify data logger list (0-17)
device={device_name} -> device to display
value={value} -> matching datalogged value
cond={condition_value} -> used in conjunction with the value
argument to determine which log entries
are displayed
cut_minimum={value} -> minimum value that will be returned
cut_maximum={value} -> maximum value that will be returned
absolute_value -> return the absolute value of each value
truncate_negative -> return a value of 0 for negative values
truncate_positive -> return a value of 0 for positive values
double -> return double precision values and
subsecond timestamps (default)
text -> display basic status and state text
no_text -> don't display basic status or state text
units -> display units text
ignore_db_format -> don't use the device database value
formatting information
node -> display values as ACNET node values
error -> display values as ACNET error values
device -> display values as ACNET device name values
clinks -> display values as dates in clinks
date -> display values as dates in local time
gmt or utc -> display values as dates in GMT/UTC
nodisplay -> don't display the values, only errors
count[_only] -> only display the number of matching
log entries
max_entries={n} -> maximum number of entries to display
first -> used in conjunction with "max_entries"
to retrieve the first n matches (default)
last -> used in conjunction with "max_entries"
to retrieve the last n matches
family -> display values for an entire family
num_values={variable} -> returns the number of values read
values={array variable} -> returns the values read
timestamps={date array} -> returns the timestamps read
milliseconds={array} -> returns the fractional milliseconds read
sum={variable} -> returns the sum of all values read
minimum={variable} -> returns the minimum of all values read
maximum={variable} -> returns the maximum of all values read
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
node_used={variable} -> returns the Lumberjack node read from
bit_number={bit number} -> process status data to return a value of
1 if the requested bit number is set and
a value of 0 otherwise
bit_mask={value} -> mask to apply to raw data to check for
a match
masked_value={value} -> mask to apply to raw data
on_off -> process status data to return a value of
1 if the original value indicates a status
of on and a value of 0 otherwise
ready_tripped -> process status data to return a value of
1 if the original value indicates a status
of ready and a value of 0 otherwise
remote_local -> process status data to return a value of
1 if the original value indicates a status
of remote and a value of 0 otherwise
polarity -> process status data to return a value of
1 if the original value indicates a status
of positive and a value of 0 otherwise
ramp_dc -> process status data to return a value of
1 if the original value indicates a status
of ramp and a value of 0 otherwise
ascending -> return data in ascending time order (default)
descending -> return data in descending time order
sda_case={case} -> specifies the case for SDA data
sda_set={set} -> specifies the set for SDA data
final_sda_data -> only display final SDA data
verbose -> generate verbose output
output={spec} -> specify output destination
The condition value strings are as follows:
all -> show all matches (default)
equal (eq) -> show entries that equal the requested
value (default if value is requested)
not_equal (ne) -> show entries that do not equal the
requested value
less_than (lt) -> show entries whose value is less
than the requested value
less_equal (le) -> show entries whose value is less
than or equal to the requested value
greater_than (gt) -> show entries whose value is greater
than the requested value
greater_equal (ge) -> show entries whose value is greater
than or equal to the requested value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
logger_get/start=today m:outtmp
logger_get/start=16-sep-2003/end="16-sep-2003 00:10"/output=mail:hendricks m:outtmp
logger_get/start=today/count_only/node=mech m:outtmp
logger_get/start=today/value=60/cond=lt m:outtmp
logger_get/start=today/error t:chrlst
logger_get/start=today/max_count=10/output=mail:hendricks m:outtmp
logger_get/start=today/node=TevSA/data_event='p,66,true'\
/output=mail:hendricks t:hppa34
Synonyms: loggerGet, loggerRead
Related commands:
logger_get_array, log_device, saverestore_get, sda_get, event_log,
state_log, setting_log, alarm_log, ftp_read, snap_read, device_list
-------------------------------------------------------------------------------
logger_get_array : read data logger array values
logger_get_array/start={date}[/end={date}][/node={node}] {device|device list}{[n:m]}{/qualifier...}
This command reads and displays datalogger array device values.
This command supports family devices and list specifiers
(see above).
Examples of logger_get_array qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
min_delta={seconds} -> minimum time between arrays in seconds
num_skip={number} -> number of arrays to skip before returning
one
node={logger_node} -> logger node to retrieve values from
(default is to choose the node with the
fastest logging rate)
data_event={event} -> specify collection data event (FTD) of data
to be read (standard data event format)
list={list number} -> specify data logger list (0-17)
device={device_name} -> device to display
value={value} -> matching datalogged value
absolute_value -> return the absolute value of each value
truncate_negative -> return a value of 0 for negative values
truncate_positive -> return a value of 0 for positive values
text -> display basic status and state text
no_text -> don't display basic status or state text
units -> display units text
ignore_db_format -> don't use the device database value
formatting information
node -> display values as ACNET node values
error -> display values as ACNET error values
device -> display values as ACNET device name values
clinks -> display values as dates in clinks
date -> display values as dates in local time
gmt or utc -> display values as dates in GMT/UTC
nodisplay -> don't display the values, only errors
count[_only] -> only display the number of matching
log entries
max_entries={n} -> maximum number of arrays to return
first -> used in conjunction with "max_entries"
to retrieve the first n matches (default)
last -> used in conjunction with "max_entries"
to retrieve the last n matches
family -> display values for an entire family
num_arrays={variable} -> returns the number of arrays read
num_values_per_array={var} -> returns the number of values per array
values={array variable} -> returns the values read
timestamps={date array} -> returns the timestamps read
milliseconds={array} -> returns the fractional milliseconds read
sum={variable} -> returns the sum of all values read
minimum={variable} -> returns the minimum of all values read
maximum={variable} -> returns the maximum of all values read
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
node_used={variable} -> saves the Lumberjack node read from in a
variable
bit_number={bit number} -> process status data to return a value of
1 if the requested bit number is set and
a value of 0 otherwise
on_off -> process status data to return a value of
1 if the original value indicates a status
of on and a value of 0 otherwise
ready_tripped -> process status data to return a value of
1 if the original value indicates a status
of ready and a value of 0 otherwise
remote_local -> process status data to return a value of
1 if the original value indicates a status
of remote and a value of 0 otherwise
polarity -> process status data to return a value of
1 if the original value indicates a status
of positive and a value of 0 otherwise
ramp_dc -> process status data to return a value of
1 if the original value indicates a status
of ramp and a value of 0 otherwise
sda_case={case} -> specifies the case for SDA data
sda_set={set} -> specifies the set for SDA data
final_sda_data -> only display final SDA data
verbose -> generate verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
logger_get_array/start=today/node=QrayN n:m1wc1v[]
Synonyms: loggerGetArray, loggerReadArray
Related commands:
logger_get, log_device, saverestore_get, sda_get, ftp_read, snap_read,
device_list
-------------------------------------------------------------------------------
madc : access MADC information
madc[/{qualifier}] {node} {MADC number} [{retries}]
This command will access information about individual
MADCs. Use of this command may require special
privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of madc qualifiers:
node={node} -> specify node
madc={MADC number} -> specify MADC number
retries={retries_value} -> specify CAMAC no-Q retries value
format={decimal|hex} -> specify data format (hex or decimal)
id -> read the CAMAC module ID number
devices[={string}] -> read the devices in the MADC
lam -> read the module LAM status value
reset -> reset the module
hex -> interpret data as hexadecimal
dec[imal] -> interpret data as decimal
queue -> allows queueing up multiple commands to
send at the same time
verbose -> display verbose output
output -> specify output
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
madc/id tev 1 # read module ID
madc/devices tev 1 # read MADC devices
madc/lam tev 1 # read module LAM status
Related commands:
crate, slot, camac
-------------------------------------------------------------------------------
mdat_info : display MDAT frame information
mdat_info[/{qualifier}][/output={spec}] {mdat_frame}
This command displays detailed information about an MDAT frame.
Examples of mdat_info qualifiers:
name -> display the symbolic name of the MDAT frame
description -> display the description of the MDAT frame
suppress_errors -> suppress the error if a nonexistent
MDAT frame is requested
name={value} -> search for MDAT frames whose symbolic names
match a string
description={value} -> search for MDAT frames whose descriptions
match a string
num_frames={variable} -> specify a variable to return the number
of MDAT frames processed
frames={variable} -> specify a variable to return the array
of MDAT frame values processed
values={variable} -> specify a variable to return data values
no_display -> suppress display of MDAT frame information
(useful if using command to generate
an array of MDAT frame values)
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
mdat_info 10
mdat_info/name=PGM
mdat_info name=mi%/and/description=cycle%
loop 10 mdat=0
mdat_info/suppress_errors mdat
endloop
Synonyms: mdatInfo
Related commands:
event_info, tlg_info, node_info, console_info, program_info, user_info
-------------------------------------------------------------------------------
measurement_spec : read or set a measurement specification
measurement_spec[/{qualifier}] {system} [=] [{fly spec}]
This command supports reading or setting of measurement
specifications. The access is made to a named group.
Use of this command may require special privileges. See
Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of measurement_spec qualifiers:
read -> read measurement spec
(default if no value is specified)
set -> set measurement spec
(default if a value is specified)
system={name} -> system to access (tev_wires, mi_wires,
pbar_wires, rr_wires, mi_blt, mi_ipms,
mi_ipm_h1, mi_ipm_h2, mi_ipm_v1)
data_source={source} -> specify the source for accessing data
value={variable} -> returns the current measurement spec value
dynamic[_arrays] -> dynamically reallocate output value variable
to match the number of values read
no_set -> suppress actual setting of devices
verbose -> display verbose output
nodisplay -> don't display the reading, only errors
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
measurement_spec tev_wires # read spec for Tev flying wires
measurement_spec tev_wires = 3 # set spec for Tev flying wires
Synonyms: measurementSpec
Related commands:
read, set, data_source
-------------------------------------------------------------------------------
node : perform operations on an ACNET node
node/{operation}[/output={spec}] {node|node list}
This command performs various operations on an ACNET node
including pinging it, retrieving its up time, downloading it,
and getting its list of ACNET tasks. It can also be used to
operate on a list of nodes matching various specified
characteristics.
node operation types:
ping -> ping the node (sets the global symbol
$_value to 1 if successful, 0 otherwise)
device_ping -> ping the node using the guaranteed readable
device (sets the global symbol
$_value to 1 if successful, 0 otherwise)
is_up -> displays whether or not the node is up
uptime -> displays node up time (sets the global symbol
$_value to 1 if successful, 0 otherwise)
uptime_from_device -> displays node up time as read from the
node's uptime device (sets the global symbol
$_value to 1 if successful, 0 otherwise)
startup_time -> displays node startup time (sets the global
symbol $_value to 1 if successful, 0
otherwise)
startup_time_from_device-> displays node startup time as read from the
node's uptime device (sets the global symbol
$_value to 1 if successful, 0 otherwise)
[guaranteed_]read -> reads the guaranteed readable device
to see if the node is functioning properly
tasks -> display the connected ACNET tasks
task={name} -> task name to search for
download -> issue a node download request
manual_download -> issue a manual node download request
acnet_version -> display the ACNET versions for a node
mooc_version -> display the MOOC version for a MOOC node
os_version -> display the operating system version
for a MOOC node
vucd_version -> display the VUCD version for a MOOC node
ssm_version -> display the SSM version for a MOOC node
vw_support_version -> display the VW support version for a
MOOC node
versions -> display the ACNET and MOOC versions for a node
system_info -> display system information for MOOC nodes
time -> display the current system time for a node
set_time -> set the current system time for a node
boot_time -> display the boot time for a node
time_error -> node's absolute time error in milliseconds
clear_alarm -> clear a node down alarm
big_clear -> send an alarms big clear to a node via the
alarms server
direct_big_clear -> send an alarms big clear directly to a node
boot_log -> display boot log entries for the node
device_access -> display processes requesting devices
from this node
logged_devices -> display devices from this node which
are being logged (ordered by device name)
logged_devices_by_node -> display devices from this node which
are being logged (ordered by logger node)
daq_tasks -> display processes on this node which
which are making device requests
alarm_info -> display node alarm information
download_info -> display node download information
class_info -> display node device class information
consolidator_nodes -> display the primary and secondary
consolidator nodes for a node
coresident_nodes -> display nodes which are coresident
(on the same computer) with a node
[show_]node_ip={node} -> display the IP address that a node has
for another node
[show_]trunk_ips={trunk}-> display the IP addresses that a node has
for an ACNET trunk
set_trunk_ips={trunk} -> resend the IP addresses for an ACNET trunk
crate_status -> display CAMAC crate status
(CAMAC nodes only)
btr_test -> perform a CAMAC block transfer test and
display the results (CAMAC nodes only)
long_btr_test -> perform a long CAMAC block transfer test and
display the results (CAMAC nodes only)
acnet_stats -> node ACNET statistics
task_stats -> task ACNET statistics
last_cnaf -> displays last CNAF information
(CAMAC nodes only)
dabbel_download_time -> display the DABBEL download time for a node
set_dabbel_download_time-> set the DABBEL download time for a node
noop -> no action requested (useful if using
command to generate an array of node values)
mark_up -> mark a node as being "up"
mark_down -> mark a node as being "down"
Examples of node qualifiers:
name={node name} -> search for nodes matching a given name
keeper={user name} -> search for nodes belonging to a keeper
backup={user name} -> search for nodes having a backup keeper
descr={description} -> search for nodes having a particular
string in their description
loc={location} -> search for nodes having a particular
string in their location
[system=]{system type} -> search for nodes with a particular
system type
[hardware=]{hardware type} -> search for nodes with a particular
hardware type
[software=]{software type} -> search for nodes with a particular
software type
[status=]{status type} -> search for nodes with a particular
node status type
status_not={status type} -> search for nodes not having a particular
node status type
[area=]{area type} -> search for nodes with a particular
area type
[opsys=]{OS type} -> search for nodes with a particular
operating system type
alarm_list={list} -> search for all nodes on a given alarm list
download_list={list} -> search for all nodes in a given
download group
trunk={trunk} -> search for all nodes on a given trunk
search_is_fe[={boolean}] -> search for front end nodes
search_is_oac[={boolean}]-> search for OAC nodes
gets32 -> search for all nodes supporting
GETS32/SETS32
no_gets32 -> search for all nodes not supporting
GETS32/SETS32
ftp -> search for all nodes supporting
fast time plot protocol (FTP)
no_ftp -> search for all nodes not supporting
fast time plot protocol (FTP)
tclk -> search for all nodes supporting
returning data on event (TCLK)
no_tclk -> search for all nodes not supporting
returning data on event (TCLK)
alarmer -> search for all nodes supporting alarms
no_alarmer -> search for all nodes not supporting alarms
acnet_search_{type}=value-> search for nodes running a given
version of ACNET
mooc_search_{type}=value -> search for nodes running a given
version of MOOC
vucd_search_{type}=value -> search for MOOC nodes running a given
version of VUCD
acnet_{type}=value -> filter search results showing only nodes
running a given version of ACNET
mooc_{type}=value -> filter search results showing only nodes
running a given version of MOOC
active -> include only operational and test nodes
no_test -> exclude test and out of service nodes
from node searches
exact -> display exact matches only in searches
download_location={loc} -> specify download location/crate
(CAMAC nodes only)
num_nodes={variable} -> specify a variable to return the number
of nodes processed
nodes={variable} -> specify a variable to return the array
of node values processed
data_values={variable} -> specify a variable to return data values
values_per_node={var} -> specify a variable to return the number
data values per node
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
node/ping mi1
node/ping keeper=hendricks
node/ping keeper=hendricks/status=active # only ping active nodes
node/uptime mi1
node/tasks mi1
node/ping name=bpm/keeper=briegel
Related commands:
node_info, node_audit_log, download, reboot, list_strings
-------------------------------------------------------------------------------
node_audit_log : query the ACNET node audit log
node_audit_log[/{qualifier}] [{node}]
This command simply reads and displays entries from the ACNET
node edit history log. You can search the log by node strings,
field names, previous values, and much more.
Examples of node_audit_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
last -> return the last matching entry
last={n} -> return the last 'n' matching entries
timeout={seconds} -> database timeout in seconds
user_name={name} -> matching user name (*)
field={field} -> matching modified field (*)
previous_value={val} -> matching previous value (*)
operation={val} -> matching operation value (*)
ip_name={val} -> matching IP name value (*)
trunk={val} -> matching trunk value (*)
keeper={val} -> matching node keeper value (*)
backup={val} -> matching node backup keeper value (*)
system={val} -> matching node system value (*)
area={val} -> matching node area value (*)
software={val} -> matching node software value (*)
hardware={val} -> matching node hardware value (*)
asc[ending] -> display in time ascending order (default)
desc[ending] -> display in time descending order
count_only -> return matching entry count
max_entries={n} -> maximum number of entries to display
num_values={variable} -> returns number of entries found
values={variable} -> returns matching entries as text strings
dates={variable} -> returns matching date values
nodes={variable} -> returns matching node values
user_names={variable} -> returns matching user name values
actions={variable} -> returns matching action values
fields={variable} -> returns matching field name values
prev_vals={variable} -> returns matching previous values
verbose -> display verbose output
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
node_audit_log/start=today
node_audit_log/start=16-sep-2011/end="16-sep-2012 00:10"/output=mail:hendricks
node_audit_log/start=today/count_only
node_audit_log/interval=1hr %bpm% # list BPM nodes in last hour
Synonyms: nodeAuditLog
Related commands:
node, node_info, audit_log, error_log, setting_log, alarm_log,
event_log, state_log, cpld_log, downtime_log
-------------------------------------------------------------------------------
node_info : display ACNET node information
node_info[/{qualifier}][/output={spec}] {node|node list}
This command simply displays node information including
a short description, the keeper, node type, special devices,
and node characteristics. It can also be used to search the
ACNET node database to find nodes matching various specified
characteristics.
Examples of node_info qualifiers:
categories -> display the node characteristic categories
devices -> display the special devices for this node
versions -> display software version information
boot_log -> display boot log entries for the node
sourced_devices -> display the list of sourced devices
crates -> display the list of CAMAC crates
(CAMAC nodes only)
madcs -> display the list of CAMAC MADCs
(CAMAC nodes only)
gas_houses -> display the list of GAS houses
(CAMAC nodes only)
description -> displays the node's description
location -> displays the node's location
keeper -> displays the node's keeper's name
keeper_email -> displays the node's keeper's email
backup_keeper -> displays the node's backup keeper's name
backup_keeper_email -> displays the node's backup keeper's email
status -> displays the node's status type
system -> displays the node's system type
hardware -> displays the node's hardware type
software -> displays the node's software type
opsys -> displays the node's operating system type
area -> displays the node's area
is_up -> displays whether or not the node is up
is_front_end -> displays whether or not the node is a
front end
is_oac -> displays whether or not the node is an OAC
is_console -> displays whether or not the node is a
console
is_central -> displays whether or not the node is a
central
supports_alarms -> displays whether or not the node supports
alarms
supports_ftp -> displays whether or not the node supports
the fast time plot protocol (FTP)
supports_tclk -> displays whether or not the node supports
returning device readings on clock event
supports_gets32 -> displays whether or not the node supports
the GETS32/SETS32 protocol
read_device -> displays the guaranteed readable device
set_device -> displays the guaranteed settable device
tod_device -> displays the node's time of day device
uptime_device -> displays the node's uptime device
download_device -> displays the download request device
reboot_device -> displays the node's reboot device
version_device -> displays the node's version device
url -> display the description URL
ip_name -> display the node's IP name
consolidator_nodes -> display the primary and secondary
consolidator nodes for a node
coresident_nodes -> display nodes which are coresident
(on the same computer) with a node
loggers -> display loggers hosted by a node
oacs -> display OACs hosted by a node
oac_info -> display OAC configuration information
(OAC nodes only)
name={node name} -> search for nodes matching a given name
keeper={user name} -> search for nodes belonging to a keeper
backup={user name} -> search for nodes having a backup keeper
descr={description} -> search for nodes having a particular
string in their description
loc={location} -> search for nodes having a particular
string in their location
[system=]{system type} -> search for nodes with a particular
system type
[hardware=]{hardware type} -> search for nodes with a particular
hardware type
[software=]{software type} -> search for nodes with a particular
software type
[status=]{status type} -> search for nodes with a particular
node status type
status_not={status type} -> search for nodes not having a particular
node status type
[area=]{area type} -> search for nodes with a particular
area type
[opsys=]{OS type} -> search for nodes with a particular
operating system type
search_is_fe[={boolean}] -> search for front end nodes
search_is_oac[={boolean}]-> search for OAC nodes
search_is_console -> search for console nodes
search_is_central -> search for central nodes
search_supports_alarms -> search for nodes which support alarms
search_supports_ftp -> search for nodes which support the
fast time plot protocol
search_supports_tclk -> search for nodes which support returning
device values on clock events
search_supports_gets32 -> search for nodes which support the
GETS32/SETS32 protocol
alarm_list={list} -> search for all nodes on a given alarm list
download_list={list} -> search for all nodes in a given
download group
trunk={trunk} -> search for all nodes on a given trunk
gets32 -> search for all nodes supporting
GETS32/SETS32
no_gets32 -> search for all nodes not supporting
GETS32/SETS32
ftp -> search for all nodes supporting
fast time plot protocol (FTP)
no_ftp -> search for all nodes not supporting
fast time plot protocol (FTP)
tclk -> search for all nodes supporting
returning data on event (TCLK)
no_tclk -> search for all nodes not supporting
returning data on event (TCLK)
alarmer -> search for all nodes supporting alarms
no_alarmer -> search for all nodes not supporting alarms
acnet_{cond}={version} -> search for nodes with a certain range
of ACNET versions
mooc_{cond}={version} -> search for nodes with a certain range
of MOOC versions
vucd_{cond}={version} -> search for nodes with a certain range
of VUCD versions
active -> include only operational and test nodes
no_test -> exclude test and out of service nodes
from node searches
exact -> display exact matches only in searches
down -> only displays nodes that are down
no_up_status -> suppress up/down status in search results
num_nodes={variable} -> specify a variable to return the number
of nodes processed
nodes={variable} -> specify a variable to return the array
of node values processed
data_values={variable} -> specify a variable to return data values
up_status={variable} -> specify a variable to return node
up (TRUE)/down (FALSE) status
no_display -> suppress display of node information
(useful if using command to generate
an array of node values)
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
node_info mi1
node_info keeper=hendricks
node_info software=mooc
node_info/mooc_lt=3.1 # display nodes with MOOC version < 3.1
node_info/acnet_gt=1.19 # display nodes with ACNET version > 1.19
Synonyms: nodeInfo
Related commands:
node, node_audit_log, console_info, switch_info, user_info,
program_info, event_info, mdat_info, download, reboot, list_strings
-------------------------------------------------------------------------------
path : set the default file path
path[/{qualifier}] {path}
A path statement specifies the file path for future commands.
Commands affected include: output, set, set_field, run,
and many others. This command can be qualified to only affect
input, output, or executable files. By default, it affects all
three types of files. If a file specification includes a path,
the default path will not be used.
Examples of path qualifiers:
input -> set the path for input files only
output -> set the path for output files only
exec -> set the path for executable files only
Examples:
path '/usr/local/cbs_files/sequencer/acl'
path/input '/usr/local/cbs_files/sequencer/acl'
path/output '/my_disk/my_dir'
Related commands:
output, print, output_value, set, set_field, run
-------------------------------------------------------------------------------
program_info : display program information
program_info[/{qualifier}][/output={spec}] {program|program list}
This command simply displays program information including
a short description, the author and keeper, and the last
modified date and programmer. For Primary Applications (PAs),
it also displays the index pages to which the program is
mapped, and for Secondary Applications (SAs) it displays the
list of applications which has started it. You can specify
the program using the PA name, index page, SA name, or central
service name. There is also minimal support for user libraries.
This command can also list all Primary Applications and
Secondary Applications belonging to a particular keeper.
Examples of program_info qualifiers:
abstract -> display the program extract
history -> display the program history
help -> display the top level help for the program
stats -> display program statistics
author -> display the program author
keeper -> display the program keeper
backup -> display the program backup keeper
description -> display the program description
title -> display index page title
help_url -> display the program's help URL
mapping -> display index page mapping
[console_]access -> display console access to a program by class
set[_console_]access -> set console access to a program by class
affiliations -> display all departments affiliated with
this program
subscribers -> display all users subscribed to be
notified when this program is modified
sa_usage -> display all SAs called by a program
pa_usage -> display all PAs called by a program
pgm_usage -> display all SAs and PAs called by a program
fshare_usage -> display all Filesharing files accessed
by the program
page_usage[={daterange}]-> display index page usage
shared_fshare_programs -> display all programs that the program shares
Filesharing files with
command_buffer -> display the program's command buffer
structures -> display all structures defined for a program
remote_methods -> display all remote methods defined for
a program
instances={program} -> list all currently running instances of
a PA or SA
title={string} -> list all PAs whose index page titles
match a string
description={string} -> list all PAs and SAs whose descriptions
match a string
keeper={account_name} -> list all PAs and SAs belonging to a
particular keeper
author={account_name} -> list all PAs and SAs authored by a
particular person
backup={account_name} -> list all PAs and SAs having a
particular backup keeper
porter={account_name} -> list all PAs and SAs ported by a
particular person
subscribedby={user_name}-> list all programs subscribed to by a
particular person
affiliation={affil} -> list all programs affiliated with a
department
mod_since={date} -> list all programs modified on or after
a given date
mod_by={account_name} -> list all programs last modified by a
particular person (can also be used in
conjunction with "mod_since")
status={status} -> list all programs having a given status
name={name} -> list all Java applications having a given
name string
reference={reference} -> list all Java applications having a given
reference string
code_type={code_type} -> list all Java applications having a given
code type string
pas -> search for PAs
sas -> search for SAs
uls -> search for user libraries
services -> search for services
certified -> only search for certified programs
uncertified -> only search for uncertified programs
active -> only search for active programs
obsolete -> only search for obsolete programs
abandoned -> only search for abandoned programs
java -> display Java application information
db -> retrieve program information from the
MECCA database
suppress_errors -> suppress the error if no matches are found
data_values={variable} -> specify a variable to return data values
sort={sort type} -> sort log entries in a particular order
(asc[ending], desc[ending])
verbose -> display verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
program_info pa0052
program_info t39
program_info sa1002
program_info/abstract oddmod
program_info/keeper=hendricks
program_info/sa_usage c48
program_info keeper=hendricks/and/description=%bpm%
program_info (/subscriber=linden/or/subscriber=rwest/)
Synonyms: pgm_info, pgmInfo, programInfo
Related commands:
program_status, program_log, find_program, cpld_log, console_info,
node_info, user_info, event_info, mdat_info
-------------------------------------------------------------------------------
program_log : display program (shared) log entries
program_log[/start={date}/end={date}/text={string}] {name} [/output={spec}]
This command simply reads and displays program (shared) log entries.
You can search the log by entry text and author.
Examples of program_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
text={string} -> matching text string (*)
author={string} -> matching author string (*)
count_only -> message count only
max_entries={n} -> maximum number of entries to display
last={n} -> display the last n entries
last -> display the last entry
asc[ending] -> display in time ascending order (default)
desc[ending] -> display in time descending order
sort={sort type} -> sort the log entries in a particular order
(asc[ending], desc[ending])
stats -> display log statistics
list_names={string} -> list matching log file names
names -> list all program (shared) log file names
messages={var} -> returns the matching log messages
num_messages={var} -> returns the number of matching log messages
verbose -> display verbose output
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier)
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
program_log/start=today testalog
program_log/start=16-sep-2001/end="16-sep-2001 00:10"/output=mail:hendricks testalog
program_log/start=today/count_only testalog
program_log/start=today/author=%pa% testalog
program_log/start=today/text=%high% testalog
program_log/list_names=%seq%
Synonyms: shared_log, sharedLog, programLog
Related commands:
console_log, program_info, program_status, find_program, cpld_log
-------------------------------------------------------------------------------
program_status : retrieve the status of a program instance
program_status[/{qualifier}] [{console}] {slot}
This command displays information about a currently
running program. The primary information includes
the program's name, current execution state, and script
state. This command sets the global symbol, $_value, to
the program's execution state. Status information can
also be returned via caller-supplied variables.
Examples of program_status qualifiers:
name={variable} -> returned process name
state={variable} -> returned program state
script_state={variable} -> returned program scripting state
no_display -> suppress display of status information
verbose -> display verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
program_status 134 pa
program_status/status=sts 134 pa
Synonyms: pgm_status, pgmStatus, programStatus
Related commands:
program_info, program_log, find_program, cpld_log
-------------------------------------------------------------------------------
read_dir : read the contents of a directory
read_dir[/{qualifier}[={value}]] {file spec}
This command will read the contents of a directory. This
command sets the $_value and $_num_values symbols to the
number of files found.
Examples of read_dir qualifiers:
num_files={variable} -> saves the number of files in a variable
file_names={array} -> saves the file names found in a variable
file_paths={array} -> saves the file paths found in a variable
num_dirs={variable} -> saves the number of directories in a variable
dir_names={array} -> saves the directory names found in a variable
dynamic[_arrays] -> dynamically reallocate output data string
to match the number of matching strings
max_files={n} -> maximum number of files to display
convert -> convert embedded device and variable
values in the file specification string
match={string} -> establish directory match string
case_sensitive (cs) -> make a case sensitive search
(default is case insensitive)
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
wildcard={char} -> set wildcard match character
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in regular expressions
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in regular expressions
include_path -> include the path in file names
(default is no path)
no_display -> don't display (output) the returned file names
verbose -> display verbose output
output -> specify output
Examples:
read_dir '~hendricks/acl/test*.acl'
read_dir/output=var:file_names '~hendricks/acl/test*.acl'
read_dir/file_names=file_names/num_files=num_files '~hendricks/acl/test*.acl'
Synonyms: readDir, directory
Related commands:
read_file, find_in_file
-------------------------------------------------------------------------------
read_file : read all or part of a file
read_file[/{qualifier}[={value}]] {file name}
This command will read all or part of a file. Search strings
can also be specified to return only matching lines. This
command sets the $_value symbol to the number of lines read.
Files can be treated as text files (default) or binary files.
When treating a file as binary, there are many choices of
output formats.
Examples of read_file qualifiers:
text -> treat as a text file (default)
binary -> treat as a binary file
fshare -> treat as a Filesharing file
web_page -> treat as a web page
acl_db_script -> treat as an ACL script from the
database repository
appds -> treat as an APPDS table
search={string} -> establish search string
skip_blank_lines -> do not include blank lines in the output
num_lines={variable} -> saves the number of lines in a variable
text={array} -> saves the matching lines of text
in a variable
dynamic[_arrays] -> dynamically reallocate output data string
to match the number of matching strings
data_values={var,...} -> variable(s) to hold structured data
(one per field of the structure)
max_lines={n} -> maximum number of lines to read (text file)
max_bytes={n} -> maximum number of bytes to read (binary file)
offset={n} -> starting byte offset to read at
stream -> start reading where the previous call to
this command left off
head[={num_lines}] -> read only the first n lines (default is 10)
tail[={num_lines}] -> read only the last n lines (default is 10)
convert -> convert embedded device and variable
values in the file name string
hex -> display file data in hex (binary files)
decimal -> display file data in decimal (binary files)
vms -> display file data in VMS file dump format
(binary files)
trim -> trim leading and trailing blanks from each
line
dont_trim -> do not trim leading and trailing blanks from
each line (default)
retain_html_tags -> don't remove embedded HTML tags
remove_html_tags -> remove embedded HTML tags (default)
value_type={type} -> value type to display file data as
(binary files)
{short,float,double,..} -> value type to display file data as
(binary files)
compare -> make a simple compare of the contents of
two files (binary or text)
case_sensitive -> make a text file compare case sensitive
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
wildcard={char} -> set wildcard match character for a search
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in a regular expression
search
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in a regular
expression search
verbose -> display verbose output
output -> specify output
Examples:
read_file myfile.txt
read_file/head myfile.txt
read_file/tail=20/search='text' myfile.txt
read_file/binary mydata.dat
read_file/binary/compare bsclk.sav bsclk.tst
read_file/fshare/compare controls_misc:bsclk.sav controls_misc:bsclk.tst
Synonyms: readFile, file_read, fileRead
Related commands:
write_file, read_dir, find_in_file, url_display, program_log
-------------------------------------------------------------------------------
reboot : reboot an ACNET node
reboot[/{qualifier}] {node}
This command performs a reboot on an ACNET node. Both hard and
soft reboots can be requested. A hard reboot utilizes the node's
reboot device while a soft reboot sends a software request for
the node to reboot itself. If neither type is requested, a hard
reboot will be requested. If no reboot device exists for that
node, a soft reboot will be requested. This command can also be
used for rebooting GAS modules by specifying the house. Use of
this command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of reboot qualifiers:
hard -> reboot the node using its reboot device
soft -> reboot by sending an ACNET reboot message
reason={reason string} -> reason for the reboot which will be written
to the reboot log (BOOT_LOG)
house={GAS house} -> GAS house name or code to reboot
module_type={GAS type} -> GAS module type to reboot (default is BPM)
noset -> don't actually send the reboot command
verbose -> display a message indicating that the
reboot command has been sent
Examples:
reboot mwap10
reboot/reason="Node was not responding" apab10
reboot/house=67 mi # reboot BPM house 67 in Main Injector
Related commands:
set, node, node_info, download
-------------------------------------------------------------------------------
save_screen_image : saves a console screen image to a file
save_screen_image[/qualifier=[{value}]] [{cns}] [{window}] [{file_name}]
(Note: Arguments enclosed in square brackets are optional.)
This command saves a console screen image to a file.
It presently supports two image types: GIF and D5 format.
Examples of save_screen_image qualifiers:
type={type} -> image type
("gif" -> GIF image (default),
"d5 -> D5 format image)
{type} -> image type
("gif" -> GIF image (default),
"d5 -> D5 format image)
console={num} -> console number
window={win} -> console window
by_title -> select the window by title
file_name={file} -> save file name
(default for D5 format files is the window's title)
invert_colors -> invert image colors (GIF only)
append_date -> append date to file name (GIF only)
wait_for_save -> wait for save to be completed before returning
Examples:
save_screen_image/gif 134 sa my_image_file.gif
save_screen_image/d5 134 pa
Synonyms: saveScreenImage
Related commands:
image_draw, cnswin
-------------------------------------------------------------------------------
sda_config : display SDA configuration information
sda_config[/{qualifier}] [{usage}] [{case}] [(device}]
This command reads and displays SDA configuration information.
It can either display the list of devices correcsponding to
a usage and case or it can display detailed information about
a single device. There is also an option to check for the
presence of a particular device. If this option is selected,
$_value will be updated with the number of occurrences found.
Examples of sda_config qualifiers:
show -> show devices corresponding to usage and case
(default)
show_scalar -> show scalar devices corresponding to
usage and case
show_snapshot -> show snapshot devices corresponding to
usage and case
show_ftp -> show fast time plot devices corresponding to
usage and case
find -> find occurrences of a device
find_scalar -> find occurrences of a device as a scalar
find_snapshot -> find occurrences of a device as a snapshot
find_ftp -> find occurrences of a device as a fast time
plot
case_info -> show case configuration information
usage={usage} -> usage to access (default is ColliderShot)
{usage} -> usage to access (default is ColliderShot)
case={case} -> case to access (default is all)
data_type={type} -> data type to return
(scalar (default), snapshot, ftp)
count_only -> file count only
max_return={n} -> maximum number of files to display
device={device} -> check to see if the configuration contains a
particular device
(result is stored in $_value)
name={search string} -> find all occurrences of devices matching
a particular name string
all_properties -> check for any property for the requested
device
obsolete -> support handling of obsolete devices
value={variable} -> specify a variable to return the results
of this command
no_display -> don't display (output) the returned values
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
sda_config # show all ColliderShot devices
sda_config 'inject pbars' # show all 'Inject Pbars' devices
sda_config 'inject pbars' t:beam # show config info for T:BEAM
sda_config/find m:outtmp # find all occurrences of M:OUTTMP
sda_config/name=m:out% # find all occurrences matching "m:out%"
device_list/create devs node=cbshot
sda_config/find/all_properties device_list=devs # find multiple devices
Synonyms: sdaConfig
Related commands:
sda_dir, sda_get, sr_dir, saverestore_get
-------------------------------------------------------------------------------
sda_dir : display SDA directory information
sda_dir[/{qualifier}] [{usage}] [{store number}] [(device}]
This command reads and displays SDA directory information.
It can also return information about which devices are stored
for a given shot. There is also an option to check for the
presence of a particular device. If this option is selected,
$_value will be updated with the logical result.
Examples of sda_dir qualifiers:
usage={usage} -> usage to access (default is ColliderShot)
{usage} -> usage to access (default is ColliderShot)
number={shot_number} -> shot number to access
case={case} -> case to access (default is all)
set={set} -> set to access (default is all)
count_only -> file count only
max_return={n} -> maximum number of files to display
latest -> display only the most recent file
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
device={device} -> check to see if the file contains a
particular device
(result is stored in $_value)
devices -> show all devices contained in a file
cases -> show all cases (and their times) contained
in a file
sets -> show all sets (and their times) contained
in a file and case
match={string} -> only display files with titles matching
a string
case_sensitive (cs) -> make a case sensitive search
(default is case insensitive)
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
wildcard={char} -> set wildcard match character
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in regular expressions
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in regular expressions
no_dir -> don't display directory information
no_times -> don't display dates
no_display -> don't display (output) the directory
ascending -> return/display values in date ascending
order (default is descending)
num_files={variable} -> returns the number of files found
titles={array} -> returns the titles of the files found
timestamps={date array} -> returns the timestamps of the files found
file_numbers={int array}-> returns the file numbers of the files found
verbose -> display verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
sda_dir
sda_dir 3745 m:outtmp
sda_dir/devices 3745
sda_dir/cases 3745
Synonyms: sdaDir, sda_directory
Related commands:
sr_dir, sda_config, sda_get, saverestore_get
-------------------------------------------------------------------------------
setting_history : display the setting values for a device or
a list of devices
setting_history[/start={date}/end={date}/scaled/raw] {device|device list}
This command reads and displays the history of setting values
for a device or a list of devices.
Examples of setting_history qualifiers:
start={date} -> starting date
end={date} -> ending date
sort={sort type} -> sort the entries by timestamp
interval={time_spec} -> set end date to interval after the start time
last -> return the last matching entry
last={n} -> return the last 'n' matching entries
raw -> display raw data (default is scaled)
match={value} -> matching setting value (+)
condition={match type} -> match condition
count_only -> setting count
max_entries={n} -> maximum number of entries to display
num_values={variable} -> returns the number of matching setting values
values={variable} -> returns the matching setting values
timestamps={variable} -> returns the matching timestamps
milliseconds={variable} -> returns the matching fractional seconds
verbose -> display verbose output
output={spec} -> specify output destination
(+ -> indicates that the search can be performed by adding a suffix
of "_lt" and a greater than search can be performed by adding
a suffix of "_gt". (Less than or equal to (_le) and greater
than or equal to (_ge) searches are also supported.))
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
setting_history/start=today z:acltst
setting_log/start=today/count_only z:acltst
Synonyms: settingHistory
Related commands:
setting_log, event_log, state_log, alarm_log, set, cpld_log,
downtime_log
-------------------------------------------------------------------------------
setting_log : display setting log entries
setting_log[/start={date}/end={date}/device={string}/property={prop}][/output={spec}]
This command simply reads and displays entries from the setting
history log. You can search the log by device strings, properties,
console numbers, programs, and index pages. In addition, by using
the "max_count" qualifier you can display the most frequently set
devices.
Examples of setting_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
last -> return the last matching entry
last={n} -> return the last 'n' matching entries
timeout={seconds} -> database timeout in seconds
device={string} -> matching device string (*)
property={property} -> matching device property (*)
{property} -> matching device property (*)
props={p1,p2,p3} -> matching list of properties (*)
alarms -> matching alarm property (*)
console={console_num} -> matching console number (*)
program={program} -> matching setting program (*)
index_page={page} -> matching index page name (*)
node={node} -> matching setting node (Java only) (*)
engine={engine} -> matching setting engine node (Java only) (*)
user={user} -> matching user name (Java only) (*)
length={length} -> matching setting length (+)
offset={offset} -> matching setting offset (+)
num_elements={num} -> matching setting number of elements (+)
(can't be used with wildcarded names)
array_index={index} -> matching setting array index (+)
(can't be used with wildcarded names)
data={raw_data} -> matching setting raw data (*)
[basic_]control={cmd} -> matching basic control commands (*)
scaled[_value]={value} -> matching scaled setting value (*)
device_node={node} -> matching a given source node (*)
device_type={type} -> matching a given device type (*)
crate={crate} -> matching crate number (*)
slot={slot} -> matching slot number (*)
channel={channel} -> matching channel number (*)
madc={MADC number} -> matching MADC number (*)
asc[ending] -> display in time ascending order (default)
desc[ending] -> display in time descending order
count_only -> setting count
max_entries={n} -> maximum number of entries to display
max_count={n} -> return the "n" most frequently set
devices along with their setting counts
fill_char='{character}' -> fill character for empty fields
(default is blank)
show_value -> display the setting values
scaled -> display the scaled setting value
raw -> display the raw setting value (default)
verbose -> display verbose output
alt[ernate] -> use the alternate setting log
output={spec} -> specify output destination
(* -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier,
+ -> indicates that the search can be inverted by adding a suffix
of "_not" to the qualifier and that additionally a less than
search can be performed by adding a suffix of "_lt" and a
greater than search can be performed by adding a suffix
of "_gt". (Less than or equal to (_le) and greater than or
equal to (_ge) searches are also supported.))
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
setting_log/start=today
setting_log/start=16-sep-2001/end="16-sep-2001 00:10"/output=mail:hendricks
setting_log/start=today/count_only
setting_log/start=today/device=%out%
setting_log/start=today/max_count=10/output=mail:hendricks
setting_log/start=today/device=b:mp02/scaled
Synonyms: settingLog, settings, set_log, setLog
Related commands:
setting_history, event_log, state_log, alarm_log, set, cpld_log,
downtime_log
-------------------------------------------------------------------------------
shot_log : make an entry in the Shot Scrapbook
shot_log/source={source}[/subsource={subsource}][/{qualifier}] [{comment}]
The shot_log command provides the capability of making an entry in
the Shot Scrapbook. If a comment string is specified, you can embed
ACNET device values in the comment string by enclosing the device name
in curly braces (eg. "Store # = {t:store}"). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of shot_log qualifiers:
comment -> insert a comment in the log (default)
chapter -> insert a new chapter in the log
url (web_page) -> insert a web page in the log
svg_url -> insert a web page containing an SVG image
in the log
png_url -> insert a web page containing a PNG image
in the log
gif_url -> insert a web page containing a GIF image
in the log
job_status -> return the current server job status for
the specified log
log={log_name} -> shot log name (default is Collider)
source={string} -> set the log source value (required)
subsource={string} -> set the log subsource value
author={string} -> set the log author value
comment={string} -> comment to insert in the log
(can contain embeded device values)
url={string} -> URL of web page to insert in the log
(can contain embeded device values)
title={string} -> title of new chapter to insert in the log
(can contain embeded device values)
by_id -> specify console windows by ID
by_title -> specify console windows by title
image=({cns}:{win},...) -> console window to insert in the log
no_send -> inhibit the actual log entry
verbose -> verbose output
Examples:
shot_log/source=Collider/subsource=01/author=me "This is a comment."
shot_log/url/source=Summary/subsource=10\
"www-bd.fnal.gov/javaapplications/html_write/ShotSummary/incompleted_{T:STORE}.html"
Synonyms: shotLog
Related commands:
web_log
-------------------------------------------------------------------------------
slot : access CAMAC slot information
slot[/{qualifier}] {node} {crate} {slot} [{retries}]
This command will access information about individual
CAMAC slots. Use of this command may require special
privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of slot qualifiers:
node={node} -> specify CAMAC node
crate={crate} -> specify CAMAC crate
slot={slot} -> specify CAMAC slot
retries={retries_value} -> specify CAMAC no-Q retries value
format={decimal|hex} -> specify data format (hex or decimal)
id -> read the CAMAC module ID number
devices[={string}] -> read the devices in the slot
lam -> read the module LAM status value
reset -> reset the module
hex -> interpret data as hexadecimal
dec[imal] -> interpret data as decimal
queue -> allows queueing up multiple commands to
send at the same time
verbose -> display verbose output
output -> specify output
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
variable:{variable_name} -> send output to a variable
symbol:{symbol_name} -> send output to a symbol
Examples:
slot/id tev a1 1 # read module ID
slot/devices tev a1 1 # read slot devices
slot/lam tev a1 1 # read module LAM status
Related commands:
crate, madc, camac
-------------------------------------------------------------------------------
snap_read : read ACNET device using the snapshot plot protocol
snap_read[/event={event}][/delay={secs}][/duration={secs}] {device|device list}[[n]]
This command reads and displays device readings acquired using
the snapshot plot protocol. Data return frequencies of up to
10 MHz can be requested. This command supports family devices
and list specifiers (see above).
Examples of snap_read qualifiers:
event={event} -> event to trigger the beginning of acquisition
delay={secs} -> delay from event (or immediate) in seconds
before beginning data acquisition
duration={secs} -> duration of data acquisition in seconds
(used in place of "frequency")
freq[uency]={freq} -> frequency of data points
(used in place of "duration")
device={device_name} -> device to display
src={data source spec} -> select the data source for the plot data
(only accelerator, SDA, and detached snapshot
manager are supported)
(sda:{file number}:{case}[:{subcase}:{usage}]
snpmgr:{system}:{date or record})
data_event={event} -> specify collection data event of data to be
read (standard snapshot data event format)
value={value} -> matching value for condition handling
cond={condition_value} -> used in conjunction with the value
argument to determine which values
are displayed
interpolate_times -> interpolate timestamps for data taken
at greater than 10 KHz
count[_only] -> only display the number of values read
max_entries={n} -> maximum number of values to display
first -> used in conjunction with "max_entries"
to retrieve the first n matches (default)
last -> used in conjunction with "max_entries"
to retrieve the last n matches
family -> display values for an entire family
num_values={variable} -> returns the number of values read
values={array} -> returns the values read
timestamps={date_array} -> returns the timestamps read
sum={variable} -> returns the sum of all values read
minimum={variable} -> returns the minimum of all values read
maximum={variable} -> returns the maximum of all values read
events_value={variable} -> returns the plot trigger events
delay_value={variable} -> returns the plot trigger delay
plot_rate={variable} -> returns the plot rate
plot_date={variable} -> returns the date on which the data was taken
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
sec[ond]s -> return timestamps in units of seconds
no_display -> don't display (output) the returned values
verbose -> generate verbose output
output={spec} -> specify output destination
The condition value strings are as follows:
all -> show all matches (default)
equal (eq) -> show entries that equal the requested
value (default if value is requested)
not_equal (ne) -> show entries that do not equal the
requested value
less_than (lt) -> show entries whose value is less
than the requested value
less_equal (le) -> show entries whose value is less
than or equal to the requested value
greater_than (gt) -> show entries whose value is greater
than the requested value
greater_equal (ge) -> show entries whose value is greater
than or equal to the requested value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
snap_read/event=2/delay=1/duration=1 m:outtmp
snap_read/event=2/duration=1/value=60/cond=lt m:outtmp
snap_read/event=2/freq=1000/max_count=10/output=mail:hendricks m:outtmp
snap_read m:outtmp/src=sda:9158:'Proton Injection Porch':0 # from SDA
snap_read/data_source=snpmgr:Scratch:50 E:MBGNDF # from snapshot manager
snap_read m:outtmp@'f,type=snp,rate=2048,dur=1,npts=2048,pref=rate,smpl=p;trig=e,2,0'
device_list/create devs devices='m:outtmp,m:outhum'
snap_read/event=2/duration=1 device_list=devs # read multiple devices
Synonyms: snapRead, snpplt
Related commands:
ftp_read, logger_get, saverestore_get, sda_get
-------------------------------------------------------------------------------
sql : send a database modification command or read database values
sql[/{qualifier}] {SQL string} [{server}] [{database}]
This command is used to modify a database table (insert, update,
or delete). It can also be used to read values from the database.
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
Examples of sql qualifiers:
server={server} -> sets the database server (default is ADBS)
database={database} -> sets the target database (default is appdb)
timeout={seconds} -> set database timeout in seconds
convert -> convert embedded device and variable
values in the SQL string
no_set -> suppress actual sending the SQL command
values={var,..} -> specify variables to hold result set
field values for a select
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
num_values={variable} -> returns the number of rows returned by
a select
verbose -> verbose output
output={spec} -> specify output destination
Examples:
sql 'insert into mytable values (1, 2, 3)'
sql 'insert into mytable values (1, 2, 3)' ADBS appdb
sql/timeout=10 'insert into mytable values (1, 2, 3)'
sql/convert 'insert into mytable values ({var1}, {var2}, {var3})'
sql/values=tinyint,smallint,int,str/num_values=num_values \
'select tinyint_value, smallint_value, int_value, char_value \
from appdb.hendricks.bsh_test_table'
Related commands:
print, output
-------------------------------------------------------------------------------
sr_dir : display save/restore file directory information
sr_dir[/{qualifier}] [{system}] [{file number}] [(device}]
This command reads and displays save/restore file directory information.
It can also return information about which devices are stored in a file.
There is also an option to check for the presence of a particular
device. If this option is selected, $_value will be updated with
the logical result.
Examples of sr_dir qualifiers:
number={file_number} -> file number to access
system={system} -> file system to access
(all, global, linac, booster, mi, tevatron,
pbar, switchyard, archive, circular, shot,
miniboone)
count_only -> file count only
max_return={n} -> maximum number of files to display
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
device={device} -> check to see if the file contains a
particular device
(result is stored in $_value)
devices -> show all devices contained in a file
match={string} -> only display files with titles matching
a string
case_sensitive (cs) -> make a case sensitive search
(default is case insensitive)
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
wildcard={char} -> set wildcard match character
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in regular expressions
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in regular expressions
no_dir -> don't display directory information
no_display -> don't display (output) the directory
num_files={variable} -> returns the number of files found
titles={array} -> returns the titles of the files found
timestamps={date array} -> returns the timestamps of the files found
file_numbers={int array}-> returns the file numbers of the files found
num_properties={var} -> returns the number of properties saved for
the files found
num_errors={variable} -> returns the number of save errors for
the files found
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
sr_dir archive
sr_dir archive 984
sr_dir/start=today linac
sr_dir archive 984 m:outtmp
sr_dir/devices archive 984
Synonyms: srDir, sr_directory, srDirectory
Related commands:
sda_dir, saverestore_get, sr_set, sda_get
-------------------------------------------------------------------------------
sr_set : set the value for a device in a save file
sr_set[/{qualifier}] {device}[[n]][/{qualifier...}] {constant|variable|symbol}
This command sets values in save/restore files only.
For the reading or setting properties, multiple scaled or
raw values can be supplied. If multiple values are entered,
they should be separated by spaces or commas. Setting values
can also be supplied in a delimited text file. This command
also supports an array index notation which allows you to
specify the beginning and ending array indices
(ex. set z:acltst[1:2]=13,3.5). This command also supports
family devices and list specifiers (see above). Use of this
command may require special privileges. See Brian Hendricks
(hendricks@fnal.gov) for more information.
Examples of sr_set qualifiers:
file_number={file} -> file number to write to
error_status={status} -> ACNET error status to associate with
the value(s)
values_per_device={val} -> number of values to set per device
allow_inserts -> permit inserting devices that are not
already in the file
scaled (common) -> make a scaled (common) setting
raw -> make a raw setting
length=2 -> set 2 bytes of data
atomic_size -> set the atomic size for this property
maximum_size -> set the maximum size for this property
num_elements=4 -> set 4 values
num_values=4 -> set 4 values
all -> set all values for this property
all_elements -> set all values for this property
offset=0 -> set data starting at a byte offset of 0
index=2 -> set data starting at array index 2
array_index=2 -> set data starting at array index 2
(alarm_)minimum -> set the analog alarm minimum
(alarm_)maximum -> set the analog alarm maximum
min_max -> set the analog alarm minimum and maximum
analog_nominal -> set the analog alarm nominal
(alarm_)nominal -> set the digital alarm nominal
(alarm_)mask -> set the digital alarm mask
(alarm_)tries -> set the number of alarm tries
file -> read setting values from a file
(default file extension is ".dat")
family -> set an entire family
Examples:
sr_set/file_number=1510 z:acltst 5
sr_set/file_number=1510 z:acltst $symbol1
sr_set/raw/file_number=1510 z:acltst A9
sr_set/file_number=1510 z:acltst=1,2,3,4
sr_set/file_number=1510/raw z:acltst[2] 3 4
sr_set/file_number=1510/minimum m@outtmp 32 # set alarm minimum
sr_set/file_number=1510/maximum m@outtmp 100 # set alarm maximum
sr_set z:acltst[1:2]/src=sr:1510=16,3.5
sr_set z:acltst[]/src=sr:1510=0,16,3.5,11 # set an entire array
sr_set z:acltst[2:3]/src=sr:1510=z:aclts3[1:2] # set multiple array elements
sr_set z:acltst[2:3]/src=sr:1510=array[1] # set multiple array elements
sr_set/family z:acltsz[1:2]/src=sr:1510=16,17.5 # set a family device
Synonyms: srSet
Related commands:
set, dbset, read, enable, disable, bypass, activate, deactivate
turn, reset, toggle, alarm_limit, nominal_mask
fill, copy, decrement, increment, delta_set, device_list
-------------------------------------------------------------------------------
state_log : display state log entries
state_log[/start={date}/end={date}] {state_device}
This command reads and displays state event history.
Examples of state_log qualifiers:
start={date} -> starting date
end={date} -> ending date
interval={time_spec} -> set end date to interval after the start time
device={device_name} -> state device
state_value={value} -> matching state value
cond={condition_value} -> used in conjunction with the state_value
argument to determine which log entries
are displayed
text -> display state text (default)
no_text -> don't display state text
node -> display state values as ACNET node values
nodisplay -> don't display the values, only errors
count[_only] -> only display the number of matching
log entries
max_entries={n} -> maximum number of entries to display
last -> used in conjunction with "max_entries"
to retrieve the last n matches
num_values={variable} -> returns the number of values read
values={variable} -> returns the values read
text_values={variable} -> returns the state text string values
timestamps={variable} -> returns the timestamps read
milliseconds={array} -> returns the fractional milliseconds read
dynamic[_arrays] -> dynamically reallocate output data variables
to match the number of values read
verbose -> generate verbose output
output={spec} -> specify output destination
The condition value strings are as follows:
all -> show all matches (default)
equal (eq) -> show entries that equal the requested
state value (default if value is requested)
not_equal (ne) -> show entries that do not equal the
requested state value
less_than (lt) -> show entries whose state value is less
than the requested state value
less_equal (le) -> show entries whose state value is less
than or equal to the requested state value
greater_than (gt) -> show entries whose state value is greater
than the requested state value
greater_equal (ge) -> show entries whose state value is greater
than or equal to the requested state value
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
state_log/start=today v:cldrst
state_log/start=16-sep-2003/end="16-sep-2003 00:10"/output=mail:hendricks v:cldrst
state_log/start=today/count_only/value=10 v:cldrst
state_log/start=today/value=10/cond=lt v:cldrst
state_log/start=today/node v:feup
state_log/start=today/max_count=10/output=mail:hendricks v:feup
Synonyms: stateLog
Related commands:
event_log, setting_log, alarm_log, cpld_log, downtime_log, program_log
-------------------------------------------------------------------------------
str_case : change the case of a string
str_case[/{qualifier}] {string} [{case}]
This command changes the case of a specified string.
This command sets the $_string symbol if successful.
Examples of str_case qualifiers:
case={case} -> set case for string
(upper, lower, invert, capitalize)
{case} -> set case for string
(upper, lower, invert, capitalize)
convert -> convert embedded device and variable
values in the source string
value={variable} -> returns the modified string
Examples:
str_case str upper
str_case 'Lower case this string.' lower
Synonyms: strCase, case_string
Related commands:
str_format, str_cat, str_find, str_replace, str_compare, substring,
str_tail, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
str_cat : concatenate two strings together
str_cat[/{qualifier}] {string} {cat_string}
This command concatenates one string onto the end of another string.
This command sets the $_string symbol if successful.
Examples of str_cat qualifiers:
case={case} -> set case for string
(upper, lower, invert, capitalize)
{case} -> set case for string
(upper, lower, invert, capitalize)
convert -> convert embedded device and variable
values in the concatenation string
value={variable} -> returns the result string
Examples:
str_cat str 'another string'
Synonyms: strCat, concatenate
Related commands:
str_format, str_case, str_find, str_replace, str_compare, substring,
str_tail, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
str_compare : compare two strings
str_compare[/{qualifier}] {string 1} {string 2} [{result}]
This command compares tow strings checking for equality.
This command sets the $_value symbol. A value of zero
would indicate a match.
Examples of str_compare qualifiers:
case_sensitive (cs) -> make a case sensitive compare
(default is case insensitive)
regexp -> perform the comparison using regular
expressions where string 2 is
the regular expression pattern
convert -> convert embedded device and variable
values in the comparison strings
value={variable} -> returns the comparison result value
Examples:
str_compare 'STRING1' 'string1'
str_compare/case_sensitive 'STRING1' 'string1'
Synonyms: strCompare, compare_string
Related commands:
str_format, str_case, str_cat, str_find, str_replace, substring,
str_tail, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
str_convert : convert a string value
str_convert[/{qualifier}] {string} {converted_value}
This command converts a string into a numeric value. This command
sets the $_value symbol if successful.
Examples of str_convert qualifiers:
data_type={data_type} -> data type to convert to (default is float)
{data_type} -> data type to convert to (default is float)
hex -> treat string as being in hexadecimal format
verbose -> verbose output
value={variable} -> specify a variable to return the value
Examples:
str_convert '123.45' value
str_convert/float '123.45' value
str_convert/int '12345' value
str_convert/error 'dpm_pend' value
Synonyms: strConvert, string_convert, convert_string
Related commands:
str_format, str_copy, str_cat, str_case, str_find, str_replace,
str_compare, substring, str_tail, unescape, str_split, str_length,
str_trim
-------------------------------------------------------------------------------
str_copy : copy one string to another
str_copy[/{qualifier}] {string} {copy_string} [{num_chars}]
This command copies one string into another. Either the
entire string or the first n characters of the string can
be copied. This command sets the $_string symbol if successful.
Examples of str_copy qualifiers:
case={case} -> set case for string
(upper, lower, invert, capitalize)
{case} -> set case for string
(upper, lower, invert, capitalize)
convert -> convert embedded device and variable
values in the copy string
value={variable} -> specify a variable to return the string
Examples:
str_copy str 'another string'
str_copy str 'another string' 7 # copy first 7 characters
Synonyms: strcpy, strncpy, strCopy, copy_string
Related commands:
str_cat, str_format, str_case, str_length, str_find, str_replace,
str_compare, substring, str_tail, unescape, str_split, str_convert,
str_trim, copy_variable
-------------------------------------------------------------------------------
str_find : search for one string in another
str_find[/{qualifier}] {string} {find_string} [{position}]
This command searches one string to see if it contains another string.
This command sets the $_value symbol if successful. It will be set
to the index of the beginning of the match (starting at 1).
Examples of str_find qualifiers:
case_sensitive (cs) -> make a case sensitive search
(default is case insensitive)
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
wildcard={char} -> set wildcard match character
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in regular expressions
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in regular expressions
convert -> convert embedded device and variable
values in the search string
position={variable} -> returns the index to the beginning
of the match (starting at 1)
Examples:
str_find 'This string contains a string.' 'a string'
Synonyms: strFind, string_find
Related commands:
str_replace, str_format, str_case, str_cat, str_compare, substring,
str_tail, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
str_format : build a formatted string
str_format {variable} {string|device|symbol} {string|device|symbol} ...
This command builds a single formatted string from a series of
component strings. An str_format statement is made up of a
sequence of terms separated by spaces. Special terms include the
name() operator which causes the name rather than the value of a
device to be output, the pos() operator which allows you to set the
output line text column for tabular data, and 'date' which will
output the current date and time string. This command sets the
$_string symbol if successful.
Examples of str_format qualifiers:
case={case} -> set case for string
(upper, lower, invert, capitalize)
{case} -> set case for string
(upper, lower, invert, capitalize)
convert -> convert embedded device and variable
values in component strings
value={variable} -> specify a variable to return the string
Special functions:
width({value},{width}) -> formats the output of a value to
a specified width
name({device}) -> causes the name rather than the value
of the device to be printed
gen_name({device}) -> causes the generic name (no property
or array index) rather than the value
of the device to be printed
text({device}) -> prints the descriptive text for
the device
units({device}) -> prints the units text for the device
units({device},{common|primary})
state_text({device}) -> prints the text for the current state
(state devices only)
state_text({device}[,{state},{trunc}])
clinks({date|integer}) -> displays date to clinks or clinks
to date
ctime({date|integer}) -> displays date to C time or C time
to date
gmt({date|integer}) -> displays date to GMT (UTC) time or
GMT (UTC) to date
seconds(secs,{type1},{type2}) -> converts between types of seconds
(clinks, C time, or GMT (UTC))
julian({date|integer}) -> displays the corresponding Julian date
hex(integer|variable|symbol -> displays the hexadecimal equivalent
[,output_length]) of the requested value
dec(integer|variable|symbol -> displays the decimal equivalent
[,convert_length]) of the requested value
rad50(string) -> displays hexadecimal radix 50
value corresponding to the
requested string
rad50(integer) -> displays the string corresponding
to the requested value
ascii(hex or decimal integer) -> displays the corresponding ASCII
characters (up to 4)
ascii(string) -> displays the corresponding ASCII
numeric values (up to 4)
error(integer|string|variable) -> displays the corresponding ACNET
error value
node(integer|string|variable) -> displays the corresponding ACNET
node value
device(integer|device|variable) -> displays the corresponding ACNET
device value
[!]exists(device|variable) -> displays a 0 or 1 depending on
whether or not the requested
entity exists
sizeof(device|variable|symbol) -> displays the number of elements in
the requested entity
rtl_error(integer) -> displays the corresponding RTL
error string
system_error(integer) -> displays the corresponding system
error string
float(float|hex) -> displays floating point values
as either floats or raw hex
Examples:
str_format str "M:OUTTMP is in alarm."
str_format str "T:HA11[0] = " t_ha11[0]
str_format str "Symbol #1 = " $symbol1
str_format str name(G:DEV000) " = " G:DEV000 # device name and value
str_format atr "Today's date is " date "." # present date
str_format str "The present time is " time "." # present time
str_format str "This shift started at " this_shift "."
str_format str "Execution time = " script_time # total script execution time
str_format str "Delta time = " delta_script_time # delta script execution time
str_format str "1234" pos(10) "5678" # position second string at column 10
str_format str "The first argument is " string(string0) "."
str_format str "First line" newline "Second line"
Synonyms: strFormat, format_string
Related commands:
print, str_case, str_cat, str_find, str_replace, str_compare, substring,
str_tail, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
str_length : return the length of a string
str_length[/{qualifier}] {string} [{return_length}]
This command determines the length of a string. This command
sets the $_value symbol if successful.
Examples of str_length qualifiers:
verbose -> verbose output
value={variable} -> specify a variable to return the length
Examples:
str_length 'another string'
str_length str length
Synonyms: strlen, strLength, string_length
Related commands:
str_format, str_copy, str_cat, str_case, str_find, str_replace,
str_compare, substring, str_tail, str_trim, unescape, str_split,
str_convert
-------------------------------------------------------------------------------
str_replace : replace a substring with another
str_replace[/{qualifier}] {string} {find_string} {replace_string}
This command replaces substrings in a string with another substring.
This command sets the $_string symbol to the resultant string
and $_value with the number of replacements if successful.
Examples of str_replace qualifiers:
replace_limit={all|num} -> set the maximum number of replacements
to allow (default is all)
case_sensitive (cs) -> make a case sensitive search
(default is case insensitive)
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
wildcard={char} -> set wildcard match character
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in regular expressions
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in regular expressions
convert -> convert embedded device and variable
values in the search string
string={variable} -> returns the resultant string
num_replaced={variable} -> returns the number of replacements
that were actually performed
Examples:
str_replace 'This string contains a string.' 'a string' 'another string'
Synonyms: strReplace, string_replace
Related commands:
str_find, str_format, str_case, str_cat, str_compare, substring,
str_tail, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
str_split : split a string into substrings
str_split[/{qualifier}] {string} {split_string} {output_strings} [{num_strings}]
This command splits a string into its constituent substrings.
The split criteria can be either any one of a set of single
characters or a single separator string. The original string
is not affected by this command. This command sets the $_value
symbol with the number of substrings if successful.
Examples of str_split qualifiers:
char -> treat the split string as a set of
individual characters (default)
string -> treat the split string as a single string
wildcard={char} -> set wildcard match character
case_sensitive (cs) -> make a case sensitive search
(default is case insensitive)
ignore_spaces (is) -> ignore spaces when making search
(default is to honor spaces)
regexp -> perform the search using
regular expressions
use_extended_regexp -> use extended regular expressions
normal_newline -> treat new line characters as normal
characters in regular expressions
special_newline -> treat new line characters as special
characters when using the '^' and '$'
anchor characters in regular expressions
convert -> convert embedded device and variable
values in the search string
no_trim -> don't trim leading and trailing spaces
from substrings
handle_quotes -> handle quoted strings
handle_embedded_quotes -> handle embedded quote characters
preserve_quotes -> preserve quote characters
Examples:
declare strings char[1]
str_split 'This string contains spaces.' ' ' strings num_strings
Synonyms: strSplit, split_string
Related commands:
str_find, str_length, str_replace, str_format, str_case, str_cat,
str_copy, str_compare, substring, str_tail, str_trim, str_convert,
unescape
-------------------------------------------------------------------------------
str_tail : extract the tail of a string
str_tail[/{qualifier}] {string} {length} [{output variable}]
This command extracts the last n characters from the end of a string.
This command sets the $_string symbol if successful.
Examples of str_tail qualifiers:
case={case} -> set case for extracted string
(upper, lower, invert, capitalize)
{case} -> set case for extracted string
(upper, lower, invert, capitalize)
convert -> convert embedded device and variable
values in the extracted string
value={variable} -> specify a variable to return the string
Examples:
str_tail 'We want the end of this string.' 7
Synonyms: strTail
Related commands:
substring, str_find, str_replace, str_format, str_case, str_cat,
str_compare, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
str_trim : trim spaces from a string
str_trim[/{qualifier}] {string} [{trim type}]
This command changes trims spaces from a specified string.
This command sets the $_string symbol if successful.
Examples of str_trim qualifiers:
all -> remove all spaces
begin -> remove leading spaces only
end -> remove trailing spaces only
begin_end -> remove leading and trailing spaces
trim={trim type} -> specify the trim type
case={case} -> set case for string
(upper, lower, invert, capitalize)
{case} -> set case for string
(upper, lower, invert, capitalize)
convert -> convert embedded device and variable
values in the source string
value={variable} -> specify a variable to return the
trimmed string
Examples:
str_trim 'Remove all of the spaces from this string.'
str_trim ' Remove the leading spaces.' begin
str_trim 'Remove the trailing spaces. ' end
str_trim ' Remove the leading and trailing spaces. ' begin_end
Synonyms: strTrim
Related commands:
str_case, str_format, str_cat, str_find, str_replace, str_compare,
substring, str_tail, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
substring : extract a substring from a string
substring[/{qualifier}] {string} {start index} {length} [{output variable}]
This command extracts a substring from another string given a
starting index (starts at 1 to match str_find) and a length.
If the starting index is negative, the substring will start
that many characters from the end of the string. This command
sets the $_string symbol if successful.
Examples of substring qualifiers:
case={case} -> set case for extracted string
(upper, lower, invert, capitalize)
{case} -> set case for extracted string
(upper, lower, invert, capitalize)
convert -> convert embedded device and variable
values in the extracted string
no_truncated -> only return complete extracted strings
value={variable} -> specify a variable to return the substring
Examples:
substring 'This string contains a string.' 22 8
Synonyms: extract_string
Related commands:
str_tail, str_find, str_replace, str_format, str_case, str_cat,
str_compare, str_trim, str_split, str_convert, unescape, str_length
-------------------------------------------------------------------------------
switch_info : display network switch information
switch_info[/{qualifier}][/output={spec}] {switch name|switch list}
This command simply displays network switch information including
a short description, the switch's location, and the keeper. It can
also be used to search the network switch database to find switches
matching various specified characteristics.
Examples of switch_info qualifiers:
categories -> display the switch characteristic categories
status -> displays the switch's status type
area -> displays the switch's area
is_up -> displays whether or not the switch is up
ip_name -> display the switch's IP name
description -> displays the switch's description
location -> displays the switch's location
keeper -> displays the switch's keeper's name
keeper_email -> displays the switch's keeper's email
backup_keeper -> displays the switch's backup keeper's name
backup_keeper_email -> displays the switch's backup keeper's email
attached_nodes -> displays the nodes attached to a switch
name={switch name} -> search for switches matching a given name
keeper={user name} -> search for switches belonging to a keeper
backup={user name} -> search for switches having a backup keeper
descr={description} -> search for switches having a particular
string in their description
loc={location} -> search for switches having a particular
string in their location
status={status type} -> search for switches with a particular
status type
area={area type} -> search for switches with a particular
area type
exact -> display exact matches only in searches
down -> only displays switches that are down
no_up_status -> suppress up/down status in search results
num_switches={variable} -> specify a variable to return the number
of switches processed
switches={variable} -> specify a variable to return the array
of switch values processed
data_values={variable} -> specify a variable to return data values
up_status={variable} -> specify a variable to return switch
up (TRUE)/down (FALSE) status
no_display -> suppress display of switch information
(useful if using command to generate
an array of switch values)
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
switch_info 19ap0
switch_info/keeper=stenman
switch_info/area='antiproton source'
switch_info location=%nml%
Synonyms: switchInfo
Related commands:
node_info, console_info, user_info, program_info, event_info, mdat_info
-------------------------------------------------------------------------------
system : execute a system command
system[/{qualifier}] '{system command string}'
This command executes an operating system command. This command
sets $_value with the status returned by the operating system.
Use of this command may require special privileges. See
Brian Hendricks (hendricks@fnal.gov) for more information.
Examples of system qualifiers:
errorexit -> exit the script on an error (default)
noerrorexit -> don't exit the script on an error
status_value={variable} -> saves the returned operating system status
in a variable
text={variable} -> returns the command output text
num_lines={variable} -> returns the number of lines of command
output text
no_display -> suppress display of command output
(useful when used with the "text" option)
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
system "dir ~hendricks"
Related commands:
execute, run
-------------------------------------------------------------------------------
tcp_request : send a TCP/IP request
tcp_request/host={host}/port={port}/request_data={{type}={value},...}[/qualifier]
This command sends a TCP/IP request to a specified host and port.
The request buffer can be specified as a series of tag/value
pairs separated by commas where the tag specifies the data type of
its accompanying value. Reply buffers can be specified by a series
data type strings separated by commas or by a named generic structure.
Use of this command may require special privileges. See Brian
Hendricks (hendricks@fnal.gov) for more information.
tcp_request command types:
connect -> specify host and port for future
tcp_request commands (values will remain
in effect until changed or the current
script ends)
static_connect -> specify host and port for future
tcp_request commands (values will remain in
effect until changed or the calling process
exits)
disconnect -> disconnect from the specified host and port
request -> send a request (default)
wait_for_reply -> wait for another reply from an earlier
request
Examples of tcp_request qualifiers:
host={host} -> host IP name to send request to
port={port} -> port (or service) to send request to
request={{type}={value},...} -> request buffer specification
string -> request is a simple string
add_newline -> add a new line character to the
end of the request string
null_terminate -> null terminate the request
reply_data={type},... -> reply buffer specification
reply_length={length} -> reply buffer length
reply_struct={struct} -> specify named reply structure
string_reply -> reply is a simple string
reply_values={var1},{var2},... -> specify variables to return
the reply value(s)
reply_length_value={variable} -> specify a variable to return
the length of the reply in bytes
no_display -> don't display the reply
swap_bytes -> swap bytes in the request and reply
swap_words -> swap words in the request and reply
ieee_to_dec -> convert between IEEE and DEC floating
point formats
allow_truncated -> allow replies that are smaller than
what was requested with the
missing bytes set to zero
timeout={seconds} -> request timeout
usm -> specify a USM (default is nonUSM)
output={spec} -> specify output destination
Examples:
tcp_request/host=centra/port=23/string/string_reply/null_terminate \
'0024,cnctn,open,1,demo;'
tcp_request/host=centra/port=almtst/request={ubyte=55,ubyte=55,\
string='m:outtmp'}/replyData=ubyte,ubyte,string25\
/replyValues=typeCode,subType,alarmText
Synonyms: tcpRequest
Related commands:
acnet_request
-------------------------------------------------------------------------------
timer : determine time intervals
timer/{qualifier}] {name}
This command allows the user to define and read timers that
calculate time intervals in the script. This command also
supports defining timers which can return the time since a
requested clock event.
Examples of timer qualifiers:
create -> creates a timer
read -> reads an existing timer
reset -> resets an existing timer
delete -> deletes an existing timer
event={event value} -> specifies a time since event timer
value={variable|symbol} -> specifies output variable for timer read
output={spec} -> specify output destination
Examples:
timer/create timer1 # create timer
timer/read timer1 # read the timer
value = timer(timer1) # read the timer
timer/create/event=2 event_timer # create a time since event timer
Related commands:
none
-------------------------------------------------------------------------------
tlg_info : read information about events generated by the TLG
tlg_info[/{qualifier}] [{event}]
This command displays information about clock events generated
by the timeline generator (TLG).
Examples of tlg_info qualifiers:
{machine} -> machine to extract TLG information for
(booster, mi, tevatron, accumulator,
debuncher, recycler, switchyard, numi)
event_times -> retrieve the times that a given event
will occur
reset_info -> retrieve reset information including
events, state IDs, and times
cycle_limits -> retrieve the minimum and maximum cycle
lengths for a given machine
cycle_lengths -> retrieve events and cycle lengths
supercycle_length -> retrieve the length of the supercycle
events={variable} -> returns event numbers
states={variable} -> returns state ID values
times={variable} -> returns event times
lengths={variable} -> returns cycle lengths
num_values={variable} -> returns the data count
suppress_errors -> suppress an error if one occurs so that
the script does not exit
verbose -> generate verbose output
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
tlg_info/reset_info/mi # retrieve Main Injector reset info
tlg_info/event_times 23 # retrieve times for event 23
Synonyms: tlgInfo
Related commands:
event_info, mdat_info, event_log, state_log
-------------------------------------------------------------------------------
unescape : replace escape characters in a string
unescape/{type}[/{qualifier}] {string}
This command replaces escape characters in a string with their
ASCII counterparts. The types of escape characters supported
by this command include: URL, HTML, and C/C++.
This command sets the $_string symbol if successful.
Examples of unescape qualifiers:
type={escape_type} -> set escape character type
(url, html, c)
{escape_type} -> set escape character type
(url, html, c)
convert -> convert embedded device and variable
values in the extracted string
Examples:
unescape/url 'This+string%20contains+URL%20encoding%2E'
Synonyms: str_unescape
Related commands:
str_find, str_replace, str_format, str_case, str_cat,
str_compare, substring, str_tail, str_split, str_convert,
str_trim, str_length
-------------------------------------------------------------------------------
user_info : display console user or console node information
user_info[/{qualifier}][/output={spec}] {search value|user list|node name}
This command displays information concerning users including
a full name, active/inactive status, extension, ID number,
permissions, and console class memberships. This command sets
the global symbol, $_value, to the count of users found.
Examples of user_info qualifiers:
name -> search by account name (default)
full_name -> search by full user name
phone -> search by phone number
email -> search by user email address
mail_station -> search by mail station
location -> search by office location
affiliation -> search by user affiliation
console_user_id -> search by console user ID
exact -> display exact name matches only
people_only -> only match entries which are humans
inactive -> match even inactive entries
(default is active entries only)
user_phone -> phone information
acl -> display user ACL privilege information
console_classes -> display the console classes that a user
is a member of
subscribed_programs -> display the list of programs subscribed to
by the user
alarms_monitored -> display the list of alarms monitored
by the user
page_usage[={daterange}]-> display the index page entries accessed
by the user
node -> display console node information
match={param} -> search for something other than a user name
(phone, email, mail, location, affiliation)
phone={phone number} -> search for users with a given phone extension
email={email} -> search for users with a given email address
num_users={variable} -> returns the number of users found
name_value={variable} -> returns the user names found
full_name_value={var} -> returns the full user names found
phone_value={variable} -> returns the phone extensions found
email_value={variable} -> returns the emails found
user_id_value={var} -> returns the user IDs found
mail_value={variable} -> returns the mail stations found
affiliation_value={var} -> returns the affiliations found
location_value={var} -> returns the locations found
no_display -> suppress display of user information
output={spec} -> specify output destination
Examples of output specifications:
mail:{user_name} -> send mail to a user
file:{file_name} -> send output to a file
Examples:
user_info hendricks
user_info/exact hendricks
user_info/inactive josh
user_info (/name=%smith%/or/fullName=%smith%/)
Synonyms: userInfo
Related commands:
program_info, console_info, node_info, switch_info, event_info,
tlg_info, mdat_info, clib_info, fshare_info, file_info
-------------------------------------------------------------------------------
url_display : display a URL in a web browser
url_display[/{qualifier}][/console={cns}] [{cns}] {URL string}
(Note: Arguments enclosed in square brackets are optional.)
This command can be used to display a simple URL. It can also
be used to display the help URLs for ACNET nodes, devices,
and programs. This command only affects the console web browser
that is used for console application help.
Examples of url_display qualifiers:
node -> treat the URL as an ACNET node name and
display the URL describing that node
device -> treat the URL as an ACNET device name and
display the URL describing that device
alarm -> treat the URL as an ACNET device name and
display the alarm help URL for that device
program -> treat the URL as an ACNET program name and
display the URL describing that program
acl_help -> treat the URL as an ACL command or function
name or as the base of ACL help
log -> treat the URL as a search string for a
web log
early_bird -> treat the URL as a reference to an MCR
early bird report
clib -> treat the URL as a reference to a
CLIB routine
user_library -> treat the URL as a reference to a
user library routine
apphome -> display the home page for application help
palist -> diplay the page which lists help for all PAs
salist -> diplay the page which lists help for all SAs
wild[card] -> wildcard a library routine name
list -> simply display the URL itself
get -> retrieve and output the requested page
Examples:
url_display/console=134 'http://www-bd.fnal.gov/controls'
url_display 134 'http://www-bd.fnal.gov/controls'
url_display 'http://www-bd.fnal.gov/controls' # display locally
url_display/node/console=134 tev # display node info
url_display/device/console=134 m:outtmp # display device info
url_display/program/console=134 c48 # display program info
url_display/program/console=this_console c48
url_display/list/device m:outtmp
url_display/get/device m:outtmp
url_display/early_bird
Synonyms: url, urlDisplay
Related commands:
read_file
-------------------------------------------------------------------------------
web_log : make an entry in a web-based log book
web_log/log={log}/source={source}[/subsource={subsource}][/{qualifier}] [{comment}]
The web_log command provides the capability of making an entry in
a web-based log book. If a comment string is specified, you can embed
ACNET device values in the comment string by enclosing the device name
in curly braces (eg. "Store # = {t:store}"). Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of web_log qualifiers:
comment -> insert a comment in the log (default)
chapter -> insert a new chapter in the log
url (web_page) -> insert a web page in the log
svg_url -> insert a web page containing an SVG image
in the log
png_url -> insert a web page containing a PNG image
in the log
gif_url -> insert a web page containing a GIF image
in the log
job_status -> return the current server job status for
the specified log
log={log_name} -> web log name
source={string} -> set the log source value (required)
subsource={string} -> set the log subsource value
author={string} -> set the log author value
comment={string} -> comment to insert in the log
(can contain embedded device values)
url={string} -> URL of web page to insert in the log
(can contain embedded device values)
title={string} -> title of new chapter to insert in the log
(can contain embedded device values)
by_id -> specify console windows by ID
by_title -> specify console windows by title
image=({cns}:{win},...) -> console window to insert in the log
no_send -> inhibit the actual log entry
verbose -> verbose output
Examples:
web_log/log=quenchlog/source='BLM/BPM'/subsource=0/author=me "This is a comment."
Synonyms: webLog
Related commands:
shot_log
-------------------------------------------------------------------------------
write_file : write a file
write_file[/{qualifier}[={value}]] {file name}
This command will write a file. Files can be treated as
text files (default) or binary files.
Examples of write_file qualifiers:
text -> treat as a text file (default)
binary -> treat as a binary file
fshare -> treat as a Filesharing file
appds -> treat as an APPDS table
text={file text} -> text to write for a text file
num_lines={num lines} -> number of lines to write to a
text file
data={file data} -> data to write for a binary file
num_bytes={num bytes} -> number of bytes to write to a
binary file
structure={name} -> write structure name
appds_table={name} -> APPDS table name
values={{type}={value},...} -> write structure specification
values={{value1},{value2},...} -> write structure specification
(predefined generic structure)
values={{field}={value},...} -> write structure specification
(predefined generic structure)
values={{field num}={value},...}-> write structure specification
(APPDS table)
fill={fill method} -> can be used with a named structure
to initialize the write buffer
from the structure default values
file -> read structure information from
a file
ieee_to_dec -> convert IEEE floats to DEC
dec_to_ieee -> convert DEC floats to IEEE
byte_swap -> swap the setting bytes on word
boundaries
word_swap -> swap the setting words on longword
boundaries
offset={n} -> starting byte offset to write at
stream -> start writing where the previous
call to this command left off
convert -> convert embedded device and variable
values in the file name string
verbose -> display verbose output
Examples:
declare text string[2] = 'line 1', 'line 2'
write_file/text=text myfile.txt # write text file
declare values integer[4] = 1, 2, 3, 4
write_file/data=values mydata.dat # write binary file
Synonyms: writeFile, file_write, fileWrite
Related commands:
read_file, read_dir, output, print, output_value
-------------------------------------------------------------------------------
cnswin : move, resize, or iconify a console window
cnswin/qualifier[={value}] {console} {window|slot|program}
This command supports manipulation of console program windows.
These operations include moving, resizing, and iconifying
windows. The window may be specified by program name, program
slot, or window identifier. Use of this command may require
special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of cnswin qualifiers:
raise -> pop the window to the front
lower -> push the window to the back
iconify -> iconify the window
home -> place the window at the origin
center -> center the window on the root window
size={small|medium|large|not_large}
-> set the size of the window
x[_pos]={coordinate} -> set X position of window
y[_pos]={coordinate} -> set Y position of window
title[={new title}] -> set the window title
Examples:
cnswin/raise 134 pa # pop PA window on console 134
cnswin/lower 134 d80 # hide D80 application
cnswin/home local sa # put local SA window at origin
cnswin/title local gxpa_1 'None' # set the title of GxPA1
Related commands:
image_draw
-------------------------------------------------------------------------------
cns_message : send a console message
cns_message[/qualifier[={value}]] {console} {message} {color} {num_beeps}
This command sends a console message. Use of this command may
require special privileges. See Brian Hendricks (hendricks@fnal.gov)
for more information.
Examples of cns_message qualifiers:
cns={console number} -> specify the console number
message={message} -> specify the message text (or file name)
file -> retrieve the message from a text file
color={color} -> specify the text color (default is white)
convert -> convert embedded device and variable
values in the message (or file name) string
no_set -> suppress actual sending the message
verbose -> verbose output
output={spec} -> specify output destination
Examples:
cns_message 134 "Hello world"
cns_message 134 "Hello world" green
Synonyms: cnsMessage, console_message, consoleMessage
Related commands:
none
-------------------------------------------------------------------------------
image_draw : display a graphic image
image_draw [/qualifier=[{value}]] [{cns}] [{window}] {file_name}
(Note: Arguments enclosed in square brackets are optional.)
This command presently supports three image types: Lex Draw,
LXI, and GIF. The Lex Draw and LXI images will be displayed
in the specified console window. GIF images are displayed in
XV application.
Examples of image_draw qualifiers:
type={type} -> image type
("lex_draw" -> Lex Draw image,
"lxi" -> LXI image,
"gif" -> GIF image)
{type} -> image type
("lex_draw" -> Lex Draw image,
"lxi" -> LXI image,
"gif" -> GIF image)
console={num} -> console number
window={win} -> console window (not used for GIF images)
resize -> resize the window (no value passed)
(not used for GIF images)
no_resize -> don't resize the window (no value passed)
(not used for GIF images)
number={num} -> image number (Lex Draw images only)
display_type -> Lex Draw image display type
("display" -> normal display (default),
"no_erase" -> don't erase window,
"blink" -> display blinking image)
x_pos={pos} -> X position in window (LXI images only)
y_pos={pos} -> Y position in window (LXI images only)
color_map={map} -> color map
("default" -> default color map,
"gray_scale" -> gray scale color map,
"private" -> private color map)
(LXI images only)
Examples:
image_draw/resize 134 sa 'a1refrig'/number=1 # display Lex Draw image
image_draw 134 sa '/usr/local/userb/pic/lexdraw/autumn_hirise.lxi'
image_draw 134 '/usr/local/userb/pic/art/cat.gif'
Synonyms: imageDraw
Related commands:
save_screen_image, cnswin
-------------------------------------------------------------------------------
Related functions:
intro_acl_usage, acl_compile_c, acl_execute_c, acl_file_execute_c,
acl_file_read_c, acl_file_write_c, acl_db_file_exists_c,
acl_file_stats_c, acl_free_c, acl_free_arg_info_c,
acl_copy_arg_info_c, acl_read_symbol_c, acl_read_symbol_as_string_c,
acl_read_symbol_info_c, acl_read_symbol_dynamic_info_c,
acl_read_symbol_names, acl_read_intrinsic_symbol_names,
acl_parse_symbol_name, acl_script_argument_info_c,
acl_script_has_symbol_list_c, acl_script_has_setting_c,
acl_set_symbol_c, acl_delete_symbol, acl_reinit_symbol, acl_info_c,
acl_cancel_requests_c, acl_get_devices_c, acl_close, acl_command_text,
acl_log_file_c, acl_default_data_source_c, acl_default_script_path_c,
acl_register_host_request_func, acl_unregister_host_request_func,
acl_register_user_exit_handler, acl_unregister_user_exit_handler,
acl_script_is_executing, acl_translate_command_string,
acl_command_string_to_type, acl_command_type_to_string_c,
acl_function_text, acl_function_type_to_string_c, acl_open_script_file,
acl_read_last_execution_info, acl_read_last_run_command_info,
acl_value_type_to_string_c, acl_file_read_description_c,
acl_add_remote_message_callback, acl_remove_remote_message_callback,
acl_execute_in_window_c, acl_execute_file_in_window_c,
acl_get_window_id, acl_search_db_files_c, spawn_acl_script_c,
acl_execute_always_block_c, acl_get_execution_line_number,
device_listing_c