Spectrum analyzer programming in Matlab

Post Reply
pozdrowskim
Posts: 1
Joined: December 7th, 2017, 3:09 am
Country: Italy

Spectrum analyzer programming in Matlab

Post by pozdrowskim » December 7th, 2017, 3:21 am

Hi
i'm new to using Spectrum analyzers and i have to control my spectrum analyzer by Matlab script. I have the algorithm but i don't know how to traduce it in matlab language. What i have to do is to trace and save data in a file. Can anybody help me please. I appreciate it a lot.

This is the script:
Input: ip address, f start, f stop, t start, t stop, file name, nof traces per file
Output: power file, time file, frequency file
1: Establish communication with the spectrum analyzer → ip address
2: Send configuration to the spectrum analyzer → ip address
{Including f start, f stop, Table 1 and others}
3: file counter ← 0
4: trace counter ← 0
5: power matrix ← [ ] {Empty}
6: time matrix ← [ ] {Empty}
7: frequency vector ← Set of 551 frequency points between f start and f stop
8: while current time < t start do
9: Nothing {Wait for t start}
10: end while
11: while current time < t stop do
12: t ← current time
13: Initiate new sweep → ip address
14: while Performing sweep ← ip address do
15: Nothing {Wait for the sweep to be completed}
16: end while
17: Retrieve sweep data ← ip address
18: power values ← Retrieved sweep data
19: power matrix ← [power matrix ; power values]
20: time matrix ← [time matrix ; t ]
21: trace counter ← trace counter + 1
22: if trace counter == nof traces per file then
23: file counter ← file counter + 1
24: Save file power file(file counter ) ← power matrix
25: Save file time file(file counter ) ← time matrix
26: trace counter ← 0
27: power matrix ← [ ] {Empty}
28: time matrix ← [ ] {Empty}
29: end if
30: end while
31: if trace counter > 0 then
32: file counter ← file counter + 1
33: Save file power file(file counter ) ← power matrix
34: Save file time file(file counter ) ← time matrix
35: end if
36: Save file frequency file ← frequency vector
37: Close communication with the spectrum analyzer → ip address

Thanks a lot

Post Reply

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest