' vbs example of FIFO usage for externally triggered frequency sweeps ' usage: fifoWithFreqSweepExample.vbs pnaName If Wscript.Arguments.Count = 0 Then set pna = createObject("AgilentPNA835x.Application") Else set pna = createObject("AgilentPNA835x.Application",Wscript.Arguments(0)) End IF pna.preset set chan = pna.ActiveChannel set fifo = pna.fifo set trigger = pna.TriggerSetup set meas = pna.ActiveMeasurement chan.hold ' Setup the channel stimulus and response chan.StartFrequency = 20e9 chan.StopFrequency = 22e9 chan.NumberOfPoints = 11 chan.IfBandwidth = 100000 'setup the measurement meas.ChangeParameter "S21",1 ' setup triggering trigger.ExternalTriggerConnectionBehavior(1) = 2 'naTriggerConnectionBNC1 , naTriggerInEdgePositive trigger.Source = 2 'naTriggerSouceExternal chan.TriggerMode = 1 'naTriggerModeChannel ' set up the fifo fifo.state = 1 ' enable the fifo fifo.clear ' clear the fifo ' Take the sweeps chan.NumberOfGroups 10000, true ' Do 5 sweeps, and make the call synchronous 'Getting the data out of the FIFO not shown