12-03-2021 04:20 AM
Hi,
i have written some code to control a test stand. Testing in the development environment everything works as intended.
But after compiling an exe using the application builder (the building process finishes without an error) when starting the compiled exe i get the error 6000 in the text LV root error 7 unknown device type. I get this error on both laptops (the one with the development environment and the one with the rune time)
I have added the UDA_devicelv.class explicitly to the project (not under dependencies and always include during the build process. It has not worked. I still get the same error. Does anybody have any suggestions?
Error Text
Mögliche Ursachen:
Unknown Device Type: (LV root error: Fehler 7 bei Get LV Class Default Value.viMögliche Ursachen:LabVIEW: (Hex 0x7) Datei nicht gefunden. Die Datei befindet sich evtl. an einem anderen Speicherort oder wurde gelöscht. Verifizieren Sie in der Befehlszeile oder im Datei-Explorer, dass der Pfad korrekt ist.=========================GPIB-Schnittstelle existiert nicht.Vollständige Aufrufkette: Get LV Class Default Value.vi UDA_Device.lvclass:CreateUDADevice.vi Observer Mode.lvlib:Open Observer.vi ObserverInitialize.vi Main_GUI.viKlasse wurde versucht, hier zu laden:C:\Program Files (x86)\01_Allgemein\build\V8\DishWasherLogger.exe\1abvi3w\user.lib\DBus2\_Device\_Device.lvclass)
Vollständige Aufrufkette:
UDA_Device.lvclass:CreateUDADevice.vi
Observer Mode.lvlib:Open Observer.vi
ObserverInitialize.vi
Main_GUI.vi
Thank Matthias
12-03-2021 04:47 AM
Sounds like your class implements a factory pattern of some sorts and tries to open the correct child implementation depending on some parameters. In this way you try to reference a class dynamically and unless someone somewhere in your code references a VI or control in that child class explicitly, LabVIEW has no way to know that this child class will be needed in an executable.
Solution is to add this child class (and other potential child classes your factory pattern may need) as Always Included files in your build specification.
12-03-2021 06:43 AM
@rolfk wrote:
...
Solution is to add this child class (and other potential child classes your factory pattern may need) as Always Included files in your build specification.
Hi,
Rolf thanks for your suggestion...
thats what i tried, explicitly adding that class as always included (this time top level). --> No change
12-03-2021 07:20 AM
And what path do you try to load? You can't use a constant path from your development environment. The class is now inside your exe, not at the absolute location of your development sources. Typically in your Factory Pattern VI you want to evaluate the relative path from your Factory Creator to the actual class you try to load and then add that to the absolute path of the Factory Creator VI.
But since we can't see your code and you failed to upload the relevant parts you have to debug that yourself.
12-03-2021 07:49 AM
Well there lays the Problem, I can't post my code because of IP reasons. But after copying the LVClass 3 times into the project it seems to wok. I'll have to do further testing on Monday. Have a nice Weekend 😀
Matthias