02-22-2017 05:11 PM
Hi,
I have an Xcontrol on my front panel. Almost everytime I load the main VI none of the buttons will work and I cannot access the block diagram.
I must then unlock the VI, delete the xcontrol and replace the xcontrol on the front panel from the labview project in order for the VI to work.
Any ideas why it I have to got through the above process?
(In addition, I have two xcontrols and it only happens with one.)
Rgds,
Seán
02-23-2017 12:00 AM
The problem is most likely a bug in your XControl. Find the bug, fix it, and the problem will go away.
If you want a less sarcastic answer, you must provide more information (i.e. your code).
02-28-2017 05:17 AM
Hi Paul,
I cannot supply the code as it is confidential.
The error only happens intermittently and I have been unable to debug. I was hoping someone might be able to suggest typical areas that could be causing the issue.
Rgds,
Seán
02-28-2017 06:12 AM
SeanJ wrote:
[...]none of the buttons will work and I cannot access the block diagram.[...]
Sounds like a dead lock with events. Is it possible that you have blocking calls in the event structure and/or assign multiple event structures to react on the same event?
02-28-2017 08:20 AM
One technique I use sometimes is to add debugging code at a variety of places that logs a message to a file (messages indicate location in the code, e.g. "Starting SubVI 1"). Then when it hangs, inspecting the log file will help you narrow down where the problem is.
02-28-2017 08:33 AM - edited 02-28-2017 08:34 AM
@paul_cardinale wrote:
One technique I use sometimes is to add debugging code at a variety of places that logs a message to a file (messages indicate location in the code, e.g. "Starting SubVI 1"). Then when it hangs, inspecting the log file will help you narrow down where the problem is.
If available, i would rather use the Desktop Trace Toolkit (DETT) and include custom DETT messages in the code of the XControl. The reason is that i do get information "for free" (e.g. event structure execution, threading information, ...) additionally to the ones which are generated explicitly.