09-29-2006 09:27 AM
09-29-2006 02:23 PM
10-03-2006 03:30 PM
Hi Bill,
Can you post the VI and dll ?
Tunde A., Application Engineer, National Instruments.
10-03-2006 04:48 PM
10-05-2006 05:39 PM
Hi Bill,
I am currently working on this issue and will get back.
Tunde A.
10-10-2006 04:35 PM
I was unable to build the dll as the "Data Socket Quality.ctl and ARINC FMC Publish Measurement.ctl" custom controls were missing. I will suggest testing the dll with version 8.2. It has a new "import dll" wizard that automatically creates a VI that makes call to the dll. To use the dll import wizard, select Tools-> Import-> Shared Library (.dll) from the project explorer. Besides, is the final goal to call this dll from LabVIEW or another programming environment?
I will appreciate if you can post the custom controls.
Tunde.
10-11-2006 03:59 PM
In response to your comments:
1. Yes, I did forget to include the customs controls. If you right click on the control and select "Disconnect from Type Def." it will keep the control and remove the link to the custom control.
2. The final goal ... ? I can not go into the sepific details of what we are doing. We have developed software that other groups within our company and external to our company will need to interface to. Our software will publish data on difference systems within our network. The other groups will need to access that data. Since we have different types of data from different sources being published on different systems, I developed an interface tool that will allow the user to perfrom a simple call and the requested data to be returned without the user knowing where it came from, how it was being published, etc. At this point, we have one company using LabVIEW 8.0. We have another company that is still using LabVIEW 7.1 (argh!) and questioned why they should upgrade to the latest version. I was told that we may have groups writing their code in C++. I know, what a mess. I really do not know who the other groups are and what language(s) they might be using. Temporarily, I have created a LabVIEW 8.0 and LabVIEW 7.1 LLB with the interface to my program so that they can test their software. I would eventually like to have a DLL so that we can make changes when ever we need to and not be concerned with making many different interfaces for these people ( 8.0 LLB, 7.1 LLB, etc.). Perhaps that is not the best approach or possible.
3. I did install 8.2 on one of our computers. I tried the "import dll" feature. I had issues and decided it was not relievant to my problem. I decided to not spend any more time on it. However, I did include a zip file with the files in it in case you are interested.
I did determine that the problem is in the "DataSocket Open" function. It seems to behave differently when run in LabVIEW (7.1, 8.0, and 8.2) when I call the function directly and opposed to when I call it using the DLL. I have included 2 zip files relating to this.
In the 1st zip file, I popup windows if an error is detected and when I start DataSocket. I did this to try and determine where the errors are coming from. I ran the program with DataSocket already running and when it was not already running. I ran it directly and through the DLL. I found that it generated different error messages when it was being called from the DLL. I also added a loop and determined that the error is only generated on the 1st pass when a DataSocket is open using the DLL. After that is seems to work. Outside of the DLL it works fine.
In the 2nd zip file, I do not popup error windows. This makes it easier to see the 1st error message and then it working fine.
I did create a file to publish data to that I could verify that my function was reading the published data.
My educated guess is that some parameter(s) is/are not being initialized properly when running from the DLL as opposed to being run from LabVIEW, that the create DLL function is not formatting the call properly so that the data is being passed correctly, or that some/all of the input data is not being used until the next call. I work as a sub-contractor. For the right price, I would be willing to come on down and help NI debug their DataSocket code.