06-11-2012 01:39 AM
Hello,
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?
Ben
06-12-2012 05:51 PM
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!
06-15-2012 07:50 AM - edited 06-15-2012 07:51 AM
@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?
-CC
06-16-2012 05:41 AM
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?
06-16-2012 02:27 PM
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).
10-17-2012 04:52 AM
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! 🙂
10-18-2012 11:22 AM
Hi komangwiswakarma,
I see you have started this thread as well: https://decibel.ni.com/content/message/43121#43121
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.