[Solved] - Problem with Functions (Voltages)

Hi good afternoon before everything.

I’m starting a little with The Dude. I have always performed basic tasks, but now I’m trying to deepen the probe functions for more information.

I’m working with version 6.36.2 on the x86 architecture.

In this case I’m trying to get the values ​​of the function:

Name: PSU1_Voltaje
Description: Voltage PSU 1
Code: oid ( “1.3.6.1.4.1.7465.20.2.9.1.3.1.6.1.3.12.1”)

It obtine result: 220000 Volts. The problem is that I want to make that value: 220 Volts, for this I made the following structure:
Name: PSU1_Voltaje
Description: Voltage PSU 1
Code: oid ( “1.3.6.1.4.1.7465.20.2.9.1.3.1.6.1.3.12.1”) / 1000

But the result becomes 0.

I incorporate information “probe”:

_Name: PSU1_Voltaje
Type: Function
Agent: Default
Available: PSU1_Voltaje()
Error: if (PSU1_Voltaje()> 215, “”, “electrical problem”)
Value: PSU1_Voltaje()
Unit: Voltios

Can you help with the case ?. I looked through the forum’s web and for such things as seen just simply set / 1000 and the value fits what I need.

I take this opportunity to ask, is there a guide to follow functions.?

Thank you very much for the time spent.

Something like this worked form me.

=== Function ===
Name: PSU1_Voltaje
Description: Voltage PSU 1
Code: round(oid(“voltage_oid”))/1000

=== Probe ===
Name: PSU1_Voltaje
Type: Function
Agent: Default
Available: PSU1_Voltaje() > 0
Error: if(PSU1_Voltaje() > 215, “”, “electrical problem”)
Value: PSU1_Voltaje()
Unit: V

Good afternoon.
Finally it works with the approach that was taking from the beginning.

The problem was that in version 6.36 X86 did not recognize. But I got off the computer to version 6.34.6 and although I lost a lot of information, but now the dude works much more stable and these functions are also operational.

Thank you very much for your help as well.

I did not want to touch versions of RouterOS, for the loss of information. But after trying his instructions still did not work properly, and then I made that decision.