LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXG code conversion inserting incorrect default constants

I ran across this when testing if a LabVIEW bug had been fixed in NXG. The original LabVIEW 2018 code is below, and contains a call to Sound File Read Simple VI.

Spectrogram_LV2018_BD.PNG

 

After this code is converted to NXG 3.0 with the code conversion utility, a bunch of compatibility (?) code is automatically added, which includes a sequence structure and wiring up previously unwired inputs. See the screenshot below.

Spectrogram_NXG3.0_BD.PNG

 

The problem (apart from looking ugly) is that the automatically created constants are not the default constants for this VI. Specifically the samples/channel input default is -1 when unwired, but the conversion utility has wired up a constant 0. This has the knock on effect of always failing to load the wav file, as 0 samples/ch is invalid (error 61 is thrown indicating not enough memory is available).

 

Also worth mentioning is that the code conversion report didn't indicate any problems or issues with the VI in question.

 

Source for both is attached. Is this a known problem?

0 Kudos
Message 1 of 3
(2,369 Views)

Hi Dataflow_G,

 

I was able to replicate the same behavior on my system.  As far as I can tell, this isn't a documented issue currently.  It's certainly not the behavior I would expect from the code conversion utility, as it results in a VI that errors out due to the invalid input.  I've submitted CAR # 736756 to track the issue, and requested that the developers clarify if this should be expected for certain source VIs, and improve the code conversion utility to either prevent the issue or report it better if it does occur.

 

Thank you for reporting this issue, your feedback helps immensely.

Michael B.
Product Support Engineer
National Instruments
Message 2 of 3
(2,318 Views)

Thanks for submitting a CAR.

0 Kudos
Message 3 of 3
(2,305 Views)