VXi VT1422A ユーザーズマニュアル

ページ / 529
Programming the VT1422A for Data Acquisition and Control   141
configure digital output channel for "alarm channel"
hpe1422_cmd(vi, ’SOURCE:FUNCTION:CONDITION (@132)’)
execute On-board channel calibration (can take several minutes)
hpe1422_cmdInt16_Q(vi, ’*CAL?’, ViPInt16 result)
test "result" for success
execute Remote channel calibration on RSCUs
hpe1422_cmdInt16_Q(vi, ’CAL:REMOTE? (@14000:14931)’, ViPInt16 &result)
test "result" for success
Direct data acquisition channels placed in Scan List. On-board channels 00-07 and 128 remote channels 
covered by VT1539A SCPs in positions 5 & 6
hpe1422_cmd(vi, ’ROUTE:SEQUENCE:DEFINE (@100:107,14000:14931)’)
Configure the Trigger System
hpe1422_cmd(vi, ’ARM:SOURCE IMMEDIATE’)
(*RST default)
hpe1422_cmd(vi, ’TRIGGER:COUNT 1’)
(*RST default)
hpe1422_cmd(vi, ’TRIGGER:TIMER .010’)
(*RST default)
hpe1422_cmd(vi, ’TRIGGER:SOURCE TIMER’)
(*RST default)
Set the channel-to-channel measurement pacing (channel settling time)
hpe1422_cmd(vi, ’SAMPle:TIMer 4E-5’)
(*RST default)
specify data format
hpe1422_cmd(vi, ’FORMAT ASC,7’)
(*RST default)
select FIFO mode
hpe1422_cmd(vi, ’SENSE:DATA:FIFO:MODE BLOCK’)
may read FIFO while running
Define algorithm. Algorithm from SCPI sequence on previous page can be put in a text file and saved as 
"seqalg.c."
hpe1422_downloadAlg(vi, ’ALG1’, 0, ’seqalg.c’)
Pre-set the algorithm coefficients
hpe1422_algScal(vi, 'ALG1', ’div’, 5)
hpe1422_algScal(vi, 'ALG1', 'mult', 5)
hpe1422_algScal(vi, 'ALG1', 'sub', 0)
hpe1422_cmd(vi, ’ALG:UPDATE’)
all alg vars updated at this time
initiate trigger system (start algorithm)
hpe1422_initImm(vi)
retrieve algorithm data from elements 10 through 15
hpe1422_cmdReal64Arr_Q(vi, ’SENSE:DATA:CVT? (@10:15,330:457)’, 502, myfloat64array[ ],&count)
may test the int32 value "count" for number of cvt values returned