06-28-2017 12:32 AM
Thank You Brad!
It looks that new version of the script works exactly like I need it to work 🙂
regards
Wojciech
06-28-2017 10:13 AM
Hi All,
Whoops. I missed one change in the script I posted yesterday. Here's a fully functional version.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
06-30-2017 04:06 PM
<Sigh>,
A customer pointed out to me that I had an error in the most recently posted script that incorrectly calculated array position from X axis position for waveform channels.
Here's the fix,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-06-2017 01:01 PM
I'm not sure if the bug exists in all versions of the code shared here, but, when using the code with waveforms, it looks 1 second to the right of the selected window.
ElseIF ChnWfKey(Ych) THEN Start = Ych.Properties("wf_start_offset").Value Delta = Ych.Properties("wf_increment").Value IF Delta = 0 THEN Delta = 1 P1 = 1 + CLng((X1 - Start)/Delta) P2 = 1 + CLng((X2 - Start)/Delta)
"P1 = 1 + ..." should not have the "1 +" term.
The attached file should take care of the problem.
11-06-2017 11:38 PM
Hello jordani,
Thank You for information - I think that You have attached not the right file to the post (the one that is available is the script that loads the Layout / data not the "working script" itself.
Just for my understanding - bug exists only in the case that I will have less than 1second marked on the waveform chart ?
11-07-2017 06:53 AM
Thanks for pointing that out. I've attached the correct file here.
The bug doesn't appear to be related to the amount of data selected. When the data are stored in waveform channels, a 1 second positive offset is added to the calculation window.