next up previous contents index
Next: III. Part 3 - Up: 9. Using the Strip Previous: 9.1 Hints for EMC   Contents   Index

9.2 configuration file

Specifies a file from which to read configuration information. If unspecified, the current working directory is checked for a file named "gstripchart.conf", the user's home directory is checked for a file named ".gstripchart.conf", and the /etc directory is checked for a file named "gstripchart.conf". The first such file found is used.

geometry
A standard X11 geometry specification of the form WxH+X+Y.

chart-interval
slider-interval
Specifies the time interval in seconds between updates to the chart window and slider window. If unspecified, the chart window will be updated every 5 seconds and the slider window will be updated every 0.2 seconds.

chart-filter
slider-filter
Specifies the time constant in seconds to be used in low-pass filtering the data displayed in the chart or slider windows. A time constant of 0 seconds turns low-pass filtering off, which can result in a jumpy display. A time constant in the same range as the interval parameter, described above, is usually a good choice. Much larger values cause display updates to become sluggish. If unspecified, no low pass filtering is performed in either window.

menubar
Adds an application menubar to the main window. Normally this is omitted, and the menu is popped up by right-clicking on the chart window.

omit-slider
Causes the display of the slider window to be suppressed.

Configuration
The configuration file has a paragraph of configuration information for each parameter to be plotted. Each of these paragraphs are comprised of a series of RFC-822 style "keyword: value" pairs, beginning with an "identifier:" line. A comment can be included by putting a sharp sign (#) in the first column of a line.

The following keywords are available. Some are optional; some are only used by certain display types; many have reasonable default values, as described below.

identifier:
Introduces a parameter definition, and assigns a name to the parameter. This line *must* be the first line of a parameter description.

active:
If a parameter is marked "active = no", it will be ignored. This provides a convenient way to disable a parameter without deleting it from a parameter file.

id_char:
Provides a single-character abbreviation for a parameter. Currently unused, this is intended for the non-existent character-graphics display mode.

color:
Determines the color to be used in displaying a parameter. The color names and their RGB values are taken from X11/rgb.txt.

filename:
The file from which a parameter value is read. When a filename beginning with a "|" is supplied, input lines will be read from a pipe.

pattern:
The pattern which identifies the line from which a parameter value is to be extracted. If no pattern is provided, the first line of the file is used.

fields:
The number of fields to be split out of the first line which matches the pattern. Splitting is done on whitespace.

equation:
An equation used to obtain the value to be plotted for this parameter.

maximum:
The largest value that can be displayed. Any value in excess of the maximum will be plotted at the top of the display. If omitted, a default value of 1.0 is used.

minimum:
The smallest value that can be displayed. Any value less than the minimum will be plotted at the bottom of the display. If omitted, a default value of 0.0 is used.

nml:
The name of the variable to read from NML to use for this plot. If an equation is specified this variable becomes keyword one or $1. Adding this keyword makes the filename and pattern keywords irrelevant. See the list of variables available.

emcmot:
The name of the variable to read from EMCMOT to use for this plot. If an equation is specified this variable becomes field one or $1. Adding this keyword makes the filename and pattern keywords irrelevant. See the list of variables available. On each iteration, a value to be displayed is obtained for each parameter in the configuration file. The file named in the "filename" line is opened - either as a pipe if the filename begins with a pipe character (|), or as a regular file otherwise - and a line is read.

If a pattern was specified, lines are read until one is found that contains the pattern string anywhere in the line. This line is split into the number of whitespace separated fields specified in the "fields" line. Each of these fields is interpreted as a floating point number.

A value is obtained by evaluating the "equation" line using these field values. The first (or only) value is denoted by $1, the next by $2, and so forth. The difference between the field values between the last and the current iteration is denoted by ~1, ~2, and so forth. The elapsed time in seconds between the last and current iteration is ~t. The requested update interval is $i (and the delta is ~i, but will always be zero). All the usual infix arithmetic operators are available.

If libgtop support has been compiled into the gstripchart program, a value can be obtained from this library. This provides a portable method of obtaining many system performance parameters. The following libgtop parameters are available:

CPU Statistics

cpu_total, cpu_user, cpu_nice, cpu_sys, cpu_idle, and cpu_freq

Memory Statistics

mem_total, mem_used, mem_free, mem_shared, mem_buffer, mem_cached, mem_user, mem_locked

Swap Statistics

swap_total, swap_used, swap_free, swap_pagein, swap_pageout

Uptime Statistics

uptime, idletime

Loadavg Statistics

loadavg_running, loadavg_tasks, loadavg_1m, loadavg_5m, loadavg_15m

Network Statistics

net_pkts_in, net_pkts_out, net_pkts_total, net_bytes_in, net_bytes_out, net_bytes_total, net_errs_in, net_errs_out, net_errs_total

Note that the network statistics don't use the libgtop library. Instead, the values are read directly from /proc/net/dev, and so are only available under Linux. These are all signed long integer quantities, except for uptime, idletime, and the three loadavg values which are floating point values.

NML Variables This is the list of variables that can be read from NML. The array_index should be replaced with an appropriate integer.

task.heartbeat, task.mode, task.state, task.execState, task.interpState, task.motionLine, task.currentLine, task.readLine, motion.heartbeat, motion.traj.linearUnits, motion.traj.angularUnits, motion.traj.cycleTime, motion.traj.axes, motion.traj.mode, motion.traj.enabled, motion.traj.inpos, motion.traj.queue, motion.traj.activeQueue, motion.traj.queueFull, motion.traj.id, motion.traj.paused, motion.traj.scale, motion.traj.position.tran.x, motion.traj.position.tran.y, motion.traj.position.tran.z, motion.traj.actualPosition.tran.x, motion.traj.actualPosition.tran.y, motion.traj.actualPosition.tran.z, motion.traj.velocity, motion.traj.acceleration, motion.traj.maxVelocity, motion.traj.maxAcceleration, motion.axis[array_index].units, motion.axis[array_index].p, motion.axis[array_index].i, motion.axis[array_index].d, motion.axis[array_index].ff0, motion.axis[array_index].ff1, motion.axis[array_index].ff2, motion.axis[array_index].backlash, motion.axis[array_index].bias, motion.axis[array_index].maxError, motion.axis[array_index].deadband, motion.axis[array_index].cycleTime, motion.axis[array_index].inputScale, motion.axis[array_index].inputOffset, motion.axis[array_index].outputScale, motion.axis[array_index].outputOffset, motion.axis[array_index].minPositionLimit, motion.axis[array_index].maxPositionLimit, motion.axis[array_index].minOutputLimit, motion.axis[array_index].maxOutputLimit, motion.axis[array_index].maxFerror, motion.axis[array_index].minFerror, motion.axis[array_index].homingVel, motion.axis[array_index].homeOffset, motion.axis[array_index].enablePolarity, motion.axis[array_index].minLimitSwitchPolarity, motion.axis[array_index].maxLimitSwitchPolarity, motion.axis[array_index].homeSwitchPolarity, motion.axis[array_index].homingPolarity, motion.axis[array_index].faultPolarity, motion.axis[array_index].setpoint, motion.axis[array_index].ferrorCurrent, motion.axis[array_index].output, motion.axis[array_index].input, motion.axis[array_index].inpos, motion.axis[array_index].homing, motion.axis[array_index].homed, motion.axis[array_index].fault, motion.axis[array_index].enabled, motion.axis[array_index].minSoftLimit, motion.axis[array_index].maxSoftLimit, motion.axis[array_index].minHardLimit, motion.axis[array_index].maxHardLimit, motion.axis[array_index].overrideLimits, motion.axis[array_index].scale, motion.axis[array_index].ferrorHighMark, io.heartbeat, io.cycleTime, io.tool.toolPrepped, io.tool.toolInSpindle, io.spindle.speed, io.spindle.direction, io.spindle.brake, io.spindle.increasing, io.spindle.enabled, io.coolant.mist, io.coolant.flood, , io.lube.on, io.lube.level, , io.aux.estop, io.aux.estopIn, io.aux.dout[array_index], io.aux.din[array_index], io.aux.aout[array_index], io.aux.ain[array_index]

EMCMOT Variables This is the list of variables that can be read from emcmot.

heartbeat, computeTime, pos.tran.x, pos.tran.y, pos.tran.z, axisPos[0], axisPos[1], axisPos[2], ferrorCurrent[0], ferrorCurrent[1], ferrorCurrent[2], ferrorHighMark[0], ferrorHighMark[1], ferrorHighMark[2], output[0], output[1], output[2], input[0], input[1], input[2], actualPos.tran.x, actualPos.tran.y, actualPos.tran.z, id, depth, activeDepth, queueFull, motionFlag, axisFlag[0], axisFlag[1], axisFlag[2], axisPolarity[0], axisPolarity[1], axisPolarity[2], paused, overrideLimits, tMin, tMax, tAvg, sMin, sMax, sAvg, nMin, nMax, nAvg


next up previous contents index
Next: III. Part 3 - Up: 9. Using the Strip Previous: 9.1 Hints for EMC   Contents   Index
root 2003-05-26