11-18-2024 04:27 AM
I would like to replicate 2 functions I use within SIemens TIA Portal regarding scaling
Normalise and Scale
I have an analog input, 0 to10V giving me 0 to 32767 - I would like this to give me a range of -20 to +80
Can anyone please suggest a way, Thank you
11-18-2024 04:41 AM - edited 11-18-2024 04:43 AM
Hi Lee,
@LeeBowers1 wrote:
I would like to replicate 2 functions I use within SIemens TIA Portal regarding scaling
Normalise and Scale
I have an analog input, 0 to10V giving me 0 to 32767 - I would like this to give me a range of -20 to +80
Generic math with function of 1st order:
y := a*x + b
You just need to determine the correct values for a & b to scale your input x (0…32767) to the desired output y (-20…+80)!
Hint:
b = -20
a = (y range) / (x range) = (80 - -20) / (32767 - 0) = 100 / 32767
How do you transfer the PLC raw data into your LabVIEW VI?
Do you even use a PLC or do you use a (NI) DAQ device?
With DAQmx you can even apply scaling (by ranges) to your AI channels, there's no need to determine a&b in this case!
11-18-2024 05:58 AM
Hello GerdW
Thank you for your email.
Your reply makes sense to me and it did seem more like a maths question rather than LabVIEW.
I did in in the interim ask chatGPT and it came back with a similar response as yourself.
Thank you
Lee
11-18-2024 02:55 PM
@LeeBowers1 wrote:
Hello GerdW
I did in in the interim ask chatGPT and it came back with a similar response as yourself.
Thank you
Lee
I knew it! GerdW is AI. That explains a lot. 🤔
11-18-2024 04:11 PM
@NIquist wrote:
@LeeBowers1 wrote:
Hello GerdW
I did in in the interim ask chatGPT and it came back with a similar response as yourself.
Thank you
Lee
I knew it! GerdW is AI. That explains a lot. 🤔
That's quite an insult. "AI" is misnamed; it should be called 'Artificial Stupidity'.
11-19-2024 08:47 AM
I actually agree. Sorry GerdW!
I can accept the "Artificial" part, but "Intelligence" is a way off yet. I will start to worry when I hear about systems that learn, adapt and modify over time and can't be turned off without "dying". Something like that could potentially achieve a self-awareness that might be considered intelligence.
Of course, then it will be too late.
11-19-2024 10:37 AM
@NIquist wrote:
I actually agree. Sorry GerdW!
I can accept the "Artificial" part, but "Intelligence" is a way off yet. I will start to worry when I hear about systems that learn, adapt and modify over time and can't be turned off without "dying". Something like that could potentially achieve a self-awareness that might be considered intelligence.
Of course, then it will be too late.
Looking at various species of living things, we can get assessments of their approximate intelligence, and also their approximate emotional range. The two go hand in hand: High intelligence correlates strongly with a wide emotional range.
If we ever develop a truly intelligent machine, it will likely be emotional (and possibly have psych issues).