Page 2 of 2

Re: Lathe ATC Gray code inputs?

Posted: Sat Aug 13, 2022 11:50 am
by Muzzer
A further update:

Everything seems to work as it should. I've wired the solenoid up to the relay and it drives that when it wants to rotate the turret. It also reports the correct tool number on the VCP when I rotate the turret switch. PLC Detective reports all the right variables etc. The timeout (default 10 seconds) loses patience when nothing happens but that is surely only because the hydraulic pump isn't running.

I'll run the hydraulics tomorrow when things are a bit more humane out there but I'm pretty sure the only issue was the incorrect plc file - I compiled this last night before doing the update from 4.64 to 4.80 and there seems to be quite a bit of changed content. It's allegedly 31C / 88F here in the shade but my workshop has lots of windows and skylights, so it's pretty nasty by our standards here in the UK.

There's only one stage in the PLC code I don't understand called MonitorIndexATCRequestStage. It talks about bins and indexes which makes me suspect it's actually to do with a carousel or rack ATC rather than a turret. Can anyone confirm if that's the case? The rest of the turret stuff makes sense, now that I've digested it.

;==============================================================================
MonitorIndexATCRequestStage
;==============================================================================
IF SkinATCIndexMinus_M THEN (ATCIndexMinusPD)
IF (ATCIndexMinusPD && !DoingIndex_M) && (!SV_PROGRAM_RUNNING ||(SV_MDI_MODE &&
SV_PROGRAM_RUNNING && !DoingM6_M))
THEN SET DoingIndexMinus_M, SET DoingIndex_M, SET RequestedBinPositionStage

IF SkinATCIndexPlus_M THEN (ATCIndexPlusPD)
IF (ATCIndexPlusPD && !DoingIndex_M) && (!SV_PROGRAM_RUNNING ||(SV_MDI_MODE &&
SV_PROGRAM_RUNNING && !DoingM6_M))
THEN SET DoingIndexPlus_M, SET DoingIndex_M, SET RequestedBinPositionStage

IF (ATCIndexMinusPD || ATCIndexPlusPD) && M6
THEN InfoMsg_W = MANUAL_INDEX_WHILE_ATC_MSG, RST DoingIndex_M

IF M6 && !DoingIndex_M
THEN (M6PD)

IF M6 && (DoingIndexMinus_M || DoingIndexPlus_M)
THEN RST M6, InfoMsg_W = ATC_WHILE_MANUAL_INDEX_MSG

IF M6PD THEN SET DoingM6_M, SET RequestedBinPositionStage

Re: Lathe ATC Gray code inputs?

Posted: Sun Aug 14, 2022 9:13 am
by Muzzer
And there we have it. Once I'd blown the air out of the system and got the pump running at full speed, I got a pretty consistent movement on the turret and I managed to get the position switch correctly aligned with the turret so that it stopped and locked at the correct position - it needs to be within a few degrees, otherwise the turret will not sit back on its locking ramps. I can see that this mechanism could be a little finickity, so I will need to monitor the "turret locked" switch to ensure the turret seated fully before allowing a toolchange to be considered successfully completed. I guess that will be best done by customising the PLC further, to check the switch status. I'll figure that out next...


Re: Lathe ATC Gray code inputs?

Posted: Sun Aug 14, 2022 9:34 am
by suntravel
Good work.

Uwe

Re: Lathe ATC Gray code inputs?

Posted: Mon Sep 19, 2022 12:34 pm
by Muzzer
I'm still not completely happy with this. In the wizard I have my "ToolIsUnclamped" signal from the turret microswitch connected up and working so that Acorn can see if the turret successfully clamped after indexing. However, I'm not certain it's actually doing anything. Changing the input from NC to NO doesn't change the behaviour.

I can't see "ToolIsUnclamped" explained anywhere. Can someone help me to understand what it is meant to do and if it can be used to check if turret indexing has completed correctly? I may be misunderstanding its purpose. My previous attempt to implement this function in my PLC edits didn't work out well and I'm wondering if I'll have to go back in there again.

Many thanks.

Re: Lathe ATC Gray code inputs?

Posted: Mon Sep 19, 2022 5:45 pm
by Allin1Chris
Muzzer,

ToolIsUnclamped will toggle the state of the memory bit "ToolUnclampedState_M" which is used in Macros M15/M16 to determine if the tool was clamped/unclamped. This is an input that is more for Mills or Routers, but you could edit you macro's to look at said memory bit in a similar fashion to the mill/router M15/M16. It is MEM12.