Hello Guest it is April 28, 2024, 06:23:47 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bill_O

361
Mach4 General Discussion / loop in macro till register changes
« on: April 18, 2019, 11:44:44 AM »
I need to have a loop in a macro that waits till a register gets changed before continuing through the macro.
I really have no idea how to do this.

Bill

362
Mach4 General Discussion / Re: 3 position toggle button
« on: April 15, 2019, 09:40:26 AM »
This worked great.

I made a register (iRegs0/MistSet)
Then I check the value of the register to change the button.

local inst = mc.mcGetInstance()
local hregmist = mc.mcRegGetHandle(inst, 'iRegs0/MistSet')
local MistNow = mc.mcRegGetValue(hregmist)
if (MistNow == 0) then
   scr.SetProperty('btnMistSet', 'Label', 'Mist Auto')
   mc.mcRegSetValue(hregmist, 1)
elseif (MistNow == 1) then
   scr.SetProperty('btnMistSet', 'Label', 'Mist On')
   mc.mcRegSetValue(hregmist, 2)
else
   scr.SetProperty('btnMistSet', 'Label', 'Mist Off')
   mc.mcRegSetValue(hregmist, 0)
end

Works like a champ and I can use the register values throughout Mach4.

Thanks for the help.
Bill

363
Mach4 General Discussion / Re: 3 position toggle button
« on: April 15, 2019, 08:24:20 AM »
thanks all
i will give it a try

bill

364
Mach4 General Discussion / 3 position toggle button
« on: April 12, 2019, 03:04:36 PM »
Has anyone made a toggle button that has 3 states?
Ex; On, Off, Auto

I think i can do it with a regular button and use led indicators but it would be nice to just have the button change.

Thanks,
Bill

365
Mach4 General Discussion / Re: Mach4 Lua for Dummies
« on: April 01, 2019, 05:52:56 PM »
Craig,

I am going to need to play with what you have in your "Using Mach4 Signals - Intro"
If I can get my head wrapped around it I can add a link your post.

Thanks,
Bill

366
Mach4 General Discussion / Re: Mach4 Lua for Dummies
« on: April 01, 2019, 05:49:58 PM »
Steve,

I actually use what you were saying for getting an axis position.
I was just quickly trying to get a more standard value for my example.
I am going to add yours stating that it is better to use the mc calls when you can.

Bill

367
Mach4 General Discussion / Mach4 Lua for Dummies
« on: March 29, 2019, 08:09:06 AM »
I am not a programmer and even though all the information is out there and plenty of people are willing to help I thought this might help some people like me.
Please all of you experts look it over and let me know if I made any mistakes.
I plan on updating this as I learn more.
I hope this helps some people get started without feeling like an idiot.

Bill

368
Mach4 General Discussion / Re: scr list
« on: March 29, 2019, 07:50:15 AM »
Brett and Craig,

That is great.
Thanks for extracting it and editing it.

Bill

369
Mach4 General Discussion / Re: scr list
« on: March 28, 2019, 05:56:01 PM »
Craig,

I saw that but was hoping there was a more complete list.
I realize not many things need the scr but as far as I can see at least some do.

Thanks again,
Bill

370
Mach4 General Discussion / scr list
« on: March 28, 2019, 05:36:11 PM »
I am unable to find a list of the scr calls that can be made in Mach4.
Does anyone know where one is?

Thanks,
Bill