Hello Guest it is March 28, 2024, 10:35:59 AM

Author Topic: Mach4 LED's  (Read 3436 times)

0 Members and 1 Guest are viewing this topic.

Offline HL

*
  •  10 10
    • View Profile
Re: Mach4 LED's
« Reply #10 on: February 06, 2019, 12:23:51 AM »
It took a while but I got text to show spindle direction( CW,CCW) and when its OFF.
Feeling good about this. Now to get coolant and mist and if that works I'll be happy.

Thanks for the help.

Offline HL

*
  •  10 10
    • View Profile
Re: Mach4 LED's
« Reply #11 on: February 06, 2019, 01:49:58 AM »
Big Thank You to    Cbyrdtopper.....

I can finally move on.

Got Coolant, Mist, Spindle Direction texts to work perfectly.

Couldn't of done it without you.

LUA is so different than the other languages I've programmed in before.

Thank You.
Re: Mach4 LED's
« Reply #12 on: February 06, 2019, 09:19:23 AM »
Glad you got it working! =)
Chad Byrd

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Mach4 LED's
« Reply #13 on: February 07, 2019, 07:48:12 PM »
All of the tools are there in the screen to implement what you want.  There is no LED in the wxWidgets framework.  So that "element" was custom coded.  This is different than buttons, as the wxWidgets framework implements stock Windows buttons.  In other words, a button on the Mach screen will look like a button in any other standard Windows application (that hasn't been dressed up).  The Terminal program Putty is a good example.  That being said, we allow the user to pretty much dress up any button they wish with the bitmap button and custom bitmaps.  My point is just because you don't see a screen element that does exactly what you want at first glance, don't assume that it can't be done. 

Back to the LEDs.  LED is an acronym for light emitting diode, as seen on many physical machine control panels.  And that is what I tried to make them look like.  Generally, people like the round LEDs because a round LED in Mach3 was not possible.  But sometimes a round LED is not what is needed or wanted, so there are properties in the control to set the shape.  You have a choice of round or square (rectangular, really).  But if you just plop a LED down on the screen in the screen editor, it is round by default and if no cursory glance at the properties is given, you may not realize that they can be made to be rectangular.  But either way, the LED screen element is rather graphical in nature under the hood.  Not textual.  It would not be easy to program it to ALSO be textual (although I'm thinking about it). 

BTW, there is a sticky topic in this forum titled "Mach 4 Feature Request".  I look at each and every post.  I don't respond in there very often, as it would consume my time that could otherwise be used to actually make the things happen.  If I think the idea has merit and I think that the majority of our user base could benefit from it, I'll implement it. 

But seeing as how text based LEDs do not exist at the present time, now it is time to start thinking outside of the box.  If I were to want a text based "Boolean" value (we won't call it an LED now), I'd start with a Static Text control and tie it to a register.  You can create a register in the regfile plugin's configuration.  Registers can contain text values, so basically whatever is put in that register will be what the Static Text control displays on the screen.  You can then tie the register's value to any signal in the signal script (or use the siglib) with a small bit of LUA code.  One could even change the color of what is displayed.  Yeah, it isn't as easy as plopping down a control and instantly having it appeal to your taste or sense of style, but it isn't THAT hard either. 

I'm not a young guy either.  And plenty on this forum know my thoughts on LUA.  Just to summarize them, I can't stand LUA.  We chose LUA not for it's looks, but because of it's speed and flexibility.  But I won't let that stand in my way of getting what I want.  :)

Here is an example of a screen set that looks NOTHING like our stock screens.  https://www.machsupport.com/forum/index.php?topic=35438.0

Steve
Re: Mach4 LED's
« Reply #14 on: February 09, 2019, 01:54:13 PM »
If the layer height of a screen element could be controlled, then you could place a static text element over an LED element and achieve a faux backlit type text LED.  However, just placing the screen element higher up in the list of a particular group does not appear to impact the element's layer height.     
Re: Mach4 LED's
« Reply #15 on: February 09, 2019, 02:07:15 PM »
HL-What font are you using in your screen?  I'm a fan of slashed zeros.  Consolas font uses slashed zeros.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Mach4 LED's
« Reply #16 on: February 10, 2019, 09:18:35 AM »
Quote
Generally, people like the round LEDs because a round LED in Mach3 was not possible.

Sure they were. Mach3 could use dual state images for LED's, so you could make them look any way you wanted.

This is something I requested when the first Mach4 version was released, years ago.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline HL

*
  •  10 10
    • View Profile
Re: Mach4 LED's
« Reply #17 on: February 12, 2019, 10:43:57 AM »
HL-What font are you using in your screen?  I'm a fan of slashed zeros.  Consolas font uses slashed zeros.

Hello buff. For the DRO's, Brave New Era G98. For G-Code, Nouveau IBM.
Re: Mach4 LED's
« Reply #18 on: February 12, 2019, 11:00:04 AM »
Thinking out loud without knowledge of how easy it is to implement...

Could you use a variable text display where the LED would be? When on, display a period or asterisk in a large font (this would just look like a solid colored square) and when the signal is off display nothing? This would be very minimalist and go along with your flat look of the display.

Mike

Offline HL

*
  •  10 10
    • View Profile
Re: Mach4 LED's
« Reply #19 on: February 12, 2019, 02:23:20 PM »
Thinking out loud without knowledge of how easy it is to implement...

Could you use a variable text display where the LED would be? When on, display a period or asterisk in a large font (this would just look like a solid colored square) and when the signal is off display nothing? This would be very minimalist and go along with your flat look of the display.

Mike

You could, but I much rather have text. In the end it wasn't very complicated to do.

Keep in mind this is a work in progress. Not finalized, but slowly getting there.