I have searched in vain for a reference design or ap note regarding using a switching voltage regulator to limit current. Want to limit current to a solenoid after it is actuated to maintain full in position. Nominal 24 volts at .5 amps required, 42 volts available at input.