LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

srq stuck in on position. Display a bmp image.

Hello,

 

I have a problem when I want to display a .bmp image. I use the functions "Read BMP File.vi" and "Draw Flattened Pixmap.vi", but unfortunately an error occurs:

 

Error 16 ocurred at read BMP Header Info.vi

Possible reason(s):

LabVIEW: Image not found.

---------------------------------------------------------

NI-488:  SRQ stuck in ON position.

 

I don't know why it happens. I have checked the folder where the image is stored and the image exists and all is correct. I have also checked the path of the image and the path of the "Read BMP File.vi" and are the same. 

 

I have attached this vi. Its functionality is to take a capture of the oscilloscope, so store it with a name and the display it in the front panel of the vi. If you open the file, you will see that I have used the flat sequence. I have used this structure because I thought that LabVIEW didn't find the image due to time issues ( the program tries to display the image when it hasn't been created yet).

 

I have been looking for information about this error, but I haven't found anything and I don't know what I have to do. 

 

Any help is appreciated. 

 

0 Kudos
Message 1 of 8
(3,949 Views)

Hi luisi,

 

you should start to analyze this problem either by building a correct path (using ".bmp" as file extension) or by using a different PictureLoad-function (namely "Load PNG file")…

Best regards,
GerdW


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

Luisi,

Were you ever able to find a solution to your problem? I believe I have the same issue, can you give some insight? Read below:

=============================================================================

I am still struggling to figure out what is special about the saved image from the TPS2024.

As mentioned in a previous email:

  1. The save image created (as a byte array per your suggestions) by opens fine in all the image viewers I have, but produces an error (Error 16, see Figure 1 below) when  attempting to load image in Labview. Not sure what the Header indo is supposed to be but any image editor seems to be able to read file fine.
  2. When opened and simply resaved using an image editor, Labview is able to open the image. The “Image Properties” appear unchanged with exception to “Disk Size”(see Figure 2 below). “scopetest.bmp” is the original save image from TPS2024, “scopetest2.bmp” is the unedited image editor software resave of the of the original image.

Figure1.jpg

 

 

Figure2.jpg

 

0 Kudos
Message 3 of 8
(3,633 Views)

Hi grscheben,

 

it would help a lot if you would attach the BMP which refuses to open in LabVIEW! (Put it in aZIP archive!)

And it would help to compare the original BMP with the re-saved one with a HEX editor type program to spot the differences…

Best regards,
GerdW


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

GerdW,

Per request here is the problematic "scopetest.bmp" in a zip file.

George.

0 Kudos
Message 5 of 8
(3,621 Views)

Hi grscheben,

 

two notes:

- when (re)saving your BMP as "ordinary" BMP it's filesize changes quite a lot. You should have noticed this already!

- when debugging the LoadBMP function with standard LabVIEW tools (like open subVIs and look at their FP) you should have noted the function "Read BMP header info": it signals a "compressed bitmap", which is the reason for loading failure within LabVIEW.

 

Conclusions:

- BMP file format is mostly obsolete.

- LabVIEW doesn't support compressed BMP files.

Best regards,
GerdW


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

GerdW,

responses to your statements:

"when (re)saving your BMP as "ordinary" BMP it's filesize changes quite a lot. You should have noticed this already!"--> I did. I TOLD YOU about this observation.

"...should have noted the function "Read BMP header info": it signals a "compressed bitmap"--> I don't seem to have "Read BMP header info" on any of my pallete's. is that funtion part of a labview add-on tool-kit?

 

"- BMP file format is mostly obsolete. - LabVIEW doesn't support compressed BMP files." --> Unfortunate. Bitmaps are the preferred export method from the Tektronix equipment supplier to read image data over the Serial interface. The file format I sent you is the only supported BMP format supported by Tektronix.

 

ADVICE: The spirit of a technical forums are to provide a venue for users to support other users. They are not intended as a venue to vent or otherwise "Troll". If that's is your intent GerdW, there are other forums that would be better use of your time.

 

0 Kudos
Message 7 of 8
(3,599 Views)

Hi grscheben,

 

I don't seem to have "Read BMP header info" on any of my pallete's. is that funtion part of a labview add-on tool-kit?

The mentioned VI is a subVI of the ReadBMP function.

I told you to look at subVIs.

 

ADVICE: Do listen to what people tell you!

 

I did. I TOLD YOU about this observation.

My fault, I didn't notice this part of your message…

 

The file format I sent you is the only supported BMP format supported by Tektronix.

But LabVIEW supports other file formats as PNG.

And there are a lot of free tools to convert image filetypes into each other. You could employ such a tool to convert those Tektronix BMPs to plain PNG files. It's just one SystemExec call away…

(A serious question: How old is this Tektronix device? I hope Tektronix does support other/better image file formats nowadays.)

 

If that's is your intent GerdW,

No, it isn't my intent to troll.

It's my intention to make people think about their VIs. Most often that's all they need… 😄

Best regards,
GerdW


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