Hi,
Could you send me a sample threshold function script for the following situation:
The configured activation event will be started if the last polled value more than 0 and less than 1
Thank you in advance and best regards,
Zsolt
Hi
in treshold section, you must select "script" from function, samples=1, activation event and deactivation event as your choice.
Press Script Button and write :
dcival=GetDCIValue($node, FindDCIByName($node, "Status")); (Status=your DCI name)
if (dcival>0 && decimal <1) return true;
return false;
Hi,
Thank you very much for your answer. I have tested your script but I found that the value of dcival in each case were "(null)". Please find the details in the attachment. However the dci value was about 2.8
What could be the problem?
BR,
Zsolt
There is a space in DCI name, please verify that you have space in configuration too.
Hello,
Yes, in the DCI name also exist the space character before "(A)" substring. However I modified the DCI name to "MUXD_CurrentPA" and I checked the script with this name as well. The result was also the "(null)" value.
BR,
Zsolt
Hi,
can you show a screenshot of DCI "MUXD_CurrentPA" configuration?
Best regards,
Victor
Hi,
Please find in the attachement.
BR,
Zsolt
Use FindDCIByDescription.
The field you are searching for is the description, not the name.
Hi,
Thank you very much it is works well.
Regards,
Zsolt
In transformation and threshold scripts, think you can simply use the "$1" to get last collected value.
dcival = $1;
If you wish to process values from another DCI you must of course use the FindDCI* methods, but here it looks like you are interested in the value from this particular DCI itself.
Best regards,
Kjell
Hi,
Yes you're right, this is a useful advice.
thanks a lot,
Zsolt