02-12-2024 10:28 AM
Hi,
I am trying to make a VI to control a ThorLabs stage using the kinesis controller. I am trying to make an iterative loop so that the stage moves back and forth between two specified points but I can't figure out how to do so. Can someone with experience help me?
Screenshot with what I currently have attached.
Thanks
02-12-2024 11:15 AM
Do you get any errors at all? There's no error handling shown in your screenshot and I can't tell if you have automatic error handling on, and if you don't then you could be getting errors and not seeing them.
Also, I can't see your initialization. Do you write both a channel number and a serial number at the start?
02-12-2024 11:29 AM
Hi Kyle,
Thanks for your reply.
I was able to get the loop to work but now the issue I am facing is that when I run the code, LabVIEW freezes until the loop is complete.
Screenshot attached.
Thanks
02-12-2024 11:33 AM
Here is the error I get.
02-12-2024 11:41 AM
That is a DAQmx error. Any Thorlabs Kinesis error you see in LabVIEW should be error 1172, not -200279 or any other number.
Do you have DAQmx code running somewhere in that VI, or in another VI you're running at the same time?
02-14-2024 09:38 AM
Yes, I have DAQMX running in the code more than once. How do I know which instance of DAQMX is causing the error?
02-14-2024 12:05 PM
Connect the error wires of all related DAQmx VIs. Add something in your program that checks for errors manually instead of relying on the automatic error handling. Then add in something that shows you where the error came from.
This is a pretty bad example but I put it together quick:
02-23-2024 11:29 AM
Hi Kyle,
Thanks for your inputs. I tried what you suggested but I still haven't been able to solve the issue. Do you mind looking at my VI?
Best
02-23-2024 12:00 PM
I can't view that file as I am on LabVIEW 2021, and many other forum users are also users of older versions. The general recommendation is to save your files back to LabVIEW 2019 or so, to ensure the most people can see them.
I can tell from the size of your file that you likely have a huge amount of things in one gigantic VI. Most people aren't going to want to sift through that. Additionally, since the title of your post has to do with Thorlabs problems, people who know about DAQmx but not Thorlabs are likely going to skip it. I use DAQmx on occasion, but not very often so there are likely other people who could spot the actual problem much easier.
I would recommend that you copy all your DAQmx code into a new VI by itself, run it to confirm you replicated the error, and then post that VI back-saved to 2019 in a new post specifically about the problem you're having with just DAQmx.