EasyManuals Logo

Brainchild PR20 User Manual

Default Icon
479 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #471 background imageLoading...
Page #471 background image
Page 471 of 479
Math
switch(decimal value)
{
case 1:
ScaleLo = ScaleLo / 10;
ScaleHi = ScaleHi / 10;
break;
case 2:
ScaleLo = ScaleLo / 100;
ScaleHi = ScaleHi / 100;
break;
case 3:
ScaleLo = ScaleLo / 1000;
ScaleHi = ScaleHi / 1000;
break;
case 4:
ScaleLo = ScaleLo / 10000;
ScaleHi = ScaleHi / 10000;
break;
case 5:
ScaleLo = ScaleLo / 100000;
ScaleHi = ScaleHi / 100000;
break;
default:
break;
}
// Step 4: Parsing data for Math1
RegData = (UINT)MAKELONG(MAKEWORD(MsgBuf[j+1],
MsgBuf[j]),
MAKEWORD(MsgBuf[j+3],
MsgBuf[j+2]));
// Step 5: Execute converted function
MathData = ConvertData(ValueRangeLo,
ValueRangeHi,
ScaleLo,
ScaleHi,
RegData);
// Step 6: Repeat Step 1 to Step 5 for getting another data of Math
}
8.3.6 Read DI Function
bool ReadDIData(void)
{
unsigned char MsgBuf[96];
unsigned char Addr = 1; /* Slave Id */
unsigned short StartRegAdd = 50;

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Brainchild PR20 and is the answer not in the manual?

Brainchild PR20 Specifications

General IconGeneral
BrandBrainchild
ModelPR20
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals