Re: Lathe ATC Gray code inputs?
Posted: Sat Aug 13, 2022 11:50 am
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
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