SOURce:RPULse:POSition[:ANGLe] <degrees>,(@<ch_list>), to preset the angular pulse position in degrees. The algorithm will control the pulse duration.
SOUR:RPULse:VARType ANGLe,(@<ch_list>) to set the type of value that will vary with algorithm control (in this case pulse width ANGLe).
Example of variable width (by angle), preset position:
Set up channel 40 as the reference channel, and channels 45 through 47 to output variable width pulses:
sense rvel for reference channel 3 rotational pulse output chans preset channel 45 pulse position to 20 degrees
preset channel 46 pulse position to 140 degrees
preset channel 47 pulse position to 260 degrees
algorithm will control pulse width by ANGLE
Algorithm outputs pulses on all three channels with variable width.
ALG:DEF ’ALG1’,’static float Width1, Width2, Width3;O145 = Width1; O146 = Width2; O147 = Width3;’
ALG:SCALAR’ALG1’,’Width1’,5 | preset ch 45’s pulse width to 5° |
ALG:SCALAR’ALG1’,’Width2’,10 | preset ch 46’s pulse width to 10° |
ALG:SCALAR’ALG1’,’Width3’,15 | preset ch 47’s pulse width to 15° |
ALG:UPDATE | . |
INIT | start algorithm execution |
• |
|
• | calculate NewWidth(n) |
• |
|
ALG:SCALAR 'ALG1','Width1',NewWidth1
ALG:SCALAR 'ALG1','Width2',NewWidth2
ALG:SCALAR 'ALG1','Width3',NewWidth3
later, adjust channel 45’s width while algorithm is running later, adjust channel 46’s width while algorithm is running later, adjust channel 47’s width while algorithm is running
ALG:UPDATE