![]() |
Labview keeps freezing
After taking a couple of pictures, the progress bar keeps running over and over again, but the new picture will not load and the buttons lock up. If we restart labview or restart the computer we can take a couple more pictures, but then it locks up again. Turning the camera off and on doesn't seem to help. There was no problem with the installation. We are not getting any of the errors that have been posted in the forum. The TTL adaptor is connected to the camera by a PWM cable but it is not attached to the RC. We configured the com port to the specifications in the camera manual. Does anyone know what we might have done wrong?
|
Re: Labview keeps freezing
SHerpich,
We've observed the same problem. When we first installed LabVIEW, we were able to grab frames without any problems. The last time we tried, we saw the same problem you described. We would always be able to grab at least 1 frame, and sometimes several, but then the progress bar would indicate a frame grab in progress and once it would get to the end, there was a pause (several seconds), no new frame displayed, but the progress bar would start over as if it was acquiring another frame. Our workaround is to upload the camera parameters in between every frame grab (even if nothing has changed). I'm not sure why that works or if that will work for you, but give it a try. You also may get a better response if you put this question in the LabVIEW forum. Mike |
Re: Labview keeps freezing
Quote:
-Danny |
Re: Labview keeps freezing
Quote:
We have used two different backup batteries, both fully charged. The problem was still observed. Note that when I say "continually", I mean that we consistently get the problem on an inconsistent basis. Sometimes we get it immediately at the start of the work session and it lasts through several restarts of LabView and RC/Camera power cyclings. Other times, things work for a little while (we can grab 2-3 frames), but then we get the OP's problem of LabView not responding to input, not getting the frame that was asked for, and the frame grab progress bar continually filling up and starting over. This persists until we restart the LabView CMUCam GUI application. After restarting, it might or might not occur again immediately. It is consistently inconsistent as to when it works. If it is really thought to be a power supply issue, then I will try to make an effort to rig up a non-battery supply and run the camera off that. Maybe the OP or someone else having the same problem can do the same (just use any standard DC power supply that fits the specs outlined in the CMU Cam docs). Hope this helps to diagnose the problem. |
Re: Labview keeps freezing
Just curious, when you have this problem are you using a USB-to-Serial converter or a built-in serial port? We've been up and down this problem trying to reproduce it, and we're having a bugger doing anything close to what you're describing - we're using a built-in port on a desktop, though.
-Danny |
Re: Labview keeps freezing
Quote:
For details, see http://www.chiefdelphi.com/forums/sh...ad.php?t=42631 |
Re: Labview keeps freezing
Quote:
Thanks! -Joe |
Re: Labview keeps freezing
Quote:
I tried the previous GUI again; this time, it loaded 3 frames before dying. I suspect that one side or the other loses the serial channel intermittently. |
Re: Labview keeps freezing
I've had the same issues with Labview. I've used different batteries as well as a 12v regulated/filtered supply. All versions of the software have behaved in the same fashion.
|
Re: Labview keeps freezing
UPDATE. By using the latest update posted by Joe, I was able to get through a sucessful calibration session with the camera. It still posted some "unable to communicate...check serial port..." messages a few times, but I just closed the window and kept working, ignoring the error. The camera still responded after doing this.
One new oddity came up while doing this. The pan function seemed to be reversed. It wanted to track AWAY from the light source. Tilt worked properly. Since this can be addressed in the rc code, I simply unplugged the servos in order to complete calibration. Thanks Joe. glenn |
Re: Labview keeps freezing
Quote:
Are you saying that the new version does nothing? I really don't understand what you mean when saying Quote:
When you say "previous GUI", are you referring to the Java GUI from last year or are you referring to one of the previous LabVIEW releases? Have you checked your change on the backup battery and all the wires for breaks or loose ends? -Joe |
Re: Labview keeps freezing
Quote:
When you get the error message does it grab part of a frame? -Joe |
Re: Labview keeps freezing
Quote:
|
Re: Labview keeps freezing
For us, the 1/25 version eliminated the run-away progress bar behavior that version 1/17 exhibited.
Peter H came over to play last night and we were able to grab frames repeatedly from his camera, but with my laptop. |
Re: Labview keeps freezing
Quote:
glenn |
Re: Labview keeps freezing
Quote:
Sometimes, I can Grab Frame OK. The rest of the time, I Grab Frame, the red LED flashes, the blue progress bar advances to the end, the progress bar disappears, a partial frame shows, and an error box appears "The application is closing because of a reported error ...". The status code is -1073807252. The status source is "VISA Read in get picture.vi>CMUcam2.vi>CMUcam2GUI.vi" I had to expand the status box to read this. I can click on the error box, it disappears, and the run icon reverts to not running. I can click on the run icon again, and repeat the process - sometimes it works, sometimes not. What is my problem? |
Re: Labview keeps freezing
Quote:
I'll look at the code to see if there is anything that can be done to make the program less susceptible to the problem. One solution is to lower the Baud rate (which would need to be done both on the camera and in the application / MAX) but would make the frame grabbing even slower. Hopefully we can avoid having to do that. Cheers! -Joe |
Re: Labview keeps freezing
Quote:
What are you using? -Joe |
Re: Labview keeps freezing
Quote:
If this is a buffer size problem, why does it work more often than not? When I get a partial frame, it is anywhere from 10% to 90% of the full frame. |
Re: Labview keeps freezing
Quote:
If it works more often than not, then VISA is barely not able to keep up with the serial stream. This should only be an issue for receiving, so you shouldn't have problems with things like programming your RC. You may have problems if you try reading the memory at full speed. I will add an option in the code to allow you to make it work for your serial port and computer. It will slow down the rate at which the camera sends bytes to you and will eliminate the buffer overflows (as long as you set it high enough). You will want to start with 1 bit delay (the default is 0 which is causing your problems) and increase it until your problem goes away. Since it almost works now, I would expect that a value of 1 or 2 should be sufficient to make it work very well. At least I'm confident that this should solve the problems you and others have been having. Thanks for helping to diagnose the problem so that everyone can enjoy the benefits of a working system! I'll post it when I finish the addition. Cheers! -Joe |
Re: Labview keeps freezing
Peter,
I've posted the new version. Please let me know if it solves your problem. Thanks, -Joe |
Re: Labview keeps freezing
Quote:
My earlier post was misleading. The serial port buffers are set to 14 and 15. I had thought you meant a software buffer. And many (~50?) WinXP processes are running in the background; most, I have no idea what they do. Maybe one of these sometimes prevents LabView from fetching the data? I can operate LabView CMUcam2 GUI reliably on my desktop; Grab Frame works 20 times out of 20. But that is faster, with fewer background processes. |
Re: Labview keeps freezing
Quote:
Quote:
Quote:
Let me know, -Joe |
Re: Labview keeps freezing
Quote:
Micrsoft Antispyware used 9% of cpu every few seconds. Killed it, but no change. Other processes use 2-3% every few seconds. LabView is now adequate for my purpose. |
Re: Labview keeps freezing
Quote:
Thanks, -Joe |
Re: Labview keeps freezing
Quote:
Sometimes, the previous behavior shows: the red LED stops when the frame update stops, the download bar repeats after several seconds, and no red LED. The Grab Frame button stays green, but, if I click it, it grays out. The download bar still repeats about every 25 seconds. |
Re: Labview keeps freezing
Quote:
Do you know how to probe lines in LabVIEW? It is a good way to debug LabVIEW code. I need you to open the "get picture.vi" inside of "CMUCam2 demo.llb" and switch to the block diagram (Ctrl-e), right click on the computed number of bytes and click probe. Then run the CMUCam Gui Application and let me know what the probe says for each of the cases you described above. I'm thinking that for whatever reason, you are having trouble with that, but lets see what you find from the probe. Thanks, -Joe |
Re: Labview keeps freezing
1 Attachment(s)
Quote:
Thanks, -Joe |
Re: Labview keeps freezing
Quote:
1 Correct operation, the full frame appears: as soon as I select Grab Frame, the number of bytes shows 114242 2 Partial frame, red LED continues to blink: as soon as I select Grab Frame, the number of bytes shows 114242 3 Partial frame, progress bar advances spontaneously, no red LED blinking: the number of bytes does not change from 0. I have not knowingly changed any LabView settings. I removed LAbView and reinstalled it a few days ago, but saw no change in operation. Since this GUI works OK with a desktop computer, I suspect some incompatibility between my laptop and the camera, that produces a hiccup in the data flow, and LabView can not tolerate the hiccup. |
Re: Labview keeps freezing
Quote:
I'm suspecting that it will now work properly for you most of the time. The new update (from 2006.01.31) will much more robustly check that it is getting what is expected and quit if it doesn't. It also flushes the serial port buffers completely now and interrupts any currently executing streams on the camera. This means that even if the camera is in the middle of a frame grab (for whatever reason) and the app asks for a new frame, it will abort the first one and ask for a fresh new one. You should never get case 3 from above, now. If you get case 2 (I'm really not sure how this is happening since the size is correct) then it should fix itself on the next try. Good luck! -Joe |
Re: Labview keeps freezing
Quote:
|
Re: Labview keeps freezing
Quote:
I'm glad to hear that it's working better. I really wish we could figure out what's going on with the 2nd case. Does it return an error when you get case 2? (I'm referring to the error cluster that appears on the front panel, not the pop up window.) It may be a screwy hardware thing. -Joe |
| All times are GMT -5. The time now is 07:30. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi