I am trying to write an interface for the lynx 6 arm with the SSC-32 controller in C++ on a unix machine. I have tested the arm using lynxterm so I know the arm works. Unfortunately, I am unable to get the arm moving using C++ or the echo command.
I feel stupid for asking this but my question is, at the most basic level, how are the command strings sent? i.e. How do I send the string "#0 P1500 "? I have tried one character at a time terminated by the carriage return, but this doesn’t seem to work. Is there an initialization string that must be sent first? Can anyone offer some insight? I know I am overlooking something incredibly obvious and I thank you all for being patient with me.
I was able to read up here in the forums. It seems the CR is the trip up for C++. Format the data like this. #5 P1500 S750\r\n Let me know if this helped.
I don’t have access to the arm right now, I’m on my spring break. I will try that on Monday, but we did try a carriage return followed by a new line using the linux echo command. We thought we got some movement the first time we tried it, but nothing happened the next couple of times we tried it.
You’re generating simple strings at a known baudrate, set up a terminal program to “see” what you’re sending. Check the baud rates out. Compare with the functional strings you generated with Lynxterm.
I ran lynxterm on a windows machine and connected it via serial port to the arm and was able to get motion out of the arm. I then connected the windows machine to a unix machine and ran the command “tail -f /dev/ttyS0” on the unix machine which should display everything it receives via the serial port. When I ran lynxterm on the windows machine and pressed the “all = 1500” button, this is what I got: � ����J���z�11�!9z�!BB�!B)�i�!J)B�
It does not look like the serial port parameters on the unix box were correct. you need to set 115.2kbaud, 8 bits, no parity, 1 stop if I remember correctly.