LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView .NET callback bug?

you got to forgive me, I was wrong: the sub-VI is always uneditable, even if I set up a breakpoint and step... When I told you it partially worked I made a mistake and saw that I was able to edit the main VI (the main VI is always editable).

 

An additional observation I made is that not all the sub-VIs called from the main suffer from this problem, in fact it is apparently the "OnImageFrameAvailable Event Callback" VI - the only subVI called by using a Register Event Callback. Is it possible that the unregistering of the event at program's exit is programmed wrong? 

 

unregister.png

0 Kudos
Message 11 of 19
(2,847 Views)

Can you send new (with garbage collector) but minimum version?
remove all unnecessary UI elements and events. Only callback register/unregister.

0 Kudos
Message 12 of 19
(2,833 Views)

I dont know if I removed enough - it's a complex task since I dont know enough LV to understand what I'm doing.

Anyway, here's the main program main.vi (the skeleton of the full "TLSC alexxx v0.6.vi" I sent before)with, in the "GUI" case structure, another case structure with the "Start camera" event (where the register callback happens) and the "Close camera" event (where the event unregister happens).

Unfortunately taking out the 99% of the stuff has left the program broken here and there, but I hope it's clearer where are the two problem points

 

 

0 Kudos
Message 13 of 19
(2,828 Views)

It's again LV18, I need 16-17.
BTW, make simplest version without bracked arrow. And try it. We need minimum with trouble.

0 Kudos
Message 14 of 19
(2,825 Views)

I'm really sorry,

I tried the whole day but I was unable to simplify it (keeping only callback register/unregister) without breaking everything... it is a very complicated program!

0 Kudos
Message 15 of 19
(2,809 Views)

Here can be problem:

Collect -> close ref -> close cam (dataflow alloow)

gc1.PNG

 

and try move Collect to the end:

gc2.PNG

0 Kudos
Message 16 of 19
(2,806 Views)

really thank you for your help, but the move of Collect to the end doesnt impacts the problem.

 

I didnt understand your 1st observation instead: you mean that "close cam" should happen before the unregistering of the event callback ?

 

0 Kudos
Message 17 of 19
(2,801 Views)

@alzyx wrote:

really thank you for your help, but the move of Collect to the end doesnt impacts the problem.


This almost certainly means that not all .NET functions have terminated or you have not closed all links.

 


@alzyx

 I didnt understand your 1st observation instead: you mean that "close cam" should happen before the unregistering of the event callback ?


No, I mean that collector should happen after another both functions.
Now it called in parallel and can do it's work before another function(s).

 

Message 18 of 19
(2,799 Views)

I don't have the problem with the Quantalux CC215MU camera frolm Thorlabs. 

The library has been copied into :

C:\Program Files\National Instruments\LabVIEW 2021\instr.lib\Scientific Camera Interfaces\LabVIEW\64_bit\Library_X64

The program made by Alexxx is very helpful, based on the example given by Thorlabs. However, I could not understand very well where the values of the graylevel are obtained. I understand that it is hidden in a register event, and Alexxx added some input in this event register cluster reference, but I was not able to understand how to add more functions on image processing. 

For example, I would like to get the pixel intensity on a Line or ROI of the image, and substract a buffered image (defined as a reference image). So if I understand how the graylevel graph has been implemented, then I will try to make this image difference on the same principle. 

0 Kudos
Message 19 of 19
(1,408 Views)