LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1172 occured at Invoke Node Error calling method

Dear Community,

 

I am experiencing an issue while using the Kinesis KCube stepper motor to control stage motion in LabVIEW.

Following the Kinesis LabVIEW guide, I successfully implemented .NET control and can operate the KCube motor. 

(https://www.thorlabs.com/Software/Motion%20Control/Kinesis/Kinesis-labview.pdf)

 

However, when running long-duration measurements (>30 minutes), I encounter the following error:

I was able to control the Kcube motor but the Error 1172 happens when I run the long-time measurement (>30m)

 

It says 'Error 1172 occurred at Invoke Node Error calling method

Thorlabs.MotionControl.KCube.StepperMotorCLI

-KCubeStepper.MoveAbsolute,

(Thorlabs.MotionControl.DeviceManagerCLI.Dev

iceMovingException: Device already moving)'

 

8C3014C7-72CE-4097-A575-F29A5D508DAB_1_105_c.jpeg

 

I attempted to resolve the issue by introducing a 500 ms interval between successive movements to avoid conflicts. However, this modification did not resolve the problem, and the error persists.

Additionally, I observed that if I manually click "Continue" in the error message prompt, the measurement resumes temporarily. However, the same error message reappears after a short period.

 

I would like to understand the underlying cause of the "Device already moving" exception. Could this be due to a conflict between sequential movement commands?

Are there any recommended approaches to ensure smooth and uninterrupted operation for long-duration measurements?

 

Any guidance or insights would be greatly appreciated.

0 Kudos
Message 1 of 3
(199 Views)

Hi salsberry,

 


@salsberry wrote:

I would like to understand the underlying cause of the "Device already moving" exception. Could this be due to a conflict between sequential movement commands?

Are there any recommended approaches to ensure smooth and uninterrupted operation for long-duration measurements?


Error 1172 comes from calling external code, like dotNET nodes.

And the error message tells you the reason why that external part of software failed…

 

So the device driver tells you that the "device is already moving". I learned from our XY stage that sometimes the device might take longer, and will also answer with errors when there are reasons why it couldn't reach the target position in specified/expected time. You need to handle such errors in your code!

  • Some devices offers status registers to read their (movement) status and act accordingly.
  • Some devices offer commands to set a defined movement track and when told so will follow the whole track as best as they could.

In the end it boils down to RTFM…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(180 Views)

The error popup you see there, along with the behavior from the "Continue" and "Stop" button, are part of an optional feature of LabVIEW toggleable per VI, called automatic error handling.  You get that popup whenever you have a node generate an error but there's no wire attached to the output of the "error out".

 

Most developers who progress beyond the beginner stage turn this off and handle errors manually.  I recommend learning how to do that.

 

For your actual issue, instead of just blindly moving or waiting a fixed amount, I recommend checking the "Is device busy" property, and only continuing if it's not busy.

 

Extremely simplified example:

 

Kyle97330_0-1738777145512.png

 

 

0 Kudos
Message 3 of 3
(142 Views)