LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Crashes with Accumulating Errors During Z-Scan Measurements

Hi,

I've written a program to perform z-scan measurements, combining the Thorlabs moving stage NRT150/M and a Thorlabs photodiode connected to the Picoscope 4227 oscilloscope. The program includes fragments of MATLAB code.

Initially, the program worked fine, but after approximately 50 compilations, it started crashing with the following error: "exception: access violation (0xc0000005) at eip=0x00007ffbe7ea85dc". However, this error didn't occured with every compilation, mostly appearing towards the end of the program's execution or even when closing the entire project. After about 50 more compilations, the frequency of crashes increased to the point where I cannot run the program anymore.

I initially suspected an issue with the ActiveX method "MoveAbsolute," where choosing the parameter "True" caused the program to freeze. However, I wrote new code with "False" parameter in this method and it still has similar issues (working for a while and then crashing).

The problems don't seem to be related to hardware, as both devices function correctly with their default software. Additionally, the program doesn't work on another computer.

Is it possible that some error is "building up" within the program itself or within a SubVi?

I'm using LabVIEW 2020 on Windows 11, MATLAB 2023, both 64-bit.

I've attached the entire project with necessary SubVis and libraries.

Thank you for your help.

0 Kudos
Message 1 of 3
(347 Views)

I don't actually see an attachment on this post, so I can't look at your code directly.

 

However since you mention ActiveX methods, I assume you installed the "APT" library.  Thorlabs has two options, APT (ActiveX) and Kinesis (.NET).  I have used both and I have found that Kinesis seems to be a lot more stable.  I can't see the size of your program to get a handle on how much reprogramming you would need to do if you switched, though.  Adding Kinesis does mean that your program now has dependencies on nearly 100 DLLs as well.

 

Does the problem "reset" when you reboot?  Full reboot, not sleep/hibernate.  LabVIEW doesn't "build up" anything if you shut it down and start it back up again, so if there is something "building up" it's either on-disk or in a service of some kind that runs in the background of Windows.

0 Kudos
Message 2 of 3
(315 Views)

Thank you for your response, Kyle97330

.

I apologize for the absence of an attachment, and I hope you can see it now.

 

I appreciate your suggestion to switch to Kinesis from APT. I'll give it a try, as you mentioned, it shouldn't pose much of a problem.

 

Unfortunately, a full reboot of the computer didn't resolve the problem. I even attempted the program on another computer, but the issue persists with the program crashing.

0 Kudos
Message 3 of 3
(286 Views)