Hello Guest it is April 20, 2024, 11:20:57 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 - Bluephish

Pages: 1
1
Thank you all for the replies!

I ended up using the code DazTheGaz posted, I just had to add a parenthesis on the first line and change the instance name. I added it to the end of the RefAllHome() and it works a treat in the simulation. I'll give it a try on my machine soon! Tick another job off the list!

Code: [Select]
if mc.mcSignalGetState (mc.mcSignalGetHandle(inst, mc.OSIG_MACHINE_ENABLED)) == 1 then
    mc.mcSoftLimitSetState(inst, mc.X_AXIS, mc.MC_ON)
    mc.mcSoftLimitSetState(inst, mc.Y_AXIS, mc.MC_ON)
    mc.mcSoftLimitSetState(inst, mc.Z_AXIS, mc.MC_ON)
    wx.wxMessageBox("Machine is Homed and SoftLimits Enabled", "Homing Sequence",4)
else
    wx.wxMessageBox("Homing Aborted", "Homing Sequence",4)
end

Allan, I couldn't get that API Call to work unfortunately :(

Cheers,

Owen.

2
Hello All,

I have been trying to find an elegant way of activating the soft limits after the ref all button has been pressed.

I have read through: http://www.machsupport.com/forum/index.php?PHPSESSID=upo39p5fi37e018ldiefmlbds1&topic=30192.0;wap2

That's a nice solution, but it's getting a bit too custom for my liking. I don't want to re-write the function that already works.

What I would like to do, is leave the SoftLimit button Up Action and Down Action alone. Then just call the "Soft Limit On" action from the end of the RefAllHome() function.

Failing that, is there a way to "click" a toggle button from a script?


Regards,

Owen.

3
General Mach Discussion / Re: M6 ATC macro help
« on: November 09, 2017, 07:57:10 AM »
Hi Craig,

That's exactly what I'm trying to do! Thanks for the code fragment!

Hopefully I'll get the tool changer up and running soon with this info.

Cheers!

Owen.


4
General Mach Discussion / Re: M6 ATC macro help
« on: November 08, 2017, 07:33:18 AM »
Sorry to bump the old post, but have you made any progress?

I'm also looking to set an output and then wait for the corresponding input to change, but with a timeout.

My current plan is to use a G04 for a few seconds to give the drawbar a chance to move and then check the input and either continue the scrip or throw an error.

A timer would be neater though.


Owen.

Pages: 1