Spectrum parameter 64001 represents a list of the amplitude values of the most recently fetched trace. In case we want to get the associated frequency of each point in the list - through a driver or Automation script - what is the best way to do so?
Is there another spectrum parameter which can directly provide the frequency points, or should we calculate these ourselves based on start freq, stop freq and number of points?
How is this handled by Cube?
Note: for various reason we don't/can't go through a spectrum script, so the question is specifically how to get this data via a driver or Automation script.
Hi Ruben, as far as I'm aware Cube spreads the list of values between the given start and stop frequency. You'll probably need to do the same calculation yourself.
- ID 64005: Start frequency (read)
- ID 64006: Stop frequency (read)
Instead of using the above parameters directly, the latest trace can also be retrieved using the SLNet connection using the following message. The trace points in the response can be parsed using the following code, which provides a list of frequencies with their value.
Another option could be to extend the connector with a new parameter that contains a data structure with frequency-value pairs.
Some things to be aware of:
- Cube does not receive its values directly from the connector. There's an SLSpectrum module in between which manages multiple simultaneous client sessions and monitors.
- Cube receives the values for its session via the 64xxx parameters. These parameter IDs are the same ones which the connector uses to pass trace information towards SLSpectrum
- Depending on how the connector has been written, the connector might not continuously be feeding new trace data into parameter 64001 but might only do so when requested to by the spectrum module. I guess that depends on the driver.