send HPGL commands to COM1

J

Thread Starter

Jean Creuze

Hi !

I want to send HPGL commands to COM1 in order to drive a plotter.

I made this :

FILE *fp;
fp = fopen("COM1","w");
fprintf(fp,"IN;");

(I made a function Init_COM1() which is working)

and the computer return me a message like "error of writing on COM1".

Can I do that ?
Just the pins RxD, TxD and the Ground are used ?
Maybe I must send all commands character by character ?

Thanks for Helping.

NB : I'm french and I hope that my english isn't bad.
 
C

Curt Wuollet

What platform?
I have some boilerplate for Linux which may help, I adapt it whenever I need to do serial comms.

Regards

cww
 
Hi all,
I've some years ago realized a driver to calcomp plotter by using HPGL commands (HP7474)for Autocad.
I suggest you to do the following command to drive your plotter:
1. Verify serial protocole for the PC and your plotter. It must be the same: Speed, number of bit, parity, number of stop bits.
example: 9600,N,8,1
by using MS DOS MODE Command
MODE COM1:9600,8,n,1
this means
9600 as baud rate (Speed)
8 Bits data
No parity
1 stop Bit

2. Verify your serial cable. Pin 3 and 2 are croised.
3. Launch this:
Type con>com1 at the prompt
IN; PD;PR0,100;PU;
<CTRL>Z CTRL touch + 'Z'
This action will initialize your plotter than down a pen after than plot relative to dx,dy=0,100.

For more assistance you can mail to [email protected]
Regards.
 
Top