cancel
Showing results for 
Search instead for 
Did you mean: 

2D Array manipulation help

Jared.Sweeney
Member

2D Array manipulation help

Message contains an attachment

Good afternoon forum folks

 

I am currently writing a simple code and have hit a mental block. I am writing a code to display PXI card information (Alias name, serial number, external calibration information) as a quick reference for testers and cal techs to check. and calibration dates past due will display as red. I have the the cards and chassis' replying and displaying the information that I need, so here lies my question(s). 

 

1. Since some of the cards don't need calibration, there external date is set to 1903, these dates all display as red. I would like to manipulate the 2D array to remove those from the results if I choose too. My thought had been to add a simple Boolean controlled case structure with a Delete from Array in it, but I am not sure how you would wire that to get the desired results. Is there a better or more efficient way to do that?

 

2. I have 30 PXI cards across two chassis'. currently there is no order to how the cards/chassis' are displayed. Is there a way to organize that so that the cards display after the corresponding chassis? my thought on this is that I would have to query the chassis first and then the cards, sort by slot number and then repeat? 

6 REPLIES 6
Gaveloni
Member

Re: 2D Array manipulation help

Message contains an attachment

Well, generally speaking, there is more than one way to do just about everything, and I certainly may not have the absolute best approach, but for your "1903" question, see if this gets things going in the right direction for you (attached LV22).   Let me know if you want more explanation or discussion.

Jared.Sweeney
Member

Re: 2D Array manipulation help

I'll take a look at this, any you're right that there is certainly more than one way to skin a ... LabVIEW problem .. 

 

I forgot to mention I am running LV2017

zou
Trusted Enthusiast
Trusted Enthusiast

Re: 2D Array manipulation help

Message contains an image Message contains an attachment

I had very similar need last year.  So I created this VI.  Each column can be sorted by click on the bottom of the row header when cursor changed to arrow.  I back saved it to LV2017.

GetAllDevices.jpg

 

My devices are simulated.  So no calib. date.

 

 

George Zou
Yamaeda
Proven Zealot

Re: 2D Array manipulation help


@Jared.Sweeney wrote:

1. Since some of the cards don't need calibration, there external date is set to 1903, these dates all display as red. I would like to manipulate the 2D array to remove those from the results if I choose too. My thought had been to add a simple Boolean controlled case structure with a Delete from Array in it, but I am not sure how you would wire that to get the desired results. Is there a better or more efficient way to do that?


I'd set them to 3000 instead of 1903.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Jared.Sweeney
Member

Re: 2D Array manipulation help

Yamaeda, I have honestly thought about doing that. The problem is, I have not found a way to re-write niDMM and niSCOPE external cal dates. I can do it with DAQmx, but have been unsuccessful with the others.

Yamaeda
Proven Zealot

Re: 2D Array manipulation help

Then you can handle it while reading. If year < 1904 (t0 for datetime) set year to 9999 in memory or something.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer