LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multipe line on intensity graph and integrate data between the two lines?

Hello,

 

I am programming a CCD and I was wondering How can I plot two lines on an "intensity graph" instead?

- I tried plotting them but only one of them shows, I think there is a command that lets you keep the first line as well, but I dont know where it is,

- Also, is there a way I can integrate the data between the two lines I draw?

 

- is there a smarter way to plot the two lines other than building two different "events"?

Please see attached

0 Kudos
Message 1 of 2
(2,315 Views)

Your post is unclear, but I think you want to do the following:

 

  1. Acquire 2D intensity data from a CCD array and plot it on an intensity graph
  2. Draw two lines to delineate an area of interest
  3. Integrate the values of the CCD between these two lines

This is relatively straightforward, but you will need a more complex architecture than the one you currently have.  You will need to use the event structure and probably should have a task handling loop, as well.  This architecture is known by several things, but "event-driven state machine" is probably the most common.  Search these forums for that phrase and you will get lots of information.

 

For your particular problem:

 

  1. In your event structure, you will need events to handle drawing the line (could be mouse or button/parameter driven, or both), events to calculate the integral, and the usual start/stop/data acquisition things.  Note that all these events should only generate commands for your command processor/state machine to handle.  These will be send via queue.
  2. In your queue-driven state machine / task handler, you will need a shift register to hold such variables as the line data (both of them), local copy of the intensity graph data, etc.
  3. The different frames of the case statement (or dynamically dispatched VIs if you go the object oriented route) do the actual work.

You should learn about the event structure and queue driven state machines before starting this.  Start with the LabVIEW help, then search these forums for additional info.  For example, I believe altenbach posted a demo awhile back of the event structure in which he drew a polygonal line.

 

Good luck.  Let us know if you need more info.

0 Kudos
Message 2 of 2
(2,301 Views)