So when you operate the swing lever, a pressure switch gets activated in the main control valve. this switch then signals the computer to either switch on or off teh swing parking brake solenoid and the machine swings. Usually the parking brake comes on 2-3seconds after you let go of the lever. commonly on Cat the solenoids get weak over time or the pressure switch doesn't get activated or is stuck on. try and unplug the pressure switch and short the 2 pins on the harness side see if it fixes the problem. if it doesn't, a quick temp fix is to loosen the nut on the back of the swing parking brake solenoid, mark the position or note carefully position of the center threaded bolt and screw it in half a turn at a time and see if that helps fix it. you can screw it in a couple of turns to either give the coil a bit of an assist or open fully to operate teh machine temporarily while you get a new solenoid. Should be costing around a 100 bucks for a good copy