SX10500 template
The SX10500 Active Template provides easy access to a SX10500 dual thermocouple Xwire peripheral board. The board supports two K-type thermocouples and gives temperature readings from 0ºC to 1024ºC with 0.25ºC resolution. The board uses the MAX6675 chip and reflects its performance.
The template settings are:
Name box
When you Save your altered template and settings, the file produced will have this name with the extension .tp1. The name will also be used in all the program labels in the generated code, including the subroutines used to access the code generated by the template. If you change Name then all subroutine names will change.
Save button
Saves the current settings in a template file named whatever you have set in the Name box
Builder button
When depressed, the code generated will contain Builder tags. SPLat Active Templates are designed primarily to be used with Builder. Builder gives you the ability to make your programs modular, with the various module (files) only being linked together into a single SPLat program late in the process. This template optionally inserts Builder segment tags into the generated files. You should study the code in the preview window to determine which tags you must specify in your build (*.b1d) file and how to qualify them (e.g. ONCEONLY
).
Preview button
Opens and closes the code preview pane
Xwire address box
Whatever you type in here will be used as the Xwire address for the board. Please study the documentation for the board to determine how to set its address and what addresses are possible. You can use a symbolic name in this box so long as elsewhere in your program you assign to it the correct numeric address via a EQU
directive.
Channels
Allows you to select to support one or two channels. If you select one channel, it will correspond to the TH1 input on the SX10500 board.
Scale
Allows you to select between the result being scaled in ºC or ºF. The native mode of the measurement chip is ºC, in 0.25ºC steps, so in ºF mode you will get readings spaced 0.45ºF apart.
Access method
If you select 2 channels, you have a choice of how to extract your readings.
Assuming you fully understand MultiTrack and the use of the J register for jndexed addressing, you can take advantage of the jndexed mode of the template. You will get one subroutine to call for both channels. The number in J determines which channel will be returned, 0 or 1. Caution: The code does not check that J contains a valid value. The number must be 0 or 1. |
|
indexed | In indexed mode you get one subroutine to call for both channels. The number in I determines which channel will be returned, 0 or 1. |
separate subroutines | If you select this mode you will get 2 separate subroutine for retrieving readings from the two channels. |
You can determine what subroutine name(s) to call from the generated code in the preview window.
Filtering
The board itself contains adjustable software noise filters on each channel. These simulate a simple RC low pass filter with a range of time constants from 1 second to 10 minutes. You can select separate filter time constants for each channel. If you check "change at runtime" you will get subroutines that let you change the time constants on the fly (at runtime). In that case your settings will be the initial values.
In brief, one time constant is the time it takes for 63% of a step change to propagate to the result.
Caution: With very long time constants you won't see the effect of temperature changes instantly. Don't mistake this for a fault.
Update checks
If the button in the top righthand corner is depressed, the template will automatically check online for any updates whenever it is run, assuming you have a live Internet connection.
Header comment
You can type whatever you like into this box. It will appear in the generated code as a comment near the top.
Using multiple SX10500 boards
If you need to use two or more SX10500 boards, simply use a separate copy of the template for each board and give them different names and addresses. The boards will have to be set to different bus addresses. There are 8 possible addresses. If you need to use more than 8 boards just contact us and we will prepare boards for you with a different set of addresses to chose from.