KreiderMachine wrote: ↑Fri Jul 11, 2025 9:07 am
Spindle will turn on only when manually told to do so from the VFD. The Allin1DC doesn't seem to be able to control it, but I verified the analog 0-10v output using the bench test procedure. There is no spindle fault.
If i had to guess, this might be because of the left over code under the SafetySwitchInterruptStage, Since nothing is setting SafetySwitch_M it always be false. So would likely go into this error.
Code: Select all
;==============================================================================
SafetySwitchInterruptStage
;==============================================================================
;IF DoorClosed_I THEN (SafetySwitch_M)
;IF !SafetySwitch_M && (SpinStart_M || KbSpinStart_M || M3_SV || M4_SV)
; THEN ErrorMsg_W = SAFETY_SWITCH_SPINDLE_MSG, SET ErrorFlag_M
IF !SV_JOB_IN_PROGRESS THEN SET SafetySwitchToolCheck_M
IF !SafetySwitch_M && !SafetySwitchToolCheck_M && SV_JOB_IN_PROGRESS
&& !(M3_SV || M4_SV)
THEN ErrorMsg_W = SAFETY_SWITCH_OPEN_MSG, SET ErrorFlag_M, SET SafetySwitchToolCheck_M
IF SafetySwitch_M THEN RST SafetySwitchToolCheck_M
I would simply comment out the entire stage since you are no longer using or have a DoorClosed_I Input.
KreiderMachine wrote: ↑Fri Jul 11, 2025 9:07 am
Stop/Go switch works to trigger feed hold, but I'll need to add something in order for it to resume upon the second trigger. (what do I need?)
Will need to add the StopGo_I to (DoCycleStart_SV) in some way, maybe something like this as a quick example.
Code: Select all
IF (CycleStartKey_I || KbCycleStart_M || MpgCycleStart_M || SkinCycleStart_M_SV || (StopGo_I && FeedHoldLED_O))
THEN (DoCycleStart_SV)
This will only allow the input to start the program while in feedhold though (Using the LED for FeedHold State), if you need something more robust will have to create additional logic for it.
KreiderMachine wrote: ↑Fri Jul 11, 2025 9:07 am
I modified the plc for my 4 gear range sensors, but am not sure I have everything right there.
I see you are setting SpindleRange_W to 1,2,3,or4 based on your inputs. This should be all you need to do for the Gears to work. Ensure you set Parameter 65, 66, and 67 to the correct ratios in CNC12 software though. Can read about the parameters more in Section 11.4.54 of the
Lathe Operators Manual.
KreiderMachine wrote: ↑Fri Jul 11, 2025 9:07 am
Jog stick works for 'z' but not 'x' (same for the vcp jog keys) and now the handwheels do not work. By inverting jog stick inputs for x, I can free up the VCP to jog 'x' axis. I can verify appropriate voltage at the inputs on the board when the jog lever is triggered for 'x'. I assume I have done something wrong in the plc.
I noticed you switched around SV_SKIN_EVENT_33 and SV_SKIN_EVENT_43 for the Ax2 Plus/Minus jogging. Just for your information, Parameter 1 allows for different orientations and allows to swap direction of the x direction by adding a 2 to parameter 1. That aside, i do not see anything that is jumping out at me for why the x-axis would not be working. Are you familiar with the PLC Detective? Can look at the jogging code via PLC detective and troubleshoot the issue.
Ensure that the MPG LED is on, when trying to use the MPG Handwheels as well.
Information on PLC Detective can be found here.
https://centroidcnc.com/downloads/centr ... kstart.pdf
Hopefully all of that gets you on the right track.