Page 1 of 1

Hydraulic Chuck Logic

Posted: Sat Nov 21, 2020 1:39 pm
by Obsidian
Working on the plc for a hydraulic chuck. I currently have it set to activate on an input called "Footpedal". I have it set to turn the closechuck output off on the detection of the Footpedal input. Should I remove the chucktimer completely to have the chuckclose output stay on at the end of the code? Thanks!





Code: Select all

;------------------------------------Chuck-------------------------------------
IF TRUE THEN ChuckTimer = SV_MACHINE_PARAMETER_992

;Open Chuck
IF FootPedal THEN RST CloseChuck
IF FootPedal || SkinOpenChuck_M THEN (OpenChuckPD)
IF ((OpenChuckPD && !OpenChuck && !SV_PROGRAM_RUNNING) || (M10L && SV_PROGRAM_RUNNING))
	&& !SpindleEnableOut_M THEN RST CloseChuck, SET OpenChuck, SET ChuckTimer
IF (OpenChuckPD && OpenChuck && !SV_PROGRAM_RUNNING) || (!M10L && SV_PROGRAM_RUNNING)
	THEN RST OpenChuck

IF OpenChuck && (ChuckIsOpen || (ChuckIsOpenIs_M && ChuckTimer))
  THEN SET ChuckOpenCloseComplete_M, RST OpenChuck, RST M10L

;OpenFault
IF OpenChuck && !ChuckOpenCloseComplete_M && (ChuckTimer && !ChuckIsOpenIs_M)
  THEN FaultMsg_W = CHUCK_TIMEOUT, Set OtherFault_M, RST ChuckTimer, RST OpenChuck, RST M10L

;Close Chuck
IF !FootPedal || SkinCloseChuck_M THEN (CloseChuckPD)
IF ((CloseChuckPD && !CloseChuck && !SV_PROGRAM_RUNNING) || (M11L && SV_PROGRAM_RUNNING))
	&& !SpindleEnableOut_M THEN SET CloseChuck, RST OpenChuck, SET ChuckTimer
IF (CloseChuckPD && CloseChuck && !SV_PROGRAM_RUNNING) || (!M11L && SV_PROGRAM_RUNNING)
	THEN SET CloseChuck

IF CloseChuck && !ChuckOpenCloseComplete_M && (ChuckIsClosed || (ChuckIsClosedIs_M && ChuckTimer))
  THEN SET ChuckOpenCloseComplete_M, RST CloseChuck, RST M11L

;CloseFault
IF CloseChuck && (ChuckTimer && !ChuckIsClosedIs_M)
  THEN FaultMsg_W = CHUCK_TIMEOUT, Set OtherFault_M, RST ChuckTimer, RST CloseChuck, RST M11L

;Clear chuck bits
IF ChuckOpenCloseComplete_M && !SV_PROGRAM_RUNNING THEN RST ChuckOpenCloseComplete_M, RST ChuckTimer

IF (!M10L && !M11L && SV_PROGRAM_RUNNING) THEN RST OpenChuck, RST CloseChuck,
                                             RST ChuckOpenCloseComplete_M,
                                             RST ChuckTimer

;-----------------------------------End Chuck----------------------------------

Re: Hydraulic Chuck Logic

Posted: Sat Nov 21, 2020 2:38 pm
by Obsidian
This is the way I got it to work. In the last line of the CloseChuck code I removed the RST CloseChuck. We can close this.

Code: Select all

;Close Chuck
IF !FootPedal || SkinCloseChuck_M THEN (CloseChuckPD)
IF ((CloseChuckPD && !CloseChuck && !SV_PROGRAM_RUNNING) || (M11L && SV_PROGRAM_RUNNING))
	&& !SpindleEnableOut_M THEN SET CloseChuck, RST OpenChuck, SET ChuckTimer
IF (CloseChuckPD && CloseChuck && !SV_PROGRAM_RUNNING) || (!M11L && SV_PROGRAM_RUNNING)
	THEN SET CloseChuck

IF CloseChuck && !ChuckOpenCloseComplete_M && (ChuckIsClosed || (ChuckIsClosedIs_M && ChuckTimer))
  THEN SET ChuckOpenCloseComplete_M, RST M11L

Re: Hydraulic Chuck Logic

Posted: Sun Nov 22, 2020 2:47 pm
by martyscncgarage
This is all part of the current beta. You might download it and check it out.
added foot pedal to Chuck Open and Chuck Close (Intended for hydraulic Chucks.
There is now also a colletopenclose

Both of which are toggled with a foot pedal input or using VCP.

Check it out and provide some feedback. Read the notes in the beta....
viewtopic.php?f=60&t=5011


Marty

Re: Hydraulic Chuck Logic

Posted: Sun Nov 22, 2020 4:54 pm
by cnckeith
see attached. for a description of how the STOCK plc works.. you can of course write your own plc logic to suit your specific application.

Re: Hydraulic Chuck Logic

Posted: Mon Nov 23, 2020 8:55 pm
by Obsidian
Thanks I got it working now. I've heard mixed information about leaving solenoids active for too long and overheating them. I did notice the solenoid pack was getting a bit warm when I had it set to leave activated. I have it set now to shut off from the timer. I was under the impression the chuck needed to remain under hydraulic pressure when cutting.

Re: Hydraulic Chuck Logic

Posted: Mon Nov 23, 2020 9:22 pm
by cncsnw
A common design for a two-position two-coil solenoid valve is to have detents in each position.

Even though the power to the coil may be turned off, the valve shuttle remains in its last position, and pressure continues to be applied in that direction (as long as the hydraulic pump continues to run).

A less-common design is a three-position, two-coil valve with springs that return the shuttle to a center, all-ports-blocked position when power is removed from the coil. A valve like that would cease providing pressure when power is removed. That would be useful for a hydraulic slide with a jogging action (one that you can stop at any intermediate position); but it would be a poor choice for a hydraulic chuck actuator.

Re: Hydraulic Chuck Logic

Posted: Mon Nov 23, 2020 9:28 pm
by cncsnw
Compare diagrams 'B' and 'C' on the second page of this document:
https://cdn.automationdirect.com/static ... idavs5.pdf
Those are pneumatic solenoid valves, but the same principles apply to hydraulic ones.

If your parts haven't flown out of the chuck since you enabled the shut-off timer, then your valve is almost certainly as shown in diagram 'B'.

Re: Hydraulic Chuck Logic

Posted: Tue Nov 24, 2020 4:01 am
by Obsidian
cncsnw wrote: Mon Nov 23, 2020 9:28 pm Compare diagrams 'B' and 'C' on the second page of this document:
https://cdn.automationdirect.com/static ... idavs5.pdf
Those are pneumatic solenoid valves, but the same principles apply to hydraulic ones.

If your parts haven't flown out of the chuck since you enabled the shut-off timer, then your valve is almost certainly as shown in diagram 'B'.
The hydraulic unit is using this coil for the chuck, turret and tailstock.
20201124_005419.jpg

Re: Hydraulic Chuck Logic

Posted: Tue Nov 24, 2020 3:35 pm
by cncsnw
Since the diagrams on those valves have neither spring symbols nor detent symbols, I am not entirely certain what their behavior is supposed to be.

My best guess is that they maintain position when powered off (no spring), and that the center condition showing all ports blocked is just to illustrate what happens during transition from one side to the other.

If someone here knows a little more about fluid power and its symbology, please speak up.