03-26-2009 10:37 AM
03-26-2009 10:38 AM
The callback VI has a control reference on the front panel, and its datatype is set to something. You can find out what kind it is by looking at the icon, so right-clicking on the control reference and select "Select VI Server Class" and seeing what's checked in the various submenus. The control reference that the callback VI is expecting has to match the type of reference that you wire to the "User Parameter" field. If you want to replace a string refnum in your callback VI with a cluster refnum there are several ways to do this. Here's one way:
03-26-2009 10:46 AM - edited 03-26-2009 10:46 AM
Carlos,
As you can see in the attached image, I wired a reference to a string into the user parameters. You can also see that this changed the callback VI to have "String" instead of "User Parameter."
Inside the callback VI, I used this reference to wire a property node and change the value in the main VI. This is also a good way to test and make sure that your actual event is occuring, just by doing a simple test such as mine.
03-26-2009 11:53 AM
Thanks Chris for your help but I have the activeX working finw now. I have a cluster reference and 3 indicators inside that take me the values of the ActiveX. The only "problem" I have it's that waht I said before. It's like if some times the ActeveX wouldn't work and sometimes yes. I discovered that if I put a retard of 100ms inside the main application, the ActiveX works better but only clicking and waiting a second (more or less) untill next click.
Thanks.
03-26-2009 12:13 PM
03-26-2009 03:24 PM
03-26-2009 05:04 PM
03-27-2009 11:09 AM
Now, don't worry about the delay, it's working fine for now, will see when I connect it to my whole application. The main problem is solved. Now I have another headache 😛 I want to modify a "Node Property" of the ActiveX with an event done in that ActiveX. That would be easy to implement but I'm in trouble when I have the cluster with both coordenates inside the second VI reference and can't unbundle it. It says it's a refnum cluster and there's no way to unbundle it.
Another question I have is that if I want to put somewhere (in a node property and an indicator) a value when a case structure is true and do nothing when it's false, what should I do? Because I can't run the app until I wire the tunnels of the false case, and I don't know where to wire them, so can't be configured to "default value" because that values are variables and I don't want to modify them in a false case, they modify according to the ActiveX.
Here I attach the code of the ActiveX I have and the second VIref to do that double clicking event.
03-27-2009 11:27 AM
CarlosSp wrote:Now, don't worry about the delay, it's working fine for now, will see when I connect it to my whole application. The main problem is solved. Now I have another headache 😛 I want to modify a "Node Property" of the ActiveX with an event done in that ActiveX. That would be easy to implement but I'm in trouble when I have the cluster with both coordenates inside the second VI reference and can't unbundle it. It says it's a refnum cluster and there's no way to unbundle it.
I'm not sure why you're bundling the reference to your ActiveX control for that second event's "User Parameter" input. The reference to your ActiveX compoenent is already available on your callback VI and is automatically created when you create the callback VI. It's the "Control Ref" front panel control. That is the reference to your ActiveX control.
Another question I have is that if I want to put somewhere (in a node property and an indicator) a value when a case structure is true and do nothing when it's false, what should I do? Because I can't run the app until I wire the tunnels of the false case, and I don't know where to wire them, so can't be configured to "default value" because that values are variables and I don't want to modify them in a false case, they modify according to the ActiveX.
I have to admit I don't understand what you're asking here. Can you provide an example and/or screenshot of what you're trying to wire up?
03-27-2009 11:41 AM
I didn't know that about "Control Ref" Then I don't need to wire the ActiveX component, but I have the same problem, can't unbundle the cluster refnum I get inside the VI ref.
Sorry if I did't explained the other problem wright. The fact is that I want to put an "Go to" button and 2 controls to put the X and Y coordinates where the user would want to go, but only when it's clicked the "Go to" button. If not,ActiveX must run normally, where you can move the map and view the points you want to. So, there's a node property that is "ViewCenterX" and "ViewCenterY", where I would want to put the value of the user's specified coordinates in case "Go to" button would be pressed. If not, that node properties, don't have to receive any data because they receive it automatically from the ActiveX.