From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ ImageToArray returns NaN in LabVIEW 7.0

I wrote a VI to quantify an image using both LabVIEW 5.1 and IMAQ Vision 5.0. Recently I upgraded to LabVIEW 7.0. When I tried to run my VI, it worked well sometimes but very often, the data values were returned as NaN. Upon checking, I realized the problem lies with the IMAQ ImageToArray subVI. When I tried to convert an image to array, it sometimes return NaN. Can anyone help me with this problem? I am still using Vision 5.0.

Thanks in advance.

Kian
0 Kudos
Message 1 of 5
(2,538 Views)
Did you change the image format (there is a new image format in LV 7.0) ?
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 2 of 5
(2,538 Views)
Did you change the image format (there is a new image format in LV 7.0)

I would expect broken wires if this was the problem, but it is certainly a possiblility. If there is an image data type problem, run the image datatype update utility, which should be installed in the National Instruments\Vision\Utility directory.

There is also a high probablity that Vision 5.0 and LabVIEW 7.0 will not behave that well together. If this problem only happens occasionally, try and see if there is a correlation between the images themselves and the NaN values.

Regards,
Colin C.
Applications Engineering
Colin Christofferson
Community Web Marketing
Blog
0 Kudos
Message 3 of 5
(2,538 Views)
I don't seem to have the National Instruments\Vision\Utility directory. Do I need to install it?

Thanks.

Kian
0 Kudos
Message 4 of 5
(2,538 Views)
That is a directory that may not be on your system due to the version of IMAQ Vision that you have.

I have attached the LLB to this post in case you cannot locate it.
Regards,
Colin C.
Applications Engineering
Colin Christofferson
Community Web Marketing
Blog
0 Kudos
Message 5 of 5
(2,538 Views)