matlab code added

This commit is contained in:
moonanjum26
2018-08-10 12:08:23 +05:30
parent 126057ce23
commit 1e927e2c54
8 changed files with 721 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
function gotoZ(s,check,currzpos)
ZPulseRate = 38400;
if(check<200000 && check>-200000)
str = sprintf('%06d',abs(round(check))); % abs needed so that no +&- in neg numbers
if((check) < 0)
newstr = strcat('-',str);
else
newstr = strcat('+',str);
end
disp(strcat('moving to position:',newstr))
% end formatting ---------- --------------------------------------------
fprintf(s,'M'); fprintf(s, newstr ); pause(0.035);
end
end