08-03-2005 09:50 AM
08-04-2005 11:43 AM
08-04-2005 11:56 AM
Hi Priya,
Sure, you can use either the Find() or the PNo() functions to return the corresponding row number of that maximum value. The Find() function will only return a row if an exact match occurs, while the PNo() function will always return the row number whose Y value is closest to the value you're searching for. The Find() function also has an optional second parameter which is the start row of the search.
One question to ask yourself is whether this maximum value might ever occur more than once in the channel, and if so, how you want to react to that possibility. Below you will find a VBScript attached which uses the Find() function to identify all occurences of the maximum value.
Ask if you have additional questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-26-2008 10:17 PM
Hello,
I am able to use the Find() and CHD() functions as shown in this thread to determine the X-value corresponding to Cmax, however as far as I can tell this only works with numeric channels. Is there a corresponding method than can be used for waveform channels? I am using this function in a text box on a report.
Thanks,
Craig
03-27-2008 08:30 AM
Hi Craig,
For waveform channels use "ChDWfX(row, channel)" instead of "ChD(row, channel)".
Brad Turpin
DIAdem Product Support Engineer
National Instruments