image thumbnail

Using the xPC Target Driver Authoring Tool to Create a Delay Timer

by

 

02 Dec 2008 (Updated )

Simple use case of the xPC Target Driver Authoring Tool.

xpcDelayTimerTestResults.m
% Run test model.
+tg;
pause(2);

% Plot Time Delay Test Results.
figure(1);
subplot(3,1,1);
stem(tg.TimeLog,tg.TETLog*1e6,'*');
ylabel('TET ( {\mu}s)');
subplot(3,1,2);
stem(tg.TimeLog,tg.OutputLog(:,1),'*');
ylabel('Trigger');
subplot(3,1,3);
plot(tg.TimeLog,tg.OutputLog(:,2),'-');
ylabel('Counter');
xlabel('Time (s)');

Contact us