Hello Guest it is April 21, 2021, 06:50:07 PM

Author Topic: [Help] One axis screen  (Read 374 times)

0 Members and 1 Guest are viewing this topic.

[Help] One axis screen
« 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, 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



First of all i want to thanks to TPS for this fantastic keyboard 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

Offline TPS

*
  •  2,113 2,113
    • View Profile
Re: [Help] One axis screen
« Reply #1 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.


anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [Help] One axis screen
« Reply #2 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 :/

Offline TPS

*
  •  2,113 2,113
    • View Profile
Re: [Help] One axis screen
« Reply #3 on: January 14, 2021, 09:44:14 AM »
you have to Change the DRO Number of yourinput field to 1400
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [Help] One axis screen
« Reply #4 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.
« Last Edit: January 19, 2021, 06:16:37 AM by aliorix »

Offline TPS

*
  •  2,113 2,113
    • View Profile
Re: [Help] One axis screen
« Reply #5 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
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [Help] One axis screen
« Reply #6 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

Offline TPS

*
  •  2,113 2,113
    • View Profile
Re: [Help] One axis screen
« Reply #7 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
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline TPS

*
  •  2,113 2,113
    • View Profile
Re: [Help] One axis screen
« Reply #8 on: January 19, 2021, 08:45:49 AM »
if you enter the Manual Target press OK does Actual Length go to the given Position?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [Help] One axis screen
« Reply #9 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  :(