From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataPlugin for DataFinder Server using LabVIEW SDK - 32-bit, 64-bit, OH MY!

Solved!
Go to solution

I just finished an installation of DataFinder Server and have mostly worked through configuring it to index a mix of TDMS and MDF files.

 

I found that the MDF metadata properties meant to be certain datatypes, always get read as, and appear in DIAdem as strings... so I downloaded the LabVIEW DataPlugin SDK and wrote a wrapper for the standard MDF DataPlugin to convert the string metadata to more colorful datatypes, to allow meaningful searches on those properties.

 

Writing the code was easy, working the installer took some time... but eventually I got it to do the job required.  Then I discovered that my testing out on 32-bit DIAdem and MyDataFinder.... doesn't mean I can deploy the Plugin to DataFinder Server, because it is 64-bit.

 

So, I installed 64-bit LabVIEW and DIAdem... built the 64-bit plugin and installer and got it to work right on DataFinder Server.

 

Now I am confused about how to complete this. If DIAdem users install 64-bit and the 64-bit DataPlugin I made, this all works fine when connected to the DataFinder Server.  If those users want to use that plugin within MyDataFinder, that won't work because MyDataFinder is 32-bit.

 

The LabVIEW DataPlugin SDK has instructions for building 32-bit plugins, and a section on building 64-bit plugins... how about a way to write a plugin that is both?  Can you just give the plugins the same name, and have 64-bit and 32-bit point to two different DLLs? (I tried that and it doesn't seem to work, something always hangs up.)  Is there a 64-bit version on MyDataFinder?  (Then just the 64-bit version would be good enough.)

 

I am open to suggestions... but would like to stick with the LabVIEW plugins...

--Brent

 

0 Kudos
Message 1 of 7
(3,281 Views)

Hi Brent, Great work so far getting this up and running in both 32 and 64 bit.

 

Do you have users that will be using both local datafinder and datafinder server?Why not have everyone on Datafinder server?

 

Additionally, can you clarify on what error messages you are seeing when trying to get this working with MyDataFinder?


Additionally, You might repost this to the DIAdem forum page to get more visibility with a group of users more likely to use DataFinder 

https://forums.ni.com/t5/DIAdem/bd-p/60

0 Kudos
Message 2 of 7
(3,232 Views)

Hello Kodester --

 

Right now the user base is small: myself and a couple other teammates... we are mainly interested in using DIAdem with the DF server, which we have achieved with the 64-bit DataPlugin and 64-bit DIAdem.

 

However, I would also like folks to be able to use the MyDataFinder to index local files.  This would be a good selling point as we try to spread adoption of DIAdem at our location.  Further, our IT department prefers to install the 32-bit DIAdem app for some reason, so installations of the 64-bit app are done manually (a barrier to adoption).

 

There really is no specific error message the issues are:  If you install the 64-bit MDF DataPlugin in 64-bit DIAdem, the MyDataFinder will crash and not start (after several re-start attempts) unless you reset myDF and deselect the 64-bit plugin.  Must be because the 32-bit myDF is trying to load the 64-bit dll.

 

I guess the only way to reconcile for now is to make folks that want to use the DF server install the 64-bit DIAdem and DataPlugin, and folks that want to use MyDF, use the 32-bit versions.

 

Seems like something that could be resolved with: (1) a 64-bit version of myDataFinder... and while they are at it, a 64-bit version of the DataFinder Toolkit; or (2) a way to make a single DataPlugin better choose the 64-bit or 32-bit version of the DLL based on the thread it is launched from.

 

I will definitely try cross posting to the DIAdem group.  Thanks!

 

--Brent

 

 

0 Kudos
Message 3 of 7
(3,230 Views)
Solution
Accepted by topic author brent2004

Hi Brent,

 

DataPlugins support different programming languages, VBS, C++ and GCode.

While VBS doesn't care about bitness, C++ and GCode do. So for C++ and GCode DataPlugins it is possible to register a DataPlugin that points to different DLLs depending on the bitness.

 

Going through the steps described in "Converting a 32-Bit LabVIEW DataPlugin to a 64-Bit LabVIEW DataPlugin" of the LV_DataPlugin_SDK.pdf, should do the job. Instead of adjusting the 32bit DataPlugin project you can copy it. Please make sure to check if all locations are adjusted correctly, e.g. 64bit DLL doesn't overwrite 32bit DLL and vice versa. A very important step is to have the correct "Register LabVIEW DataPlugin.exe", there is one for 32bit and one for 64bit, included in the sample projects. The name of the DataPlugins must be the same for both bitnesses.

 

After you have installed your DataPlugin for both bitnesses, please check if the following DLLs exist and if their bitness is correct:

C:\ProgramData\National Instruments\Shared\USI\Plugins\DataPlugins\<DataPluginName>\<DataPluginName>.dll  is 32bit

C:\ProgramData\National Instruments\Shared\USI\Plugins\DataPlugins\<DataPluginName>_x64\<DataPluginName>.dll  is 64bit

To see the bitness of the DLL you can use e.g. Dependency Walker.

 

For LabVIEW, you will end up in having two installers, I don't think there is a way to workaround this.

Having it installed this way, the correct DLL is loaded depending on the bitness of your application.

Message 4 of 7
(3,218 Views)

usac--

 

Thanks for the suggestions.  I'm going to give it a try and report back.  I guess the key is to keep everything the same except to use LV64 and the correct "Register LabVIEW DataPlugin.exe".

 

In my previous attempt I kept the name of the plugin the same, but made two different names for the dll files...

 

--Brent

0 Kudos
Message 5 of 7
(3,211 Views)

This approach worked.  It is worth noting that after running both the 32-bit and 64-bit installers, the myDatafinder running on the PC was unresponsive... after launching DIAdem, it reported errors with myDataFinder.  After a reboot of the PC, everything worked as expected.  Both 64-bit and 32-bit DIAdem installs showed a single USI DataPlugin with the same name and used the appropriate bit-ness dll as expected.

 

Thanks again for the support.

--Brent

Message 6 of 7
(3,201 Views)

Hi Brent,

thanks a lot for your feedback. Glad to hear everything works as expected now.

Regarding the error message, was it something about "NI PSP Service Locator" service? If yes, this has nothing to do with the installation of the DataPlugins. My DataFinder uses this service, and reports an error when it is not started. This can happen e.g. after installing DIAdem without rebooting.

Best regards

Message 7 of 7
(3,183 Views)