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.
problem
A weird trick occurred to me now: If the values indeed come from the OPC Server as Booleans, you may try to ask for them in as integers: That is, set RequestedDataType (I think in ReadParameters) to I2 (corresponds to VT_I2) or so. But you are likely to end up with 0 for False (which is good) but -1 (negative) for True (which is not good, as you need +1).
Regards
Please Log in or Create an account to join the conversation.
An example data converter - our StatusToColorConverter - is here: kb.opclabs.com/Implementing_a_data_converter_component . All converters are same in the principle, they just need to do different computations internally.
But let me state once again, Live Binding is meant to be used mainly for applications where its existing capabilities are a good fit. It is possible to extend it, but it's not easy. You may be trying to stretch a bit too far.
Please Log in or Create an account to join the conversation.
Ad 1: No, it is not possible. But I cannot quite understand why you'd want to RESTRICT it ("only to show localhost or only anyhost with my nodes") during the development process - in the Visual Studio? It's not for end users (users of the application you develop), it's for you, as a developer. What's wrong with seeing a couple of extra nodes?
Please Log in or Create an account to join the conversation.
Actually, it is kind of possible, but with a trick.
First, it were easily doable if you had a Boolean tag in OPC, or a numeric tag that had 0 for "hidden" and anything else for "visible". In these cases, you could add a second binding to the control, and bind to the Visible property.
Things become complicated if you do not directly have this, and want to use a condition like yours. The trick lies in using a Conversion that we can have with each binding. So you need a Conversion that would convert the incoming value to the case described below, so that it can be bound to the Visiable property. a) In some cases, this can be done by using the LinearConversion component we provide. b) In other cases, this can be done with extra manual coding: Defining a new conversion class in the code, instantiating it and assigning to the binding. It is a somewhat ugly solution, though.
Please Log in or Create an account to join the conversation.
As a note, I am a bit confused by your mention of Delphi, and TButton. I am not sure how these apply here, because Live Binding in QuickOPC is for .NET Windows Forms applications only.
Second, it should be made clear that Live Binding is meant to be (with some exceptions) a model in which you do not write code. This brings some limitations. The Live Binding is good for certain scenarios and within its capability boundaries; for more complicated tasks, Live Binding may not be the best choice.
Now to the specifics:
Ad 1) When invoking the OPC browsing dialogs from the code, it is possible to specify the starting node (server). When talking about invoking a subsequent "bind" dialogs in Visual Studio designer, this is not currently possible. As I have stated in the answer in the other topics, subsequent invocations of "Bind to Point" should open it with the same server&node as before.
Ad 2) Live Binding currently requires that everything is fixed - server endpoints, node IDs etc. If you are talking about on-time change in the project during the development time, you can simply use Search and Replace functionality in the Visual Studio, because all the parameters of the bindings are actually represented in code files (.cs or .vb), and can be edited there as well.
Ad 3) Currently this is not possible. It would be possible to combine Live Binding with some extra code that would do this.
Ad 4) I am not quite sure if I understand, but you can use a CheckBox with Appearance set to Button, and then bind to its Checked property.
Regards
Please Log in or Create an account to join the conversation.