LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PROGRAM HANGS

Hi,
    I am currently debugging a software developed in labwindows for a head tracking system. The problem is that on my uir. i have a configure button. When i press it it loads another panel(line 66) that has the configure switches on it. After making changes with configuration parameters when i press OK to return to the main panel(callback function CONFIGCOMPLETE (line72)) it hangs abruptly without going further. Right now i am testing the software without connecting the headtracker to the serial port . Ideally it should hide the panel, see if the headtracker is working or not(line 87) and return me the pop up message on line 92 coz the headtracker is not connected however it hangs and does  nothing.
 
Is this because the headtracker is not connected to the system or bcoz of some programming error . I have tried a few things but nothing seems to work. I m currently trying to make sure my software runs smoothly before connecting to headtracker.
Pls do suggest something.
Waiting for a reply,
Kunal
 
Download All
0 Kudos
Message 1 of 3
(3,112 Views)
Hello Kunal!

I took a look at your code, and while I can't run it due to the missing header files (such as bird.h), I do have some possible suggestions for you.  First of all, have you tried running the code in debug mode, and single-stepping through the code to see precisely where the hang occurs?  I suspect that the hang is happening at line 87, possibly due to not reaching the appropriate timeout values.  I suggest verifying that the timeout unit is indeed milliseconds, since this would be completely normal behavior if the units were seconds. 

It's difficult to say for certain whether not having the headtracker attached to the system is the culprit, since the birdRS232WakeUp function is defined in that missing bird.h header file.  If it's something convenient to do, test the system with the headtracker unit attached, compare behavior, and let me know where precisely in the code the hang is occurring.
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 2 of 3
(3,089 Views)

Hi Mattt,

           thanks a lot . your suggestion did help. i kind of went debugging the software using breakpoints and i realised i made a silly mistake.

for a callback function called from a command button i had declred the control mode as normal instead of hot. its working right now atleast giving me an error message for everything saying that the headtracker is not corrected , will try it out in a couple of days with the actual machine

thanks again

bye

kunal

 

0 Kudos
Message 3 of 3
(3,072 Views)