In UserDefined Mode, the SmartSampler executes a sequence of instructions defined by the user. Each instruction is written on its own line and follows this general structure:
F#,T#,S#,O#,P#,I#
Where:
- F# = Function number
- T# = Time parameter, target line, or mode (depending on the function)
- S# = State or secondary parameter
- O# = Output number (only for functions that control outputs)
- P# = Sub-program selection (optional)
- I# = Invert flag (only for output control functions)
Not all functions use all parameters. Unused parameters may be omitted.
The program uses the configuration defined in the GUI (sensor inputs, modules, timing settings, output modes). The User Program controls the sequence in which actions occur.
Accessible Variables
The following variables can be used in User Programs and User Formulas.
Sensor Variables (A to D)
These correspond to the sensor string positions selected in the GUI. They are updated automatically after each sensor read.
| Variable | Meaning | Type | Range | User Editable |
|---|---|---|---|---|
| A–D | Sensor inputs | float | Sensor dependent | No |
User Parameters (G, H, J, K, L, M)
Editable under
Basics -> Home
| Variable | Meaning | Type | Range | User Editable |
|---|---|---|---|---|
| G, H, J, K, L, M | User parameters | uint16_t | 0 to 65535 | Yes |
Formula Result (R)
Contains the result of the most recently evaluated formula.
| Variable | Meaning | Type | Range |
|---|---|---|---|
| R | Formula result | double | Full double precision |
Counters (X, Y, Z)
General-purpose counters used for loop control or conditional logic.
| Variable | Meaning | Type | Range | Editable |
|---|---|---|---|---|
| X–Z | Counters | uint32_t | 0 to 4,294,967,296 | Indirectly via F15 |
Function-Specific Identifiers (I, O, T, P, S)
These letters are not variables. They are parameter labels used inside function definitions:
- I = invert flag
- O = output reference
- T = time or mode
- P = sub-program
- S = state or secondary argument
These are not numeric variables and cannot be used in formulas.
