image thumbnail

XY Text Writer

by

 

Uses the 33522A waveform generator to write text on scope screen. Turns scope into message board.

Build_XY_Arbs(str_in,str_len,x_place,y_place)
function [y x] = Build_XY_Arbs(str_in,str_len,x_place,y_place)
%Takes in string and builds to arbs X and Y to print string on XY scope
%display. Uses input string, input string length, x axis starting place, y
%axis starting place. Uses Get Character function to build points for each
%character in the input string

i = 1;
i = int16(i);
y = 0;
x = 0;
y_place2 = y_place;
x_place2 = x_place;

if str_len <= 13
    iter = str_len;
else 
    iter = 13;
end

while i <= iter
    if str_in(i)~= ' '
        [y_temp x_temp] = Get_Character(str_in(i));
        y_temp = y_temp + y_place;
        x_temp = x_temp + x_place;
        y = [y y_temp];
        x = [x x_temp];
    end
    x_place = x_place + 1.4;
    i = i + 1;
end

y_place2 = 1.7;
x_place2 = .5;

while i <= str_len
    if str_in(i)~= ' '
        [y_temp x_temp] = Get_Character(str_in(i));
        y_temp = y_temp + y_place2;
        x_temp = x_temp + x_place2;
        y = [y y_temp];
        x = [x x_temp];
    end
    x_place2 = x_place2 + 1.4;
    i = i + 1;
end


end

Contact us