Knowledge Base

The SL100 with late Firmware revisions can respond to UV instructions that address the CPU device. Some of the responses are dependent on the hardware configuration.

Board Type

The board will respond to the following board-type poll:

  SPxPoll2      3,!CPU

by placing its board type identification number on U0 and U1. The response is a function of the type (model) of board and the number of connected XPice expansion boards (e.g. XBIO16XIRO16HIO16). The numbers can be fetched from U0 and U1 by the PushU instruction.

The following table defines the responses for the SL100 with varying amounts of expansion:

ConfigurationU0U1
SL100016
SL100+16XPice017
SL100+32XPice018
SL100+48XPice019
SL100+64XPice020

Note that you can discover in this way how much expansion has been added but not the type of board.

Interpreting the number of XPice points can be a little tricky. For boards with segregated inputs and outputs, like XIRO16 and HIO16, each 8I/8O board corresponds to 16 XPice points. For the XBIO16, each bidirectional point corresponds to one input and one output (and appears as such on the SPLat/PC screen). That means one XBIO16 board gets counted as 32 XPice points although it only adds 16 I/O points to your configuration.

PWM base frequency (Dialect 20 or later)

The analog outputs on the board are generated by a pulse width modulated digital pulse train which is filtered (averaged) by an analog filter to produce a DC output. Normally the frequency of the PWM pulse train is 16kHz. The base frequency can however be altered using the instruction:

SPxCmd1          0,!CPU

with register U0 preset to a value between 0 and 7. The resulting PWM frequencies are given in the following table:

U0PWM frequency
016kHz (Default)
18kHz
24kHz
32kHz
41kHz
5500Hz
6250Hz
7125Hz

Any other value will result in a fatal runtime error.

All analog output pins are affected. This feature is designed to be used with PWM output circuits such as DC motor speed controls. Be aware that a low PWM frequency will have an impact on any actual analog (filtered DC) outputs. Our filter circuits are normally designed for the default PWM frequency. Using a much lower frequency will produce ripple in the DC output.

When used with an AnOut instruction, the resolution is 8 bits. With fAnOut it is 10 bits.

Modify SuperTimer 10mS clock interval (Dialect 20 or later)

You can change the basic 10mS SuperTimer clock interval to some other value. Set U0 to the required value in mS and then execute a

         SPxCmd1         1,!CPU

This affects all timers that use the SuperTimer mechanism, which is any timer that can have a duration counter up to 16,777,215 (PausefSTTimeSinceWaitOnT, etc). If you set the interval to 1, the timing will run 10 times faster than normal. If you set it to 256, the timing will run 25.6 times slower than normal giving you a timing range of 49.7 days. Due to the resolution of the internal math, the re-scaling will produce an error of up to 0.2% at the slow end of the scale. The actual error will be the error produced by rounding 65,536/U0 to the nearest integer. If U0=0 it reverts to the default 10mS.

Note that it makes little sense to run the SuperTimers with a clock that is faster than the “loop time” of your program.

CPU temperature readout (Dialect 21 through 27 or later (Deleted after 27))

An SPxPoll4 0,!CPU returns the floating point temperature of the CPU chip in °C at locations U(0) –> U(3)

An SPxPoll4 1,!CPU returns the floating point temperature of the CPU chip in °F at locations U(0) –> U(3)