From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need cursor value from graph to use in block diagram

OK I edited it a lil bit so it would "compile."  And it's real close to what I want...any thoughts.
0 Kudos
Message 11 of 21
(1,100 Views)
I would keep the full data on the left graph, and only show the cut data on the other two.
 
  1. Your FOR loop has no purpose whasoever.
  2. To get an array subset, use "array subset" not "delete from array".
  3. Don't duplicate code. You only need to read the cursors once, not three times in paralell. 🙂
  4. Use switch action, else the cut will revert in the next iteration.

See attached... (LabVIEW 7.0)

0 Kudos
Message 12 of 21
(1,091 Views)
In one of your earlier posts I got the impression that you wanted to look at the subset and possibly cut further from that. If so, replace the tunnels where the arrays enter and leave the while loop with shift registers. This is in addition to Altenbach's comments. I don't have LV7.0 running right now so I cannot post the mod in your version.

Lynn
0 Kudos
Message 13 of 21
(1,084 Views)
yes, you are correct...I want to further delete more of the array.  That was the whole reason for having the for loop so I could use the shift registers to pass the cut array back into the loop for MORE CUTTING.
0 Kudos
Message 14 of 21
(1,079 Views)


@altenbach wrote:
  1. ...To get an array subset, use "array subset" not "delete from array".


Sorry, my mistake. I thought you wanted to keep the data between the cursor, not delete them. So, yes, use "delete from array" for your stated requirements. 🙂
0 Kudos
Message 15 of 21
(1,078 Views)
If you're all interested I've attached my final version.

This was the first program I've written in LV ( from scratch).

Thanks everybody for your replies and for you help.  I truly appreciate it.
0 Kudos
Message 16 of 21
(1,069 Views)

Your FOR loop still has no purpose at all. Why do you think it is necessary?

Now, as the next exercise, wrap the entire thing into a nice event driven state machine, including states to read a new data file, save the trimmed file, undo a clip action, stop the program, etc. 😄

0 Kudos
Message 17 of 21
(1,065 Views)

hi

 

how to program my requirement.

i.e. get the two x-axis values automatically from the graph.New Bitmap Image.JPG

please give an idea to this.

i attached my requirement as image

 

Regards,

Hari

0 Kudos
Message 18 of 21
(619 Views)

(You probably should have started a new thread, because your problem has nothing to do with cursors.)

 

Also, please attach a typical dataset and the expected result. A there always exactly two spikes?

0 Kudos
Message 19 of 21
(617 Views)

Hi

 

This graph mesaures a time between two sensors outputs.

The graph contains only two spikes from two sensors.

 

I need the time period between two spikes only.

 

I am not able to create new thread.

I can place dataset if you create new thread for me.

 

Regards,

Hari

0 Kudos
Message 20 of 21
(615 Views)