
Experiment 1.1
Building familiarity with xPC toolbox and executing real-time code in PC104.
For your first task you will create a real-time program that produces a square wave with amplitude 1, a
period of 2 seconds and sampling time 0.1 seconds. The output should be visible on the monitor
connected to the PC 104 board. For the scope, use a 100 point window (load this model file into PC 104
board using Standalone and DOS Loader (RS232 and TCP/IP) modes). Show your TA what you have
done after each step.
The figure below shows the model you need to
create. The steps to build it and where to find each
block is given as follows.
You will find the Pulse generator under : View>
LibraryBrowser> Simulink> Sources> Pulse
generator. Drag and drop it in the model file.
Double click on the block to configure it. See
image below the model file. Select pulse type as
“Sample based”. Set “Sample time” as 0.1,
“Amplitude” as 1, period as 20 samples(which
corresponds to a period of 2 seconds) and pulse
width as 10 samples (as required in the problem).
For xPC Scopes (these enable you to view
graphical/numerical scopes on the monitor connected to
the PC104 boards), go to View> Library Browser> xPc
Target> Misc> Scope (xPC). Configure one scope as
numerical and the other one as a graphical scope as shown
below.
Commentaires sur ces manuels