knifeman Posted November 19, 2006 Report Share Posted November 19, 2006 Hi, everybody. I have founded the right way to build the .lsb file finally today morning, but there are still some problems exist. The first one is that I cannot reload the lsb file directly, LabVIEW noticed me the warning massage every time when I compiled the new files, the massage is mainly about say: Quote Link to comment
PJM_labview Posted November 19, 2006 Report Share Posted November 19, 2006 I think you can't debug a CIN while LabVIEW is running. Note: I am not 100% sure PJM Quote Link to comment
knifeman Posted December 8, 2006 Author Report Share Posted December 8, 2006 Hi,PJM. Thank you for your help. And what step you will take on when your C program must be rebuilded to creat a new lsb file? Quote Link to comment
Rolf Kalbermatter Posted January 11, 2007 Report Share Posted January 11, 2007 I think you can't debug a CIN while LabVIEW is running.Note: I am not 100% sure PJM Well that is not exactly true but it is a bit of a pain and for reentrant CINs you really can be in trouble sometimes. The most reliable way is to add DbgPrintf calls into your code. That is a LabVIEW manager function just like the other xxPrintf function explained in the External Code Reference manual but the output goes to a debug console window that opens on the first execution of this function instead of a memory buffer address. Another one is to add a DebugBreak() call (Windows OS API, other platforms have different calls) into your source that will cause a user breakpoint exception and break into the system debugger if any is installed. Otherwise you get an Exception dialog. However newer versions of LabVIEW add exception catching around external code calls (at least for Call Library Nodes, have not done any CINs for a long time). You can disable this exception catching from LabVIEW 7.1 onwards by adding the extFuncCatching=False entry to the LabVIEW.INI file. This won't work in LabVIEW 6.1 or 7.0 so debugging external code really is a pain there. Note that if your CIN (or DLL call) is reentrant your are likely to run into a deadlock situation (at least with Visual C 6.0, not sure about other debuggers) with the debugger blocking on some GFL (Windows global f***ing lock) and also locking LabVIEW entirely. The only solution I have found so far out of this is Ctl-Alt-Del and then retry debugging with reentrancy disabled. Rolf Kalbermatter 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.