LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using shared variables in a rt target

Hi all,

 

I wrote a diesel engine ECU in LV 7.1 FPGA and ran it for the past year, using TCP VI's to communicate between the Host and cRIO-9004.

 

Next, I translated it to LV 8.0 (with some difficulty recompiling the FPGA) and it worked fine up to that point.

 

Next step was to use the much-touted shared variables to eliminate all the TCP overhead.  I defined 2 shared variables as big clusters with lots of controls and data passing back and forth.  This worked fine while running under the source code.  However, once I compiled the Host and cRIO code (ECUHost.exe and C:\NI-RT\startup\startup.rtexe), the sharing stopped.

 

I tried defining and binding the variables under My Computer and also tried under the cRIO target, with no success.  I was able to get source code to talk to compiled code (I forget which one was which), but not when both were compiled.

 

Thanks for any suggestions,

 

McSynth

 

Message 1 of 3
(3,449 Views)
That is quite strange. Here is some information regarding shared variables and building stand alone applications that may or may not help:


Using Shared Variables in Stand-Alone Applications or Shared Libraries
If you plan to distribute a stand-alone application or shared library (DLL) that uses shared variables, do not include the .lvlib file in an LLB, the executable, or the DLL. Use the Source Files Setting page of the Application Properties dialog box or the Source Files Setting page of the Shared Library Properties dialog box to change the Destination of the .lvlib file to a destination outside the executable, LLB, or DLL.

Best Regards,

Jaideep
Message 2 of 3
(3,423 Views)

Jaideep,

Somehow or other, I got it to work after trying a variety of approaches.  Now I have to figured exactly what it was that made it work and fold it into my regular procedures. 

In terms of embedded startups, I may have misunderstood the roll of "Deploy" after doing a "Build".  I guess I was not using Deploy after building the startup.rtexe for the Real-Time target, so the new startup file was not being transferred to the target.  Just another little annoying difference between 7.1 AND 8.0.

Thanks for your reply.

 

McSynth

0 Kudos
Message 3 of 3
(3,412 Views)