Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:56:23 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  LCD display
Pages: 1   Go Down
Print
Author Topic: LCD display  (Read 298 times)
0 Members and 1 Guest are viewing this topic.
cd_edwards
Active Member

Offline Offline

Posts: 27


View Profile
« on: October 28, 2011, 08: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   
Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #1 on: October 28, 2011, 09:53:30 AM »

IS this device serial,modbus,usb, HuhHuhHuhHuh

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

Are you running pokeys??

(;-) TP
Logged
cd_edwards
Active Member

Offline Offline

Posts: 27


View Profile
« Reply #2 on: October 28, 2011, 06: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.
Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #3 on: October 28, 2011, 08: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
Logged
cd_edwards
Active Member

Offline Offline

Posts: 27


View Profile
« Reply #4 on: October 28, 2011, 08: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.
Logged
cd_edwards
Active Member

Offline Offline

Posts: 27


View Profile
« Reply #5 on: October 28, 2011, 08: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

Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #6 on: October 28, 2011, 09: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
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!