Thanks Steve for these explanations. I love your no frills little examples! Could you show this with the node-red-contrib-buffer-parser. Especially with a longer string, this node would be clearer.
Can I ask a question pls? how can we do calculations with these buffer numbers according to float or integer type calculations? for example 12.5 : 2 = 6.25, how can we do this in a buffer or can we do it in a function which only consists of converting a float number to a buffer and doing the calculations in a normal way? or do we have to do the calculations in a buffer calculation as well? and can you give an example sir? thank you 🙏
You explained very gr8. I am trying to convert buffer [4] to 32 bit float value but it's not done. Buffer Value is [57,19,67,90] represent as 32 bit float value Pls tell me how to do or give code for this same 32bit representation Or for array [2] to 32 bit value floating reprentation. Thanks in advance
@@stevecope Hi Now buffer value is [67,162,67,104] or for Array showing [17315, 17256]. In this case Energy Meter voltage showing 232.3 volt 32bit floating value.
Hi Not sure of the question? To convert the buffer into a value use value=buf.readFloatBE() I've updated the tutorial on the site with examples at the bottom. www.steves-internet-guide.com/understanding-buffers-node-red/
Thanks for always save me!
Greetings from Mexico!
Thanks for the clear explanations and excellent related references. Very helpful.
Thanks Steve for these explanations. I love your no frills little examples!
Could you show this with the node-red-contrib-buffer-parser. Especially with a longer string, this node would be clearer.
I just discovered your channel. Great job!
Thanks for help me Steve!
Can I ask a question pls?
how can we do calculations with these buffer numbers according to float or integer type calculations? for example 12.5 : 2 = 6.25, how can we do this in a buffer or can we do it in a function which only consists of converting a float number to a buffer and doing the calculations in a normal way? or do we have to do the calculations in a buffer calculation as well?
and can you give an example sir? thank you 🙏
To do the calculation you will need to convert the buffer into a float then do your calculation and convert it back again to a buffer.
Rgds
Steve
You explained very gr8.
I am trying to convert buffer [4] to 32 bit float value but it's not done.
Buffer Value is [57,19,67,90] represent as 32 bit float value
Pls tell me how to do or give code for this same 32bit representation
Or
for array [2] to 32 bit value floating reprentation.
Thanks in advance
hi
code should be
b=Buffer.from([57,19,67,90]);
output=b.readFloatBE()
output should be the float number
0.00014044102863408625
Is that correct?
@@stevecope output should be in like a 3 digit value as 230.3 volt of frequency or different
Hi
Is the buffer value you sent me correct? Should that buffer value evaluate to 230.4? Is it BE or LE
rgds
steve
@@stevecope
Hi
Now buffer value is [67,162,67,104] or for Array showing [17315, 17256].
In this case Energy Meter voltage showing 232.3 volt 32bit floating value.
Hi
Not sure of the question? To convert the buffer into a value use
value=buf.readFloatBE()
I've updated the tutorial on the site with examples at the bottom.
www.steves-internet-guide.com/understanding-buffers-node-red/