Back to the main lathe after the diversion of the bar feeder!
Today's task: find out why I cannot unclamp the hydraulic collet chuck under program control. Firstly manually there is a two station foot pedal (clamp / unclamp) and some buttons on the control panel to point this at the main or opposite spindles. All works well and does what it should. The pedals are ultimately digital inputs routed via interlocking relays. The hydraulic valves are driven by more relays driven by digital outputs. There is also feedback confirming clamped and unclamped states.
Now by program there are two simple 'M codes' M10 clamps the spindle, M11 unclamps the spindle (or rather didn't !) Much of the relay logic and digital input and outputs are common to both manual and program operation. My main suspects were the five relays involved in the interlocking chain, and sure enough two had rather high contact resistances. Out they came, dismantled contacts cleaned, bench tested and returned to the machine. No change

The other three relays are plug in jobs so it was simple to swap them around and eliminate them. Issue hinges on one digital output not being driven, BUT this same digital output is used when manually opening the collet and works

It HAS to be a software issue. Quick email to my mole at Traub points me to an obscure 'PLC logical switch' page of set ups on the controller with one clearly labelled 'Enable M11 always'

Turns out the M11 function is disabled if you have a bar feeder attached . . . . argh
Anyway logical toggle switch duly clicked on the screen and off we go both M10 'close collet' and M11 'open collet' now do what you'd expect. Ah well I can think of worse ways of spending a Bank Holiday
Needed the M11 function as I have ordered a 'bar puller', which is a three fingered claw that sits in a station in the tool turret, and grasps the end of the bar. You then open the collet (M11) move the tool station away from the headstock as far as you need to make the next widget, then close the collet (M10) and pull the claw off the bar.
Have a picture of a bar puller: