This section will describe a Simulink model used to generate code for capturing and displaying video frames from/to the PC target using the TCP/IP protocol
You should allocate an IP address to the DM6437 DVDP, as described in the board documentation. .
Create a new Simulink model
Open the Simulink library browser and add the "C6437EVM" from the "Target Support Package TC6" group of the " C6000 Target Preferences" Blockset (Please refer to Figure 16).
We now need to create Simulink dedicated block to execute CCS commands.
Drag in an empty subsystem into the model (Simulink->Ports&Subsystem->Subsystem).
Delete its contents
Format it: Give it a name. In our example we use “Bulid / Reload&Run".
Right click on the Subsystem, choose “Block Properties”. Go to the Callbacks tab, and under OpenFcn* enter: “RW_tcpip_script('RW_pcl_tcpip');”, as shown in the following picture:
Add the "Task" block from the "DSP/BIOS library" group of the "Target Support Package TC6" Blockset.
Add the “Function- Call Subsystem” from the “Ports&Subsystems" group of the "Simulink" Blockset (Please refer to Figure 18).
Rename “Function- Call Subsystem” to “R_W Algorithm” and connect it to the “Task” block.
Add the "IP Config" block from "Target Support Package™ TC6->DM6437 EVM Board Support"
Save the model as “RW_dm6437_tcpip.mdl”. Your model should look as follows:
Double-click the “Task” block and make the same changes as shown in Figure 20.
Double-click the “IP Config” block and make the same changes as shown in Figure 21.
Double-click the “R_W Algorithm” block. A new window will be opened.
In the new window, add the "TCP/IP Recive", "TCP/IP Send", "Byte Unpack" and "Byte Pack" from the "C6000 DSP Communication Libary" group of the ""Target Support Package TC6" Blockset as shown in Figure 22.
Connect the blocks as shown in Figure 23.
Double-click the “TCP/IP Receive” block and make the same changes as shown in Figure 24.
.
Double-click the “TCP/IP Send” block and configure it as shown in Figure 25:
Double-click the “Byte Unpack” block and configure it as shown in Figure 26.
Double-click the “Byte pack” block and configure it as shown in Figure 27.
Open a new m-file, copy the following code and save it as "RW_tcpip_script.m" at the same directory as the model.
Create another new Simulink model. Add the "Byte Pack" from the "C6000 DSP Communication Libary" group of the ""Target Support Package TC6" Blockset as shown before and the "TCP/IP Receive", "TCP/IP Send" from the "Instrument Control Toolbox" blockset.
Configure the " TCP/IP Receive " and " TCP/IP Send " blocks :
Add the "To Video Display" from the "DM6437 EVM Board Support" group of the ""Target Support Package TC6" Blockset , also add the "From Multimedia File" from " Signal Processing Sources" group of the "Signal Processing blockset".
Configure the " From Multimedia File " block
Add the “Subsystem” from the “Ports&Subsystems" group of the "Simulink" Blockset as shown before.
Rename “Function- Call Subsystem” to “Display”.Double-click the “Display” block. A new window will be opened. In the new window, add the "Byte Unpack" and " To Video Display " as shown before, add the "Reshape" from the "Math Operations" grope of the "Simulink" blockset. (Configurations are the same as before).
Connect the blocks as follows:
Your model should look as follows:
Save it as “RW_pcl_tcpip.mdl”.
Build load and run the project. Double-click the "Build / Reload&Run" block.
Running the script, you will see the video captured and displayed. A single frame is shown in Figure 32.
if three forces F1.f2 .f3 act at a point on a Cartesian plane in the daigram .....so if the question says write down the x and y components ..... I really don't understand
a fixed gas of a mass is held at standard pressure temperature of 15 degrees Celsius .Calculate the temperature of the gas in Celsius if the pressure is changed to 2×10 to the power 4
Receive real-time job alerts and never miss the right job again
Source:
OpenStax, From matlab and simulink to real-time with ti dsp's. OpenStax CNX. Jun 08, 2009 Download for free at http://cnx.org/content/col10713/1.1
Google Play and the Google Play logo are trademarks of Google Inc.
Notification Switch
Would you like to follow the 'From matlab and simulink to real-time with ti dsp's' conversation and receive update notifications?