SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Hi,
I tried to use EwsClient SetValues function to set an output point in the AS. When I called "ewsClient.SetValues",
I got an error "READ_ONLY". In what condition will this happen?
Is it possible to set an input point value in the AS? I did try the same function call and got the "READ_ONLY" error too.
Thanks!
Juh
Link copied. Please paste this link to share this article on your social media post.
While it is certainly possible to set any ValueItem in any EWS Server (SBO AS or ES), any ValueItem can equally be deemed "Read Only". If you attempt to set such a ValueItem, the specification mandates you return the "READ_ONLY" error result.
To confirm that this is what you are seeing, you should retrieve the ValueItem using "GetItems" and examine the returned data. See Section 5.6.11 of the EWS specification here.
Link copied. Please paste this link to share this article on your social media post.
Hi Mark,
I call GetItems to get the item that I am going to set and it is a writeable item.
{"GetItemsItems":{"ValueItems":[{"Id":"01/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1","Name":"Digital Output 1","Description":"","Type":"boolean","Value":"0","Unit":"none","Writeable":"1","State":"0","Forceable":"1","EnumId":"~/Servers/Automation Server/io.pt.DigitalIOValue","Metadata":null}],"HistoryItems":[],"AlarmItems":[]},"GetItemsErrorResults":[],"version":"1.2"}
When the "ewsClient.SetValues" is called, I still get the "READ_ONLY" error result.
Any idea?
Thanks!
Juh
Link copied. Please paste this link to share this article on your social media post.
Juh,
Seems like the point should be able to be written to. Could you please provide a WireShark or Fiddler capture which shows both the GetItems and SetValues calls.
Link copied. Please paste this link to share this article on your social media post.
Hi Juh,
You have have encountered a bug in SBO, try to do a GetContainerItems request to "00/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1" and see if something like "11/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1/RequestedValue" is there.
For IO Modules, if you are trying to write to the Output Point, you will need to write to the RequestedValue property. The default property of the IO Module, should not be writable. I am not sure why it is exposed that way.If you want to read the value you should read the 'Value' property.. or is it 'PresentValue'.. In any case, it is not obvious .
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
Below is the data returned from GetContainerItemsItems:
{"GetContainerItemsItems":
[
{"Id":"00/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1","Name":"Digital Output 1","Description":"","Type":"structure",
"Items":{"ContainerItems":[],
"ValueItems":[
{"Id":"11/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1/Value","Name":"Digital Output 1-Value","Description":"Value","Type":"boolean","Unit":"none","Writeable":"0","Forceable":"0","EnumId":"~/Servers/Automation Server/io.pt.DigitalIOValue","Metadata":null},
{"Id":"11/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1/CommStatus","Name":"Digital Output 1-CommStatus","Description":"CommStatus","Type":"boolean","Unit":"none","Writeable":"0","Forceable":"0","EnumId":"~/Servers/Automation Server/io.pt.CommStatus","Metadata":null},
{"Id":"11/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1/Reliability","Name":"Digital Output 1-Reliability","Description":"Reliability","Type":"integer","Unit":"none","Writeable":"0","Forceable":"0","EnumId":"~/Servers/Automation Server/io.pt.Reliability","Metadata":null},
{"Id":"11/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1/RequestedValue","Name":"Digital Output 1-RequestedValue","Description":"RequestedValue","Type":"boolean","Unit":"none","Writeable":"1","Forceable":"1","EnumId":"~/Servers/Automation Server/io.pt.DigitalIOValue","Metadata":null},
{"Id":"11/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1/OverrideState","Name":"Digital Output 1-OverrideState","Description":"OverrideState","Type":"boolean","Unit":"none","Writeable":"0","Forceable":"0","EnumId":"~/Servers/Automation Server/system.pt.Boolean","Metadata":null}
],
"HistoryItems":[],"AlarmItems":[]},"Metadata":null}
],"GetContainerItemsErrorResults":[],"GetContainerItemsStatus":null,"version":"1.2"}
When I set value to "11/Server 1/Servers/Automation Server/IO Bus/IO-04/Digital Output 1/RequestedValue" and it works.
I try to set Input and it seems Input is not writable. No "RequestedValue" can be found from "GetContainerItemsItems". In general, is there any case needed to change the Input value? It seems that Input is also not forceable. Is this correct?
Thanks!
Juh
Link copied. Please paste this link to share this article on your social media post.
Hi Juh,
Inputs points of IO modules are inputs because they receive data from an external stimulus (such as a voltage), they cannot be written to.
That said, I believe in theory they can be forced. If you do GetContainerItems on an Input, is the /Value property not forceable?
But, please do not 'force' an input if you want to change its value, forcing is basically for testing and manual override situations, if you need to programatically change an input on a regular basis, I would suggest reviewing your architecture, and determine if there is a better approach.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
Yes, it is forceable. I just wounder that is there any use cases needed to set the input value.
Thanks!
Juh
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.