Thanks for the information.
You have the right build of QuickOPC.NET - it is the latest publicly available as of today.
And, the exception you are getting is actually coming from the OPC server, QuickOPC just passes it through. The exception is standard OPC error that means that the ItemID you are requesting is not known to the server. Your code passes this in third parameter of SubscribeItem, namely, "InMsgReady". This is the incorrect value. You just need to figure out what the right value is. This depends on the OPC server, and given that your code ues the BrowseLeaves method to see what's under the "FIM" branch, it is likely that the Matrikon server will construct the full ItemID as something like "FIM.InMsgReady". You can use some OPC client - such as the demo application that comes with the product - to visually browse the server's address space, and see what the full item ID is. You can also enhance your code to actually make use of the collection returned by BrowseLeaves: For each leaf (item), its full ItemID is in there. I can also install the Matrikon server and find it out for you, let me know if this is necessary, but I think that with this information above, you might be able to proceed yourself.
Some more information - please read, it's quite important:
- Unless the item has already been unsubscribed, your code can always access the ItemDescriptor property of the EasyDAItemChangedEventArgs. You are not getting the exception because of accessing ItemDescriptor. Your exception is generated in call to ReadItemValue
- When ItemChanged handler is called, QuickOPC already has the data value for you. It is in EasyDAItemChangedEventArgs.Vtq.value. You do not have (and you rather should not) call ReadItem or ReadItemValue to obtain the data value "again".
- Yes, the rate in SubscribeItem is in milliseconds. The "proper" rate depends on what are needs of your application - mainly, what's the allowed "reaction time" or "delay" you can allow before your code gets the notification.