Trying to create an application in c sharp to return the watt hours consumed. The meter is a DMMs 350 and the registry is 40435 which I was told will return the value needed once translated from BCD to decimal.
another note is, connecting via TCP. The examples I have tried from codeproject, just seems to be so much overhead on the code.
I connect without issue><pre>
<code>
private static ushort _timeout = 500;
private static ushort _refresh = 10;
private static bool _connected = false;
private Socket tcpAsyCl;
private byte[] tcpAsyClBuffer = new byte[2048];
private Socket tcpSynCl;
private byte[] tcpSynClBuffer = new byte[2048];
Received an email about changing my registery number.
so, I did and the values I am receive are not right. What would be the correct math
Here is code using to get return values.
Current values are all 1####, and the current Watt Hours is 30354###.
Several of the returned numbers are 12336.
Final result working on getting is total Watt Hours, current consumed.<pre>
<code>
Int16[] Registers = new Int16[10];
WSMBT.Result Result;
Result = wsmbtControl1.ReadHoldingRegisters(1, 435, 10, Registers);
if (Result == WSMBT.Result.SUCCESS)
{
string DataString = "";
string str = "";
decimal d = 0;
for (int i = 0; i < 10; i++)
{