|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
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? |
|
#17
|
|||
|
|||
|
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 |
|
#18
|
|||
|
|||
|
Re: Labview keeps freezing
Quote:
What are you using? -Joe |
|
#19
|
|||
|
|||
|
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. |
|
#20
|
|||
|
|||
|
Re: Labview keeps freezing
Quote:
or operating systems like Windows that are not real-time, it is difficult to service every byte with low latency (before the next byte). It is much easier for something like the PIC in the RC.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 |
|
#21
|
|||
|
|||
|
Re: Labview keeps freezing
Peter,
I've posted the new version. Please let me know if it solves your problem. Thanks, -Joe |
|
#22
|
|||
|
|||
|
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. |
|
#23
|
|||
|
|||
|
Re: Labview keeps freezing
Quote:
Quote:
Quote:
![]() Let me know, -Joe |
|
#24
|
|||
|
|||
|
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. |
|
#25
|
|||
|
|||
|
Re: Labview keeps freezing
Quote:
Thanks, -Joe |
|
#26
|
|||
|
|||
|
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. |
|
#27
|
|||
|
|||
|
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 |
|
#28
|
|||
|
|||
|
Re: Labview keeps freezing
Quote:
Thanks, -Joe |
|
#29
|
|||
|
|||
|
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. |
|
#30
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Example LabVIEW Apps - Dashboard, CMUcam2 and Motors | Russ Beavis | National Instruments LabVIEW and Data Acquisition | 9 | 21-01-2007 17:19 |
| LabVIEW Com Port Error | 354.FIRST | LabView and Data Acquisition | 4 | 18-01-2006 18:43 |
| National Instruments LabVIEW and Data Acquisition Forum | Danny Diaz | National Instruments LabVIEW and Data Acquisition | 1 | 16-01-2006 13:20 |
| COM port settings for CMUcam labview testing and programming | pwilczynski | Programming | 1 | 15-01-2006 15:09 |
| National Instruments LabVIEW & Data Aquisition Forums | Brandon Martus | Announcements | 0 | 22-11-2005 21:12 |