SB-Bus Control

The SB-6668 is a member of the SB-Bus interface family. This means that it can be connected to the COM port of just about any Master computer together with 124 other devices.
Only a simple adapter is required to make the necessary conversion from RS-232 signal levels to the SB-Bus signals. Such an adapter can be as simple as a special cable that can connect just one device, or can be as complex as a complete multi-port driver that can drive up to 125 devices at the same time.

This chapter only gives you a brief overview of the SB-Bus. If you need more detailed information about the SB-Bus please read the description elsewhere on my site.


The communication on the SB-Bus is done at a fixed speed of 9600 baud, 8 data bits, no parity and 1 stop bit. All commands are given in understandable ASCII commands. Commands can be given in upper or lower case, for the software is not case-sensitive. Bit b7 of each character is always 0, because only the standard ASCII character set is allowed during communication.


In order to connect multiple devices to one bus system it must be possible to address each single device. Each device must have its own unique SB-Bus address. Such an address is a byte where b7 is '1', as opposed to normal characters where b7 is always '0'. Thus address bytes can have a decimal value from 128 to 255, or hexadecimal from $80 to $FF.
Addresses 128 ($80), 254 ($FE) and 255 (4FF) have a special function in the SB-Bus protocol, so you can choose any of the 125 other addresses as long as it is not already used by an other device on the same bus.
The SB-6668 can be set to any free SB-Bus address you like (see the description of the *SLAVE command). The SB-Bus protocol has reserved the address range from 170 ($AA) to 179 (B3) for measuring instruments. This is only a recommendation and you're free to choose any other available address.
You can do one of two things if you don't know the current address of a device:

  • You can try all possible addresses and wait for an answer from the device. Naturally this can take some time, especially if you have to do it manually.
  • You can use the *SLAVE command to set a new address. This can be done by connecting the SB-6668 as the only device on the bus, and selecting the general call address 255 ($FF).


SB-Bus devices respond with 3 different prompts. Such a prompt indicates the status of the device, and is always the last string sent by a device in response to a command. A device will not send any more characters on its own accord after sending one of these prompts.


OK Prompt. The last command was completed successfully. This prompt is also given $


Execution error Prompt. This prompt is given if the last command could not be completed without error. The *ERROR? command will tell you what kind of error occurred.


Syntax error Prompt. The command is not recognized by the instrument.


Two handshaking methods are described in the SB-Bus protocol. The main handshaking is done with the XON/XOFF flow control. With this protocol the receiving party can temporarily halt incoming data by sending the XOFF character (Ctrl-S). The receiving party can resume the incoming data again by sending the XON character (Ctrl-Q). This protocol is only used if the receiving party is unable to handle the incoming data fast enough.
The input buffer of the SB-6668 is 256 character long, which is long enough to receive normal commands and parameters. Therefore the SB-6668 will never have to send an XOFF signal to the master to slow down communication.

Acknowledge flow control is useful when transferring large amounts of data. The receiving party has to send an acknowledgement every time one line of data is received. The sender will transmit the next line only when the receiver has received the previous line correctly, otherwise the previous line is repeated.
Acknowledge flow control is only used when transferring multiple lines. Commands that can only send one line of data will never use acknowledge flow control.
You may decide whether or not to use acknowledge flow control. The Acknowledge flow control is a supplement to the XON/XOFF flow control, which will always be active.