From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

KDC101 Motor: Simple and Continuous Adquisition and Logging not working

Solved!
Go to solution

Hi everyone, 

 

I have been working in a polarimeter, for which I am using two KDC101 motors and a power meter PM 100, all from Thorlabs. I wanted to base my program by using the template in Labview: Continuous Adquisicion and Logging, but I needed to added a new functionallity: Single Measure.

 

Basically, for doing one measure, the motor has to rotate a number of times (depending on the samples) and measure in each one of them the power received. I did at the beginning a very basic one, using just one event handler and the results are correct but when I was trying to implement the continuous case, I encounter the problem of having to call an event from another event (Continuous to Simple) which is not recommended, so I decided to try a new approach.

 

This new architecture is the one attached in the file. For some reason, when I run the simple case, the rotation is not done the number of times expected (For Loop is use in this part). Just once and the program stop.

 

I tried to put a sequence to force not to stop the pogram until the number of samples are done but didn't change anything.

I tried to do step by step but I do it like this, it works correctly. 

 

 

Can please, someone help me?

 

Thank you in advance.

0 Kudos
Message 1 of 3
(2,548 Views)

Hi ggarmendia,

first of all i'm not able to see al the .vi.. a library is missing.

Anyway, i would suggest you to test the motor in a separate .vi and eventually post that .vi.

 

0 Kudos
Message 2 of 3
(2,508 Views)
Solution
Accepted by topic author ggarmendia

Hi,

 

I managed to correct the error. The main problem was that all the methods from the motor that involves movement have a parameter bWait, that, according to the manual does the following:

 

If the bWait parameter is set to 'False', the method returns as soon as the homing sequence has been initiated. If bWait is set to 'True', MoveHome returns only after the motors have finished homing. In either mode, a HomeComplete event is fired once the homing sequence has been completed.

 

At the beginning, I set it to False since it was the default. When I changed it to True, then and only then, it worked properly.

 

The strange part is that I previously consider this and created a subVI to check the state of the motor and only continue if it stop but it seems to not have any effect (see attached).

 

Thank you for you answer and help.

 

 

 

 

0 Kudos
Message 3 of 3
(2,479 Views)