SE Augmented operator advisor variable stuck

Hey everyone,

looking for some help here. I'm setting up Schneider electrics AOA for my company and if run into an issue with my variable being displayed.

So i connected to a VFD and I'm reading the Hz address, i then attach the AOA variable name to it and I'm sending off to my project with live reading values... However everything is coming in as multiples of 10. (so at 5Hz I'm displaying 50Hz and so on) I've tried adding functions, switches, changes, and more but nothing I'm doing seems to work. does anyone know how i can change this? or add a divide by 10 script?

Do you mean you just need to divide the value by 10? If so then you can use a Range node set to convert the input range 0 to 1000 to the output range 0 to 100. Set it to Scale The Message Property mode. It doesn't actually matter what upper values you put in as long as they are in the ratio 10 to 1.
The above assumes the value is a number not a string. Feed it into a debug node and it will show you the type. If it is a string then you need to convert to a number first, so one way is to use a function node containing

msg.payload = Number(msg.payload)
msg.payload = msg.payload/10
return msg

That will convert it to a number and also do the divide.

If still having problems then feed the incoming message into a debug node so we can see exactly what you have.

Good Morning Colin,

You are correct, I am trying to divide the Value by 10. the debug message from the drive said my value was displayed as an array so I knew it was a value and not a string, I was good there. However my previous Functions code did not work and I couldn't figure out why.

Your code for the Function was not only the thing I needed but you also had me thinking about my flow differently. (I am brand new to Node-RED so I am still learning the proper function to the flow) instead of having the payload connected to the drive, I moved the payload to the function connect my flow as followed: Drive> function> debug>aoa value> augmented server. once it deployed everything worked just how we needed it!

Thank you very much for taking the time to help solve this issue!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.