Machsupport Forum

Mach Discussion => Mach Screens => Machscreen Screen Designer => Topic started by: aliorix on January 14, 2021, 06:57:37 AM

Title: [Help] One axis screen
Post by: aliorix on January 14, 2021, 06:57:37 AM
Hi everyone, i'm trying to build something like this -->https://www.youtube.com/watch?v=dHXoMG2s5yE (https://www.youtube.com/watch?v=dHXoMG2s5yE), but not so fancy xD

So, besides the doubts that i have with the hardware part of the project, i have a couple of problems with the software part of the project.

Basically I'm making my own screen since I didn't find anything that looks like what I need.

My first problem is that I don't know anything about programming, so for sure there are a lot of things that are basic but i am not aware, so sorry for that.
I will share a picture of what i have done, and some of my doubts

(https://i.ibb.co/XVDgGs0/asd.png)

First of all i want to thanks to TPS for this fantastic keyboard https://www.machsupport.com/forum/index.php?topic=36213.msg247828#msg247828 (https://www.machsupport.com/forum/index.php?topic=36213.msg247828#msg247828)

Ok, better to start.
*The load and edit buttons are working perfectly

*The stop and home. I want to think that too [function stop (3); function Zero all (7)] i hope that I will be able to try it soon.

*The Go! button, i use the function set this line next to execute (156) but i don't see it in the target length [x dro (800)]

*I can't figure out how to choose between picking a length from the list or making a manual input. I saw the video and its look like he uses a led with some script, but as i said im realy lost there.

*On the Actual length [a machine cord dro (86)] its shows 0.00
But in the target length [x dro (800)] its shows -2.55 all the time and from the beginning, when i press in input target and the keyboard opens it shows too the -2.55, if i change the number and press ok, it doesn't change in the target length


I will realy apreciate a lot any kinde of help  :)
i will attach the .set file if someone want to look at it
Title: Re: [Help] One axis screen
Post by: TPS on January 14, 2021, 08:11:12 AM
i assume you are referencing your machine to a limitswitch.
in this case the DRO Number for for Actual Pos is 83 not 86.

for the Manual Input you have to use a free DRO, not 800, because 800 is x-axis workcoord DRO.
the code for your Manual Input Button would then be something like this:
Code: [Select]
Sub Main
call NumericKeyboard(1400)
        Code "G0 X" &GetOEMDro(1400)
End Sub


#Expand <\..\..\macros\yourprofile\numerickeyboard>

make sure you use the correct path for #Expand intruction

to "work" through your loaded list i would set machine into single step  (DoOEMButton(1004)) and
then by each Cycle Start (DoOEMButton(1000)) it should exceute one line.


Title: Re: [Help] One axis screen
Post by: aliorix on January 14, 2021, 09:18:43 AM
Thx again!

Ok, so i fixed the actual pos.

And i dont understand how to put a free dro :/

i changed the manual input and is working but only 1 time, i can put 1 time some number, press OK and then when i want to open again is not working :/

Title: Re: [Help] One axis screen
Post by: TPS on January 14, 2021, 09:44:14 AM
you have to Change the DRO Number of yourinput field to 1400
Title: Re: [Help] One axis screen
Post by: aliorix on January 19, 2021, 06:12:35 AM
Thx again TPS!

So i make it work all the manual input thing (now i understand why you  put in the script the "&GetOEMDro(1400)")
I give up using your keypad because i couldn't make it work more than 1 time, so a friend told me that i can use the auto-calculator, it's a little small, but anyway)

Now i'm ashamed to say that i didn't understand a word about the list...
The g code is showing the txt, the load and edit buttons are working but the "GO!" its look like is not working, and i don't know if to add another dro to be able to see the cords of the list or if there is a way to show that in the target dro (that now is with the oem 1400)

I don't have a problem even to make two tabs, one for manual and another for list.
Title: Re: [Help] One axis screen
Post by: TPS on January 19, 2021, 07:49:48 AM
made a quick and dirty wizzard

-create the Folder c:\Mach3\Addons\bladestop
-copy the attached file into this Folder
-restart Mach
-use load wizard
-select baldestop
-test

than you can look with screeneditor what i made in the entire buttons
Title: Re: [Help] One axis screen
Post by: aliorix on January 19, 2021, 08:06:05 AM
Wow man, thank you for your time! really!


I tested.

Your keyboard still pop up 1 time, if i put any number and press ok, its working, but if i try to do it again it doesn't pop up

I see that in the GO button you put a condition (if) with a oemled, but i don't see any led's
So when i load the list, and press go i don't see anything happening. And if i scroll down in the list and chose anything, when i press go it come back to the first entry of the list.

Ah, and i see that you replace the actual length (oem 86) with a x oem
Title: Re: [Help] One axis screen
Post by: TPS on January 19, 2021, 08:40:41 AM
i made a simple g-code file for the list i loaded

Code: [Select]
X10
X20
X30
X40

-then i load this list with Load List button
-every time i press the GO button next line is excecuted
-with Reset List i rewind and go back to the begin of list


here everytime i press the Input Target button the simple Keyboard Shows up and after i press
Enter x-axis moves to the Position witch was entered.

i used OEMLed(82) with tells me that single step is turned ON, if not i turn it ON
(DoOEMButton(1004)).
OEMLeds are always updated even if they are not present at actual screen
Title: Re: [Help] One axis screen
Post by: TPS on January 19, 2021, 08:45:49 AM
if you enter the Manual Target press OK does Actual Length go to the given Position?
Title: Re: [Help] One axis screen
Post by: aliorix on January 19, 2021, 08:56:26 AM
No, if I put some length in manual (or if I choose from the list) the actual doesn't change at all.

Maybe is a problem of my computer? i will try to test it in my house today and see if there is something different :/
Here i have win10  :(
Title: Re: [Help] One axis screen
Post by: aliorix on January 19, 2021, 09:02:16 AM
If I copy&paste your g-code (that have 4 entrys) it only shows me 3 in the list, then i check again to press GO and anything is happening, actual length is showing -2.55 and your keypad only shows 1 time :/

Maybe something wrong with my profile?
im opening mach3, load the profile, and then i go to view --> load screen
Title: Re: [Help] One axis screen
Post by: TPS on January 19, 2021, 09:10:20 AM
maybe E_stop not reseted, Looks like your machine is not moving at all.
Title: Re: [Help] One axis screen
Post by: TPS on January 19, 2021, 09:11:22 AM
im opening mach3, load the profile, and then i go to view --> load screen

-use load wizard
-select baldestop

to run my wizard
Title: Re: [Help] One axis screen
Post by: aliorix on January 19, 2021, 09:15:51 AM
Its doing exactly the same...

i will try to record a video and upload here
Title: Re: [Help] One axis screen
Post by: TPS on January 19, 2021, 09:17:28 AM
you will have to upload the Video to Youtube, will be to large for here.


try to upload a screenshot of mainscreen (1024.set) and of Config -> Ports&Pins -> Motor Outputs here