DNC Precision Software Manual
DNC Precision Software Manual
Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective
owners. The publisher and the author make no claim to these trademarks.
While every precaution has been taken in the preparation of this document, the publisher and the author assume no
responsibility for errors or omissions, or for damages resulting from the use of information contained in this document
or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be
liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or
indirectly by this document.
Printed: 2004
Publisher
AGG Software
Production
© 2004 AGG Software
http://www.aggsoft.com
Contents I
Table of Contents
Part 1 Introduction 2
1 About software
................................................................................................................................... 2
2 Glossary ................................................................................................................................... 2
Part 2 Installation 4
1 System requirements
................................................................................................................................... 4
2 Installation................................................................................................................................... 5
Part 3 Configuration 5
1 Introduction
................................................................................................................................... 5
2 Machine configuration
................................................................................................................................... 7
Port parameters
......................................................................................................................................................... 7
Data flow control
......................................................................................................................................................... 9
Logging ......................................................................................................................................................... 10
Program format
......................................................................................................................................................... 11
Characters .........................................................................................................................................................
translation 14
Delays ......................................................................................................................................................... 16
Manual mode......................................................................................................................................................... 17
Variables ......................................................................................................................................................... 19
Server mode......................................................................................................................................................... 21
Settings .................................................................................................................................................. 21
File list .................................................................................................................................................. 25
Reports .................................................................................................................................................. 28
3 Windows...................................................................................................................................
NT/2000/XP service 29
Part 5 Troobleshooting 34
1 No data received
...................................................................................................................................
on CNC side 34
2 No data received
...................................................................................................................................
on DNC server side 35
3 Garbled data
...................................................................................................................................
received 36
4 Data received
...................................................................................................................................
as one long line 36
1 Introduction
1.1 About software
DNC Precision is a communications program specially developed to exchange data and programs
between a computer and any Numerical Control (NC) machine. The program makes it possible to
send and receive programs written in the machine language. DNC Precision can run on any
computer working under Windows 9x,Me,NT,2000,XP or Windows 2003 Server.
This program can send and receive files both in the manual mode (under the control of the PC
user) and automatically by receiving certain requests from the NC.
1. Working with several machines at a time if the system is built according to the radial
scheme where each machine is connected to a separate serial port;
2. Creating separate configurations for several machines
1. Configuring port parameters
2. Using software or hardware handshaking
3. Configuring the format of files that are sent and received
4. Restricting users' access to the program settings
5. Choosing a separate folder with programs for each machine
3. Creating back-ups
4. Working in the automatic mode when files are sent and received automatically
5. Processing commands transmitted in the header of a data block (only for machines
supporting this feature)
Before you go on reading this guide, make sure you are well acquainted with the basic conceptions
of the Windows operating system, such as:
· Launching programs.
· Managing windows.
· Managing files (saving, deleting, opening, etc.).
· Using folders and directories.
1.2 Glossary
Baud Rate - The transmission speed of data through an asynchronous channel. Often confused
with BPS (bits per second), baud rate actually refers to the number of signals per second. Because
each signal can represent more than one bit of data, the number of bits per second is usually
higher than the baud rate. For example, 2400 bps is typically sent at a rate of 600 baud.
Binary File - A file that contains data or program instructions written in ASCII and extended ASCII
characters.
ASCII - An acronym for American Standard Code for Information Interchange. ASCII files are plain,
unformatted text files that are understood by virtually any computer. Windows Notepad and virtually
any word processor can read and create ASCII files. ASCII files usually have the extension .TXT
(e.g., README.TXT).
Bytes - A collection of eight bits that represent a character, letter or punctuation mark.
COM port - Short for a serial communication port. Most DNC software communicate with a
computer through a communication port, and most IBM and IBM-compatible computers support up
to four serial ports COM1, COM2, COM3 and COM4. Additional ports can be added by adding
additional hardware.
CNC - Computerized Numerical Control Refers to machine tools that have a computer and
memory to control their operation. Most all non manual machine tools sold today will be CNC. see
also NC.
Data bits - A group of bits (1's and 0's) that represent a single character or byte. Typically, there
are seven or eight data bits. During an asynchronous communication (e.g., BitCom connecting to
CompuServe), each side must agree on the number of data bits. Data bits are preceded by a start
bit and followed by an optional parity bit and one or more stop bits.
DNC – Acronym that can mean Distributed Numerical Control or Direct Numerical Control
depending upon the application. In the beginning DNC stood for Direct Numerical Control. A
computer provided machine instructions for a NC milling machine that were transmitted over
telephone lines. Later the term DNC evolved to mean a system where a group of CNC machines
are linked to a central computer. Or conversely a combination of computers are each linked to one
or more CNC machines and the computers are linked together by way of a local area network.
Distributed Numerical Control where by NC programs are sent (distributed) to the memory of a
CNC machine. The program is then run from the CNC memory.
Flow control - A method of controlling the amount of data that two devices exchange. In data
communications, flow control prevents one modem from "flooding" the other with data. If data
comes in faster than it can be processed, the receiving side stores the data in a buffer. When the
buffer is nearly full, the receiving side signals the sending side to stop until the buffer has space
again. Between hardware (such as your modem and your computer), hardware flow control is
used; between modems, software flow control is used.
Handshaking - Is the way in which the data flow between computers/hardware is regulated and
controlled. Two distinct kinds of handshaking are described: Software Handshaking and Hardware
Handshaking. An important distinction between the kinds of signals of the interface is between data
signals and control signals. Data signals are simply the pins which actually transmit and receive the
characters, while control signals are everything else.
NC - Numerical Control The operation of a machine by a series of coded instruction's that consist
of numbers and letters of the alphabet and other symbols. These are translated into pulses of
electrical current or other output signals that active motors and other device to run the machine. On
early NC machines these signals was often delivered to the machines by using punched tape. Also,
the term NC machine refers to machine tools that do not have a computer and memory installed.
see also CNC.
NC File – a file containing one or more programs in the special language for Numeric Control
machines.
NC Program – a set of instructions written in the machine language and saved to an NC file.
data add up to an even number, and None, in which a parity bit is not added.
Punch - CNC output device - used in CNC machines to output programs to perforated tape. Units
can be parallel to tape punch or serial output.
RS232, RS423, RS422 AND RS485 - The Electronics Industry Association (EIA) has produced
standards for RS232, RS423, RS422, and RS485 that deal with data communications. EIA
standards where previously marked with the prefix "RS" to indicate the recommended standard.
Presently, the standards are now generally indicated as "EIA" standards to identify the standards
organization.
Electronic data communications will generally fall into two broad categories: single-ended and
differential. RS232 (single-ended) was introduced in 1962. RS232 has remained widely used,
especially with CNC control builders. The specification allows for data transmission from one
transmitter to one receiver at relatively slow data rates (up to 20K bits/second) and short distances
(up to 50' @ the maximum data rate). This 50' limitation can usually be exceeded to distances of
200' or more by using low capacitance cable and keeping the data rates down to 9600 baud and
lower.
RTS/CTS Hardware handshaking - uses additional wires to tell a sending device when to stop or
start sending data. DTR and RTS refer to these Hardware handshaking lines. you can select
whether you need to use DTR or RTS individually, or use both lines for hardware handshaking.
See also Xon/Xoff.
Stop bits - In data communication, one or two bits used to mark the end of a byte (or character).
At least one stop bit is always sent.
Upload - To send one or more files from your computer's disk storage to a remote computer. In
DNC this usually means from the CNC machine's control back to the DNC computer. This can also
mean from your computer's disk to a remote computer, such as another PC or an online service or
the internet.
2 Installation
2.1 System requirements
To run the program, you need one of the following operating systems:
· Windows 95;
· Windows 95 OSR2;
· Windows 98;
· Windows Me;
· Windows NT4 or Windows 2000 or Windows XP (administrator permissions are required).
It is necessary to have at least one free serial port, not occupied by any other device (for example,
mouse), to connect NC controllers.
Limitations:
· serial ports assigned for querying are used exclusively by the program. While the program is
running, they cannot be used for any other purposes. Although the work of the program can be
interrupted manually if necessary;
· the environment of the program is Win32 (Windows 95/98/NT/2000/XP).
2.2 Installation
If you have received the distribution package of the program as a single exe file, execute it after
copying it to your hard disk. Follow the instructions of the wizard during the installation process.
If you have received the distribution package of the program as a packed zip or rar file.
After you install the program, configure the program step by step as described below.
3 Configuration
3.1 Introduction
To enter the program configuration mode, execute the file "DNCprecise.exe". If the program is
already running, open the window of the running program.
Once the program is launched, the main program window is opened (fig.1). It is in this window that
you create the list of active machines, select actions that should be done, view the log of either
messages from the program itself or operations performed with a machine.
1. The toolbar with the buttons to perform actions, add, edit or remove machine descriptions and
also to select the mode the machine should work in.
1. Add – allows you to add a new record to the machine list. Once the button is pressed, first
you are prompted to enter the machine name, then the window for changing the default
machine settings is opened. If you press "OK" in that window, the machine descriptions will
be added to the list, otherwise the operation will be cancelled;
2. Remove – allows you to remove a machine description from the list. After you remove a
description, no operations will be possible for the machine. To do the removing, select the
necessary machine from the list and press the "Remove" button;
3. Setup – allows you to change the configuration of a previously added machine. To perform
this action, you should select the necessary machine and press the button. A dialog window
will appear where you can edit the needed parameters. After you press the "OK" button, the
changes you have made will be saved.
4. Receive – allows you to receive a file from a machine in the manual mode. In this mode the
name of the file to be saved is asked and after it is specified, the program switches to the
mode for receiving files.
5. Transmit – allows you to send a file from the computer to the machine in the manual mode.
In this mode the name of the file to be sent is asked and after it is specified, the program
switches to the mode for sending files.
6. Server – switches the program to the server mode for the selected machine. In this mode
files are sent and received automatically without any activity from the user. For the program
to work correctly in this mode, you should correctly configure the parameters related to the
server mode.
2. The list of machines available for operations. The user creates the list with the help of the
buttons on the toolbar.
3. The combo box where all messages either from the program or from the selected machine are
displayed
4. The status bar where you can see the status of the program
Warning: it is possible for monitors with low resolution not to display the entire window.
Note: It is the default that the access to the machine parameter settings is granted only after the
password is entered. The default password is empty (you can change configuration without
password).
To configure port parameters, go to the "Port/Port parameters" tab in the options window (fig. 1).
· Event – when the program waits for a signal from Windows that the communications driver
has received data and only after that it requests the size of the received data;
· Polling – when the program is constantly querying the communication driver if there are any
data inside the internal buffer.
In the first mode the computer resources are saved, but some slow computers can "skip" events
and therefore lose data. That is why by default this mode is recommended for fast computers by
default. Though if you notice any problems in data transmission, we recommend that you choose
the second mode.
The second mode uses relatively more computer resources, but this mode is more stable.
Baud rate – data transmission rate, bits per second. This rate should match that specified on the
machine.
Stop bits – the amount of bits added after each transmitted character and indicating the end of the
character transmission. The amount of stop bits should match the one selected on the NC.
Data bits – the amount of bits in each character. The amount of stop bits should match the one
selected on the NC.
Parity – parity is a mechanism used to track errors while transmitting data. The parity settings
should match the settings on the NC:
RS-485 interface mode – sometimes the communication line between the computer and the NC
can be very long, in that case the RS-485 connection standard using a twin-core cable line can be
used. In this mode the program will not send data while they are being received, which it is possible
according to RS-232.
Clear the buffer when an error occurs while receiving data – when you are just configuring a
machine, you may need to see all the data (even if they contain errors) that arrive at the serial port.
If it is the case, you should turn this option off. You do not have to do it in the usual working mode.
That is why this option is off by default.
To configure port parameters, you should switch to the "Port/Data flow control" tab in the options
window (fig.1).
Handshaking is used when the NC cannot quickly process the received data. To prevent the input
buffer in the NC from being overrun, it tells the program (DNC server) to pause sending data.
The method of exchanging signals between the NC and the DNC server is called handshaking.
There are two handshaking methods: software (XOn/XOff) and hardware. For hardware
handshaking you will need a special cable for it is performed using special cables in this case.
Software flow control (XOn/XOff) - Two bytes that are not usually used to transmit text are
assigned to two special characters of pausing (XOff) and resuming (XOn) data transmission.
When the NC wants the DNC to pause sending data, it sends the character XOff (Transmission
Off). When the buffer of the NC is empty, it sends the signal XOn (Transmission On), meaning
that it is ready to receive data again. The default for XOff is ASCII 19, sometimes also called
DC3 (Device Control 3), and ASCII 17 (DC1) for XOn. XOn/XOff are used only for text
transmission. They cannot be used to transmit binary data, for binary files may contain the
characters XOn and/or XOff.
Hardware flow control (RTS/CTS) - RTS/CTS is a normal form of hardware handshaking. The
computer signals via the RTS (Request To Send) line that it wants to send data to the NC, while
the NC sends the CTS (Clear To Send) signal when it is ready to receive data.
Hardware flow control (DTR/DSR) - The DTR (Data Terminal Ready) and DSR (Data Set
Ready) signals can also be used for handshaking. The DNC server sends the DTR signal when
it is ready to send and receive data while the NC uses the DSR signal for that.
The characters XOn/XOff - Some machines use nonstandard characters for XOn/XOff, in this
case you can specify your own code value for these characters. The character code is specified
in the hexadecimal form #XX, where XX is the hexadecimal ASCII character code and can be
calculated in the standard Windows calculator. If you are not sure, specify the default values of
XOn = #11, and XOff = #13.
Set RTS high - If the RTS signal is not used for hardware handshaking, it can have either low or
high level. The default "on" setting is high level.
Set DTR high - If the DTR signal is not used for hardware handshaking, it can have either low or
high level. The default "on" setting is high level.
3.2.3 Logging
Logs will help you track and diagnose errors that may occur in the process of configuring and using
the program.
To configure the log settings, you should switch to the "Port/Log files" tab in the options window
(fig.1).
1. Received data log files - these types of files are used to determine the
configuration parameters of the machine when the connection is being established. This file
allows you to find out the file format used for transmission and configure the DNC according to
it;
2. Message log files – when the program is working, there may appear both simple
informational and error or warning messages. You can configure the level of details in
message logs for each machine. The log file either can never be changed or it can be created
each day/hour/month which makes it easier to search for certain information in a log file by
date.
For each log file type you can specify folder, where all files will store.
Each machine (NC) can have its own format of programs that are sent and received. The format of
programs can be either common (i.e. its parameters can be applied for programs that are both sent
and received) or different for programs that are sent and received.
General settings
To change general settings, you should open the "Format/General" window (fig.1)
Finish receiving data from the NC after character – if you check this option and specify a
hexadecimal character code, the DNC will stop receiving data immediately after it receives this
character.
Comment delimiters – these characters separate comments in the program body. In the
server mode comments contain requests to the DNC from the NC, while the DNC in its turn sends
additional information to the NC (such as catalog contents, operation progress status, etc.). It is
important to specify those characters correctly, as the correct interpretation of requests and
responses depends on this.
Wait Xon before send data - this option allows DNC server transmit data to NC machine only
after Xon character receiving, that specified on "Port" tab, and only if you not use software flow
control. This option needs in a some cases, when DNC server can't detect with hardware flow
control, that machine is now in the receiving state.
Data exchange
To change these settings, you should open the "Format/Data exchange" window (fig.2).
You can configure the data transmission format separately for each direction (sending and
receiving). The direction of data transmission is selected from the drop-down list at the top of the
dialog window. If the format is the same for both received and sent data you can select the "Same
format for receiving and sending" item from the list.
After you select the direction of data transmission, you should first configure the general format of
the program. It is characterized by two parameters:
Start – the parameter indicating the beginning of the program. This parameter is a character string
and can contain both usual ASCII characters ranging from 32 to 127 or any other character with
the code specified in the form of #XX, where XX is the hexadecimal code of the needed character.
All the data received prior to this parameter are considered a control header and processed
correspondingly. For instance, if you enter the sequence of characters %#0A, the parameter of the
program start will be two ASCII characters % and LF.
End – the parameter indicating the ending of the program. All the data received after this
parameter are ignored by the DNC and are saved only to the received data log file. The format of
this parameter is the same as of the previous one.
Program name prefix – it is by this parameter that the DNC attempts to determine the size of the
program file while receiving data.
After you configure the program format, you should configure the format of each program line. This
format is also characterized by two parameters:
Start – the parameter telling the DNC that the NC is starting to send a new program line. The
parameter is entered in the same format as the previous parameters. If this parameter is not
specified, the program starts receiving data from any character. In this case a line is separated only
by the line end parameters.
End - the parameter telling the DNC that the NC is finishing to send a program line. The parameter
is entered in the same format as the previous parameters. If this parameter is not specified, it will
not be possible to separate lines in the general data flow. That is why this parameter is obligatory.
Skip lines starting with – this parameter defines such lines separated by the above-mentioned
parameters that are not to be received or sent. If a line has this sequence of characters at the
beginning, it will be skipped.
Ignore characters – one or several characters are specified in this input field. When a line
separated by the above-mentioned parameters has one of the specified characters, they will be
removed from the line.
Skip empty lines when transmitting data – if this option is on and if an empty line (containing
only the line start and end parameters) is encountered while transmitting data, it will be skipped.
When you send and receive data, character replacement allows you to get rid of those characters
that are unnecessary or unwanted for the DNC server, unacceptable for sending to a machine or
incompatible with it. Character replacement is configured separately for each direction of data
transmission. (fig.1)
Use the "Direction" field to specify the direction to be configured. Once it is specified, you will see
what character replacement rules that are already set for this direction in the "Current
translations" field. To define a rule, you should select the character code in the "Character" field
and select the rule after that.
· Keep character – the selected character will not be changed. This action is default for all
characters;
· Remove character – the selected character will be removed;
· Replace with – the selected character will be replaced with the one specified.
Removing all below ASCII 32 – all characters with a code less than 32 will be removed. It means
all unprintable characters.
Removing all above ASCII 127 – all characters with a code greater than 127 will be removed. It
means all characters with the code requiring 8 bits of data.
3.2.6 Delays
Some machines need time to process the received data. To save the time for analyzing
handshaking signals, you can specify preset delays that will ensure high quality data transmission.
To change time delays, you should open the "Transmit/Delays" window (fig.1)
Delay before transmission start (ms) - Use this field to specify the time for the DNC server to
wait before sending data. This time interval will be observed either when a request is received from
the NC in the server mode or between files in a cyclic mode of transmitting files.
Delay before each line (ms) - Use this field to specify the time interval to be observed before
sending each program line.
Delay between characters in line (ms) - Use this field to specify the time interval to be observed
between sending each character in a line.
Handshake resume delay (ms) - Use this field to specify the time interval to be observed between
changes of RTS signal from up to down state.
Transmission timeout (s) - Use this field to specify the time interval for the DNC to return to the
normal working mode.
Configuration
The manual mode is used to send and receive files under the control of the PC user. Depending on
the granted permissions, the user can load files either from the specified folder or from any folder
on the disk. The same is true for receiving files.
The behavior of the user and the program is determined by the settings specified on the "Manual
mode/Directories and files" tab (fig.1).
While transmitting files from the machine to the computer, sometimes it happens so that the
transmitted file already exists on the disk in the specified folder. In this case the program will follow
the instructions specified in the "Backup" group.
Mode – defines what the program should do if it turns out that such a files already exists on the
disk
· Disabled – no backup copies are created. The old file is replaced by the new one
· Copy old files to the backup folder – the file that already exists in the folder specified for
saving will be moved to another folder (specified below)
· Rename the old file – the file existing in the folder will not be moved, but only renamed. An
identification number 1, 2, 3 etc. will be added to its name.
· Rename the new file – the files existing in the folder will remain unchanged, while the new file
will be renamed. Renaming is done as described above.
If mode #2 is selected, the "Folder" input field becomes available for editing. Here you can specify
the location on the disk where backup copies of files will be placed.
Autocreate directories – is this option is on, all the folders specified above will be created
automatically. It means that you will not have to create them before launching the program. If the
folder already exists, it will remain unchanged.
After this the program will switch to the mode for receiving files. After that you should press the
PUNCH button on the machine itself. If the machine was configured correctly, the message log will
reflect the process of receiving the file. The final message will be that the file is successfully
received. In any other case an error message will be displayed.
If for any reason you decide to cancel receiving the file, press the "Stop" button on the toolbar in
the main program window.
After this the program will switch to the mode for sending files and will wait until the receiving
device is ready. After that you should press the READ button on the machine itself. If the machine
was configured correctly, the message log will reflect the process of sending the file. The final
message will be that the file is successfully sent. In any other case an error message will be
displayed.
If for any reason you decide to cancel sending the file, press the "Stop" button on the toolbar in the
main program window.
3.2.8 Variables
$DATE$ - The date in the format set on the computer. Example: 29/04/04
$TIME$ - The time in the format set on the computer. Example: 13:12:02
$DATETIME$ - The date and time in the format set on the computer. Example: 29/04/04 13:12:02
$DATESTRIP$ - The date in the format set on the computer, but only digits. Example: 290404
$TIMESTRIP$ - The time in the format set on the computer, but only digits. Example: 131202
$DATETIMESTRIP$ - The date and time in the format set on the computer, but only digits.
Example: 290404 131202
$DATECLEAN$ - The date in the format set on the computer, but only characters that can be used
in a filename. Example: 29-04-04
$TIMECLEAN$ - The time in the format set on the computer, but only characters that can be used
in a filename. Example: 13-12-02
$DATETIMECLEAN$ - The date and time in the format set on the computer, but only characters
that can be used in a filename. Example: 29-04-04 13-12-02
$DATEJ$ - the number of the current day in the year (001$ - 366).
$DATEU$ - the number of the current week in the year, where Sunday is the first day of the week
(00$ - 53).
$DATEW$ - the number of the current day of the week, (0$ - 6; Sunday = 0).
$DATEWW$ - the number of the current week in the year according to the ISO standard, where
Monday is the first day of the week (00$ - 53).
$DATEY$ - the current year, the last two digits as a number (00$ - 99).
$TIMEH$ - The current hour in the 24-hour (ISO) format (00$ - 23).
$RECVONO$ - the number of the received program with a prefix. Example: O12
$RECVONO4$ - the 4-digit number of the received program with a prefix. Example: O0012
$RECVONO6$ - the 6-digit number of the received program with a prefix. Example: O000012
$RECVONO8$ - the 8-digit number of the received program with a prefix. Example: O00000012
$ORGPATH$ - the filename sent or received last and its path. Example: C:\MILL\Mould.nc
$ORGNAMENOEXT$ - the filename sent or received last without its extenstion. Example:: Mould
$ORGEXT$ - the extension of the file name sent or received last. Example:: nc
$ORGDIR$ - the path of the file that was sent or received last. Example:: C:\MILL
Report variables
$RECVPRGNAME$ - the name (number) of the program received last. Example: 5643
$RECVFILESIZE$ - the size in bytes of the program file received last. Example: 604
$RECVFILENAME$ - the full name of the program file on the disk received last. Example:
TEST.NC
$RECVDIRNAME$ - the name of the folder where the program file received last was saved.
Example: C:\MILL\
$RECVPATH$ - the full name of the program file received last and its path. Example:
C:\MILL\TEST.NC
$RECVERRTEXT$ - a brief description in the English language of the error that occurred while
receiving the last file. Example: File not found.
$RECVERRORS$ - the amount or errors that occurred during the process of receiving
It is the most "advanced" and intellectual working mode of the program. In this mode all the
program actions are performed automatically without the PC user actions. When the program is
launched, it is automatically switched to the mode for receiving information from the machine.
When receiving some data, the program analyzes their contents and depending on the processed
information performs responds in one way or another:
Folders for receiving and sending files are specified in the same way as in the previous section –
"Manual mode".
Commands from the machine to the computer can be transmitted in two ways:
· As commands in the control header of the transmitted data block - the set of these
commands is limited and directly depends on the machine manufacturer. Some machines may
have no such commands. Often the control header is present in the machines with the feature
of loading the programs from an external disk drive, working via the RS232 interface.
· As commands transmitted in the program body - is the most convenient way of
transmitting the information between the machine and the PC. Nearly any information can be
transmitted in this form. In this case the data transmission format is determined by the
message protocol, accepted on the DNC server. Using this way, the NC operator can request
the information (folder contents, files) from the DNC server. The NC operator sends a small
program to the DNC with the requests, to which he would like to receive responses.
Header commands
The commands are extracted from the header according to the parameters specified in the "Server
mode/NC commands format" tab (fig.1)
If you are sure, that your machine uses service commands in the header (for example, you have
found it out analyzing the log file), first it is necessary to enable this mode in the "Processing
commands from NC" field. After that it is necessary to specify the parameters by which the
commands will be extracted from the general information flow.
Start – the parameter indicating the beginning of a command. This parameter is a character string
and it can contain usual ASCII characters ranging from 32 to 127 as well as any other character
with the code specified as #XX, where XX is the hexadecimal code of the necessary character. All
data received prior to this attribute are not considered as commands and are ignored. For
example, if you enter the #1B#26 character sequence, two ASCII characters – ESC (ASCII 27) and
& – will be considered as the command start parameter.
End – the parameter indicating the end of a command. This parameter is a character string and it
can contain usual ASCII characters ranging from 32 to 127. The parameter input format can be
specified in the same way as the previous one. All data received after to this parameter are not
considered as commands and are ignored.
The first N characters are the command name – after a command is separated from the
program header or body using the parameters specified above, it is also necessary to identify its
name and possible value. To do it, specify how many of the first characters are the name of the
program. In addition to it, you can specify (only letters) that the name of the program can contain
only letters. Thus, the maximum size of the command name is limited, but if the last characters are
not letters, they will be cut off from the command name and added to the beginning of the
command body.
Use regular expressions – to separate commands from the service header of from the program
body, we will use perl-like regular expressions widely used to process text data. Having specified
one or more regular expressions (each regular expression is specified on a separate line), you will
define the corresponding amount of rules for processing incoming data. When specifying a regular
expression, you should have two matches as the result of its work. The DNC server will consider
the first match to be the name of the command, while the second match will be considered the
body of the command.
The DNC server can process commands transmitted in the program body. For a command to be
correctly identified, the following conditions should be observed:
1. All commands sent to DNC must be transmitted in the NC program that has the name
specified in the "Search for requests only in the program named" field (fig.1);
2. The name of the NC program must be transmitted in its first line and it must be of the format
specified in the section. If everything is observed, DNC identifies the program name as the
command in the program body that can be separated from the program body using the
corresponding regular expression.
The first line specifies the program name. In the DNC settings for the current machine this name
should match the one specified in the "Search for requests only in the program named" field,
because DNC will search for requests from the NC only in programs with this name.
The second line contains the DIR =/VIPROS command that defines the folder for the operation of
receiving a file or folder contents to be performed in.
The third line contains the PRG=0010 command telling the DNC server to send the file named
0010 to the machine. To obtain the actual name of the file, the DNC server generates it from the
prefix (it will be added before 0010), the suffix (will be added after 0010) and the extension (will be
added at the end and separated from the suffix with a dot). After that it will search for the file in the
specified folder.
The last line with the % character indicates the end of the program and it must match the one
specified in "Program format".
After the NC operator sends a request, he should switch to the mode for receiving data from the
DNC server within 3 minutes. If he does not do it, the DNC server will switch back to the mode for
expecting requests from DNC. The request will result in either a file, or the disk contents, or the
status of performing the operation.
Command triggers
If all the above-mentioned conditions are observed, the process will result in identifying one or
several commands that the DNC server will be able to execute. Now it is necessary to match the
identified command names with those supported by the DNC server. It is done in the " NC
command names" list. The DNC server supports and can execute the following commands:
· Send a file – once the DNC server receives this command, it will queue the file the name of
which was transmitted in the command body for sending. The final filename is generated from
the prefix, the suffix and the extension specified on the "Folders and files" tab (fig.2).
· File list – once the DNC server receives this command, it will queue the contents of the folder
(or folders) specified on the "Directories and files" tab (fig.2) in the "Folder for files to be sent
to the machine" list for sending.
· Set the relative path – the name of the folder where the DNC server should search for
programs to be sent to the machine. The folder name is defined relative to the folders
specified on the "Directories and files" tab. For example, suppose C:\NC is specified in the
DNC settings for the current machine and the body of the received command is VIPROS, in
this case the server will search for files in the C:\NC\VIPROS\ folder. If this command is not
specified, the search for files is performed only in the folder specified in the DNC settings for
the current machine.
· Skip – if you specify this action for a command, the command with this name will be skipped
and there will be a record added to the message log informing that this command has been
ignored.
· Set the file for operations – when this command is executed, the filename transmitted in the
program body will be remembered and used for further operations (for example, renaming). If
this command is the last one in the list of the processed commands, it will mean the request
for sending the file with this name.
· The name of the received file - this command tells the DNC server that the command body
is the name of the program that is being sent to the DNC server at the moment. Depending on
this name, the server searches for commands in the program body because the name of the
program to search for commands in is specified in the options (fig.1). In case of non-service
programs, this filename is used for saving the program file to the disk.
· Delete the file – the file the name of which is specified in the command body is deleted. The
file is removed from the first found folder specified in the "Folder for files to be sent to the
machine" list in the options.
· Rename to – the file the name of which was set earlier by the "Set the file for operations"
command will be renamed to the file specified in the command body. Renaming is done in the
first found folder specified in the "Folder for files to be sent to the machine" list in the
options.
In the server mode the DNC server can process the request to send the list of files located in the
folder specified in the "Folder for files to be sent to the machine" field on the "Server
mode/Directories and files" tab.
After receiving the request to transmit the file list described in the "Commands in program body"
section, the DNC server will generate the file list in a pseudo-program form with the format
specified by the user on the "Server mode/File list" tab (fig.1). Then the generated pseudo-program
is ready to be sent to the machine. The NC Operator, in his/her turn, should switch the NC to the
data receiving mode. Once it is done, the NC operator receives the program with the file list in its
body.
Allow file list request – this option allows the DNC server to process the requests to send the file
list. If this option is off, the request to read the file list will be ignored, with the report generation
option on, the NC operator will be sent an error message.
List request identifier – requests to send the file list can be transmitted not only in the request
program body as it is described in the "Commands in the program body" section, but also as a
separate, empty request program having its own name. This program name (specified in its first
line) is the identifier. Having received the program with such an identifier, the DNC server
Insert at the beginning of the list, Insert at the end of the list - allows you to create the file list
header and its ending to your liking. Between the list header and its ending the generated file list
will be inserted. Specifying these fields you can use the $PORTNAME$ variables, describing the
current DNC server status. The full description of the variables can be found in the "Variables"
section.
Note: When sending the data from these fields the program will try to determine the syntax of the
entered data. It means that the line numbers and comment characters will NOT be added to the
following lines:
Column 1..3 - these combo boxes specify the format in which one line in the file list describing one
file from the folder should be displayed. The following values are possible:
· File size - the file size in bytes will be displayed in the column. Example: 680
· File date - the file creation date will be displayed in the column. Example: 12/12/2004
· File time - the file creation time will be displayed in the column. Example: 12:12:04
· File date and time - the file creation date and time will be displayed in the column. Example:
12/12/2004 12:12:04
Send in comments - if this option is on, the file list will be included in the comment delimiters
specified in the program format.
Number lines when sending - if this option is on, each line of the file list will be numbered. Line
numbering will start at 1000 with the step of 10.
Note: If you enable the "Number lines when sending" and "Send in comments" options, but
you want some of the lines to be transmitted unchanged (without numbers and comments), put the
'!' character at the beginning of the line (see the example below).
!:8889 feed
DIRECTORYLIST FOR $PORTNAME$
----------------------------
or
END LISTING
!M30
While transmitting and receiving files, processing requests in the automatic mode, it is sometimes
necessary to inform the operator about the operation performance status. It can be done with the
help of reports. The DNC server can generate the following types of reports:
To edit report parameters, you should switch to the "Server mode/Reports" tab (fig.1).
Report type – selecting the report type which parameters you want to edit
Enable report - if you enable this option the current report will be generated and sent to the
machine
Send in comments – the lines of the report generated from the template will be included between
the comments
Number lines when sending - lines of the report generated from the template will be numbered
starting at 1000 with the step of 10
Report text – the report text template you want to send. You can use variables in the report text.
Generating the reports the additional variable set for the reports can be used.
Note: If you enable the "Number lines when sending" and "Send in comments" options, but
you want some of the lines to be transmitted unchanged (without numbers and comments), put the
'!' character at the beginning of the line (see the example below).
!:9997
SUCCESS!
TIME $TIMESTRIP$
DATE $DATESTRIP$
--------------------------------------------
RECEIVED PROGRAM $RECVPRGNAME$
SIZE $RECVFILESIZE$
FILENAME $RECVFILENAME$
DIRECTORY $RECVDIRNAME$
--------------------------------------------
!M30
· control service on local and remote computers, including remote computers with Windows NT
4.0 system;
· setup actions on emergency service restore in case of failure, for example auto service or
computer restart (only on computers with Windows 2000 or later);
· create for services other names and descriptions, to find them easier (only on computers with
system Windows 2000 or later);
· run service before user login (password input);
· service can be setup on automatic start after operation system load.
Note: you must be logged in as an administrator in order to change the configuration or control the
service in any way (start, stop, pause, continue).
To on program work mode in service mode go to program options tab "Main menu -> Options ->
Configure... -> Windows NT/2000/XP service" (pic.1), then put check box "Use program as
service".
After that in the displayed window setup program run type. There can be the following variants:
1. Automat - service will be run automatically at every Windows start, before user login;
2. Manual - to run service make start in window "Services" of Control panel;
3. Disabled - service can't be run.
If you want to change program settings in service work mode, show "Display program window at
service start". In that case at start service puts its icon in systray (pic.2). But then you couldn't use
command "User logoff" in work stop select mode menu, so as in that mode Windows will wait
manual service stop.
If you use data bases or special COM port drivers, before service run, these applications must be
run. You can show what services run before DNC Precision in window "Start service after selected
services" (pic.1). After you installed service mode for program, reload computer or run service
manual from window "Services" in Control panel (pic.3)
After service run in process list will be two applications dncpsrv.exe and dncprecise.exe (pic.4).
DNCPrecision application makes interface between service manager and main DNC Precision
program and proper start and program stop. Unlike utility srvany.exe our service at stop saves all
settings and completes all opened serial port session.
To have the program work in service mode it must be run with administrator rights. To control
service manual and remove service, use command string. Run dncpsrv.exe with the following
parameters:
· /? - short help;
· /I - install service for start in manual mode;
· /A - install service for start in automatic mode;
· /D - install service in off state;
· /R - remove service from computer.
At once can be set only one parameter. At showing parameter keep characters register.
Registered users are entitled to FREE upgrades for the major version, they purchased. That
meens, that in case you bought registration key for version 2.00, you will receive upgrades for
versions 2.xx for FREE . If a new authorization code is required it will be issued upon request at no
charge to users who have registered for the current major version.
4.3 Support
5 Troobleshooting
5.1 No data received on CNC side
Problem: When trying to send data from the DNC to CNC, no data is received.
Check the log combo box to verify that the server is actually sending any data. If no data is send,
check the port status, in some cases the server will wait for a start of transmission signal from the
CNC, if this is the case, the port status will indicate this.
Open the configuration dialog, and check that you have selected the correct serial port.
Handshake problem
Check that you are using the correct handshake method. If hardware handshake is not enabled, try
selecting Set RTS high and/or Set DTR high in the serial port configuration dialog. Some
machines use non-standard software handshake characters. If this is the case change the XOn
character / XOff character in the serial port configuration dialog. For further information, please
refer to Serial port.
Handshake problem
Check that you are using the correct handshake method. If hardware handshake is not enabled, try
selecting Set RTS high and/or Set DTR high in the serial port configuration options tab. Some
machines use non-standard software handshake characters. If this is the case change the XOn
character / XOff character in the serial port configuration dialog. For further information, please
refer to Serial port.
Check that you are using the correct number of data bits
Refer to your CNC's manual for further information.
Check that you are using the correct number of stop bits
Refer to your CNC's manual for further information.
This is most likely caused by incorrect len end character character setting.