You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to use the "write" function in SunSpecModbusClientDeviceTCP.
I am having a tough time to understand what is the format of the 'data' parameter in the function.
From the comment in the function:
Parameters:
First of all make sure that your model DERCtlAC (DER AC controls model, id=704) is available on your target device.
You can check that by printing the models dictionary print(d.models) and looking for two keys: 704 (model ID) and DERCtlAC (model name).
If you didn't find any of those keys, then your device doesn't have this model.
If you found the ID (704) but not the name, then you forgot to include the model definition file: model_704.json. Copy its content and put it here: sunspec2/models/json/model_704.json.
Now to change your value, it's recommended to do it this way (using the class Point):
# Enabling power factor when injecting active power.
d.DERCtlAC[0].PFWInjEna.value = 1 # The value has changed in the object
d.DERCtlAC[0].PFWInjEna.write() # The value has changed in the device
Hi,
I'm trying to use the "write" function in SunSpecModbusClientDeviceTCP.
I am having a tough time to understand what is the format of the 'data' parameter in the function.
From the comment in the function:
Parameters:
This is what I tried to do:
What is wrong in my code?
Thanks!
The text was updated successfully, but these errors were encountered: