My 3.5 h.p. air compressor will be wired with 10/2 with ground. Compressor will be outside of shop under cover. I'd like to be able to control power to the outside compressor disconnect with the use of a 240V, 30 amp relay with 24V coils. It will be near the outside disconnect. That way I can cut the power to my compressor with a switch as I leave my shop. Is there a code violation with this set up?