06-08-2006 03:30 AM - edited 06-08-2006 03:30 AM
Message Edited by Support on 06-13-2006 06:22 PM
06-09-2006 01:31 PM
Hello medval,
It took me a little while to understand what was happening in the code. It looks like Lv1.vi calls a function c1call with c2caller as a parameter. C1call (a function in a dll) then calls lv2call (a LabVIEW VI ?) with c2caller as a parameter. LV2 calls c2caller by reference, since it was passed as a reference through the whole chain. Where in the link is it breaking down? You should compile the dlls to have a break point so that you can tell that they are getting called. You can also run the VIs in highlight execution mode to see that they are being called from the dlls.
If I am mistaken in the actual order or in the intended purpose please let me know. Why is it that you are using dlls to call LabVIEW vis in this way. Also, where is the lv2.c file or is it supposed to be using the lv2.vi for its implementation?
Steven T.
06-09-2006 07:44 PM
Hi Steven et al,
Attached is the roughly the same code for LV7. I can highlight the execution and do pretty much whatever I want in c2caller.vi.
In LV8 I cannot highlight execution, neither can I write to files and such.
lv2call - this is a call to a LV generated dll - lv2.vi is the source code used for the application builder. (use lv2.bld to build the dll, or similar for LV8 in the other zip file).
To me it looks like a change in behavior for LV8 which prevents us from doing this - have no idea what is going on.
Correct, no lv2.c file exist - you have lv2.vi which is compiled from LabVIEW.
Best wishes, Marcus
06-12-2006 07:15 PM
06-12-2006 10:28 PM
06-13-2006 06:42 PM
Hi Marcus,
Thanks for the clarification. I tried running your code in 8.0.1 and sure enough, it did not write anything to mytxt.txt. However, I believe the reason for this is that the LabVIEW-built DLL was invoking the wrong version of the runtime engine. I created a new project and build specification from your .bld build script file (under Tools >> Convert Build Script...). With the new lv2.dll I was able to successfully run the code and write to mytxt.txt!
I have attached the modified code that worked on my machine. Perhaps you can upgrade to 8.0.1 if it still does not work on your machine.
Hope this helps!