|
Using DNC Server in Auto-Serve Mode
There is an item in the DNC
settings dialog that turns DNC Server into an automatic server that will
respond to commands from the CNC machine so that you never have to go to
the computer get or save files.
On Main Menu click on
Communication
Go to Auto
Serve tab
When 'Use
Auto Serve DNC' is checked DNC Server goes
into a permanent listening mode, waiting for files to be sent to it from
the CNC machine. You can tell it is in server mode because the status
line has changed to blue color instead of red, and says it's 'Waiting
for Server Command'.
It's now waiting for a file to be sent to it
just as if the 'Receive' button was
pressed. But the files that you punch out from the CNC machine will have
embedded commands to tell DNC Server what to do after it receives that
file.
Server Command Strings. There are
five commands it recognizes. Just put a comment line somewhere in the
program that starts with the command string. The command strings are
configurable incase your control does not accept the default character
strings. Configure these settings in the Server
Command Strings box.
GET FILE EXAMPLE:
If you are at the CNC machine and want to load in a part program, make a
little one line program that has the '(G*' command and the filename to
get:
%
(G* 2A0895 OP90 RV1.NC)
M30
%
Punch this out to the waiting DNC
Server and when it's through receiving the file, it recognizes the '(G*'
command and gets the filename from the configured directory for this
machine, loads it into the editor window and waits for you to press the
'Read' button on the control. After DNC Server is finished sending you
the file, it goes back into listening mode waiting for the next command.
What if DNC Server can't find
the file requested because you spelled it wrong or it doesn't exist?
Then it still sends you a file to load into the control but the file
consists of a comment telling you it's not found. You would see this at
the CNC control:
%
(FILE 2A0895 OP92 RV1.NC NOT FOUND)
M30
%
SAVE FILE EXAMPLE:
%
(S* 2A0895 OP90 RV1.NC)
M30
%
Punch this out to the waiting DNC Server and when it's through
receiving the file, it recognizes the '(S*' command which means that the
next file it gets should be saved under this filename. DNC Server is
listening for the next file so when you punch it, it is automatically
saved under that filename. Then it goes back into
listening mode waiting for the next command.
An easier way to save the files you punch out
would be to use the '(A* ' command within the program. DNC Server is
always waiting to receive a file anyway, so if you permanently have a
comment in the program with '(A*' and the filename to save to, DNC
Server will see it and will be saved automatically to that filename just
by punching it out from the machine.
AUTO SAVE EXAMPLE:
%
$P51H388-130.MIN%
N15 G0 G17 G40 G80 G90
(A* 51H388 OP130 RV1.NC)
N20 G15 H1
N25 G0 X-15.565 Y20
( PN 51H388 OP130)
N50 M1
(TOF Z6.9)
(CDL G:\CADCAM\PWA\51H388\51H388-0DEG)
(-- ROUGH MILL AROUND )
(.5 DIA HOG MILL)
(TM .5)
N85 G0 A0
N90 M6
IF[ VTLCN EQ 1 ] NB1
N100 T1 M6
NB1 G15 H1
N105 T2
N110 S550 M3
N115 G15 H1
N120 G0 X-7.7587 Y3.1208
N125 G56 H1 Z0
N725G0 Z0
N730 G0 Z30 M5
N735 G40
N740 X-15.565 Y20
N745 M30
%
Tip for some Fanuc controls: Since
many Fanuc controls do not have opening or closing parenthesis on the
control, it is not possible to alter comments. This does not limit the
ability to use the Get or Save program. Since the Get and Save program
is never actually executed by the control, it doesn't have to be in a
format that the control would otherwise understand. For example, the Get
file setting can be changed to something other than "(G*" For example,
the opening parenthesis can be omitted so the Get File string is G* This
will still work. Since G* is not a string that could appear in a normal
program, this is an acceptable setting. The same theory applies to all
other strings except Auto Save. With Auto Save, that must be as a
comment, because that will be a part of the program that is actually
executed through the control. This comment can be entered into the
program at the PC, the same way all other comments would have to be
entered.
%
G* 2A0895 OP90 RV1.NC
M30
%
How do
you know if it was saved correctly?
DNC Server maintains a running log of the last 6 files that it
successfully saved for that machine configuration.
GET LOG EXAMPLE:
Punching this program:
%
(L* )
M30
%
you would receive this program:
%
(SAVE D:\DATA\51H388 OP130 RV1.NC 6/26/01 1:32PM 12445 BYTES)
(SAVE D:\DATA\764915 OP20 RV1.NC 6/26/01 10:10AM 6778 BYTES)
(SAVE D:\DATA\445332 OP30 RV1.NC 6/25/01 1:44PM 34501 BYTES)
(SAVE D:\DATA\353654 OP40 RV1.NC 6/25/01 11:31AM 22340 BYTES)
(SAVE D:\DATA\785665 OP140 RV2.NC 6/24/01 4:12PM 1008 BYTES)
(SAVE D:\DATA\351388 OP10 RV1.NC 6/24/01 8:32AM 13457 BYTES)
M30
%
Now after you save a
program you can check to see if it was saved right. The number of bytes
it saved should be exactly the same as shown on your Inplot program
printout.
If you make a mistake, and
DNC Server is out of sync with what you want to do, you can punch out a
program from the control that has the Reset command in it, and DNC
Server will clear itself and set itself back to "Waiting for Server
Command".
Filenames: You can use the full path name in the
get and save commands, such as: "D:\DATA\51H388
OP130 RV1.NC". If your control does not have the backslash
character, you can use the forward slash, which is the regular block
skip character, and it will work the same.
On Communication Settings
Page:
Default Save Directory -
Directory where files are saved to when the the
Auto Save command is received, unless the received filename includes a
full file path.
That's fine for one machine
control, but if I have more than one machine, then I have to go back to
the computer before every upload or download to make sure the
configuration and switchboxes are set for the right machine anyway.
Using DNC Server with many
machines at once.
Each DNC Server can be set
for only one serial port and configuration at a time. All you need to do
is have multiple copies of DNC Server running, each one working
independently.
Multiple RS-232 Serial ports. On the DNC Server settings for each
machine, you can enter a comm port number.

The easy way to add extra serial ports to your
computer is through a USB port hub and USB to
Serial adapters. All newer PC's have a USB port and older ones
can have an add-in card. Through a single USB port you can add hubs with
more multiple ports and a serial port adapter in each one- to a
theoretical maximum of 254 serial ports.
You would have as many instances of the DNC Server program running as
you have machines connected. Just minimize them down on the Windows
Program bar and each one shows its machine name so you can easily find
it. They don't need to open windows for them to work:

USB Serial adapters
An example below of prices for equipment. Hubs
can be cascaded together to increase capacity.
Procedure for
loading and saving with DNC Server:
To receive a file at the control
1. Call up the “get” program in edit mode.
2. The GET program has this format:
File length must be less than 10 lines.
Change the filename in the comment to the filename you want to receive
at the control.
Within the program is (G* P123) which is a comment consisting of “(G*”,
a space, and the filename. You don’t have to put any extension on the
end of the filename because the server will add it automatically.
3. Quit edit and Punch the GET program file to the server. The requested
file will be queued up and be waiting for you to load it.
4. Start loading the file with “CN0:” on Okuma or “Read” on Fanuc. Make
sure a couple of seconds pass before trying to load so the server has
time to queue up the file.
To Send a
file from the machine and save on the computer.
1. Call up the “Send” program in edit mode.
2. The Send program has this format:
File Length must be less than 10 lines.
Change the filename in the comment to the filename you want to Send from
the control and save on the computer.
Within the program is a line with (S* P123) which is a comment
consisting of “(S*”, a space, and the filename. You don’t have to put
any extension on the end of the filename because the server will add it
automatically.
3. Quit edit and Punch the SEND program file to the server. The server
will get ready to receive the next file you send and save it to the
given filename.
5. Punch out the file you want to save. Make sure a couple of seconds
pass before trying to send it so the server has time to get ready to
receive your file.
To get a Log report of recent transactions at your machine. This is
useful for checking to see if the files you downloaded to the computer
were properly saved.
4. The Log program has this format.
File Length must be less than 10 lines.
Within the program is a line with (L*)
6. Punch the SEND program file to the server. The requested file will be
queued up and be waiting for you to load it.
7. Start loading the file with “CN0:” on Okuma or “Read” on Fanuc. Make
sure a couple of seconds pass before trying to load so the server has
time to queue up the file.
8. The file you receive at the machine will have no filename, and will
consist of several lines of comments that shows the last few
transactions with filenames, file sizes, and times that took place for
this machine.
To Reset
Server to Command Mode.
1. The Reset program has this format:
Anywhere in the text is the characters “(X*”
2. If the Server sees these characters anywhere, it will reset back to
the listen for command mode without saving any file.
Back
|