Hello Guest it is March 28, 2024, 01:17:07 PM

Author Topic: How to- USB powered LCD display of DRO`s  (Read 73185 times)

0 Members and 1 Guest are viewing this topic.

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: How to- USB powered LCD display of DRO`s
« Reply #20 on: July 07, 2011, 04:37:52 PM »
So there must be variables in these versions because in version 3.042, it's real time.

Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to- USB powered LCD display of DRO`s
« Reply #21 on: July 07, 2011, 11:08:09 PM »
HIYA GUYS, I see you found the glitches(;-) Yes Dave there are variables in the vesions that is why I stopped working with macros you could never really depend on them from version to version, machine to machine to work the same.

Really all you need to do is  send an LCD initialation string as Ian suggested in the Mach startup initiation string to make sure the cursor is turned off.

Because you are only blasting data down the tube so to speak the raw data seemed to work the best with spacing setting up the line wraps as holders.

We did that in the early days of MODIO and the LCD display.

It SHOULD be updating at the speed of the macropump loop. But sometimes the LOOP seems to get lost for a while(;-)

COnsidering the use of send serial on the USB port I was amased it worked at all.

(;-) TP

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: How to- USB powered LCD display of DRO`s
« Reply #22 on: July 08, 2011, 04:55:29 AM »
Hi Terry,

Thanks for your input as well, and confirming what we've seen.

Is there any way to get this macro (or the original of yours) to work on V3.039? I really like the way that version functions on my machine PC and I'm sure you can understand that if something works perfectly, don't "fix" it  ;)

Thanks,
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: How to- USB powered LCD display of DRO`s
« Reply #23 on: July 08, 2011, 05:34:47 AM »
According to the downloads page the latest LOCKDOWN is R3.043.022 so that's really the latest anyone should be using if they want the best available stability.

I suspect the problems are related to the SendSerial command rather than the macropump per se but let's see. (I've had problems with SendSerial before - it really is rather p*ss poor  ;D

There's really no difference between Terry's earlier version and mine except mine attempts to split things into the three parts needed for (semi)minimal use of the serial line and the macropump. i.e. that which only needs to sent once only - the cursor off command cos that's stored by the card in EEPROM. That which needs to be sent once at the beginning of each Mach session - the display size and the X,Y,Z and A labels. And finally that which needs to be sent continually - i.e the actual changing values.

Terry's get's the positioning right by padding and using line-wrap wheras mine positions the cursor appropriately and then sends the DRO values.

Anyway - let's see if we can figure out if this is a macropump issue or a SendSerial issue.

If you're using my version then just replace the macropump code I posted above in reply #16 with this:

Code: [Select]
message _
"X: " & Format (Getdro(0) , "+000.0000;-000.0000") & " " & _
"Y: " & Format (Getdro(1) , "+000.0000;-000.0000") & " " & _
"Z: " & Format (Getdro(2) , "+000.0000;-000.0000") & " " & _
"A: " & Format (Getdro(3) , "+000.0000;-000.0000")


This will display the same DRO info on Mach's status bar instead of sending it down the serial pipe.

If that works - which it does for me on the latest LOCKDOWN then we'll cast our suspicious eyes back at SendSerial.

Cheers

Ian

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: How to- USB powered LCD display of DRO`s
« Reply #24 on: July 08, 2011, 10:09:14 AM »
Hi Ian,

No DRO info on the status bar with that macro. As for using the version that I've stuck with, even though everyone has told me in the past (including Brian and Art), "if the version you're using is working properly, then continue to use it", I still tried to upgrade at one point (because I heard it was more stable), and it wreaked havoc on my macros that I used since I set up Mach 3. I vowed not to do that again, lol!!

I'm half afraid to change anything as I'm just not as educated in this field as most of you and the last thing I want to do is have my machine down.

I'm sure I've already taken up a lot of your time, but can you briefly explain what changes in a Mach revision/version that makes one version suitable for some macros and not suitable for others? Of, course, now thinking about that stupid question, I guess if you knew the answer, you'd be able to map out a macro that would work correctly with version 3.039, right? lol!  :P  Sorry for sounding dumb...... I guess it's all in the coding of the program, yes?

Thanks again,
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)
Re: How to- USB powered LCD display of DRO`s
« Reply #25 on: July 08, 2011, 10:13:57 AM »
I am having no problem with the original Macro after turning off the cursor, its works just fine on my XP and windows 7 machines. There are also 4 outputs you can turn off and on on this board but not sure what they can be used for using a Macro.
Also a custom splash screen can be programed as well. I am using Version R3.043.022
"Gravity, its not just a good idea its the law"

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: How to- USB powered LCD display of DRO`s
« Reply #26 on: July 08, 2011, 10:18:10 AM »
Hi Fred,

Just a note, I didn't have a problem with your macro either, it worked just fine on the later version of Mach. It just isn't working on my earlier (prefferred version V3.039).

Thanks for the info though.
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)
Re: How to- USB powered LCD display of DRO`s
« Reply #27 on: July 08, 2011, 10:36:03 AM »
I see, this is the first time I have used a Marco and I always use the latest version of Mach so i did not realize that there was a compatibility issue with macros and different versions of Mach, I hope you get it sorted out.


Hi Fred,

Just a note, I didn't have a problem with your macro either, it worked just fine on the later version of Mach. It just isn't working on my earlier (prefferred version V3.039).

Thanks for the info though.
Dave
"Gravity, its not just a good idea its the law"

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: How to- USB powered LCD display of DRO`s
« Reply #28 on: July 08, 2011, 02:59:08 PM »
Addressing all the posts from reply #24 onwards, all I can say is that both Terry's code and mine are both simply sending control strings down the serial port to the LCD hardware. Both are correct and SHOULD work as far as the LCD display hardware manual states.

Whether the macropump and the SendSerial command are actually doing what it says on the tin REGULARLY and RELIABLY is open to question. I think Terry is probably broadly correct in saying you just can't rely on either to behave as advertised.

I know when I built my own (programable) THC and software I had to work around SendSerial's faults and also when I wrote my probing routines I had to code around G31's faults - it's horses for courses I guess.

Ian
« Last Edit: July 08, 2011, 03:00:39 PM by stirling »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to- USB powered LCD display of DRO`s
« Reply #29 on: July 10, 2011, 09:49:45 AM »
Ian is correct in that the send serial is a crap shoot. I think the problem between machines and version has a lot to do with how the MACHINE handles VB and threading along with the overall processing speed of the threads.

I have a n older 1 gig MB that will take anything that mach can throw out and it works every time. I have a 2 gig MD that chokes machVB to death without adding wait states all over the code to slow it down. It gets completly out of sync and even stores code that pops up a few lines later down the program.

I think you might want to try a simple wait state between each line to allow the LCD to process each line before Mach throws everything at it at once.

I really can't believe that mach was developed without a simple  PROPER serial port control seeing as most of the older machines had serial control for the external devices. But it was developed for the simple HOBBY market not the commercial side. I could go on but I wont (;-)

Iit is what it is, and with time you can work it out to work on YOUR machine IF you have a sense of adventure. (;-) TP