Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing on a Display

1 view
Skip to first unread message

Jochen Lorenz

unread,
Nov 10, 2004, 5:15:12 AM11/10/04
to corel.wpoffice.paradox10

I am a PDX10/ObjectPAL-User an relativly familar with this.
But now, I have to show something on an external additional display.
The display is plugged on COM1 and works with serial communication.
I have to show on this display: String-Constants, String-Variables,
Edit- and Memo-Fields direktly.
I think, it is not a good idea to use a virtual text-printer on COM1
(directly or with mode.com), because the print-Method always shows a dialog.

Thanks for helping and tipps!

Krgds
Jochen

Anders Jonsson

unread,
Nov 10, 2004, 1:03:18 PM11/10/04
to corel.wpoffice.paradox10

You can do this by opening a textstream on the COM1 port.

var
ts textstream
endvar

IF NOT ts.create("COM1:") THEN ERRORSHOW() ENDIF

ts.writeline("This is the first line")
ts.close()

You probably need to read up on the documentation of the display and send
some control characters to start a new line etc. You might also need to
initialize the display, I do that with an execute method that sets baud
rate, parity and that kind of stuff.

Of course you will have to figure out some method for writing a memofield,
first splitting it into small strings, then write the string, wait a while
so the one reading the display will have time to read it and the write again
etc.

Should be doable.

Anders Jonsson

"Jochen Lorenz" <jlo...@wb-lorenz.de> skrev i meddelandet
news:4191e410$1_2@cnews...

Jure Zorko

unread,
Nov 11, 2004, 9:22:04 AM11/11/04
to corel.wpoffice.paradox10

method SendLine(s String)
var TS TextStream
endVar
try TS.Open("com1","nw")
TS.WriteLine(s)
TS.Commit()
TS.Close()
onFail
if TS.isAssigned() then TS.Close() endIf
return
endTry
endMethod


method PrinLineLCD(line SmallInt,s String)
; line = string to display
; s = line number on display
var o String
endVar
if S.Size()>20 then
s = s.Substr(1,20)
endIf

switch
case TipLCD="STAR":
switch
case line = 1 : o = chr(27)+"QA"+s+chr(13)
case line = 2 : o = chr(27)+"QB"+s+chr(13)
otherwise : o = chr(27)+"QA"+s+chr(13)
endSwitch
SendLine(o)
case TipLCD="PD2100-AEDX":
switch
case line = 1 : o = "!#2"+s+chr(13)
case line = 2 : o = "!#1"+s+chr(13)
otherwise : o = "!#1"+s+chr(13)
endSwitch
SendLine(o)
case TipLCD="PD2100":
s = s.SubStr(1,20)
switch
case line = 1 : tmpvrst1 = s ; global variables for separate lines on
display
case line = 2 : tmpvrst2 = s
otherwise : tmpvrst1 = s
endSwitch
s=tmpvrst2+tmpvrst1
SendLine(s)
endswitch
endMethod


"Jochen Lorenz" <jlo...@wb-lorenz.de> wrote in message
news:4191e410$1_2@cnews...

Jochen Lorenz

unread,
Nov 19, 2004, 2:38:57 AM11/19/04
to corel.wpoffice.paradox10

Many thanks to Anders Johnson and Jure Zorko for their promptly and good
helping!

I hope, I can it payback to this group.

Krgds
Jochen

0 new messages