The load profile is not a register, it's a Profile Generic object. If you want to set capture objects to PG, download GXDLMSDirector, and set capture objects with it. Then you add capture objects to PG and write it as normal write. You can check the client example. I believe it will help you.
Hi,
Hi,
Use capture objects to set values that you want to save.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Is there any sample code that I can set objects to a register?
Please help me.
For example,
obj.SetValues(5, new GXObisValueItemCollection { new GXObisValueItem { Value= 62800, UIValue = "1.0.0.0.0.255" } });
Does it work? How can I save this? What should I do?
Thanks in advance.
Hi,
Hi,
The load profile is not a register, it's a Profile Generic object. If you want to set capture objects to PG, download GXDLMSDirector, and set capture objects with it. Then you add capture objects to PG and write it as normal write. You can check the client example. I believe it will help you.
BR,
Mikko
This doesn't save or write
This doesn't save or write anything.
GXDLMSObject obj = GXDLMSClient.CreateObject(ObjectType.ProfileGeneric);
obj.Version = 1;
obj.LogicalName = "1.0.99.2.0.255";
obj.SetValues(5, new GXObisValueItemCollection { new GXObisValueItem { Value= 62800, UIValue = "1.0.0.0.0.255" } });
client.Write(obj, 5);
profileGeneric doesn't have something like save or write method.
var profileGeneric = new GXDLMSProfileGeneric("1.0.99.1.0.255");
profileGeneric.CaptureObjects.Add(new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject> { Key = obj, Value = new GXDLMSCaptureObject { AttributeIndex = 0, DataIndex = 2 } });