Models 707B and 708B 199BSwitching Matrix User's Manual
Section 6: Working with the Series 2400
707B-900-01 Rev. B / June 2013
6-7
function run70xForScan(cTable)
for i = 1, table.getn(cTable) do
if i > 1 then
triggered = digio.trigger[2].wait(3)
if triggered == true then
channel.exclusiveclose(cTable[i])
waitcomplete()
digio.trigger[1].assert()
else
print("Trigger not received")
end
else
channel.exclusiveclose(cTable[i])
waitcomplete()
digio.trigger[1].assert()
end
end
print("done")
end
This function sequences the crosspoint closures
and hardware triggering. A table of crosspoints
to close must be input to this function.
The
for
loop iterates through the channel list
and waits for a trigger on a digital I/O line to
occur before closing a channel.
The first channel of the list does not wait for a
trigger.
After channel closure is complete, an output
trigger is asserted on digital I/O line.
endscript
forScan()
Run the script to generate the functions.
crossptTable = setup70xChanList()
Call the function that sets up the Model 707B or
708B and store the output of the function in the
variable
crossptTable
.
Alternate method for creating a list of crosspoints
The following code creates a list of crosspoints that can be used in a test. This code replaces
chanTable
in the example code above.
x = 1
--The following nested for loop creates channel list for the scan. --This list is
compiled in the table "jscTable"
for i = 1,11,2 do
j = i + 1
chan1 = channel.createspecifier(1,1,i)
chan2 = channel.createspecifier(1,2,j)
chanTable[x] = chan1 .. "," .. chan2
--Crosspoints are printed to show output of example
print(chanTable[x])
x = x+1
end
Output:
1A01,1B02
1A03,1B05
1A05,1B06
1A07,1B08
1A09,1B10
1A11,1B12