Showing results for 
Search instead for 
Did you mean: 

Servo control via XBEE


im using labview to control a servo motor via xbee (mounted on explorer shield), I want to control the angle of the motor (0 to 180) so I used a numeric object to set an angle, and I've connected it to a "To Decimal" (Converts number to a string of decimal digits width characters wide). The thing is that it sends me other numbers then those I inserted for example instead of 1 it sends 49. And for 2 digit number it sends 2 digit number twice. Anyone encountered this kind of problem. What kind of radix is that?


0 Kudos
Message 1 of 7

Hi Ben,


Would it be possible for you to post some screenshots of the code and the behavior you're seeing?  I think that might us better identify the problem.


Have a great evening!

Michael B.
Applications Engineer
0 Kudos
Message 2 of 7


@BenHerut wrote:

I've connected it to a "To Decimal" (Converts number to a string of decimal digits width characters wide).........


.........instead of 1 it sends 49. 

That would be right - the decimal representation of the character 1 is 49. I haven't used any of the kit you talk about, but is the "To Decimal" necessary?



"If anyone needs me, I'll be in the Angry Dome!"

0 Kudos
Message 3 of 7

my goal is to control a servo motor/ i want to supply to the motor a number between 0 to 180 that represent the angle of it's arm. as you can see in the pic attached, i have used a kind of numeric control that sends a DBL number and therefore i used a "Number To Fractional String" with precision 0 to convert it to a string in order to send it with Xbee connected to the PC. in the other pic attached is the number received by the Arduino (that the motor is connected to). it is some kind of representation of each digit sent. all i want is to send lets say 90, and to get 90 in the other end. how can i do it?

Download All
0 Kudos
Message 4 of 7

Just a guess here, but decimal 49 is the ASCII decimal for the character "1". You may be sending strings over the serial port and the Arduino is interpreting them as decimals.


If that's the case, you'll either have to convert the string to a number on the Arduino side (don't remember how), or pass it differently on the LabVIEW side (harder to debug using serial terminal).

Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 5 of 7

hello, iam a noob in Labview and also Arduino, but i try to learn it step by step, Currently i have a problem on how to creating communication between labview and arduino using Xbee so that in the end of this small project, i able to control one or more servo from the labview. I've tried several tips from discussions in this forum, but nothing can seem clearly make me through it. I'm using Arduino Uno, Xbee 1mw and i already got these xbees communicating to each other with xctu. 


If anyone kind to help me, i would appreciate it so much, Thanks! 🙂

0 Kudos
Message 6 of 7

Hi komangwiswakarma,


I see you have started this thread as well:


Typically the Arduino forums are the best channel for questions like this, and it looks like you are already recieving some support through that thread. If anyone has suggestions or help though feel free to post them on this thread.  We try not to have duplicate threads in our forum.

Andrew T.
National Instruments
0 Kudos
Message 7 of 7