Scaling Operations - OPTO 22 PCI-AC51 User Manual

Hide thumbs Also See for PCI-AC51:
Table of Contents

Advertisement

Scaling Operations

Function
Function
Type
long
PamuxUtilScaleI2I
float
PamuxUtilScaleI2F
float
PamuxUtilScaleF2F
long
PamuxUtilScaleF2I
* Note for Visual Basic users: * indicates a "by reference" argument.
CHAPTER 3: SETTING UP AND USING THE SDK
Parameter
Parameter
Type
long
X1
long
X2
long
Y1
long
Y2
long
Xin
long
X1
long
X2
float
These interpolation functions are useful for con-
Y1
verting between engineering units and raw ana-
float
Y2
log counts. Pamux analog input and output
values range between 0 and FFF hex (4,095
long
Xin
decimal). These values typically correspond to
engineering units, such as pH and psi. For
float
X1
example, to convert raw counts (from 0 to FFF
hex) to a percentage, use:
float
X2
float fPercent=PamuxUtilScaleI2F
float
(0,0xFFF,0.0,100.0,RawCount);
Y1
float
Y2
float
Xin
float
X1
float
X2
long
Y1
long
Y2
float
Xin
Description
PCI-AC51 User's Guide
23
23

Advertisement

Table of Contents
loading

Table of Contents