LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition from detector in real time

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!

0 Kudos
Message 1 of 9
(1,715 Views)

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!

0 Kudos
Message 2 of 9
(1,637 Views)

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.

0 Kudos
Message 3 of 9
(1,609 Views)

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?

0 Kudos
Message 4 of 9
(1,589 Views)

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


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 5 of 9
(1,581 Views)

@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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 9
(1,567 Views)

@Ben nice tip .. somehow i missed this notion when i initially read the help for the 'wait' function a long time ago


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 7 of 9
(1,551 Views)

Thanks!I have read the link but there is actually no event structure was used in my whole vi program.

0 Kudos
Message 8 of 9
(1,544 Views)

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.

0 Kudos
Message 9 of 9
(1,542 Views)