Hi,
Is there a way to open an element card through an automation script? I have to set some parameters in a spectrum element, but I need to make sure the element is opened in Cube. The automation is started by a Visio button and I have also linked this button to the element I need to open, this even works, but the automation window opens in the second plan.
Thanks in advance.
Hi Rene!
Let me explain further.
The automation script set some parameters in the Spectrum element (center frequency, span, level …) and then executes a GetParameter(64001) command to retrieve the wave points to generate an external image.
The problem is, the GetParameter(64001) command doesn’t work well when the element is not open, so I need to make sure the element is open.
Another way to phrase the question would be: Can we send a (built-in) command from Automation that triggers a repoll of the spectrum trace? I believe that might be a more robust way to achieve what you want.
This seems like a weird and highly unreliable way to get a spectrum trace.
It might be interesting to look into using the GetSpectrumRTBufferDataMessage SLNet request instead. This request allows to retrieve a spectrum trace on request (using a predefined preset). No need for open elements cards. This returns an SpectrumBufferDataResponseMessage response with the trace data as well as settings that were used
Thanks, Wouter. This concerns an existing system which does not make use of any measurements points or presets. From an Automation script, spectrum settings are directly written to the element, and after doing so, the goal is to retrieve the resulting trace. Note that the script is designed in such a way that the analyzer element gets locked to avoid conflicts. In other words, the analyzer is not intended to be multi-user capable on this particular system.
Knowing this, is the original approach acceptable – and if so, can we trigger the trace to update without opening the card – or is there still a better way?
First a recap of the question comments up to this comment
The question comes from the need to retrieve a spectrum trace directly from an automation script. No measurement points or presets exist, and the automation script locks the spectrum analyzer element. There is no need for the spectrum analyzer element to be multi-user capable on this system.
I would still advocate for using a GetSpectrumRTBufferDataMessage request SLNet message, which requests one spectrum trace to be measured for a specific element (dmaid/eid) and a provided preset as well as an optional measurement point. The result is a SpectrumBufferDataResponseMessage response with the trace data along with the settings that were used to take the trace.
No background monitors or configured measurement points are required for this to work.
Even the preset doesn't have to exist. An inline preset reference can also be used, e.g. "inline:freqstart:450000;freqstop:500000000"
Hi Wouter,
Do you have any doc or example of how to implement the GetSpectrumRTBufferDataMessage request?
I tried this code below but it doesn’t work:
private double[] GetTrace(Element element, Engine engine)
{
GetSpectrumRTBufferDataMessage getSpec = new GetSpectrumRTBufferDataMessage();
getSpec.ElementID = element.ElementId;
getSpec.DataMinerID = element.DmaId;
SpectrumBufferDataResponseMessage response = engine.SendSLNetSingleResponseMessage(getSpec) as SpectrumBufferDataResponseMessage;
return response.Values;
}
Hi Maximiliano,
Make sure to also fill out the getSpec.PresetID property, e.g. getSpec.PresetID = “inline:freqstart:450000;freqstop:500000”
You can also test this message from the Client Test tool ( https://docs.dataminer.services/user-guide/Reference/DataMiner_Tools/SLNetClientTest_tool/Opening_the_SLNetClientTest_tool.html?q=clienttesttool ) => Build Message > GetSpectrumRTBufferDataMessage
Any logging about failures will be in the SLSpectrum.txt logfile (if the logging level is set high enough)
Hi Wouter,
It worked, thank you!
Hi Maximiliano – could you please elaborate further on the use case? Are you setting the parameters via the automation script and only want to verify that they got set via the element card?