| Computers Forum Index » Computer Languages (Labview) » Return a value generated by an OCX event |
|
Page 1 of 1 |
|
| Author |
Message |
| Kenneth Naylor |
Posted: Mon Apr 14, 2008 4:10 pm |
|
|
|
Guest
|
What I am trying to do is quite simple but I cannot get to grips with the process. I have a .OCX for a smart card reader that has a number of properties and methods. In addition it can generate events and return values associated with the event. If I use Register Callback Event for the OCX control I can see all the events that are listed in the manual. I then create the Callback vi which has, among other things, the clusted containing the two integers that I want to use. What I am struggling to do is get these values into the calling vi.
Can anybody help? I'm sure it is obvious but I cannot see it!
Thanks
Ken Naylor
I am using LabVIEW 8.5.1
|
|
|
| Back to top |
|
|
|
| Ian Colman |
Posted: Tue Apr 29, 2008 3:10 pm |
|
|
|
Guest
|
Hi Ken, I may be on the wrong lines here so just let me know if I am, but, if you are trying to pass data such as a cluster from a sub-VI back to the calling-VI then you must go through the following steps:- On the Front Pannel of the Sub-VI right click on the VI-Icon in the top right of the screen and select "Show Connecter Pane"
- Left-click on a terminal on the pane that you have just displayed to select it
- Left-click on an indicator that displays the cluster information (or whatever indicator you wish to pass back to the calling VI) to associate that data with that terminal of your sub VI)
- Save and Close your Sub-VI
- In the block diagram of your calling VI, right click on the sub-VI that has just been modified and select "Reload Sub-VI" (or simillar text option) to reload the VI that has been modified.
- You should then be able to pull the data out of the SubVI terminal that you have just created in steps 1 to 4
Please let me know if this is not what you mean or if you run into any difficulty.Best Regards,Ian ColmanApplications EngineerNational Instruments UK & Ireland |
|
|
| Back to top |
|
|
|
|