Anda di halaman 1dari 15

2016

Execution profiling- MicroDAQ

Salaideva Thirumani
Tenet Technetronics

Tenet Technetronics 1
Application Notes

Contents
Introduction 2
Hardware employed..

Software employed

Steps

Output graph...

10

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 2
Application Notes

Introduction:
In this application note we will measure Execution time for sampling considering No. of

and we can utilize that in a live application data


access to verify if model works as expected or it needs to be modified.
channels and event time

MicroDAQ
MicroDAQ is an ideal platform for developers, scientists and geeks
involved in real-time measurement and control development. The platform
supports design flows from popular model based tools like SCILAB, MATLAB, and
LABVIEW. The user has the choice to either go with a complete open source
software toolchain or with the existing access to proprietary tools in the house.

MicroDAQ Toolbox
MicroDAQ toolbox combines Scilab/XCos environment with Embedded
Solutions MicroDAQ real-time control measurement system equipped with TI
C6000 DSP. Module extends Scilab by allowing user to automatically generate
DSP applications directly from XCos scheme. User can use custom XCos blocks
which gives access to MicroDAQ hardware (ADC, DAC, DIO, PWM, UART,
Quadrature Encoder). Generated DSP application utilizes SYS/BIOS real-time
operating system combined with code generated from XCos scheme.

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 3
Application Notes

Libraries of blocks allow seamless to create Models/Diagrams in either


XCOS/SIMULINK/NI Labview and also create optimized C-Code, Compile and
link with the target compiler and download it for deployment. In addition to this
the platform allows for high frequency real-time data acquisition to capture or
tune parameters from the hardware in real-time.

Hardware employed:

MicroDAQ E1100
Power adopter 5V 2A
USB CABLE
Ethernet cable
Analog sensor (LDR breakout)

Software employed:

SCILAB 5.5
Code composer studio 5.5

MicroDAQ E1100:
The MicroDAQ E1100/E1100 is a DSP real-time control measurement device
designed to solve complex problems.This device combines TI C6000
fixes/floating point DSP core and an ARM9 core. The MicroDAQ E1100 is
equipped with up to 8 channel analog input with a sample rate of upto 166
KSPS.

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 4
Application Notes

Steps:
Execution time taken by single channel
Step1: Open Scilab and create new Xcos file.
Step 2: Open Palette browser (view-> Palette) and click on MicroDAQ

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 5
Application Notes

Step 3: Drag down the mdaq_setup to the Xcos window for setting the time and
change the parameter of profiling as 1

Step 4: Drag down the clock to generates a regular train of events that are
scheduled by parameter Period in seconds.

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 6
Application Notes

Step 5: Since our experiment calculates the execution time for a channel to
read the data , Here we are reading an analog value and thereby we can
calculate the execution time for various periods.

First activate the input by dragging input activation port from the port &
subsystems.

Step 6: Drag ADC block from commonly used blocks.


In ADC block two output will be there top one for Raw ADC value and another
one for voltage indication.

If we want to sample more No. of analog sensors values to sample we can add
channels as 1 2 3 8

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 7
Application Notes

Step 7: Drag signal block from commonly used blocks. Signal block reads signal
data from DSP application generated from Xcos model.

Step 8: Drag CScope from commonly used blocks. The Scope block displays its
input with respect to simulation time.

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 8
Application Notes

Step 9: Then connect all the blocks and select all blocks and right so we have to
make a superblock so we can generate the code

Step 10: Connect with super block with clock

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 9
Application Notes

Hardware setup:
Kindly refer previous application note for configuring MicroDAQ. Here we
assigned AI1 in ADC block connect analog sensor output to that AI1 pin of
MicroDAQ.

Once after connection in Xcos file, go to Tools-> MicroDAQ Build and Load
model.

Then click run button, real time graph will open, and then see the response in
the graph by changing the analog sensor.
Then stop the simulation then click Tools -> MicroDAQ execution profile then
Time(uS) vs No. of samples graph will be generated thereby we can analyze the
time taken for execution will be calculated and we can utilize that in a live
Tenet Technetronics | Varsity
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 10
Application Notes

application data access to verify if model works as expected or it needs to be


modified.
Here we done the experiment with the Tenet LDR sensor and captured the real
time values by changing light intensity.

Output graph :
a. Single channel

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 11
Application Notes

Execution profile output (single channel):

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 12
Application Notes

b. Multiple channel (when eight analog sensors connected

from AI1- AI8)

Execution Profile output (4 channel):

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 13
Application Notes

Execution Profile output (8 channel):

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 14
Application Notes

Comparison of execution time for various channels:


No. of channels
1
4
8

Initial Time(uS)
36.8
~72
~102

Average time(sec)
~17
~52
~81

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Anda mungkin juga menyukai