Hello Guest it is May 11, 2024, 01:22:20 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

381
Mach4 General Discussion / Re: input signals
« on: March 22, 2019, 08:37:33 AM »
Craig,

The parts at the start and end are in the actual code.
It all works other than the part I mentioned.
Here is the whole thing.

382
Mach4 General Discussion / Re: input signals
« on: March 21, 2019, 04:16:55 PM »
jbuehn,

That is one of those things I do not know how to check or see.

The error code stuff is still so far above my head that I might see the fact that there is error code.

bill

383
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

384
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

385
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

386
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

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

388
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

389
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

390
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