Hi everyone
I'm working on a Low Code app where I want to select the one X20 to get it output, and then choose which Titan Edge Decoder insert it as input.
To perform this, I'm writing a small automation script, it gets correctly the information to insert as input in the Titan, and also sets the parameters correctly, but after a small amount of time, the parameters roll back to the previous values.
But I don't get way they rollback, this change is never seems to be tracked on the information events.
Below the code to better understand the issue
#region Set input Titan
/// set alfa channel
var decoders = GetColumns(decoderElement, 2100, new[] { 0, 1, 6}, (string idx, string status, string moduleID) => new { Idx = idx, Status = status, ModuleID = moduleID}).ToList();
var decoder = decoders.First(elm => elm.ModuleID == decoderChannel);
string ssmAddress = "[" + string.Join(",", networkIP.Select(ip => ip.Address.ToString())) + ",,,,]";
//// engine.GenerateInformation(ssmAddress);
decoderElement.SetParameterByPrimaryKey(2117, decoder.Idx, ssmAddress);
/// Alfa IP
decoderElement.SetParameterByPrimaryKey(2105, decoder.Idx, outputAlfaIP.Ip);
/// Alfa Port
decoderElement.SetParameterByPrimaryKey(2106, decoder.Idx, outputAlfaIP.Port);
///// Beta IP
decoderElement.SetParameterByPrimaryKey(2109, decoder.Idx, outputBetaIP.Ip);
decoderElement.SetParameterByPrimaryKey(2110, decoder.Idx, outputBetaIP.Port);
#endregion
I also tried to set directly the write parameters, but it seems to crush after.
1-Edit:
I found some informations, first thing, everything work find untile the script will try to update the field SSM Address, a parameter of the Titan Edge decoder protocol, version 1.0.2.1, with PID 2117, the field has to be formatted in a way like this "[,,,,,,,]" and I try to insert a new value like this [10.169.244.54,10.169.116.54,,,,].
As suggested by Joao I already tried to set the check flag to false, but without any luck.
2-Edit:
The problem seems related to the SSM Address parameter, as if I try to change it by hand, the value will not change with the new value
Hi Marco,
If you add the square brackets around the IP addresses when setting the SSM address in the Titan Edge connector, that will cause a bad formatted data, and the device will not accept the data since it will not be a list of valid IP address. The IP addresses are sent to the device as a list of IP addresses by splitting the string with the comma. When the square brackets are added in the input data, they become part of the IP address which will make it invalid IP. The square brackets that you see in the read parameters of the table are added by the device API when it returns the data (to indicate array of IP addresses). Remove the square brackets and set a comma separated list of IP addresses. So, if you set 10.169.244.54,10.169.116.54,,,, it will work.
Probably, the connector can be enhanced in the future by removing the square brackets from the returned data to avoid such confusions.
Hi Marco,
Are those parameters you are setting device data (i.e. part of polling) or element configurations (i.e. data not linked to a setting on the device)?
One thing that I think could be happening if those are device data is that the polling cycle is overriding your changes, especially if you are not setting the values on write parameters.
When you mention you tried to set directly the write parameters do you mean in your script or manually via the element card?
If you want the values you set to persist you would need to use the write parameters and make sure those perform the logic to send them towards your device.
Could you try the solution for this other question?
https://community.dataminer.services/question/how-to-use-automation-script-to-change-the-value-of-a-custom-name-field/
I tried, but without any luck 🙁
Meanwhile I found something more that I’ll add to the question in the edit
Given that doing a manual set also does not work it could be an issue with the connector. I noticed that version 1.0.2.2 exists so I would try to upgrade to the latest version and see if it is something that was identified and fixed already.
Otherwise, I would say it would be better to get in touch with our Tech Support team (techsupport@skyline.be) so that it can be investigated and fixed.
Hi Joao, thanks for your answer, I tried via script to set the write parameter, but when I tried the script will stuck at the first parameter to set and then crash with the following error
Script ‘SetInputTitanEdgeDecoder’ failed:
The following was returned from the script:
Could not verify that parameter 22895/421/2117/decoder-1/input-0 was correctly set (50 retries). Last value: [10.216.155.83,10.216.187.84,10.216.155.143,10.216.187.143,10.123.197.203,10.123.228.203,10.123.197.201,10.123.228.201]
(Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Set Parameter (‘_22895_421’:2167/decoder-1/input-0) Failed: 0x80004005
at CManagedAutomation.RunWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* pvarReturn, String scriptName)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80131500h):
Exception :
Could not verify that parameter 22895/421/2117/decoder-1/input-0 was correctly set (50 retries). Last value: [10.216.155.83,10.216.187.84,10.216.155.143,10.216.187.143,10.123.197.203,10.123.228.203,10.123.197.201,10.123.228.201]
(Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Set Parameter (‘_22895_421’:2167/decoder-1/input-0) Failed: 0x80004005
at CManagedAutomation.RunWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* pvarReturn, String scriptName)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80131500h):