Hello Guest it is January 26, 2025, 04:17:32 AM

Author Topic: developing screens need help on a few bits  (Read 4220 times)

0 Members and 1 Guest are viewing this topic.

developing screens need help on a few bits
« on: November 24, 2024, 03:55:35 PM »
retired now and getting around to my hobbies and workshop
as well as doing a load of brains for Modbus project I am also doing screens
VB script is new to me, but have done other programming
not after anyone to do all the code just want pointed in the right direction
also attached my "work in progress screen" would like some constructive critasism
attached my screen file

QUESTIONS

1) in "single block" mode stop cycle does not change the state of led 803 what is 803 exactly

2) sometimes in feedhold start cycle does not work a cycle stop is required then a start cycle to continue
   i found its when in subroutine is this correct or is something else going on

3) is there a ticker for M codes ie equivelent to "code" for G codes

4) is there a button code for reset jog rate % to 100%

5) in pb script either 33 or 34, i can't get this to work
   i'm trying to use G59 and indirect address the P word
   or load an offset table using a UserDRO to load the P word
     
G59 P (GetUserDRO,1026)
 
or
    
select_field = (GetUserDRO,1026)
G59 P select_field

or

select_field = (GetUserDRO,1026)
G59 ("P" & select_field)

what is the correct syntax

many thanks anyone thats looking
servomac
Re: developing screens need help on a few bits
« Reply #1 on: November 24, 2024, 04:14:33 PM »
hi again
does the .set file need the graphics seperatly or are they bundled into the file itself
regards
servomac

Offline TPS

*
  •  2,542 2,542
Re: developing screens need help on a few bits
« Reply #2 on: November 25, 2024, 07:04:17 AM »
try to answer a few of your question's:

1.as far i know there is no led for stop mode in single step mode
  in a macro you can use IsMoving() to check axis run

3. as far i know -> no

4. if you mean SlowJog % -> SetOemDro(3,100) will set it 100%

5. correct syntax in VB script would be: Code "G59 P" &  GetUserDRO(1026)

hope it help's a bit
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: developing screens need help on a few bits
« Reply #3 on: November 25, 2024, 11:35:20 AM »
Hi TPS
thanks very much for your help, sometimes things just drive you mad and you can't see the wood for the trees

1) i've ended up with a conveluted bit of logic to get a cycle stop LED to work; taking, single block, cycle and feed hold into consideration. It seem to work well, confirmation of no stop mode led ok, i will stop looking

3) would have been nice but thinking about it there is only spindle, coolant and a few others that are standard so its best forgotten about, should maybe put my brain into gear before engaging a shout for help

4) That works a treat, dont know why i did not come to that conclusion, thanks a lot

5) The code works great in the VB editor but does not work from a tranparent button image with code 33 or 34
    any idea's . I cut and pasted the code just to make sure it was not finger trouble.

i'm getting there slowly but surley; between "Brains" and "MachScreen" its a bit of a learning curve
thanks again for all your help
servomac

Offline TPS

*
  •  2,542 2,542
Re: developing screens need help on a few bits
« Reply #4 on: November 25, 2024, 02:00:26 PM »
Hi servomac,

for 5.

is your transparent button on top of an other control element?
are you using machsreen as screeeditor?

if yes and yes, there is a small listview window coming up when your
try to select the transparent button, within this listview the transparent
button must be the first one in the list, if it is not the first one you can
select the transparent button by pressing the left mouse button, hold the mouse
button pressed and shift it upwards in the list.

this is the only thing i can imagine what could go wrong with this transparent button.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: developing screens need help on a few bits
« Reply #5 on: November 26, 2024, 05:01:44 AM »
Hi TPS
everyday is a school day
always wondered what the multiple / single select toggle was for
I just used the swap layers before to get things working
its working a treat now
thanks for all your help its very much appreciated
regards
servomac