LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Thorlabs DDS300 with LabVIEW

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

0 Kudos
Message 1 of 9
(474 Views)

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?

0 Kudos
Message 2 of 9
(457 Views)

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

0 Kudos
Message 3 of 9
(449 Views)

Here is the error I get.

Adit18_0-1707759193423.png

 

0 Kudos
Message 4 of 9
(447 Views)

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?

0 Kudos
Message 5 of 9
(437 Views)

Yes, I have DAQMX running in the code more than once. How do I know which instance of DAQMX is causing the error?

0 Kudos
Message 6 of 9
(378 Views)

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:

Kyle97330_0-1707933925494.png

 

0 Kudos
Message 7 of 9
(371 Views)

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

0 Kudos
Message 8 of 9
(305 Views)

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.

0 Kudos
Message 9 of 9
(296 Views)