# Siematic SPS Controllers

Siematic SPS controllers are used at SinQ for handling all the things which fit in nowhere else. Such as operating air cushions on some instruments, reading variables from ADC's, reading status of shutters or other parts of the instrument and the like. Those SPS units have an RS-232 connector and understand a simple ASCII command protocoll. The Siematic SPS and its command protocoll are special to PSI and this section is probably of no interest to SICS managers outside. The SPS basiaclly support three operations:

- Push a button.
- Request status of instrument status packed into a bit.
- Read an ADC.

This is so user unfriendly that the usage of the SPS will mostly be packaged into Tcl-macros.

A SPS unit can be configured into the SICS server with the command:
MakeSPS name macintosh port channel
The parameters are: the name of the SPS in SICS, the serial port server computer, the port where the serial port server is listening and the channel number of the SPS unit at the serial port server computer. An example:
MakeSPS sps1 lnsp25.psi.ch 4000 6
configures a SPS unit at lnsp25.psi.ch at channel 5. The serial port server is listening at port number 4000. The SPS unit will be accessible as sps1 in SICS.

After configuartion the following four commands are understood by name, shown with sps1 as example:

sps1 push byte bit
  Corresponds to pushing the button mapped to the bit bit in the byte byte.
sps1 adc num
  Reads the value in the ADC num. num can be between 0 to 7 for a maximum of eight ADC's. Please note, that the values read are raw values which usually must be converted in some way to physically meaningful values.
sps1 status bit
  Reads the status of the bit bit. bit can be in the range 0 - 128.
sps1 stat2 byte bit
  Reads the status bit bit in status byte byte. Is equivalent to status, but adds some syntatctic sugar.

For all conversion factors, for all mappings of bytes and bits, consult the electronician who coded the SPS.