Hello Guest it is April 26, 2024, 02:01:34 PM

Author Topic: Homing  (Read 10466 times)

0 Members and 1 Guest are viewing this topic.

Re: Homing
« Reply #10 on: September 03, 2015, 03:30:12 PM »
Attached is the Homing Log Stack for just the A-Axis.

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Homing
« Reply #11 on: September 03, 2015, 06:43:30 PM »
Perhaps this might help or not, it will start the logging within the plc and dump it out to a file called Output.log in the mach4 directory. The internal logging is a lot faster updating than this but might just take you to just before the crash.

Using the Screen Editor use the codes below.

--screen load script
Code: [Select]
local inst = mc.mcGetInstance()
mc.mcCntlSetLogging(inst, 1)
local done = ''

function WriteLog()
    local var = mc.mcCntlGetLastLogMsg(inst)
    if var == done then
    return
    else
    file =io.open("Output.log", "a")
    file:write(var..'\n')
    file:close()
    done = var
    end
end

and in the PLC Script

Code: [Select]
if testcount > 5 then WriteLog() end
Theres 2 variables being used here 'var' and 'done' just check and make sure these are not in use elswhere...

DazTheGas
« Last Edit: September 03, 2015, 06:47:38 PM by DazTheGas »
New For 2022 - Instagram: dazthegas

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Homing
« Reply #12 on: September 04, 2015, 12:48:42 AM »
I tried daz`s homeimg code with changing the code to reflect A instead of Y it worked as it should under test condition`s I could not try on the machine it was being used
« Last Edit: September 04, 2015, 12:55:28 AM by blockhead »
Re: Homing
« Reply #13 on: September 04, 2015, 09:47:12 AM »
I have also tried His code. that is what i had started with. The issue is not with the coding that is done by me. I understand that the coding works as it should. My day to day job is software development. The issue is when my Motor 3 is mapped to the Y axis and Motor 1 is mapped to the A axis, Homing switches wired and activated accordingly, Mach4 will go into a non-responsive state when the A axis makes contact with its homing switch during the homing sequence.

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Homing
« Reply #14 on: September 04, 2015, 10:40:40 AM »
Your missing the point, we are trying to get the log so we can see what is called before it hangs.....

DazTheGas
New For 2022 - Instagram: dazthegas
Re: Homing
« Reply #15 on: September 04, 2015, 11:19:46 AM »
I posted the log.

Attached is the Homing Log Stack for just the A-Axis.

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Homing
« Reply #16 on: September 04, 2015, 11:50:39 AM »
The posted log is showing the estop etc,

With the log being outputed start up the machine, and click home all axis. Then we can see only what has been run in the api and motion controller befor it hangs.

The thing we need to discover is if there is something else that is causing the hang.

DazTheGas
New For 2022 - Instagram: dazthegas

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Homing
« Reply #17 on: September 04, 2015, 05:30:25 PM »
set all other axis to home in place, then run just the A mapped as Y with no code, then with your code keeping a copy of the log each time, doing that way will show if it can be done with out code and what does or does not go wrong. same with running your code.

then the code can be compared, everything has a order to it where that order goes wrong is what is need that`s why the logging is used to find where it`s going wrong.

on what was in the log you posted it showed something when`t wrong but it had the other axis in it and calling of your code you can see where the estop was hit but it carried on if you run the code what daz posted it will still put a log out even with it crashing
« Last Edit: September 04, 2015, 05:36:21 PM by blockhead »

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Homing
« Reply #18 on: September 04, 2015, 05:52:50 PM »
Why not turn on logging and then go to the Machine Diagnostics page and just reference the A axis? You can reference axis individually on the diagnostics page.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Homing
« Reply #19 on: September 04, 2015, 07:18:15 PM »
thanks Chaoticone did not think of that one.

KingKerf please try that