SSC 32 response protocol

Hi,
I am programming communication with an SSC-32, and have a question about the command/response specifications:
Suppose I am sending a command for which I expect a reply, for example “VER”. My program sends four bytes (including cr) out the serial port and I then start reading the ASCII characters coming back. How do I know when I have read the complete response string? Does it always end with some specific character like a carriage return?
Regards,
Joe

Look at my Python code in this thread and you will see how to do what you want. I am not doing anything fancy in the code, so it should translate easy to whatever MCU you are using. The ‘\r’ is the RETURN character.

8-Dale

The user manual doesn’t mention any end of string terminating character.

All commands are terminated with a CR (RETURN), and so is all output from the SSC-32. I just know that is what works. :smiley: The user manual does say all commands to the SSC-32 must be terminated by a CR (RETURN).

8-Dale

It would be easy to check using an application like Portmon to see the bytes returned from the ssc-32. I don’t think the commands to the ssc-32 is what is being asked about.

Hi Linux guy,
Thanks for the information. I have used python before so I can see exactly what you did in your code. I will be writing my control programs in Java. (Yes, I am very definitely a member of THAT church. In fact, is not inconceivable that some of the code you posted in the other thread ends up being fed to the insatiable javac beast. :wink: )
regards,
Joe

PS:

zoomkat Wrote:

zoomkat my friend, the map is not the territory.

Zoomkat wrote:

Good idea. It turns out, for example, the “VER” command returns a terminating CR while the “Q” command only returns a single byte. I haven’t check out any of the others yet.
Regards,
Joe

I’m getting the info you want from Mike D.

All I ask is to give credit where credit is due. :slight_smile:

8-Dale

The general rule is: commands that return ASCII strings end with a carriage return, and commands that return binary values or single ASCII characters do not.

The A, B, C, D, AL, BL, CL, DL, Q, and XQ commands all return a single ASCII character, without a terminating CR.

The QP, VA, VB, VC, and VD commands all return binary values, without a terminating CR.

The VER command returns an ASCII string, with a terminating CR.

Thanks Mike!

Thanks, Mike and Jim.

in visual basic,
How to read binary value returned with the VA command ?

Thanks