AN2263 Freescale Semiconductor / Motorola, AN2263 Datasheet - Page 18

no-image

AN2263

Manufacturer Part Number
AN2263
Description
PC Master Software: Creation of Advanced Control Pages
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2263/D
18
PC Master Software: Creation of Advanced Control Pages
Create an event-procedure in ThisWorkbook that will be activated when the
Excel file is opened:
Private Sub Workbook_Open()
End Sub
This sub-routine assigns the PC master software ActiveX object to the pcm
variable and schedules the sub-routine RecordAndAnalyze to run
5 seconds later.
Create the sub-routine RecordAndAnalyze in Module1. The purpose of this
routine is to get the FIR coefficient values w(n) for the spectral function
calculation and to get the recorder signals x(n), y(n) and d(n) for their statistics.
The data will be saved to the specified positions on the third sheet named
"Data". Then, the Excel cell functions will use this data to automatically
calculate the Spectral Function and the signal statistics.
Create the declarations and assign a sheet variable with the third sheet named
"Data" in the sub-routine RecordAndAnalyze.
Sub RecordAndAnalyze()
To get the w(n) FIR coefficients the PC master software ActiveX control
function ReadMemory will be used because the w(n) coefficients are stored in
an array in the board application memory. It is necessary to know the length of
this array which corresponds to the processor order N.
Freescale Semiconductor, Inc.
Set pcm = CreateObject("MCB.PCM")
ScheduleTime = Now + TimeValue("00:00:05")
Application.OnTime ScheduleTime, "RecordAndAnalyze"
Dim succ As Boolean
Dim sht As SheetData
Set sht = Worksheets("Data")
succ = pcm.ReadVariable("N", N, tv, msg)
If succ Then
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA

Related parts for AN2263