function [cmd] = addcarriage(cmd)


cmd(end) = [];
cmd = sprintf('%s\r\n',cmd);