Based on my understanding, you are looking to transfer data from an oscilloscope to a spectrum analyzer model in MATLAB. There are two possible approaches to achieve this:
Approach 1 : By creating an “oscilloscope” object:
You can create an “oscilloscope” object which will receive data from the oscilloscope and save it in the base workspace. As a next step, you can export the data from the base workspace to your Simulink model and run the spectrum analyzer model. The procedure is shown below:
Description :
MATLAB provides “Quick-control oscilloscope” to interface with any oscilloscope that uses an underlying IVI-C driver. However, you do not have to directly deal with the underlying driver. You can also use it for Tektronix® oscilloscopes. This oscilloscope object is an easy-to-use interface. Refer to the below documentation to know about the system requirements to use “Quick-control oscilloscopes”: https://www.mathworks.com/help/instrument/quick-control-oscilloscope-requirements.html Example code:
availableResources = resources(myScope)
myScope.Resource = 'TCPIP0::a-m6104a-004598::inst0::INSTR';
myScope.AcquisitionTime = 0.01;
myScope.WaveformLength = 2000;
myScope.TriggerMode = 'normal';
myScope.TriggerLevel = 0.1;
enableChannel(myScope,'Channel1');
configureChannel(myScope,'Channel1','VerticalCoupling','AC');
configureChannel(myScope,'Channel1','VerticalRange',5.0);
waveformArray = readWaveform(myScope);
t=linspace(0,myScope.AcquisitionTime,myScope.WaveformLength)
Open Simulink model:
After executing the above code successfully, open you Simulink model and replace the block “Three tone sine Wave” with “input” block as shown below.
Now go to Model Configuration Parameters (Ctrl + E) > Data Import/Export and check "Input", setting it as shown below:
Run the simulation.
Approach 2: Use “Instrumentation Control Toolbox”.
Please refer to the link below to learn how to connect an oscilloscope with Simulink. This resource includes video tutorials that guide you through the process
I hope this helps.