SOUR:RPULSE:POS:ANGL 140,(@146) SOUR:RPULSE:POS:ANGL 260,(@147) SOUR:RPULSE:VART TIME,(@145:147)

preset channel 46 pulse position to 140 degrees

preset channel 47 pulse position to 260 degrees

algorithm will control pulse duration by TIME

Algorithm outputs pulses on all three channels with preset duration.

ALG:DEF ’ALG1’,’static float Width1, Width2, Width3;O145 = Width1; O146 = Width2; O147 = Width3;’

ALG:SCALAR’ALG1’,’Width1’,.005

preset ch 45 pulse width to 5ms

ALG:SCALAR’ALG1’,’Width2’,.010

preset ch 46 pulse width to 10ms

ALG:SCALAR’ALG1’,’Width3’,.015

preset ch 47 pulse width to 15ms

ALG:UPDATE

 

INIT

start algorithm execution

 

ALG:SCALAR 'ALG1','Width1',NewWidth1

ALG:SCALAR 'ALG1','Width2',NewWidth2

ALG:SCALAR 'ALG1','Width3',NewWidth3

ALG:UPDATE

calculate NewWidth(n)

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 values in update queue sent to variables

Figure 24. Fixed Position, Variable Width by Time

36 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP

Page 40
Image 40
VXI VT1538A user manual ALGSCALAR’ALG1’,’Width2’,.010