Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO Servo Demo not working: Servo sweeps back and forth

Solved!
Go to solution

Hi all,

 

First time using LabVIEW and myRIO and I thought I'd run the Servo demo. The issue that it displays the following error:

 

Error Display.PNG

 

If I choose to ignore the error my servo works but does not stop at a point (hold the angle) and rather sweeps back and forth. This can be seen in the following video: 

 

https://youtu.be/z3Eluin3sWo

 

I'm honestly at a loss, I have next to no experience with this hardware and software and the standard demo software won't run. I am using a Corona CS-239MG analogue servo.

 

Any help will be greatly appreciated 🙂

0 Kudos
Message 1 of 10
(7,615 Views)

Hi Rhettyj92,

 

From the error message, it looks like you might not have the CompactRIO driver installed. You can check this by opening NI MAX, expanding Remote Systems, finding and expanding your myRIO in the list, and looking under the Software option. It should list all of the software and drivers installed on the device, so if you don't see NI CompactRIO on the list (or if the version of the driver doesn't match the version of LabVIEW you're running), you'll want to install the correct version. This article walks you through that process.

 

Let me know if you're still running into difficulties after installing the correct version of the drivers, and we can dig into what else may be going on.

 

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 2 of 10
(7,597 Views)

Hi Katherine,

 

I've checked and it is installed with the right version. I'm not sure why it comes up? Have you seen the way that the servo is moving on the video link I posted?

 

Thanks for the help 🙂

0 Kudos
Message 3 of 10
(7,584 Views)

Hi Katherine,

 

I've checked and it is installed with the right version. I'm not sure why it comes up? Have you seen the way that the servo is moving on the video link I posted?

 

CompactRIO present.PNG

 

Thanks for the help 🙂

0 Kudos
Message 4 of 10
(7,584 Views)

Hi Rhettyj92,

 

I saw that video, and it did seem like odd behavior. It looks like your drivers are there, and they should be compatible with LabVIEW 2015. I have a few other questions for you, to help narrow down what else might be going on here:

 

-Do you have a link to the user's manual for the Servo?

-Can you take a picture of the physical connections between the Servo and the myRIO?

-What is the name of the example file you're running, and where did you find it? Ex: was it a shipping example that came with LabVIEW, did you download it from our community examples, etc.

 

Because it looks like the drivers are compatible, I'd like to investigate the hardware and software sides of the issue next.

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 5 of 10
(7,562 Views)

Hi Kathryn,

 

Apologies for the late reply. 

 

1-Here is a link to the servo manual/specs: http://www.corona-rc.com/coproductshowE.asp?ArticleID=236

2- Here is a picture of the connections:

20160728_160518.jpg

 

3- The demo is from the NI site: http://www.ni.com/academic/myrio/project-guide-vis.zip

 

I've tested the software with a K-King HK15178 and it worked perfectly. The Corona CS-239MG however has the specs that I need for my application.

 

Thanks so much for the help, I honestly feel like I'm going crazy! Servo control should be so easy!

0 Kudos
Message 6 of 10
(7,536 Views)

A video of the same software working with another servo (HKing HK15178)

 

https://www.youtube.com/watch?v=wQT58JLkuR8

 

0 Kudos
Message 7 of 10
(7,531 Views)

It's a bit hard to see where the wires are connected to the myRIO in your picture- can you list what pins the brown, red, and orange wires are connected to?

 

The fact that the demo works with one servo but not the other makes me think that the Corona servo may be looking for different kind of input than the demo program is sending out. I didn't see anything about communication protocols or any advice on connecting the servo on the spec sheet, so that's what I would investigate next, if I were in your shoes. Have you tried reaching out to Corona for more information on their device?

 

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 8 of 10
(7,517 Views)
Solution
Accepted by rhettyj92

Hi Kathryn,

 

Thanks for all the help, you were immensely helpful 🙂 The solution was that I needed to power it from a battery pack as the myRIO was supplying far too little current. I found the solution in another NI forum and the OP was experiencing exactly the same issue. I have a battery pack on order and will update with the results. 

 

Kind regards,

Rhett

0 Kudos
Message 9 of 10
(7,450 Views)

Hi Rhett,

 

Definitely keep me updated once the battery pack arrives, I'm curious to see whether increasing the current provided to the motor fixes the issue. Motors can do some strange things when they don't have enough power, though, so I could see that being the issue here.

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 10 of 10
(7,438 Views)