Options

Serial communication through COM1

cedriccedric Member Posts: 8
Hi,

we are implementing an interface with an automatic cash register.
The supplier sent us following piece of BASIC ](*,) code to open the drawer.

OPEN "COM1: 110,N,8,2, OP0,CD0,CS0,DS0" FOR RANDOM AS #1
Delay (20) 'delay of 20 seconds needed to charge up the cash register
PRINT #1, "E" 'opens up the register

I try to use the COM_NF OCX from the download section and came up with following code... but it does not work.... any hints ???

ComPort.ComX := 0;//com1
ComPort.BaudRate := 0;//110bps;
ComPort.Parity := 0;//None
ComPort.DataBits := 4;//8 databits
ComPort.DtrDsr := FALSE;
ComPort.RtsCts := FALSE;
ComPort.XonXoff := FALSE;
ComPort.StopBits := 2;
ComPort.OpenPort;
SLEEP(20000);//20sec.
ComPort.SendStr('E');
ComPort.ClosePort;

Comments

  • Options
    jreynoldsjreynolds Member Posts: 175
    I've had good success using MSCOMM32.OCX for serial commuinication.
Sign In or Register to comment.