Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Write arduino map(....) function on proview plc

Write arduino map(....) function on proview plc 12 years 2 months ago #3183

  • jagspaul
  • jagspaul's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 58
  • Karma: 0
Hi,

Can any body tell me how to write Arduino map(value, fromLow, fromHigh, toLow, toHigh) function in plc.

regards
jags
The administrator has disabled public write access.

Re: Write arduino map(....) function on proview plc 12 years 2 months ago #3184

  • jagspaul
  • jagspaul's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 58
  • Karma: 0
Hi,

I have use CArithm and write code as follows

OA1 = (A1 - A2) * (A5 - A4) / (A3 - A2) + A4;

A1 = Input value
A2 = input min
A3 = input max
A4 = output min
A5 = output max

Is there any other better way available??

jags
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.631 seconds