From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-16-2017 03:48 AM
Hi, I've been encountered a problem during data acquisition from CCD camera and I really need some help. The CCD camera received data in every 1ms which would be transfered to computer in real time. I have been using a for loop to transfer the data and it worked well as long as it was leaved alone (I could not even drag the vi window or click the mouse, which would cause the loop unable to keep pace). My guess is that the data transfer process through for loop is quite susceptible, because it need to be very fast and it might occpied all the CPU. I have resorted to CCD camera engineer but the problem is not solved. Does any one have any solutions?
There is an image of the vi block diagram in the end.
Thanks!
01-17-2017 11:10 AM
Hi George0,
Which version of LabVIEW are you using?
It sounds like this may be due to a LabVIEW setting and not the for loop itself. Furthermore, this link may explain why you are seeing this behavior.
I hope this helps!
01-19-2017 03:36 AM
Hi cblanchard,
Thank you for your reply. I am using LabVIEW 2013.
I have realized that my inner while loop doesn't have a wait function which could ocupy much of CPU resource. this might be the reason why its so susceptible. but I still don't have a good solution, because it have to work fast too keep up with hardware.
01-20-2017 09:34 AM - edited 01-20-2017 09:34 AM
Hello George0,
In that case, it may be helpful to check the settings of your event structure to ensure that "Lock Panel" is not selected in the settings. This is further explained in this link.
Does this fix the problem?
01-20-2017 09:52 AM
the general practice i think is to seperate data acquisition and presentation
have one loop (with a little waittime to not use all ressources) to get the data and put it into some variable/indicator/whatever, and another loop that handles your GUI elements (like stop button) with a event structure.
hope that might help
01-20-2017 12:38 PM
@George0 wrote:
Hi cblanchard,
Thank you for your reply. I am using LabVIEW 2013.
I have realized that my inner while loop doesn't have a wait function which could ocupy much of CPU resource. this might be the reason why its so susceptible. but I still don't have a good solution, because it have to work fast too keep up with hardware.
When you need to run a loop continually as fast as possible and still allow other things to happen with you machine use a "Wait" with a "zero" wired to it. That constrcut tells LV to check every iteration to see if other processes need serviced but if they do not, get back to running the loop.
Ben
01-20-2017 04:08 PM
@Ben nice tip .. somehow i missed this notion when i initially read the help for the 'wait' function a long time ago
01-20-2017 11:41 PM
Thanks!I have read the link but there is actually no event structure was used in my whole vi program.
01-21-2017 12:06 AM
I'm afraid this might not work with my case. The data comes in every 1ms, but we have to check it in faster scale, once data is ready it will be transferred to computer. We don't actually need to present it in real time, we can process data after some certain amount of data points. The important thing is to get consecutive data.