キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/7
1,839件の閲覧回数

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
メッセージ2/7
1,834件の閲覧回数

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 件の賞賛
メッセージ3/7
1,810件の閲覧回数

@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 件の賞賛
メッセージ4/7
1,759件の閲覧回数

@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 件の賞賛
メッセージ5/7
1,747件の閲覧回数

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 件の賞賛
メッセージ6/7
1,713件の閲覧回数

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

メッセージ7/7
1,704件の閲覧回数