LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Property Node Error 1172

Solved!
Go to solution

I'm new to labview, and I've been working on the attached vi to operate and collect data from a ThorLabs camera. I've been getting the following error when running the vi as normal:

error 1172 in imagedata node.PNG

However, when I run the vi with execution highlighted, no error occurs. I'm confused why this null exception error occurs when running at full speed but not when its executed step by step. If anyone has run into similar issues with .NET exceptions or know of a potential fix, please let me know.

Another small issue that I'm having with this VI is that I'm having trouble saving the image as a .bmp file. Every once in a while I get error 7, as seen below, due to the creation of the .bmp, but its not consistent despite me not changing anything. error 7 in bmp creation.PNG

Additionally, the files often don't save to the desired folder, or at all, and I'm confused as to why.

Thank you for any and all help!

0 Kudos
Message 1 of 4
(3,133 Views)
Solution
Accepted by topic author colegurt

Well I've never used that particular camera so all I can give advice in is just generally.

 

It does say the issue is with a property node you're writing to.  Likely the issue is the value you're writing into it being null, so I would suggest you add several debug hooks for when it is running full speed to see if you can find out what is causing it to be null.  It could simply be that since cameras run at some amount of frames per second, if you try to get image data before it has an image, it's returning a null value.  That would explain why it works at a slow speed doing things step by step, because it gives it time to take a full frame.

 

If that is the case, I would look into ways to check when new frame data is available (like, reading from a frame index counter or registering for an event that occurs when a new frame is ready) and pace your program around that.

 

As for the second one there, did you notice that you're trying to save to two files at once?  "color checker test.PNG\test images1.bmp"?  Could be that's not allowed and causes the error.

 

 

0 Kudos
Message 2 of 4
(3,125 Views)

Oh whoops, didn't catch that I was accidentally using that png as my file path. However, that brings up another issue, which is that I'm having trouble getting a folder as my file path. I though I had managed to, but I guess I accidentally selected the png instead. Is "file path control" the right thing to be using here? If not, what should I use, and if so, why am I having trouble making folders the path?

I think I managed to solve the null issue by creating a while loop that ends once a frame is queued.

And thanks, I really appreciate the advice!

0 Kudos
Message 3 of 4
(3,059 Views)

If you're just using a control on a front panel somewhere, you can right-click it and select "Browse options", and in the window that pops up you can set whether the control allows folders, paths, or both.  Just set it to only use paths.  It will replace the standard button with one called "Current folder" and you won't be able to select files any more.

0 Kudos
Message 4 of 4
(3,051 Views)