From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Why won't half my servos work? (LabVIEW, Arduino & Linx)

Solved!
Go to solution

Hello there, you fine people!

 

I was hoping that some among you may be able to help me figure out what's going on here. All I'm trying to do is get six servos working from my Arduino Uno (it'll eventually be nine, if I can get this working. Baby steps), but only three work. Servos 1, 2 & 3 (channels 4, 5 & 6) work perfectly, but the other three don't do anything at all. 

 

You can ignore the "True" part of the case structure, I'm getting rid of that.

 

Here's a screenshot of the major part of my code (full VI attached as well), and my circuit layout. 

 

Does anyone have any ideas? I'm tearing my hair out here...

Servo & Motor Power Test.PNG

Circuit layout screenshot.PNG

0 Kudos
Message 1 of 28
(3,416 Views)

First thought, not enough power.

 

Second thought, you have 3 servos powered by 1 set of batteries, the other 3 powered by another set.  Possible battery or wiring issue?

0 Kudos
Message 2 of 28
(3,407 Views)

Hi RavensFan, thanks again for replying to one of my problems!

 

The power is powering, the ground is attached to ground. So it is written in the things I've found that say how to power stuff with batteries on Arduino.

0 Kudos
Message 3 of 28
(3,396 Views)

Perhaps you didn't fully understand what I was trying to ask you.

 

You have 3 devices powered by one set of batteries.

You have another 3 devices powered by another set of batteries.

 

If 3 of your devices don't work, then perhaps the problem is with one of those sets of batteries!

 

You described that channels 4,5,6 work and thus 7,8,9 don't.  If I can read your diagram correctly, it looks like 4,5,6 are powered by one set of batteries, and 7,8,9 by the other.   That sure seems like a pattern worth investigating!

0 Kudos
Message 4 of 28
(3,382 Views)

Aaaah, gotcha. 

 

No, that's a fair point. Sorry, I should've said I already tried swapping over the battery packs and they both work fine. Also tried swapping servos, so I know they all work.

0 Kudos
Message 5 of 28
(3,377 Views)

Did you put probes on the error wires to see if any of them are returning errors?

0 Kudos
Message 6 of 28
(3,374 Views)

I have now! No errors

0 Kudos
Message 7 of 28
(3,370 Views)

I don't think there is anything we can do to help you through the forum.  You are just going to have to use basic trouble shooting techniques on your own. 
Try each servo one at a time connected to just one channel.

 

Do the servos come with any software that let you run them?  See if the manufacturers software works for you.

0 Kudos
Message 8 of 28
(3,359 Views)

I had a little time today for some research. First according to LabVIEW MakerHub

 Can I branch / split the LINX Ref wire?


When you call the LINX Initialize VI it establishes a connection to the LINX device and the Init VI passes out the LINX Ref wire. You can think of this wire as the connection to the device and it contains all of the info needed to 'talk to' the device. You really shouldn't branch / split this wire because you only have one connection to the device. If you split the wire you don't get a new connection, you juts get the same connection. If you split the LINX Ref wire, the VIs downstream might both try to talk to the device at the same time. In this case a command might be sent to the LINX device before the previous one is complete, and the responses to the commands might get swapped resulting in incorrect data being returned. Since only one command can be sent at a time splitting the LINX Ref wire doesn't result in any performance increase and adds risk for incorrect data. When you call the close VI the connection is closed. This includes any copies of the connection in branched / split wires. Once the connection is closed you can no longer talk to the device unless you establish a new connection with the LINX Init vi.

 

 So basically you should not branch that reference wire. Since you are going to correct that you might as well use only one error wire and wire it through.

 That might not fix your problem since it seems that it has cropped up before

A resolution was found using more advanced LabVIEW concepts.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 9 of 28
(3,355 Views)

Hi GovBob, thank you for replying to my problem!

 

I've had to split the error wire because I need to be able to control the servos simultaneously. I'll get rid of my split Ref wire though, and let you know if it helps. Thanks for the tip!

0 Kudos
Message 10 of 28
(3,351 Views)