LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pseudo empty 2-d array - NPSV error 42

I am posting this more as a warning than a question.

 

My application has a Network Published Shared Variable that uses a cluster containing a 2-D array of Doubles.

 

I have found that if I write a 3x0 Array to this shared variable, it can't be read (Error 42).

If I write a 0x3, 0x0 array to it, it can be read.

 

How do I get a 0x3 or 3x0 array? I hear you ask

Terrific question, I will let you know when I figure that out!.

It is theoreticaly impossible but structuraly supported.

It happens in an unitiialised Class Control via typedef..

 

Tim L.

iTm - Senior Systems Engineer
uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
0 Kudos
Message 1 of 3
(2,749 Views)

Hi Tim,

 

no it's not impossible to get 3×0 and 0×3 arrays: use an autoindexing loop to produce an array containing 3 rows from empty 1D arrays (aka "no column data")…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,747 Views)

Figured that there would be several ways to do it, I was thinking re-dimension array. as another possible candidate.

 

The Problem is that I don't use any of those structures!  It is a typedef that is initialised with an empty array constant.

 

That said, I would not expect the NPSV to Crash because of it, especially the difference between 3x0 vs 0x3

 

 

 

iTm - Senior Systems Engineer
uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
0 Kudos
Message 3 of 3
(2,718 Views)