Phantom DNC Software Notes

Rybett Controls WebDoc 303   (Copyright 2008)   Return to [Index]


Phantom DNC software supports background file transfer while using your favorite CAD/CAM programs in the foreground. With Phantom, operators may run files of unlimited length and as an option view job packets of CAD drawings and photos. Supports remote file requests from machine tools and integrates with other applications via hooks. Phantom is packaged in a 2 port version as software only or in 4, 8 and 16 port versions which include hardware.  You may browse the document or click a topic:  [Setup]  [Hooks]  [Windows 95/98]

BASIC PHANTOM FILES and SETUP PROCEDURES:

Phantom DNC programs are built upon simple text files that control the look and function of the software. The following files may be edited by the user to modify default settings:

    Machnam.txt is the Name and Description for each machine
    C3menu.mnu is the Common user menu for all machines
    "name".mnu is the Specific user menu for machine "name"
    Fileopt.fopis the Common file menu for all machines
    "name".fop is the Specific file menu for machine "name"

As a first step, the Machnam.txt file should be edited to reflect the actual shop names of your machines. During setup, run the Phantom program with a -n switch for NO TSR (ccam -n) or click on the Setup icon to call a batch file that does this for you. When first run, Phantom software searches for a Machine Setup for each name you have defined. New names will result in a blank setup which must be filled out by selecting the Machine Setup Menu Option. If a password is required, it will usually be "pass" in lower case. To save time, you may press "M <Enter>" to view a menu of default setups for many types of machine controls. Follow the prompts at the bottom of the screen and be sure to check the validity of Item 1: Port/Mode. To change any item, press its menu number and <Enter>. To exit, press Q and <Enter> followed by Y and <Enter> (to save your modified setup.)

The file C3menu.mnu defines the common user menu for all machines that do not have a specific menu defined by a "name".mnu file, where "name" represents the first 8 characters of the Machine Name. As explained in the user manuals, the first line of the menu file defines the final screen prompt. The remaining lines are grouped into threes, each group defining a menu item by prompt, command and password. Look at the menu files in an editor and it will become clear how to modify them to meet your needs.

If you have trouble, you may request the following related WebDocs along with instructions for specific machine controls:

WebDoc 102: Testing RS232 Serial Ports
WebDoc 106: Adding New Machines to a DNC
WebDoc 402: List of CNC RS232 Installations

PHANTOM SOFTWARE HOOKS:

PHANTOM SOFTWARE HOOKS allow other manufacturing applications to be cleanly integrated into the overall DNC system. These hooks provide four methods of interaction with third party software: standard hot key pop-up, program calls from machine menus, similar calls from file menus and a PCAM.EXE program that may be executed from many other software programs. PHANTOM DNC puts you in control.

As previously noted, once the Communications Window TSR is loaded as a background task, it may be called from other DOS programs operating in text (non-graphics) mode by pressing a hot key. The default hot key is <Alt> C, which requires holding down <Alt> and pressing the letter C. Since other programs may use <Alt> key commands too, the Camshare hot key may be redefined. Use the -hxx switch when loading the CAMCTSR or CAMCTSR0 programs to set the scan code to xx. As an example, CAMCTSR -h32 will reset the hot key to <Alt> D.

When running the Camshare Disk Menu, you are first presented with a menu of machines. After choosing a particular machine, a list of operations for that machine is shown. This list, called the Operator Menu, may be customized by the user. Simply edit the C3MENU.MNU file to alter the Operator Menu for all machines or build custom .MNU menu control files for each machine name. Menu control files are defined as follows:

    (Final Prompt) Row, Column, Message
    (Menu Item 1) Row, Column, Message
    Command Line
    Password
    (Menu Item 2) Row, Column, Message
    Command Line
    Password
    (Menu Item 3) Row, Column, Message
    Command Line
    Password
    (Menu Item 4) Etc.

The "Row" and "Column" are just numbers to place "Messages" on the display screen for Menu Items and the Final Prompt. The "Command Line" may be an internal Camshare function or any DOS program that you wish to execute. An 8 character "Password" is optional and protects access to any Menu Item. The internal Camshare functions available as commands are listed below:

Downfile File selection and download functions

    Upfile: File selection and upload functions
    Editfile: EDIT File selection and calls EDIT program
    Filesel: USER File selection and calls USER program
    Fileutil: File selection and utility functions
    Filecopy: File selection and copy functions
    Machdef: Machine Setup Page functions

The two commands Editfile and Filesel prompt for a filename, then pass this filename to the program indicated on the command line. In the case of the above list, EDIT stands for the name of any editor and USER denotes any user program name. If you don't want Camshare file selection screens to precede your program, you may enter any DOS program name as a command. Also, you may follow the DOS name with any of the several Camshare parameters listed below:

    Camshare will convert %m to the Machine Name
    Camshare will convert %p to the Printer Path
    Camshare will convert %d to Primary Directory
    Camshare will convert %b to Backup Directory

To make things easier to understand, you may copy the C3MENU.MNU file to a machine name (with extension .MNU) and perform a few minor edits to see what happens to the menu for that machine. For instance, you could add a password to the EDITFILE function and replace EDIT with the name of your own favorite editor. Or, you could change the FILECOPY command to FILESEL TYPE which will prompt for a filename, then use DOS TYPE to display that file on the screen.

If a program called by the new menu is not located in the Camshare DNC directory, you may wish to use a batch file which changes directories before and after executing a program. Then, the Camshare menu can call your batch file as the command.

Ultimately, a Camshare Download menu pick will result in a filename selection and a list of options will appear for each member of the selected family. This list, called the File Options Menu, may be customized by the user. Simply edit FILEOPT.FOP to alter the File Options Menu for all machines or build custom .FOP control files for each machine name. The control file layout is shown below:

    Dirname,Prompt,Function,Class,Params
    Dirname,Prompt,Function,Class,Params
    Dirname,Prompt,Function,Class,Params
    etc.

Dirname: Name of the subdirectory for a file type (ie, SETUP).
Prompt: The text to be placed on the screen as a menu pick.
Function: The name of a predefined function or DOS program.
Class: Enter "TEXT" or "BINARY" to categorize file.
Params: Optional parameters for the function or DOS program.
Parameters %m %p %d %b are available in addition to %f for the selected file.

If you have a good grasp of DOS commands and are feeling adventurous, copy the FILEOPT.FOP file to a machine name (with .FOP extension) and perform a few minor edits to see what happens. For instance, you could change the prompt "IMAGE Hardcopy" to "NC Tape to Printer". Or, you could add a suitable batch file that calls a CAD display program for files located in the PLOT subdirectory.

So far, we have discussed ways to call other programs from within the Camshare Disk Menu. The reverse operation, calling Camshare DNC from other programs has been limited to the hot key approach. The PCAM program allows other software to run Camshare by shelling out to DOS and calling PCAM whenever required. PCAM operates as follows:

PCAM [machine] [filename] [-d,-l,-u] {other parameters}

where: -d = download filename to machine
-l = dripfeed filename to machine
-u = upload filename from machine

other: -b = don't check for duplicate Primary/Backup files
-c = copy Primary to Backup and make Backup current
-d = swap to disk for external programs (not EMS/XMS)
-e = copy Primary to Backup and use as Editor source
-l = enable logging of activity to CCLOG audit file
-m = disable multiple upload paths (use Primary)
-n = run without check for proper functioning TSR
-o = disable download file options (immediate send)
-p = disable file header password controls
-u = enable conversion of UNIX files to DOS format
-sx where x = screen saver delay (use 0 to disable)

Many of the programs popular in the manufacturing sector give the user means to interact with other software such as Camshare. For instance, dBase allows the construction of Command Files that look very much like Basic programs. If called with a command file as a parameter, dBase will load and run automatically. So, for instance, the Camshare Operator Menu could call DBASE COMFILE which would run the command file COMFILE. Alternately, dBase could run Camshare to transfer a file selected from a database. The dBase III language allows the command RUN PROGRAM to be used to shell out to DOS and run a PROGRAM. So, the statement "RUN PCAM MACHINE FILE -d" could easily be embedded in a dBase program designed to handle anything from work orders to tool maintenance.

Similarly, Lotus 123 spreadsheets have a Macro Language for building the equivalent of Basic programs. These programs can be called by pressing macro keys or run from a menu bar built into a spreadsheet. To call Lotus from Camshare, use the DOS command "123 -wNAME" in a batch file called by a Camshare menu pick, where NAME is the Lotus worksheet to be run. To call Camshare from Lotus and download FILE to MACHINE, use the command {SYSTEM PCAM MACHINE FILE -d} in a Lotus macro. Of course, Lotus spreadsheets are valuable shop tools for everything from cost analysis to quality control.

WINDOWS 95/98 PROPERTIES APPENDIX:

Phantom DNC will work under Windows 95/98 but not later versions such as NT or XP. To launch Phantom DNC under Windows 95/98, you must create a batch file that first calls the proper Phantom TSR program and then calls the CCAM menu program. As an example, the Cam0 COM1/COM2 version of Phantom could be launched by the following batch file:

cd \camc
mode com1:9600,e,7,1,p
mode com2:9600,e,7,1,p
nopause
camctsr0 -p
ccam -p -m -e

If the batch file was named Phantom.bat and located in the C:\CAMC directory, the Windows program name would be C:\CAMC\PHANTOM and the working directory would be C:\CAMC.

When using Phantom under Windows 95/98, execute Phantom.bat and operate per the Phantom manual. When you exit, only kill the process if you wish stop all DNC tasks. If you wish to permit DNC in the background (for dripfeed operations), minimize the Phantom window by clicking the "-" button in the upper right corner or by pressing <Alt><Tab>.

WINDOWS 95/98 INTERRUPTS, MEMORY CONFLICTS and PROPERTIES:

DigiBoard RS232 port expansion cards (in advanced Phantom systems) use a PC computer address range and interrupt line. These need not be defined as Windows hardware; however, to prevent conflicts we recommend that the address and interrupt be reserved. To reserve resources under Windows 95/98, click "My Computer", "Control Panel" and "System". Select the Device Manager tab and highlight "Computer" at the top of the display. Then click the "Properties" button and "Reserve Resources". Reserve your DigiBoard interrupt and address range which will typically be IRQ 7 and ADDR 100 - 140.

If you have trouble with DNC operation check your free memory and try running in a DOS Full Screen mode. (This may be especially important if you wish to Upload/Input data using the DNC software.) To toggle between window sizes, press <Alt><Enter>. To minimize from a full screen and switch to another task, press <Alt><Tab>.

Windows 95/98 Properties may be changed by right clicking "Start" and following the procedure outlined for altering "icons" discussed earlier. However, instead of just clicking the Program Tab and changing the icon, you can click any Tab and do some real damage.

RECOMMENDED WINDOWS 95/98 PROPERTIES SETTINGS

Program Close on Exit: check
Advanced: Suggest MS-DOS as Necessary: check
Prevent DOS from detecting Windows: check
Memory Conventional Total: auto
Environment: auto
Protected: no check
Expanded (EMS) NONE: See Config.sys above
Extended (XMS) Total: auto
HMA: check
DOS Protected Total: auto
Performance Fast ROM Emulation: check
Foreground Screen Saver: NO CHECK
Quick Edit: no check
Exclusive Mode: no check
Background Always Suspend: NO CHECK
Termination Warning: check
Idle Sensitivity set to mid-range and Shortcut keys checked