07-22-2005 03:37 PM
07-25-2005 02:11 PM
hi, yea thats what I wanted, its still not working though, so im going to try to write it in matlab and add a script.
thanks for all your help
07-26-2005 03:02 PM
Hello,
Ok, I am getting into this post a little late, however, it seems like you just want to construct the following:
1. a "histogram" where:
bin1 contains the number peaks that occur in signal B, between the 1st and 2nd peaks of signal A
bin2 contains the number peaks that occur in signal B, between the 2nd and 3rd peaks of signal A
...
binN contains the number peaks that occur in signal B, between the nth and (n+1)st peaks of signal A
If you are simply looking for a plot with "bars going up" where the size of the "bars" equals the number of peaks in what we previously called a "bin," then perhaps the easiest way to do this is to simply build an array containing the values indicated above. That is, the first element in the array is really just bin1, the second element is really just bin2, ... and so on. You can show this much like a histogram if you simply change the plot style to be one of the "vertical bar types." I have attached an example showing how to plot 100 bars, where the height of each bar is a random integer between 0 and 10; I plot the same thing to 2 waveform charts (where it updates a bar at a time) and also 2 graphs where one uses a thin bar type, and the other uses a thick bar type. You could use a similar technique, where instead of plotting random integers, you simply count the peaks in signal B between "reference" peaks (as you seem to already be able to do), and build an array of those values. I do this in a "for" loop, but especially using the charts which update a "bar" at a time, you could do this in a while loop and see your "counting" occurring in "real-time."
Repost if you continue to have questions! Also, if you are set on using text-based code to implement this, you can always use a MATLAB script node (which takes MATLAB syntax) in LabVIEW so you can play with the data before and/or after in LabVIEW. You can also use a formula node, which will allow you to use C-like syntax and corresponding programming structures. However, you should be able to do everything you need fairly easily with more fundamental LabVIEW types!!!
Repost if you have any further questions!
Best Regards,
JLS
07-27-2005 04:05 PM
Hi Sophie,
@sophie83 wrote:
hi, yea thats what I wanted, its still not working though, so im going to try to write it in matlab and add a script.
thanks for all your help
08-05-2005 03:39 PM
Hi, Thanks for all your help. Its working fine now. I just have a question about minimizing my program, how did you do that, where you made your own subvi? I know it has to do with the connector pane but I am not able to do it???
Also, I have another question, say im running a program and acquring samples, and I have a button where the user clicks on analyze data. I would then like a new pop up window with a front panel to pop up and display the data on teh different screen. Right now I am displaying the samples and data all on one front panel, and its very crowded. I think I have to create subVIs, but im not sure how im supposed to do it
08-07-2005 12:24 AM
@sophie83 wrote:
Hi, Thanks for all your help. Its working fine now. I just have a question about minimizing my program, how did you do that, where you made your own subvi? I know it has to do with the connector pane but I am not able to do it???
Also, I have another question, say im running a program and acquring samples, and I have a button where the user clicks on analyze data. I would then like a new pop up window with a front panel to pop up and display the data on teh different screen. Right now I am displaying the samples and data all on one front panel, and its very crowded. I think I have to create subVIs, but im not sure how im supposed to do it