LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D Array manipulation help

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? 

0 Kudos
Message 1 of 7
(367 Views)

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.

0 Kudos
Message 2 of 7
(353 Views)

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

0 Kudos
Message 3 of 7
(347 Views)

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
Download All
Message 4 of 7
(305 Views)

@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
0 Kudos
Message 5 of 7
(279 Views)

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.

0 Kudos
Message 6 of 7
(267 Views)

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
0 Kudos
Message 7 of 7
(197 Views)