#ACAD controls serialport
2 messages in this thread
Thanks for your help earlier on my circle lockup problem. Here's a new
question:
I use a Logical Connection printer/plotter sharing device with my
three stations. Each 80386 has all output (LPT1 included) redirected to
COM2, which is set to 9600,e,7,1 and feeds the Logical Connection. The
Calcomp plotter uses these parameters as its default, but is configurable
otherwise. So far, so good.
I now want to switch COM2 to 9600,n,8,1 because graphics from other
programs in the form *.pic or *.pcx, etc seem to transfer to the printer
much better. When I reconfigure the system (plotter, Logical connections,
mode settings on PC's…) thus I can get ONE plot from ACAD only. Why? I
think I have established that ACAD (Rel11c2) RESETS my serial port each
time I plot. Is this true? Is it necessary? Is there a way I can have
ACAD plot consistently over a 9600,n,8,1 line?
Any guidance will be appreciated. If this should be posted to ALL
or placed in another section feel free…
Charles – AutoCAD initializes the COM port when it plots, then
re-initializes it when it returns to the Drawing Editor — allowing you to
use the same port for plotter and digitizer. The CalComp driver uses 9600,
E,7,1 and XON/XOFF handshaking. If you want to use other parameters for
the serial port, then you might slide around the configuration issue by
employing R11 spooling to copy a plot file to the COM port outside of
AutoCAD, something like this:
First set the plot environment variable to use the COPY command to
send the plot file to the port:
SET ACADPLCMD=COPY /B %s COM2: (use %%s in a batch file)
Then re-configure AutoCAD's operating parameters. Set the default plot
file (3) to AUTOSPOOL. Make sure the spooler directory (4) exists —
the default is \SPFILES\ — or change it to a directory that does
exist. Then just plot to file, AUTOSPOOL.
Note, however, that the sequence above does not delete the plot file
after the plot is copied to the port; so, you should delete the plot
files routinely. Or, you can use a batch file to execute both COPY and
DELETE automatically. For example, make a batch file, SPOOLER.BAT:
COPY /B %1 COM2:
DELETE %1
Before running AutoCAD set the plotter environment variable:
SET ACADPLCMD=SPOOLER %s
Then plot to file, AUTOSPOOL …
Of course, this procedure assumes that you can dump the file to the plotter
without communication software (XON/XOFF).