0

Hello All,

I have been trying to send data to a pole display i.e. DigiPos WD202,

I am trying to use the following code but nothing appears on the display

Procedure CSPortWrite(PortID, PortData : string);
var
f: THandle;
NumberWritten : dword;
begin
NumberWritten := 0;
//assigns the stream to the printer port LPT1
f := CreateFile(PChar(PortID),GENERIC_WRITE,0,nil,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
//write to printer
{-$1} writefile(f, PChar(PortData)^,Length(PortData),NumberWritten,nil) {+1$};
CloseHandle(f);
End;

and calling then CSPortwWrite()

CSPortWrite(PortID, trim(Frm_FMMain.EdSalesAmount.Text));

Please assist.

1
Contributor
1
Reply
3
Views
6 Years
Discussion Span
Last Post by KE50
0

Got the solution, which is getting a TComm Component which I used to send the control characters together with the text to be displayed.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.