% Created by Tom Spinka on Sept. 28, 2007 for converting a decimal position
% count to the stacked-ascii format read by the Lambda Physik FL3001/3002.
function StrOut = DyeLaserDecToAscii(DecIn, NumDigits)
StrMiddle = dec2hex(DecIn,NumDigits);
StrLen = length(StrMiddle);
for n = 1:StrLen
StrOut(StrLen + 1 - n) = char(hex2dec(StrMiddle(n)) + 'A');
end