Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Control K-Cube Thorlabs from realtime device

Hi, 

I would like to be able to control motor controller K-Cube from Thorlabs by using NI RT device. I wonder if any body have experience with it or have any related information can share with me.

Thank you in advance.

 

Regards,

Thang Nguyen

0 Kudos
Message 1 of 11
(4,559 Views)

I would like to update that I followed the APT tutorial and be able to create the demo software to run with the controller on Windows. But what I want is be able to controller from RT device. I wonder if there is any low level communication methods I can use to create a driver for this controller or not.

0 Kudos
Message 2 of 11
(4,548 Views)

If you post a link to the APT tutorial you completed in Windows that might be helpful.

 

How does LabVIEW communicate with the controller in the tutorial? (assuming the tutorial uses LabVIEW)

 

Most communication protocols that work on Windows also work on Linux so I don't imagine it would be too difficult... unless they use a proprietary driver or .dll to handle the communication.

0 Kudos
Message 3 of 11
(4,530 Views)

Brettski,

Thorlabs provides either .Net software (Kinesis) or ActiveX software (APT) as in the link below 

https://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=2419&pn=KDC101#5077

 

I also found a document about communication protocol but without example I cannot figure out how to use it. 

https://www.thorlabs.com/Software/Motion%20Control/APT_Communications_Protocol.pdf

0 Kudos
Message 4 of 11
(4,524 Views)

The .Net and ActiveX methods of communication will not work as those technologies are not available on NI RT devices.

 

The manual you linked says that the "controllers provides a USB and an RS-232 interface to communicate with the host PC."

 

This is promising as RS232 communication is fairly trivial to setup (search the LabVIEW example finder for... examples). However, a quick look at the linked Communication Protocol document you provided looks like the programming could be quite involved as they give you access to some pretty low level stuff.

 

Can you provide more details about what you are hoping to accomplish?

0 Kudos
Message 5 of 11
(4,518 Views)

I understand that I cannot use .Net and ActiveX to work with RT because that is only supported on Windows. I just wonder how can I send the Message described in the manual. It does not look like a typical string message I can just sent by RS232.

I would like to write the driver to control this controller to move the servo.

Thank you.

0 Kudos
Message 6 of 11
(4,514 Views)

Looks like they are using hexadecimal.

 

Check out this Knowledge Base article on sending Hex over VISA (RS232)!

0 Kudos
Message 7 of 11
(4,509 Views)

@Brettski: Thank you. Look like it will take a lot of time if using this method.

 

 

0 Kudos
Message 8 of 11
(4,506 Views)

You have to enable the transmittion property of serial port setup. This example works. There is an issue. If you send a wrong command (see attached protocol) to K-cube, the K-cube blocks communication. To reset the communication you have to disconnect and reconnect the power supply of the K-cube. 

0 Kudos
Message 9 of 11
(2,627 Views)

@diedas: could you please help me save the file as 2016 version.

 

Thank you very much for your help!

0 Kudos
Message 10 of 11
(2,618 Views)