XTC

XTC (X-windows Tektronix Controller) provides an X-window to display
Tektronix 4014 and 4105 plots.  XTC buffers the plot frames and can
scroll back and forth through previous plots.  It can also print a buffered
frame, save a plot frame to a disk file, or read frames from a plot file.

Home Top


Setup

Each Xwindow user needs to start one copy of XTC for the entire
session and define the logical variable PLOT in all xterm windows to
point to that XTC window.


To setup environments and start xtc:
  
  tcsh users:
  source  .xtcrc_csh
  
  bash users:
  . .xtcrc
 
  the scripts are in $NTCC_ROOT/etc/ if PPPL, 
  in $CODESYSDIR/xtctek/ otherwise.

Home Top


At PPPL

  module load ntcc (after you have loaded a compiler)
  cp $NTCC_ROOT/etc/Xtc $HOME/
  cp $NTCC_ROOT/etc/.xtcrc{_csh} $HOME/
     ( you can edit/rename the file and change TERMINAL_INPUT )
  source $HOME/.xtcrc{_csh}
     this will start a window

Home Top


Printing

If your printer can not handle tektronix files, xtc can convert
the file to PS prior to printing:
To do this define the "Directory of tek2ps prolog" on the "Frame Printing"
menu. This must be the directory, where tek2ps.pro and xtc_print reside,
e.g. $CODESYSDIR/xtctek for TRANSP developers, or $TRANSP_LOCATION.
For PPPL users it would be  $NTCC_ROOT/etc; but PPPL printers usually
handle tek files, so this field should be empty.

Note: you also must have 'tek2ps' in your PATH !
      (tek2ps should be located where xtc is.)
      
If you made changes to "Frame Printing" do "Save Current Settings"
in the Customize menu.

Home Top


VMS

  If you don't do "setup tftrlog" in your login.com, do
	$ setup xtc

  To launch xtc and define logicals:
        $ runxtc 

  runxtc runs SPAWN_XTC.COM, which you can copy from SOURCEROOT:[XTCTEK].




Home Top


Defaults

Under VMS the XTC default settings are in the file "XTC.DAT" in your
top level directory.  Under UNIX, the file is named "Xtc".
You can copy a standard set of defaults from the TRANSP distribution, 
$CODESYSDIR/xtctek, $NTCC_ROOT/etc, $TRANSP_LOCATION 
or set the options using the XTC menus
the first time it runs and do "Save Current Settings" in the Customize menu.
Be sure the following are set in the defaults
file.
  xtc*wtog_Display_MBX_Data.set:          true
  xtc*wtog_Display_Plotfile_Data.set:     true
  xtc*wscale_Background_Red_V4.value:     255
  xtc*wscale_Background_Green_V4.value:   255
  xtc*wscale_Background_Blue_V4.value:    255
Without the first 2 options XTC receives the plot vectors, but doesn't
display them.  Setting the background colors to 255 sets the background
screen to white.

The standard size for the XTC window is:
  xtc*wdraw.width:        640
  xtc*wdraw.height:       512
Home Top


Useage

Most SGLIB plots end with a call to subroutine UPAUSE which causes the
output device to "beep" and wait for a typed character.  At this point
XTC beeps and waits.

  If you click MB1 (left mouse button) inside the window, XTC treats this
  as having typed a RETURN in the window.

  If you want to type a character other than a RETURN, click in the window
  border to make the window active, then type the character.

  You can bypass waiting for a character by defining the environment
  variable TERMINAL_INPUT=NONE in the xterm window before running the
  program that generates the plots.

The easy way to scroll to the previous stored plot is to put the mouse
inside the window border and click MB2 (middle mouse button); to scroll
to the next stored plot, click MB3 (right mouse button).

The list box (which appears if you select "Show List Box" in the Commands
menu) provides additional options.

Home Top


List_box

The List Box appears when you select "Show List Box" in the Commands
menu.  It lets you display an arbitrary frame, print one or more frames,
or save frame(s) to a disk file.

The number of frames that XTC buffers can be changed in the "Frame
Buffering" window under the Customize menu.

Frames are identified in the List Box by names of the form "MBX_0 Frame #"
where "#" is the frame number since XTC was started.  You can change the
name of any individual frame with the "Rename Frames" window under the
Commands menu.
You can change the general format of the frame name(s) in the "Frame
Filing" window under the Customize menu.

Home Top


Command_Menu

The following commands are available:

Home Top


Show List Box

"Show List Box" brings up the List Box window, which contains a scrollable
list of the plot frames in the buffer and lets you draw, save to a file,
print, or delete one or more frames.

Home Top


Clear Frame Buffer

"Clear Frame Buffer" clears the frames in the buffer.

Home Top


Show Byte Stream

"Show Byte Stream" lets you view the frame data as it is received; this
greatly slows XTC's execution.

Home Top


Erase Screen

"Erase Screen" clears the display window.

Home Top


Read Plot File

"Read Plot File" lets you select a plot file to display.  All frames in
the file are read and displayed.

Home Top


Rename Frames

"Rename Frames" lets you rename a frame.

Home Top


Fix Aspect Ratio

"Fix Aspect Ratio" resizes the display window to the standard Tektronix
 4014 aspect ratio (780/1024).  This prevents plot distortion after you
have resized the window manually.  Note that when you resize the display
window the drawing is scaled appropriately, however the text size remains
constant.

Home Top


About XTC

"About XTC" displays the version number.

Home Top


Quit

"Quit" exits XTC and deletes its mailbox.

Home Top


Customize_Menu

You can set and then save the following options:

Home Top


Frame Buffering

"Frame Buffering" lets you select how many frames are stored in the
XTC buffer.
Home Top


Frame Filing

"Frame Filing" lets you select the general format of the file name for
frames saved to disk by XTC.
Default is ~/*_#
which creates files in your home directory with the name MBX_0_Frame_1,
MBX_0_Frame_2, etc.

You can enter a directory of your choice.

Home Top


Auto File

"Auto File"  will create a "new" file for each plot, automatically numbering the files, e.g. ~/MBX_0_Frame_1.ps, ~/MBX_0_Frame_2.ps, etc.
If you also select "Append New Frames To Existing File", it will still create a new file for each individual plot.
To actually append all plots into one file, you need to select
"File" on the "Show List Box" as explained under "Append New Frames To Existing File".

Home Top


PostScript File

"PostScript File" will create a post script file in addition to the tek file.

Home Top


Append New Frames To Existing File

"Append New Frames To Existing File" 
When you are done, click under "Show List Box"
Highlight all frames
Click "File"

You will get one file in ~/MBX_0_Frame_1.ps
If you click "Print", all plots will be printed with one cover sheet.

Home Top


Frame Printing

"Frame Printing" lets you select the default printer queue, and whether
or not frames are automatically printed as they are displayed.
You need a printer that supports tektronix style files.
If your printer can not handle tektronix files, you can save the file
- see "Frame Filing" - and use TEK2PS to convert it to a PS file.
XTC can do this automatically:

At PPPL this is already setup for you (it should be $NTCC_ROOT/etc).

Other Sites:
On UNIX define "Directory of tek2ps prolog"
      e.g. $TRANSP_LOCATION
      or   $CODESYSDIR/xtctek

On VMS  define "Slave Printer Process Command File"
      e.g. SOURCEROOT:[XTCTEK]XTC_DCL.COM


Home Top


Visibility

"Visibility" lets you select whether XTC is a window or an icon on
startup.  (If you select Icon, the List Box also always starts as an
Icon.)  It also contains switches to control whether or not plot frames
received (via the mailbox) from a program or read from a file are
automatically displayed.  If these switches are not turned on, you
must select "Draw" from the List Box to view the plot.  "List Box
Policy" option selects whether the list of frame names automatically
widens to accommodate long names or remains constant with a horizontal
scroll bar to view the names.

Home Top


Colors

"Colors" lets you select the color for the background and each of the 7
Tektronix line color types.  For a black and white display to get black
on white, set Background to (255,255,255) and all the Foreground colors
to (0,0,0); to get white on black, set Background to (0,0,0) and the
Foreground colors to (255,255,255).

Home Top


Internals

XTC works by setting up 2 mailboxes between a program using the SGLIB
graphics library and the XTC process; one mailbox for the graphics output
and one for the GIN (crosshairs) input.

XTC is maintained by C. Ludescher-Furth.  This file was last updated July 22,
2004.
Home Top


About this document

This Document was created by hlptohtml

  • Written By:
  • Manish Vachharajani(mvachhar@pppl.gov)