LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

64bit application communication with 32bit application on one PC?

Solved!
Go to solution

In an image processing project we started using x64-LabVIEW to suit our extensive need for memory. However to be able to communicate with the production plant the machine will be integrated into we wanted to use a Profibus DP PCI-card from COMSOFT, which has no x64 support yet. Since we try to keep everything within one PC we figured we might be able to get the Profibus-related functionality running within a x86 application talking to the simultaneously running x64 application on the same PC. This way, simply using VI server, we would only have to transfer the data from one application to another and vice versa for process communication.

 

My first test was this:

  1. start a VI within x86 LabVIEW instance
  2. load the VI ref of that VI into a VI within an x64 LabVIEW instance
  3. identify the needed element refs from the x86's FP
  4. read the values from the x86's elements via property node

 

The two described VIs are attached. The result is, that LV x64 receives an empty array of elements from the FP ref of the x86-loaded VI. What I also realized: It is not possible to transfer objects from an x86 BD to the x64 BD. This leads me to the conclusion that what we planned doesn't work. At least not the tested way.

 

Is there any chance at least that it will work across 2 different PCs? Or maybe (locally) shared variables are an answer (I never used them before)? Possibly one of the VIs has to be turned into an executable in order to be able to distinguish the different application instances. Any hints about this are appreciated. Alternatively: If anyone knows of Profibus DP hardware that can be controlled directly via LabVIEW without the hassle of OPC, which does have x64 support, please share your knowledge.

 

Thank you very much.

 

comrade, Berlin, Germany

Download All
0 Kudos
Message 1 of 4
(4,432 Views)
Solution
Accepted by topic author comrade

Dear comrade,

 

If I get your idear right, you want to share data between LabVIEW 32 Bit and 64 Bit Version. Fortunately I have running LabVIEW 2011 SP1 (32-Bit & 64 Bit) on my Windows 7 64 Bit. I think using VI-Reference won't work in this case 😞

 


I've prepared to example projects related to your issues:

 

The first point you mentioned is dynamically load an x86-VI within x64VI: This could be approached through configuration of the VI-Servers of the two LabVIEW Versions, working on different network ports. Therefore you need to determin your VI Server settings (Tools->Options->VI Server), for example your x64 (x86) shares data through the TCP/IP Port e.g.: "3336"

 

If you are calling the VI by reference you also need to open an application reference to the VI Server and then use open VI Reference VI to open the specific VI you want to call:

openAppReference.PNG

 

 

 

 

 

 

 

 

 

 

Concerning the Sharing of Variable values I would suggest to create Network Published Variables (NPV).
Here you could find a short summary on Network Variables from the LabVIEW help: http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/ni_psp/.
Additionally I provide you the link to a white paper which demonstrates the usage of Network Vars: http://www.ni.com/white-paper/4679/en

 

The important thing is, that before you could use the Variables you have to deploy them, therefore you have to right-click on the lvlib in the project and say Deploy All, demonstrated in the picture below.

 

DeployAll.png

 

Hopefully, this is what you were looking for? 🙂

If you have any further questions please do not hesitate to contact me.

 

br

romi_wo

 

Download All
Message 2 of 4
(4,412 Views)

Hi grrominw,

 

thanks for the great effort. The port definition for the application instance seems to do the trick. I first tried to get going on the conventional VI server example you provided (LVx86.vi). It works even without any lvlib-vars in the project. Only thing I couldn't figure out: Apart from deactivating deletion of VI- and FP-Reference and of course the implementation of the application instance, you didn't seem to have done anything different than I did in my LVx86.vi. However - yours is running fine without any deployed vars. Mine is not, even after I tried to copy the "un"deletion of the VI- and FP-reference (I rather postponed it until after the LVx86 is done...) I attached it for reference. Including the changes I made on your LVx86.vi from the Project. Your VI, stripped of the vars you inserted works fine with my LVx64.vi - LVx86 does not. How come?

 

Other than that: Great help! Kudo's on the way!

Download All
0 Kudos
Message 3 of 4
(4,375 Views)

Using Comrade's example pairs (LVx86.vi and LVx64.vi) I was unable to read the x64 indicator values in the x86 application using the property node Get Value called in LVx86.vi (snippet extract below). But the shared variable access mode in LVx86.vi is working nicely. With Get Property no new data is delivered - just zero, but again - no error is reported - any idea why?

 

But in any case thanks to Comrade for a useful example.

PS: using LV2013's

 

read ctls.png

0 Kudos
Message 4 of 4
(4,209 Views)