01-10-2012 10:39 AM
Hello,
I am aiming to automate the process of selecting a data range in DIAdem VIEW (with band/frame cursor), then flagging the data, and copying the flagged section.
Whilst I can automatically set the position of the cursor, I don't believe I can use the ChnFlagSet command as this requires that the row number and number of values is known, effectively I want to just select/copy all the values that fall within the framed section, however the data points are not in chronological order.
Its something that I can easily be done manually in VIEW, however when I record this action in SCRIPT nothing is recorded.
Any help would be much appreciated
Thanks
Ben
01-11-2012 05:02 AM - edited 01-11-2012 05:03 AM
Hi Ben,
Welcome to the NI Forums!
Just to check that I have a good understanding of your situation, can you please just clarify that I properly understand your requirements:
Do you programatically define which columns to be selected? If so, we could base not only the column of data to be selected but also the selection length on internal variables. We could use this information to infer which Row Number and Number of Values to use when using the ChnFlagSet command.
Would it be possible for me to take a look at what you have written so far?
01-11-2012 12:03 PM
Hi Ben -
I echo Alex's questions. Are you attempting to let the user interactively set the band, and then once set, programmatically flag-and-copy the data within the band? We can use the "X1 and X2" values from the band to programmatically determine the starting row number and number of values (this is a bit trickier for waveforms).
How will the user specify that they're finished setting the band? Button press? Menu entry? If you are attempting to always run specific, known calculations on the data within the band (for example, calculating the FFT) then you could even respond to the event of the cursor position changing and dynamically run and display the result of the calculations without requiring button press or menu entry.
Take a look at the DIAdem Examples called Viewing and Automatically Analyzing Data as well as Calculating a Tanget to a Curve for two different ways to architect this (at a high level).