NWDNC

Simple RS232 file send and receive for Centroid Controls
Version 2.01
www.cncsnw.com

Installation

Insert the NWDNC diskette in the floppy drive of your control.

Press F7 for the Utility screen

Press F2 for Update

When the "Installation complete" message appears, press ESC to return to the Utility screen, then press ESC again to return to the main control screen.

Configuration

NWDNC is installed to receive with the following default communication settings:

  Serial Port: COM1
  Baud Rate: 9600
  Data Bits: 8
  Parity: None
  Stop Bits: 1
  Flow Control: Hardware (RTS/CTS)

If you need to change these settings (e.g. your DNC network uses different parameters, or you just want to go faster than 9600 baud), you must edit the NWDNC command line in your CNC7CAMS.TXT file. CNC7CAMS.TXT is a DOS text file which defines the CAM menu you see when you press F5.

To change the NWDNC command line in CNC7CAMS.TXT:

  1. From the main control screen, press Ctrl-Alt-X to get to the DOS prompt.
  2. Type "EDIT CNC7CAMS.TXT"
  3. Move the cursor down until you find a line like
      nwdnc com2: 9600 8n1 rtscts
    
  4. Make whatever changes you need.
  5. Press Alt-F for the File menu.
  6. Press X for Exit.
  7. Press Y for Yes, you want to save your changes.
  8. Type "CNC7M4" to restart the control software.

(Note: if you have a newer control which uses PC-DOS 7.0 instead of MS-DOS 6.22, then to save and exit (steps 5, 6, and 7) simply press F3.)

If you are familiar with RS232, the command line arguments for NWDNC should be self-explanatory. The serial port may be COM1, COM2, COM3, or COM4. The baud rate may be 1200, 2400, 9600, 19200, 38400, 57600, or 115200. Data bits may be 7 or 8. Parity may be even, odd, none, or mark. Stop bits may be 1 or 2. Flow control may be software (XON/XOFF) or hardware (RTS/CTS).

The data bits, parity, and stop bits codes must be specified together, in order, with no spaces (as shown in the example above).

If your DNC sender does not support flow control, or you are not sure which type it supports, you must be sure to select a slow enough baud rate that the control never has to request the sender to wait. On a '486-based control, try 19200. On a Pentium-based control try 38400.

Some examples:

 NWDNC COM1: 115200 8N1 XONXOFF
 NWDNC COM2: 19200 7E2 RTSCTS

If you also need to send files from the control back to the DNC station, you can add another selection to the CAM menu. For example, to send the currently loaded job out with the standard communication settings, edit the CNC7CAMS.TXT file (as described above) to include an entry like this:

DNC Out:Send job file back out DNC port
  NWDNC COM2: 9600 8N1 RTSCTS /SEND

This will add a "DNC Out" button to the CAM menu.

Receiving a file

From the control's main screen, press F5 for CAM, then press whichever function key is shown for NWDNC. This will often be F4, but depends on what other software you have installed on your control.

Within ten minutes, go to your DNC computer and start the file transmission. If NWDNC does not start to receive data within ten minutes it will time out and return to the main control screen.

If the program you are sending was generated by Mastercam, Intercon, or Virtual Gibbs, NWDNC should determine the name of the file automatically. Otherwise, if there is a valid program number (O0001 through O9099) on one of the first three lines of the file, NWDNC will name the job file Oxxxx.CNC (where xxxx is the program number, with leading zeros if necessary). If NWDNC cannot determine either a name or a number, it will prompt you to enter a file name after it is done receiving the file.

If you have another CAD/CAM system, and would like NWDNC to determine the file name automatically, modify your postprocessor to insert a comment like one of the following on one of the first three lines of the CNC file:

; Program: PARTNAME			(for a .CNC extension)
; PROGRAM NAME - PARTNAME		(for a .NC extension)

If you have version 6.00 or later of the Centroid control software, the new job should be loaded automatically. If you have an earlier version of the control software, you will have to press F2 and select the job file to load.

Breaking out numbered subprograms

NWDNC can separate the incoming file into multiple subprogram files based on O numbers in the G codes. This can assist you in running programs on the Centroid control which were written for older, program-number-oriented controls, and which therefore do not meet Centroid's normal requirements for embedded subprograms (that they be numbered 9100+ and be located at the beginning of the file).

To use this feature, include the "/N" switch on the NWDNC command line. There must be a program number for the main program on one of the first three lines, and each subsequent program or subprogram must begin with an "O" number in the first column. Each subprogram will be saved in a separate file, using the usual naming convention for numbered program files ("O1234.CNC").

Sending a file back

Go to your DNC computer and enter whatever commands are necessary to tell it to receive a file from the CNC control.

Return to the control. If the job file you want to send is not already loaded, press F2 for Load; select the file; and press F10.

From the control's main screen, press F5 for CAM, then press whichever function key is shown for DNC Out. This will usually be F5, but depends on what other software you have installed on your control.

NWDNC will send the file. When the complete file has been sent, the display will return to the main screen.

Progress

While a file is being sent or received, NWDNC displays a running data count.

To the left of the count is a '-' or '+' symbol, which indicates the flow control status. '+' indicates that data is being transmitted; '-' indicates that the receiver has asked the sender to pause while it catches up. If the indicator changes to '-' frequently, you should probably use a slower baud rate.

You can press ESC at any time to cancel the transfer.

Legalese

This software and documentation are copyrighted with all rights reserved.

I make no warranty, express or implied, with respect to their quality, performance, or fitness for a particular purpose. They are provided "as is", and you assume all risk associated with their use.

DNC-style file transfer inherently lacks effective error checking. The file you receive may not be the same as the one you sent. You should use all available means to verify that the job will run safely before you press the CYCLE START button. These include, but are not limited to, the F8/Graph and F6/Edit features of your control.


CNC Services Northwest Home

Copyright © 1999 Marc Leonard
Centroid, Intercon, Mastercam, and Virtual Gibbs are trademarks of their respective owners.