Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

How to poll register in ABB TotalFlow protocol

Status
Not open for further replies.

telvent

Computer
Dec 12, 2010
1
0
0
CA
thread791-183706

We are working on TotalFlow protocol. The difficult thing is, as one of the posters (robertjo24) said, there is very little documentation about the protocol.

Specifically, they tell you to call these two lib functions to poll register data:

// the last 4 arguments are app, array, register, numitems
//
BuildRegisterRequest((unsigned char *)&ComReqRec, 2, 3, 12, 2);
AddRegisterRequest((unsigned char *)&ComReqRec, 2, 3, 12, 2);

But, when you call this lib function, it returns 0 (bytes copied):

short nBytesCopied = GetRegisterValue(parchive, 2, 3,
12, 2,(char *)nArray); // short nArray[20];

Question:
How to call the lib functions for a range of registers:

-- Call BuildRegisterRequest() once for the first register, and then call AddRegisterRequest() for each of the other regosters. Is this correct?

-- In this call: BuildRegisterRequest((unsigned char *)&ComReqRec, 2, 3, 12, 2); The last parameter (=2) is numitems, does that mean a register can hold multiple items? or it means a range of 2 registers, so we are polling registers 12 and 13.
 
Status
Not open for further replies.
Back
Top