Hi,
Firstly, we are making amazing progress with the Gurux library, great piece of work and now we are looking at communication efficiencies, in this case the Association View which itself can take up to 2 minutes to complete (i.e. GetObjectsRequest()).
I understand that this process could be omitted if the object type were known, but we need a generic driver that can cater for multiple variants and as such use the meter as the source of knowledge.
So, rather than perform a complete Association View capture prior to any read/write operation with the meter, I would like to build a view based on the items we looking to extract/modify in the connected meter.
We are writing in C#, asynchronous comms model. Being asynchronous, the message build, send, receive, parse are distributed through the code so I have included the pertinent components and hope you can understand our intent.
I must emphasize that using the full Association View method we successfully read register and profile generic (and their capture objects, scalars, units etc) objects and are able to write registers (i.e. meter time set/sync).
_____________________________________________________________
// Asynchronous comms, get association by OBIS code where object is not known.
// Get the next request.
_currentObisCode = "0.0.1.0.0.255"
_currentGxDlmsObject = _gxClient.Objects.FindByLN(ObjectType.None, _currentObisCode);
// _currentGxDlmsObject is NULL if it can't be found in the Client Objects
if (_currentGxDlmsObject is null)
{
_messageConnectionState = MessageConnectionStateEnum.GetAssociationObject;
}
......
// State machine, generate the message to send to the meter
switch (_messageConnectionState )
case MessageConnectionStateEnum.GetAssociationObject:
// Get the association for the single object
_command = _gxClient.GetObjectsRequest(_currentObisCode);
break;
......
// Physically send the message to the meter
_applicationProbe?.SendData(_command);
......
// Parse the response from the meter
switch (_messageConnectionState )
case MessageConnectionStateEnum.GetAssociationObject:
_gxClient.ParseObjects(response.Data, true); // *** ERROR
break;
*** ERROR
At this point we have a response.ErrorMessage = "Access Error : Device reports an undefined object."
______________________________________________________________
Can you suggest why, getting the individual association view objects is causing us issues when reading the full association view is working as expected.
Hi, I suggest that you will…
Hi,
I suggest that you will read the association view and save it to the file or database. It makes everything faster and it's easier to handle.
Your error means that your meter doesn't know the object that you try to read. Your object type of logical name is wrong. You need to check them.
BR,
Mikko