Jump to content

The important thing after the CIN node is completed


Recommended Posts

  • 3 weeks later...
  • 1 month later...
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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.