adding updated code for newport301, fix minor problems with communication port