SD84 - servo controler - RS232 - Sytax?

I am now attempting to use the SD84 (an 84 channel servo controller) within VVVV via the rs232 node. I am unable however to figure out the format of the string i would need to use to send over the com port. As far as i can tell the SD82 is seeing something as I get a red led flash when i try to send a message, however no matter how I write the string I unable to get any information or trigger a response to the servo that is connected. Below is a screen of what the setup looks like on screen

The documentation for the SD84 can be found at http://www.robot-electronics.co.uk/htm/sd84tech.htm#Channel%20Modes
Apart from getting a red blinking led light on the board I’m at a total loss of what commands to send with this but its about the only way i could think of programming it myself.

I tried other various values until I felt a little woozy…some of these are are found below, but yeah any help getting this functioning would be awesome :cry:
Also for clarity I know the board is working as I have a demo app that comes with it and control servos quite will with a slider using the mouse
00xAA 0xA0 0x55 0x01 0x01 0x02 0xDC 0x05

0x01 00xAA 0xA0 0x55 0x01 0x01 0x02 0xDC 0x05

00xAA0xA00x550x010x010x020xDC0x05

0x0100xAA0xA00x550x010x010x020xDC0x05

SET_SERVO 00xAA, 0xA0, 0x55, 0x01, 0x01, 0x02, 0xDC, 0x05

SET_SERVO 0x01, 00xAA, 0xA0, 0x55, 0x01, 0x01, 0x02, 0xDC, 0x05

00xAA, 0xA0, 0x55, 0x01, 0x01, 0x02, 0xDC, 0x05

0x01, 00xAA, 0xA0, 0x55, 0x01, 0x01, 0x02, 0xDC, 0x05

0x01/00xAA/0xA0/0x55/0x01/0x01/0x02/0xDC/0x05

1 170 160 85 1 2 220 5

asascii-(string-hex) look at this module to convert your hex codes in real bytes. Leave out the 0x in your hex codes as seen in the helpfile.

Closer, now I get a green led and a red led…but still no joy in servo movement

Actually that did the trick, but the final step in getting it to see a command was for the board to be initialized. I only figured this out because I ran the test program that comes with it then closed that then opened vvvv again…this time it set the servo to the correct position…
Next question would be how to really get some usable position information into the hex format for example the servo controller wants low then hi values to set a position.
Low Byte High Byte
0xDC 0x05

trying to get this in with the rest of the string…unsure

Do you mean something like this?
I don’t think that’s the most effective way.
But it should work.

Convert the endianess (9.1 kB)

Gab you were close and thanks to you I was able to finish of that part of the patch to some point.
I’ve done a first draft of a test patch that mostley works, however I get some errors in the positioning(litle jumps to incorect postions). I can see that this is due to an incorrect Hex value which I see as a (?) in the output node under the AsAscii.
for example the value
1431.81520314548 or in Hex
AA A0 55 01 02 02 97 05 shows as
ª U?(cant really display some of those characters here)

but something is going wrong with some of the representations of the Ascii and im ot sure why yet.
Any more advice?

SD84_example_00.v4p (18.8 kB)

Hi Nava,
I don’t really know why there are little jumps in the movement.
But I’m quite sure it has nothing to do with the characters which are not being displayed. When you look http://www.asciitable.com/ you can see that the first 31 characters are only control characters which don’t have a displayable sign.

I wouldnt have any other clue otherwise but its probably human error on my part.
just for clarity I meant that the characters didnt display in the post(when I copied pasted) not in the output and that there is a “?” character in the output when the servo jumps(which from the Ascii table deosnt seem to be part of the Ascii syntax and sujests that it doenst know what todo with that value from the HEX ). Its definatley getting some sort of wrong message at some point as the test app I have has no problems iterating thorugh the full range of moment without these jumps.
Anyway its late here tierd more progress after some sleep:)
thanks again for helping

hi Nava , the jump could be some sort of lack of carriage return CR in the loop etc .

Thanks Milo do you know a way to set up some nodes testing for that? I used an LFO with a 60sec cycle but the jumps are still there. Or maybe a way to filter out data thats causing the problem?

Hi Nava, you could use http://com0com.sourceforge.net/ and a terminal programm like hterm or putty to proof that the created Signals are like you expect it. For timing testing you might need a logic analyzer or a good DSO (Digital Sampling Oscilloscope)

Ok I can see there is a problem with the AsAscii, either this or it doesnt like my High byte then low byte. By using the BYTE node after the AsAscii I can see its not converting the values correctly, for example when I see the ? i get something like 073f instead of the 0786. So it is something todo with the AsAcii.

Ive attatched the the patch so anyone can see, just be carfull when reading my ascii as the number is flipped for example 07 86 is 86 07, this is because my device wants the high byte then the low byte.

SD84_example_01_Ascii_errors.v4p (27.0 kB)

there is 64 bit version.
http://sourceforge.net/projects/com0com/files/com0com/2.2.2.0/
But I haven’t tried it yet.

thanks gab, can anyone else confirm they get the wrong output in the BYte node? Im on a 64bit system if that makes any diff what so ever

I think I’ve found the reason for your problem. the Ascii standard only defines the first 7-Bits so you could only have numbers until 0x80.
I don’t know how to fix that problem easily. The best solution would be a rs232 node which accepts values and not strings I think.

oh dear, not something I can do myself I think