EasyManuals Logo

Brainchild PR10 User Manual

Brainchild PR10
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 #472 background imageLoading...
Page #472 background image
Page 472 of 479
unsigned short RegQuantities = 5;
bool DiData;
// Read register data from remote device
ReadData(Addr, StartRegAdd, RegQuantities, MsgBuf);
// Step 1: Parsing data for DI1
DiData = (bool)MAKEWORD(MsgBuf[4], MsgBuf[3]);
// Step 2: Repeat Step 1 for getting another DI data
}
8.3.7 Read AO Function
bool ReadAOData(void)
{
unsigned char MsgBuf[48];
unsigned char Addr = 1; /* Slave Id */
unsigned short StartRegAdd = 601;
unsigned short RegQuantities = 5;
unsigned short RegData;
float AoData;
// Read register data from remote device
ReadData(Addr, StartRegAdd, RegQuantities, MsgBuf);
// Because the AO expression is specific, so we need using specific // expression to convert the value
//as following:
// Step 1: Parsing data for AO1
RegData = MAKEWORD(MsgBuf[4], MsgBuf[3]);
// Step2: To do converted expression for AO1
AoData = ((RegData * 65.535)/65535)-32.768;
// Step 3: Repeat Step 1 to Step 2 for getting another AO data
}
8.3.8 Read DO Function
bool ReadDOData(void)
{
unsigned char MsgBuf[48];
unsigned char Addr = 1; /* Slave Id */
unsigned short StartRegAdd = 74;
unsigned short RegQuantities = 5;
bool DoData;
// Read register data from remote device
ReadData(Addr, StartRegAdd, RegQuantities, MsgBuf);
// Step 1: Parsing data for DO1

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Brainchild PR10 Specifications

General IconGeneral
BrandBrainchild
ModelPR10
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals