Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
Exception on Write Boolean Value
You do not need to create it, the server already has this attribute on each variable node. If you are using UAExpert, it should be able to show its value to you. What is its value?
The reason I am asking about it is that it could be a server bug. It can be reporting itself as an array, while being a scalar in reality. That's why I need to know the value of ValueRank.
Regards
Please Log in or Create an account to join the conversation.
- Scattolaro
-
Topic Author
- Offline
- Platinum Member
-
- Posts: 39
- Thank you received: 1
Ok, but if when I read the same node the OPClabs library return me a Boolean.
How is it possible that when I try to write the same node it's necessary to send an array? How do I do create this ArrayRank that you talk about?
I don't understand.
Regards
Please Log in or Create an account to join the conversation.
It looks like that QuickOPC is trying to convert the value you provided (a Boolean) to an array. This must be for a reason. Most likely, the ArrayRank attribute of the node contains value that indicates that the node is an array. Check that. What is the rank value?
Regards
Please Log in or Create an account to join the conversation.
- Scattolaro
-
Topic Author
- Offline
- Platinum Member
-
- Posts: 39
- Thank you received: 1
Exception: OpcLabs.EasyOpc.UA.OperationModel.UAException: An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from 'mscorlib'. The inner exception, of type 'System.InvalidCastException', contains details about the problem. ---> System.InvalidCastException: Cast da 'System.Boolean' a 'System.Object[]' non valido. in System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider) in System.Boolean.System.IConvertible.ToType(Type type, IFormatProvider provider) in System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) in OpcLabs.BaseLib.Utilities.ConvertUtilities.EnrichedChangeType(Object value, Type conversionType, IFormatProvider provider) in OpcLabs.BaseLib.Utilities.ConvertUtilities.CheckedChangeType(Object value, Type conversionType, IFormatProvider provider) in OpcLabs.BaseLib.Utilities.ObjectUtilities.ChangeType(Object value, Type type, Object& result) --- Fine della traccia dello stack dell'eccezione interna --- in OpcLabs.EasyOpc.UA.EasyUAClient.CheckSuccess(OperationResult operationResult) in OpcLabs.EasyOpc.UA.IEasyUAClientExtension.WriteValue(IEasyUAClient client, UAWriteValueArguments writeValueArguments) in OpcLabs.EasyOpc.UA.IEasyUAClientExtension.WriteValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor, Object value, Type valueType) in OpcLabs.EasyOpc.UA.IEasyUAClientExtension.WriteValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor, Object value) in Qualitas.DeviceAppOPC.DataAccess.OPCserverCH.Write(String nName, Object value)(An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from 'mscorlib'. The inner exception, of type 'System.InvalidCastException', contains details about the problem.) Trace: in OpcLabs.EasyOpc.UA.EasyUAClient.CheckSuccess(OperationResult operationResult) in OpcLabs.EasyOpc.UA.IEasyUAClientExtension.WriteValue(IEasyUAClient client, UAWriteValueArguments writeValueArguments) in OpcLabs.EasyOpc.UA.IEasyUAClientExtension.WriteValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor, Object value, Type valueType) in OpcLabs.EasyOpc.UA.IEasyUAClientExtension.WriteValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor, Object value) in Qualitas.DeviceAppOPC.DataAccess.OPCserverCH.Write(String nName, Object value);
My OPC labs library version is (OpcLabs.EasyOpcUA.dll version:5.52.147.1).
So I attach 2 screenshot of UAExpert that work properly(on read and write) but the OPCLabs library don't work on write.
Can you help me please? Where is it the error?
Thanks
Please Log in or Create an account to join the conversation.