Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:09 05 May 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Stepper Project

     Page 6 of 6    
Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3186
Posted: 08:19am 04 May 2026
Copy link to clipboard 
Print this post

[32] Select Case click(ref)
Error : REF is not declared

As you are using OPTION EXPLICIT it thinks REF is an undeclared variable.
Have you set OPTION GUI CONTROLS xx ? Without that advanced controls won't work properly.
It should appear in OPTION LIST.

See the first page of PicoMite Advanced Graphics manual.
Edited 2026-05-04 18:19 by phil99
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1900
Posted: 08:21am 04 May 2026
Copy link to clipboard 
Print this post

Yep I'm on now reading that Advanced Graphics again and couldn't see the wood from the trees today,  

Been reading up on the MsgBox() and I'm thinking as we can open a file this could open G-Code and by setting $values on the axis setup pages they could then be used for the stepper gc $'s.

I still have a long way to go getting it all the pages setup and it is nice to have a break from fabrication.

Edit: I was typing and missed your post Phill and yes I did set the GUI Controls to 75 before I started.
Edited 2026-05-04 18:23 by Bryan1
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11269
Posted: 09:04am 04 May 2026
Copy link to clipboard 
Print this post

Lyle
Please could you test B5 to make sure I haven't broken anything. B5 now supports a 4th axis (A)
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1900
Posted: 09:15am 04 May 2026
Copy link to clipboard 
Print this post

Peter I'm running B4 and I may get enough dutch courage tomorrow with this gui and have a go at running the stepper. Now when I was using it yesterday I did notice a couple of times it kept going the error of no soft limits and only a reset stopped it. Now the code for the soft limits never changed in the code so not sure.

In the morning I can try it again and see if it happens again then take some screen shots.
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 289
Posted: 12:59pm 04 May 2026
Copy link to clipboard 
Print this post

G'day Peter,
Will load it up in the morning and report back, thanks for the additional A axis  

I do wonder if you can read minds, I was planning a rotary engraving machine but was going to re-assign the Y-axis as the rotary. A call from my nephew with an idea for a project has moved it up the to-do list.

So many projects and only 2 hands...

Regards,
Lyle.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1876
Posted: 07:22pm 04 May 2026
Copy link to clipboard 
Print this post

Just a bit curious re: no A axis homing.

There are rotary tables with limited rotation and also, not every workpiece is circular.
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1900
Posted: 02:35am 05 May 2026
Copy link to clipboard 
Print this post

Ok next bit of fun   Working off the Advanced Graphics Manual example got the radio button working but it just goes to a blank screen

OPTION EXPLICIT
OPTION DEFAULT NONE
option console serial
Colour RGB(white), rgb (black)
const X_position = 1, X_goleft = 2, X_goright = 3, X_boundryleft = 4
const X_boundryright = 5, Y_position = 6, Y_goin = 7, Y_goout = 8
const Y_boundryin = 9, Y_boundryout = 10
Const Z_position = 9, Z_goup = 10, Z_godown = 11, Z1 = 24
const Z_boundaryup = 12, Z_boundarydown = 13, X1 = 22, Y1 = 23
const AENABLE = 14, XSTEP = 15, XDIR = 16, YSTEP = 17, YDIR = 18
const ZSTEP = 19, ZDIR = 20, PAGE_1TITLE = 21, ysetup = 23, Z0 = 35
const page_1 = 27, xsetup = 25, zsetup = 26, ver = 32, X0 = 33
const page_2 = 28, page_3 = 29, page_4 = 30, page_6 = 31, Y0 = 34
cls
backlight 50

font 1,2 : gui caption PAGE_1TITLE, "MMBasic Surface Grinder", 70, 20
           gui caption ver, " Version 0.001", 100, 40
GUI radio X1,"X Axis", 350, 160, 10, rgb(red)
gui radio Y1,"Y Axis", 350, 210, 10, rgb(red)
gui radio Z1,"Z Axis", 350, 260, 10, rgb(red)
gui displaybox X_position, 60, 90, 140, 30, rgb(white)
ctrlval(1) = "0.000"'Str$(Peek(stepper x),-4,4)
gui button X0,"X",0,80,50,50, rgb(white)
gui displaybox Y_position, 60, 130, 140,30, rgb(white)
ctrlval(6) = "0.000" ' Str$(Peek(stepper y),-4,4)
gui button Y0, "Y", 0,120,50,50, rgb(white)
gui displaybox Z_position, 60, 170, 140, 30, rgb(white)
ctrlval(9) = "0.000" ' Str$(Peek(stepper z),-4,4))
gui button Z0, "Z", 0, 160, 50, 50, rgb(white)
gui page 1, 2, 3, 4
gui interrupt TOUCHDOWN


do



loop


sub TOUCHDOWN

if touch(ref) = 22 then GUI page 2 'X1

if touch(ref) = 23 then gui page 3 'Y1

if touch(ref) = 24 then gui page 4 'Z1
 
 
 end sub
 
 
 gui setup 2
 
 font 1,2
 gui caption xsetup,"X Axis Config",60,20,, rgb(green)
 
 Gui setup 3
 
 font 1,2
 Gui caption ysetup,"Y Axis Config",60,20,, rgb(green)
 
 gui setup 4
 
 font 1,2
 gui caption zsetup,"Z Axis Config",60,20,, rgb(green)


It has me beat why this isn't working
 
     Page 6 of 6    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026