added gains to plc vars