Jump to content

Building an application (.exe) with custom generated class


Recommended Posts

Dear Friends,

 

I've an Project which is using CAN, DeviceNet, EtherNet/IP, ProfiBus communication protocol. All this protocol are called structured using LVOOPS concept. When I try to build an application (.exe), There is no issues in running the application. When I copy the folder and try to run in different PC i'm not able to run the functions in application which is having the class called in it.

 

 

May I know should I use any specific steps to build an application with custom class.

 

Regards,

 

Ganesha Moorthy A 

Link to comment

Yeah I'm guessing Tim is right.  You'll need to either install all the needed driver, software, and run-time engines on the other machine, or create an installer that includes all those things.

 

In the project under build specifications right click and create an installer.  In the install go to the Additional Installers section and choose the software tools you used.  Then when the installer is built these things will be in it.

 

Expect your installer to grow into at least 1GB but it sounds like a big program so it will probably be bigger.  Once these things are installed new installers don't need to include all of this extra stuff, but it must be there the first time or else you won't be able to run.

Link to comment

Hi Tim, 

 

Yeah I tried the installer in a different PC. on different drive locations. But still the same problem?

 

When I try to copy from E to D then build the application at D once again it`s working fine.

 

During build does LabVIEW creates any path dependency to it's build folder? 

Link to comment

It isn't clear what you are trying to say.  On the second PC, what happens when you run the EXE?  Does it run?  Does the EXE have a broken arrow?  What do you see?  Have you only been able to run the EXE on the PC that the software was developed on?

Link to comment

My guess is there are relative paths to objects that are being loaded dynamically. The objs aren't being included in the EXE. it works fine when you're on the dev machine, but they aren't being copied to the new PC.

 

As hooovahh said though, we don't really have enough info to answer for sure.

Link to comment

Hi hoovah,

 

I`m placing the snippet of our project structure and the build source file structure.

 

 

post-29033-0-50865100-1404457772_thumb.p

 

post-29033-0-51238900-1404457775_thumb.p

 

 

Is there any suggestions on the build?



Hi Queue,

 

Since the size of class is too high and when I try to load it to always included, LabVIEW stops abruptly showing Not enough memory. My system configuration is good for the build which has i3 32 bit processor, 4GB RAM, 500GB hardisk, C specifically has 94.3 GB of free space.

 

We have also increased the memory size of LabVIEW to 3GB from it's default 2GB processing.

 

From the above attached, comm, DAQ, Prompt, State, Test, Report are class specific.

 

User Interface is the top level VI of all the classes.

 

Since we are using sub panel to load some of the VI's dynamically I couldn't able to debug the exe at Run time engine.

Link to comment
Since the size of class is too high and when I try to load it to always included, LabVIEW stops abruptly showing Not enough memory. My system configuration is good for the build which has i3 32 bit processor, 4GB RAM, 500GB hardisk, C specifically has 94.3 GB of free space.

 

We have also increased the memory size of LabVIEW to 3GB from it's default 2GB processing.

 

This feels weird. Obviously I've never seen your entire codebase, but I've built some big projects with TONS of classes and I've not run into problems like that. The memory usage could be totally warranted, but this would be an avenue I'd investigate. I don't have a good suggestion of how to figure out what's using all your memory, but I'd start taking classes/modules out 1 by 1 until it built. This is only vaguely related to your original problem though.

 

It does sound like I was correct in saying that you load classes dynamically. So you need to look at your code and see how you're picking the filepaths to load and you need to make sure that the LVClass files exist there on the new machine.

Link to comment

I've seen LabVIEW run "out of memory" when trying to recompile vis with very high code complexity.

In one case I had a large project with a vi of a complexity over 30. Every time I changed something inside, LabVIEW allocated Gigabytes of memory (hooray for the 64 bit version) for the recompile and wouldn't free the memory again.

When this project was loaded in a 32 bit version of LabVIEW it ran out of memory before being able to change anything.

 

Lesson for the future: be careful with combinations of parallel loops inside inline vis inside parallel loops etc

Link to comment
  • 2 weeks later...

Dear All, 

 

I really appreciate all your suggestions and thoughts.

 

Initially I left the option of LabVIEW 8.xx Layout by viewing this http://digital.ni.com/public.nsf/allkb/BAF0ACFA708F1D19862574C8005248E7 , enable it only when you build an LabVIEW developed in earlier version of LabVIEW 8.xx. But I've developed in LV12.

 

When I tried referring different search results I found this http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/build_checklist/ , here they have added up for dynamically calling VI's use the LabVIEW 8.x file Layout.

 

By enabling the function it worked. I can able to copy the application (.exe) to different location and run it successfully. 

 

But why are there two different solutions for an single option?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.