Hello Guest it is April 11, 2021, 06:23:28 PM

Author Topic: LCD display  (Read 3014 times)

0 Members and 1 Guest are viewing this topic.

LCD display
« on: October 28, 2011, 09:09:26 AM »
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   

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: LCD display
« Reply #1 on: October 28, 2011, 10:53:30 AM »
IS this device serial,modbus,usb, ????????????

IS Mach running the LPT SS or some other motion device??

Are you running pokeys??

(;-) TP
Re: LCD display
« Reply #2 on: October 28, 2011, 07:53:14 PM »
It's a USB serial device. The device shows up as Com5. Mach was actually seeing the device and sending information to it. I just need to be able to send the proper string's to it.

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: LCD display
« Reply #3 on: October 28, 2011, 09:02:43 PM »
From What I can see the LCD Smartie is SOFTWARE used to drive a lcd display.

SO what LCD display are you using???

Can you post a link to a manual for the display???

What about the other code on here did not work for you?

(;-) TP
Re: LCD display
« Reply #4 on: October 28, 2011, 09:28:42 PM »
Got it from Sure Electronics. It's called a LCD Smartie Kit. There's a couple of versions of it, I got version II of it.

http://www.sureelectronics.net/goods.php?id=969

I need to send raw char strings to the device instead of waht the other code from here uses. I might have solved the problem, I'll see what happens after this reboot. Currently my serial port is in "use" according to winblows.
Re: LCD display
« Reply #5 on: October 28, 2011, 09:29:14 PM »
If init=0 Then
   SendSerial Chr(254) & "X"
   SendSerial Chr(254) & "G" & Chr(1) & Chr(1) & " X:"
   SendSerial Chr(254) & "G" & Chr(1) & Chr(2) & " Y:"
   SendSerial Chr(254) & "G" & Chr(1) & Chr(3) & " Z:"
   SendSerial Chr(254) & "G" & Chr(1) & Chr(4) & " A:"
   setVar(1001, init+1)
   setVar(1000, 0)
end if

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: LCD display
« Reply #6 on: October 28, 2011, 10:19:36 PM »
YOu are going to have to start small and work your way UP and their is no garrentee that Mach can talk to it.

First make sure that Mach3 and the device is setup proper in the serial side. They have to be exact in configuration.

Start by sending 1 line of 20 charectors to it and see what that does.  

Sendserial "abcdefghijklmnopqrst"

(;-) TP