Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to poll register in ABB TotalFlow protocol

Status
Not open for further replies.

telvent

Computer
Joined
Dec 12, 2010
Messages
1
Location
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.

Part and Inventory Search

Sponsor

Back
Top