procedure comset(protTemp: string);var Comm1: TComm;begin Comm1 := TComm.create(nil); try with Comm1 do begin CommName := trim(string(protTemp)); BaudRate := 9600; Parity := Space; ParityCheck := true; Outx_XonXoffFlow := false; Inx_XonXoffFlow := false; end; Comm1.StartComm; sleep(2); Comm1.StopComm; finally Comm1.Free; end;end;