DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

setting flags in scripts

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

0 Kudos
Message 1 of 3
(4,590 Views)

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:

 

  • You're wishing to automate the process of making a selection across a range of data. The selected data then must be flagged and the data needs to be copied to the clipboard.

 

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?


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 2 of 3
(4,572 Views)

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).

Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 3 of 3
(4,556 Views)