Hello Guest it is April 27, 2024, 05:44:25 PM

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

381
Mach4 General Discussion / Re: input signals
« on: March 21, 2019, 03:53:03 PM »
ok.

I was a little quick like normal.
My hopes of being a Mach4 Lua Guru are being dashed. LOL
I no longer get an error but it executes the move regardless of weather the switch is activated or not.

Bill

382
Mach4 General Discussion / Re: input signals
« on: March 21, 2019, 03:38:49 PM »
jbuehn,

I just found that myself.
Was coming in to say never mind I was just being a dumba**.

Thanks all again.

Bill

383
Mach4 General Discussion / Re: input signals
« on: March 21, 2019, 03:05:48 PM »
Craig,

The script goes in a macro.

It is at the start of a special homing macro I made.
Sometimes the Home Switch will be activated at the time I need to do the special homing routine.
So I want to look and see if the switch is activated then move back a set distance.

Bill

384
Mach4 General Discussion / input signals
« on: March 21, 2019, 01:58:36 PM »
Well all I am back with another episode of "I just don't get it" or "What the hell did I do wrong this time".
Once again thanks to everyone for all the previous help.
I thought I was getting to be a Mach4 Lua Guru........screeching halt here we are. LOL

I need to check if the motor 0 home switch is active and move off of it.
Through much searching I am unable to find anything that makes sense to me and I can get working.

Here is the code I tried.

local inst = mc.mcGetInstance()
   
   local hsig = mc.mcSignalGetHandle(inst, ISIG_MOTOR0_HOME)
   local MatHmLimit = mc.mcSignalGetState(hsig)
   if MatHmLimit == 1 then
      mc.mcCntlGcodeExecute(inst, "G91 G0 X-5")
      mc.mcCntlGcodeExecute(inst, "G90")
   end

Any and all suggestions other than jumping off a cliff are greatly appreciated.

Bill

385
Mach4 General Discussion / Re: plc from macro
« on: March 15, 2019, 09:31:25 AM »
Great
I will work on it

386
Mach4 General Discussion / Re: plc from macro
« on: March 15, 2019, 09:20:57 AM »
Sorry I should have been more informative.
I am talking about the PLC Script in Mach4

387
Mach4 General Discussion / plc from macro
« on: March 15, 2019, 07:50:07 AM »
Is it possible to run something in the plc from a macro?
I guess what I am asking is if I have the plc look for a setting to do something else at that time.
Somewhat like Daz used in his video about homing workaround.

Bill

388
Mach4 General Discussion / skipping lines
« on: March 15, 2019, 07:45:05 AM »
Attached is a macro I made.
If I step through in the editor it works fine.
The first time I run it it works fine.
If I run it again it skips the second G28.1.
If I restart Mach it runs fine the first time again and so on.
It has a lot of commented out things that I have been trying so please ignore them.

Bill

389
Mach4 General Discussion / Thanks
« on: March 14, 2019, 09:49:48 AM »
Just wanted to put a general thank you to everyone who has helped me recently.
I know I missed some specific thanks.
I am also sure I will be posting more questions in the near future while I try to get my head wrapped around the Lua.

Thanks again,
Bill

390
Mach4 General Discussion / protected dro's
« on: March 13, 2019, 03:46:55 PM »
How can I change the properties of the following dro's so I can write to them from a macro?
X Machine Position
X Fixture Offset
X Offset

Thanks,

Bill