I purchased a LCD Smartie recently which I hope to use for DRO display as well as other information. Here is the code I'm having trouble with
It seems that I need to send raw characters to the device in order to drive it. The example I found in one of the other boards here, does not work for me. The block that I've been working on is in the "If init-=0 .... endif" section.
I'm working from the driver software for the matrix DLL which works using LCD Smartie
procedure TLCD_MO.setPosition(x, y: Integer);
begin
writeDevice(Chr($0FE)+'G'+Chr(x)+Chr(y));
inherited;
end;
Chr(254) is 0xFE
cnt=getVar(1000)
init=getVar(1001)
If init=0 Then
SendSerial _
Chr(254)"G"Chr(0)Chr(0)" X:" & _
Chr(254)"G"Chr(0)Chr(1)" Y:" & _
Chr(254)"G"Chr(0)Chr(2)" Z:" & _
Chr(254)"G"Chr(0)Chr(3)" A:" & _
setVar(1001, init+1)
setVar(1000, 0)
end if
if cnt=10 then
setVar(1000, 0)
SendSerial _
"¦30" & Format (Getdro(0) , "+000.0000;-000.0000") & _
"¦31" & Format (Getdro(1) , "+000.0000;-000.0000") & _
"¦32" & Format (Getdro(2) , "+000.0000;-000.0000") & _
"¦33" & Format (Getdro(3) , "+000.0000;-000.0000")
else
setVar(1000, cnt+1)
End If