Professional OPC
Development Tools

logos

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.

Write of mapped Properties

More
14 Jul 2017 10:15 - 14 Jul 2017 10:16 #5355 by support
Replied by support on topic Write of mapped Properties
It is possible that there are errors but you do not see them, because errors in Live Mapping do not always automatically throw exceptions.

Please study this: opclabs.doc-that.com/files/onlinedocs/QuickOpc/2016.2/User%2...n%20the%20Mapper%20Object.html

and rule out the situations described there.

Most importantly:

1. For the same data, map an additional member with Kind = UADataMappingKind.Exception, and check whether it gets null or a non-null Exception after the Write.

2. Hook to the mapper's UpdateFailure event and check whether it isn't raised during the Write.

Regards
Last edit: 14 Jul 2017 10:16 by support.

Please Log in or Create an account to join the conversation.

More
14 Jul 2017 09:48 #5354 by Captain_Dash
No I did not reverse it, but unfortunately i picked the wrong property, which was actually not writeable. I will update this here

Ignored
    [UANamespace("CODESYSSPV3/3S/IecVarAccess"), UAType]
    public class MappedIoAnalog : BindablePropertyBase
    {
        private double actualValue;
 
        [UANode(BrowsePath = ".Actual_Value"),
        UAData(Operations = UADataMappingOperations.All, Kind = UADataMappingKind.Value),
        UAMonitoring(SamplingInterval = 250), UASubscription(PublishingInterval = 500)]
        public double ActualValue
        {
            get { return actualValue; }
            set { SetProperty(ref actualValue, value); }
        }
   }
}

Write successfull
    [UANamespace("CODESYSSPV3/3S/IecVarAccess")]
    [UAType]
    public class MappedMotionAxis : BindablePropertyBase
    {
        private AxisControl controlProperties = new AxisControl();
 
        [UANode(BrowsePath = ".control")]
        public AxisControl ControlProperties => controlProperties;
    }
 
  [UANamespace("CODESYSSPV3/3S/IecVarAccess")]
    [UAType]
    public class AxisControl : BindablePropertyBase
    {             
        private double setPosition;
 
        [UANode(BrowsePath = ".Set_position"),
         UAData(Operations = UADataMappingOperations.All, Kind = UADataMappingKind.Value),
         UAMonitoring(SamplingInterval = 250), UASubscription(PublishingInterval = 500)]
        public double SetPosition
        {
            get { return setPosition; }
            set { SetProperty(ref setPosition, value); }
        }
    }
 
 

Please Log in or Create an account to join the conversation.

More
14 Jul 2017 09:42 #5353 by support
Replied by support on topic Write of mapped Properties
Are you sure that classes aren't reversed in your post - the one that writes and the one that does not?

For writing to work, the Operations should include UADataMappingOperations.Write.

In your first class, you have Operations = UADataMappingOperations.All.
In your second class, you have Operations = UADataMappingOperations.ReadAndSubscribe.

So, I would expect the first class to do the Write but not the second.

Please Log in or Create an account to join the conversation.

More
14 Jul 2017 09:37 #5352 by Captain_Dash
Hello,

I have two classes with properties which i mapped succesfully, which means i can read the correct data from the server. Now I want to change properties and write the values to the server for each class. After Calling simply the client.write() methode one class is able to write on the server, the other ignores the writing without a message.


Following the structure of the two classes, with reduced properties

The one which will be ignored:
    [UANamespace("CODESYSSPV3/3S/IecVarAccess"), UAType]
    public class MappedIoAnalog : BindablePropertyBase
    {
        private double actualValue;
 
        [UANode(BrowsePath = ".Actual_Value"),
        UAData(Operations = UADataMappingOperations.All, Kind = UADataMappingKind.Value),
        UAMonitoring(SamplingInterval = 250), UASubscription(PublishingInterval = 500)]
        public double ActualValue
        {
            get { return actualValue; }
            set { SetProperty(ref actualValue, value); }
        }
   }
}

The one which will write, the class :
    [UANamespace("CODESYSSPV3/3S/IecVarAccess")]
    [UAType]
    public class MappedMotionAxis : BindablePropertyBase
    {
        private AxisControl controlProperties = new AxisControl();
 
        [UANode(BrowsePath = ".control")]
        public AxisControl ControlProperties => controlProperties;
    }
 
  [UANamespace("CODESYSSPV3/3S/IecVarAccess")]
    [UAType]
    public class AxisControl : BindablePropertyBase
    {             
        private double currentPosition;
 
        [UANode(BrowsePath = ".Current_position"),
         UAData(Operations = UADataMappingOperations.ReadAndSubscribe, Kind = UADataMappingKind.Value),
         UAMonitoring(SamplingInterval = 250), UASubscription(PublishingInterval = 500)]
        public double CurrentPosition
        {
            get { return currentPosition; }
            set { SetProperty(ref currentPosition, value); }
        }
    }
 

I am calling the write method like this
     clientMapper.Write();


What the mistake here? Did I miss any Attribute? The write method should write all mappings, or shouldn't it?

best regards

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.049 seconds