lsheang Posted December 23, 2006 Report Share Posted December 23, 2006 hi i have been getting the analog signal. the analog signal consists of at least 2 curve for each sample. what i need to do is to get the area under these 2 curves respectively. what i did is using basic level trigger to get the 2 location of each curve then extract portion of signal. it works. however, when input to numeric integration vi, it can get the value for the first curve. for the subsequent sample of data, it shows NaN. what;s wrong with that? thanks regards Quote Link to comment
crelf Posted December 23, 2006 Report Share Posted December 23, 2006 Post the data and the code you've tried to help us to help you Quote Link to comment
lsheang Posted December 25, 2006 Author Report Share Posted December 25, 2006 hello. here i attach with the vi i develop, the subvi, and the offline data. i am doubt that the subvi of "extract portion of signal " or the " numeric integration" has gone wrong. thanks regards Download File:post-5763-1167067021.llb Download File:post-5763-1167067505.vi Download File:post-5763-1167067791.zip Quote Link to comment
Neville D Posted December 27, 2006 Report Share Posted December 27, 2006 Hi, looking at your vi's there are a number of errors: 1 If you are looking to find the 2 peaks in your data, the input to the detect triggers should be 2 (instead of default of 1). 2 The dt input to the integration vi is the spacing between consecutive pts in your data array. It is NOT the spacing between the 2 peaks in your data. 3 For trivial operations like abs(x1-x2), avoid usage of the express Vi for performance reasons. Besides the above 3 issues, I am not sure what you are trying to integrate. If you want to integrate the area under BOTH peaks, then your VI won't work, since you are detecting the 1st peak correctly (rising edge), but the second peak is NOT included in the data, since you actually need to detect falling edge for the second peak (see my screen shot of your front panel). You should change your trigger detect algorithm, to separately find the pts in time for the 2 peaks, and then use the rest of your VI. One way, is to reverse the data array and find first rising edge; this should give you the falling edge of the second peak. Neville. Download File:post-2680-1167245490.llb Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.