廉怡仪 Posted November 11, 2019 Report Share Posted November 11, 2019 I created a subvi(vi_01) with "single error handler.vi"; Interface.vi load this subvi directly, interface02.vi load the subvi by reference, both programs work in debug mode; I built executables for both programs, interface.exe works properly, interface02.exe not works properly(error code =1003); I tried methods mentioned in the link below, but I couldn't fix the problem https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAq8SAG&l=zh-CN The attachment is my program(LabView2018 32bits). debug.zip Quote Link to comment
JKSH Posted November 11, 2019 Report Share Posted November 11, 2019 You are calling Open VI Reference using a path that points to your hard drive (D:\DEBUG\debug\vi_01.vi). That VI is not inside your executable. It is possible to make this work, but your executable will break if you move the VI on your hard drive. It is safer to open a strictly-typed Static VI Reference. This loads a copy of Vi_01.vi is stored inside the executable itself: For more info, see https://forums.ni.com/t5/LabVIEW/Static-VI-Reference/td-p/3334006 http://zone.ni.com/reference/en-XX/help/372614J-01/glang/static_vi_ref/ 1 Quote Link to comment
廉怡仪 Posted November 12, 2019 Author Report Share Posted November 12, 2019 19 hours ago, JKSH said: You are calling Open VI Reference using a path that points to your hard drive (D:\DEBUG\debug\vi_01.vi). That VI is not inside your executable. It is possible to make this work, but your executable will break if you move the VI on your hard drive. It is safer to open a strictly-typed Static VI Reference. This loads a copy of Vi_01.vi is stored inside the executable itself: For more info, see https://forums.ni.com/t5/LabVIEW/Static-VI-Reference/td-p/3334006 http://zone.ni.com/reference/en-XX/help/372614J-01/glang/static_vi_ref/ I have modified the program according to your suggestion, it can work properly, thank you very much Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.