SignalGenerators
SignalGenerators holds one SignalGenerator per channel and drives them as a group.6 minute read
SignalGenerators holds one SignalGenerator per
channel and drives them as a group. Setting enable here starts and stops
every channel at once, and the two fade times apply to all of them — so a
multi-axis test is one write rather than several.
Everything else stays per channel. Each generator keeps its own waveform, amplitude, frequency, phase and offset in its own sub-tree, so a group can run three axes at three phases, or one sine and two flat lines.
flowchart LR
i1(["enable — starts and stops every channel"]) --> B["SignalGenerators"]
This block publishes no outputs of its own. Read each channel’s signal from its own sub-tree:
signalGenerator01/output,signalGenerator02/output, and so on.
While group control is on, three of each generator’s settings are
overwritten every cycle — its enable, enableFadeTime and
newSettingFadeTime. Writing them in a sub-tree has no effect. Set
disableGroupControl if you need per-channel control of those three.
Signals
Inputs
| Path | Unit | Range | Description |
|---|---|---|---|
enable |
- | - | Starts or stops every channel, unless disableGroupControl is set. Each channel ramps over enableFadeTime rather than stepping. Not persistent. |
Outputs
None at this level. The group’s signals are only available per channel, at
signalGeneratorNN/output. The same applies to every diagnostic — isStable,
stableCycleCnt, enableIsOn and the rest are all per channel.
Parameters
| Path | Unit | Default | Range | Effect |
|---|---|---|---|---|
enable — see above |
||||
newSettingFadeTime |
s | 5.0 | 0 upward | How long a setting change takes to apply, for every channel. Lower it for quick commissioning. |
enableFadeTime |
s | 5.0 | 0 upward | How long starting and stopping takes, for every channel. |
disableGroupControl |
- | false | - | False lets this block drive every channel’s enable and fade times. True hands those three back to each channel’s own sub-tree. |
These three are persistent and survive a restart.
The signal settings live below this block, one sub-tree per channel:
signalGenerator01, signalGenerator02 and so on, numbered from 1. Each
carries the full set described in signal-generator.md
— waveform, amplitude, frequency, phase, offset, dwell and noise, plus that
channel’s outputs and diagnostics.
None of those signal settings is persistent. Every channel comes back after a restart with zero amplitude and zero frequency.
Setup
-
Count the
signalGeneratorNNsub-trees to find how many channels this instance has. They are numbered from 1, sosignalGenerator01is the first. -
Leave
disableGroupControlfalse so the group drives every channel’s enable. -
Set
newSettingFadeTimeandenableFadeTime. One or two seconds suits commissioning; the five-second defaults are conservative. -
Configure each channel’s waveform, amplitude, frequency, phase and offset in its own sub-tree, following
signal-generator.md. Start every amplitude at 0. -
Set
enabletrue. Every channel ramps to itsoffset; confirm each channel’s ownenableIsOngoes true. -
Raise the amplitudes one channel at a time, watching the machine.
Step 6 moves the machine on every channel you have configured. The group enable started all of them at once, so an amplitude left over from earlier work on another channel will move that axis too. Check every channel’s amplitude before enabling.
-
Before measuring, confirm every channel’s
isStableis true. There is no aggregate flag — you have to check them individually.
Tuning
All the waveform tuning is per channel and is described in
signal-generator.md. What is specific to the group:
- Use the group
enableas the master switch for a multi-axis test. It is the reason the block exists. - Set the two fade times here rather than per channel — they are overwritten in the sub-trees anyway while group control is on.
- Set
disableGroupControlonly when channels genuinely need different enable timing. It hands back all three settings at once, not just the one you wanted. - For a phased multi-axis excitation, give each channel the same waveform,
amplitude and frequency, and stagger the
phasevalues. - When sweeping, write each channel’s new frequency, then wait until every
channel’s
isStableis true before measuring. - Remember the cost. Every channel evaluates all seven waveforms and draws noise every cycle whether or not it is in use — an unused channel in a group costs the same as a used one.
Each channel is independent apart from the enable and the two fade times.
| Symptom | Cause | Action |
|---|---|---|
| There is no output on this block | Expected: it publishes none | Read signalGeneratorNN/output per channel |
Setting a channel’s enable does nothing |
Expected: the group overwrites it every cycle | Use the group enable, or set disableGroupControl |
| Setting a channel’s fade time does nothing | Same cause — both fade times are overwritten too | Set them here, at the group level |
| An axis moved that I did not expect | The group enable started every channel, and that one still had an amplitude set | Zero the amplitudes you are not using |
| One channel is flat and the others work | That channel’s amplitude or frequency is 0 | Set them in its sub-tree |
| Everything is flat after a restart | Expected: no channel’s signal settings are persistent | Reconfigure them; keep your test settings elsewhere |
| I cannot tell when the whole group is settled | There is no aggregate flag | Check each channel’s own isStable |
| Channels started at slightly different times | Not possible with group control on — they share one enable and one fade time | Check disableGroupControl is false |
| Channels need different enable timing | Set disableGroupControl, then set each channel’s own enable and fade times |
Note this hands back all three settings |
| The block costs more processing time than expected | Every channel computes all seven waveforms and two noise draws every cycle | Size the instance to the channels you actually use |
| I cannot reset the group’s fades from the parameter tree | Those helpers are available only from an application | Use each channel’s own resetEnableSwitch |
A starting point for a three-channel group, quick to retune:
disableGroupControl = false
newSettingFadeTime = 1.0
enableFadeTime = 2.0
enable = false
Then configure each signalGeneratorNN sub-tree from
signal-generator.md’s starting point and enable the
group last.
Limits and errors
| Limit | Set by | What happens | Reported |
|---|---|---|---|
| Group outputs | Not published | This block registers no outputs. Every signal and diagnostic is per channel, in its own sub-tree | Not applicable |
Per-channel enable and fade times |
Overwritten | While disableGroupControl is false, all three are written from this block every cycle and a sub-tree write is discarded |
Not reported |
| Aggregate status | Not available | There is no group isStable, isEnabled or cycle count. Check each channel |
Not applicable |
| Persistence | Fixed | The three group parameters persist. No channel’s signal settings do | Not reported |
| Fade times | Nothing | Not checked | Not reported |
| Processing cost | Fixed | Every channel runs its full generator every cycle regardless of whether it is producing anything | Not reported |
| Group reset helpers | Not exposed | Resetting every channel’s fades at once is available only from an application | Not applicable |
| Channel count | Machine configuration | Fixed once the controller starts. Count the sub-trees to discover it | Not reported |
| Everything else | — | See signal-generator.md, which applies per channel |
— |
The block raises no errors or warnings and logs nothing. Every failure above shows as a value on a trace, not as a message.
Verified against motorcortex-control3 3.30.0 (bc348fd).