LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scaling

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

0 Kudos
Message 1 of 7
(178 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(173 Views)

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

0 Kudos
Message 3 of 7
(149 Views)

@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.  🤔

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 7
(98 Views)

@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'.

0 Kudos
Message 5 of 7
(86 Views)

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.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 6 of 7
(52 Views)

@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).

Message 7 of 7
(43 Views)