SIGGEN(9)
π SIGGEN(9) β HAL Component π
okay bestie, welcome to siggen, the signal generator of your dreams β¨ it lives in the HAL component family and it's literally the moment π
β¨ NAME β¨
siggen β a signal generator, periodt π
πΈ SYNOPSIS πΈ
loadrt siggen [num_chan=num | names=name1[,name2...]]
π¦ DESCRIPTION π¦
so siggen is a signal generator, right? and it's the girl for testing and any other application that just needs some simple waveforms π«Ά. it makes sine, cosine, triangle, sawtooth, and square waves β with variable frequency, amplitude, and offset β and you can feed all of that into other HAL components. it's giving "utility icon" ngl π
siggen supports a maximum of sixteen channels. how many actually get loaded? that's set by the num_chan argument when you load the module π§ alternatively, you can specify names= and hand it unique names separated by commas.
lowkey important:num_chan=andnames=are mutually exclusive, bestie. pick one. and if you specify neithernum_chan=nornames=? the default value isone. one channel. that's it. π
π NAMING π
the names for pins, parameters, and functions get prefixed like this:
siggen.N.for N=0,1,...,num-1 when you're usingnum_chan=numnameN.for nameN=name1,name2,... when you're usingnames=name1,name2,...
and the siggen.N. format is the one shown in all the descriptions below, so keep that in mind π
β FUNCTIONS β
siggen.N.update(uses floating-point) β updates the output pins for signal generator N. every single time it's called it calculates a new sample β¨ it should be called many times faster than the desired signal frequency, to avoid distortion and aliasing. no cap, call it fast or the waveform gets messy π
π PINS π
siggen.N.frequencyfloat in β the output frequency for signal generator N, in Hertz. the default value is1.0Hertz.siggen.N.amplitudefloat in β the output amplitude for signal generator N. ifoffsetis zero, the outputs will swing from-amplitudeto+amplitude. the default value is1.00.siggen.N.offsetfloat in β the output offset for signal generator N. this value is added directly to the output signal. the default value is zero.siggen.N.resetbit in β resets the output pins to pretermined states:sineβ0sawtoothβ0squareβ-1 * amplitudecosineβ-1 * amplitudetriangleβ-1 * amplitude
siggen.N.clockbit out β the clock output. a bit type clock signal output at the commanded frequency β°siggen.N.squarefloat out β the square wave output. it's positive whiletriangleandcosineare ramping upwards, and whilesineis negative.siggen.N.sinefloat out β the sine output. it lagscosineby 90 degrees.siggen.N.cosinefloat out β the cosine output. it leadssineby 90 degrees.siggen.N.trianglefloat out β the triangle wave output. ramps up whilesquareis positive, and down whilesquareis negative. it reaches its positive and negative peaks at the same time ascosineππsiggen.N.sawtoothfloat out β the sawtooth output. ramps upwards to its positive peak, then instantly drops to its negative peak and starts ramping again πͺ the drop occurs whentriangleandcosineare at their positive peaks, and it coincides with the falling edge ofsquare.
π PARAMETERS π
None. nothing. zero. empty. the void. π
that's the whole vibe check bestie, go make some waves ππ
LinuxCNC Documentation Β· 2007-01-16 β mwah, xoxo, go slay some HAL π«Άβ¨
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- debian trixie: linuxcnc-uspace 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms