07-05-2011 12:28 PM
Hello,
I am posting because our group has been having difficulty with a program we are trying to run to control a monochromator and collect data.
We recently had to replace a computer that we used for collecting and storing data. The hard drive from the old machine was installed as a secondary drive on the new machine to maintain easy access to the collected data and the LabVIEW programs that already existed. We were running LabVIEW 6 on that old machine.
While we were making the change, we installed labview 2009 SP1 and tried to modify the old collection programs to run in the newer version. The program kept running out of memory or overshooting the end of the wavelength range by a considerable amount.
Eventually we tried going back to labview 6 but it would not work with the newer driver installed with the 2009 version. I uninstalled 2009 SP1 and reinstalled version 6. I downloaded a driver compatible with version 6 as well. Now we keep getting error messages such as "polymorphic subvi is broken" and subvi is not executable"
Does anyone have any suggestions regarding how to solve or get around this problem?
Could the change in designation of the hard drive from C in the old machine to E in the new machine be causing a problem with the libraries or VIs stored on that drive?
Is there a way to run both versions 6 and 2009 SP1 on the same machine without encountering problems? (both are on different licenses)
In case it might help I have attached two VIs. The first is the old copy of the program before we began modifying it to work with the new machine and new version of labview. The second is the last modified version we attempted.
Thank you for any advice you can offer
07-05-2011 12:44 PM
Which polymorphic subVI is broken?
I'm guessing you may have problems with the easyio.llb and may need to reinstall it or force recompile it.
07-05-2011 01:19 PM
Thank you for your reply.
The three that give the "polymorphic subvi is broken" error are :
AI Buffer Read
AI Read
AI Waveform Scan
I should have mentioned this in my first post but I am getting another error message that I forgot to include: MSVCR90.dll could not be found.
Thank you again.
07-05-2011 01:25 PM
The only driver stuff that I see is related to Traditional DAQ. You are calling DAQ functions from that library. Part of the issue may be with the versions you are installing. LabVIEW 2009 requires Traditional DAQ 7.4.4 (http://digital.ni.com/public.nsf/allkb/F4E76EC05118F72D8625773000672298). However, that version does not support LabVIEW 6. For LabVIEW 6 the most recent version of Traditional DAQ that you can install is 7.1. Check to see which versions of Traditional DAQ you are installing.
Now, as far as the code is concerned...
Let me guess, the VI was written so that you used the "Run Continuously" button in the toolbar. Am I right? If I am, STOP. Do not do that. The Run Continuously button is not meant to normally run the VI. It is meant for specific troubleshooting steps. If your VI must run and keep going until someone presses stop, then you need to have a loop in the code. Your code would also be well served from using a basic design principle, like a state machine (see Application Design Patterns: State Machines). Your code is also replete with local variables, and without even doing an in-depth analysis, I'd hazard to say that almost all of them can be eliminated.
You said the program "kept running out of memory or overshooting the end of the wavelength range by a considerable amount". These sound like different issues. Are these happening on the old code as well, or only on the 2009 version of the code? Both VIs that you uploaded are LabVIEW 6. Did you upload the correct versions?
07-05-2011 01:27 PM
Based on what I saw in this thread
You probably need to reinstall the NI Traditional DAQ drivers.
The other option would be to refactor your code and write it using DAQmx functions.
Based on what I saw in your VI, I would recommend refactoring and moving to DAQmx if you intend to keep this program around long term.