VXi VT1529A/B 사용자 설명서

다운로드
페이지 529
140 Programming the VT1422A for Data Acquisition and Control  
TRIGGER:SOURCE TIMER
(*RST default)
Set the channel-to-channel measurement pacing (channel settling time)
SAMPle:TIMer 4E-5
(*RST default)
specify data format
FORMAT ASC,7
(*RST default)
select FIFO mode
SENSE:DATA:FIFO:MODE BLOCK
may read FIFO while running
Define algorithm
ALG:DEFINE 'ALG1','static float a,b,c, div, mult, sub;
if ( First_loop )
{
 a = 1; b = 2; c = 3;
writecvt( a, 10 ); writefifo( b, 11 ); writefifo( c, 12 );
}
writecvt( a / div, 13 );
writecvt( b * mult, 14 );
writecvt( c - sub, 15 ); /* end of algorithm */'
Pre-set the algorithm coefficients
ALG:SCAL 'ALG1','div',5
ALG:SCAL 'ALG1','mult',5
ALG:SCAL 'ALG1','sub',0
ALG:UPDATE
all alg vars updated at this time
initiate trigger system (start algorithm)
INITIATE
retrieve algorithm data from elements 10 through 15
SENSE:DATA:CVT? (@10:15,330:457)
enter statement here for CVT values from 6 on-board and 128 remote chans
Example VXIplug&play Driver Function Sequence
This example plug&play command sequence puts together all of the steps 
discussed so far in this chapter.
hpe1422_init(INSTR_ADDRESS, 0, 0, &vi)
hpe1422_reset(vi)
Reset the module
Setting up Signal Conditioning (only for programmable SCPs & RSCUs)
hpe1422_cmd(vi, ’INPUT:FILTER:FREQUENCY 2,(@116:119)’)
        On-board SCP channels
hpe1422_cmd(vi, ’INPUT:FILTER:FREQUENCY 10,(@14000:14931)’)
         128    Remote channels
hpe1422_cmd(vi, ’INPUT:GAIN 64,(@116:119)’)
hpe1422_cmd(vi, ’INPUT:GAIN 8,(@120:123)’)
set up digital channel characteristics
hpe1422_cmd(vi, ’INPUT:POLARITY NORM,(@125)’)
(*RST default)
hpe1422_cmd(vi, ’OUTPUT:POLARITY NORM,(@124)’)
(*RST default)
hpe1422_cmd(vi, ’OUTPUT:TYPE ACTIVE,(@124)’)
link channels to EU conversions (measurement functions)
hpe1422_cmd(vi, ’SENSE:FUNCTION:VOLTAGE AUTO,(@100:107)’)
          
(*RST default)
hpe1422_cmd(vi, ’SENSE:REFERENCE THER,5000,AUTO,(@108)’)
hpe1422_cmd(vi, ’SENSE:FUNCTION:TEMPERATURE TC,T,AUTO,(@109:123)’)
hpe1422_cmd(vi, ’SENSE:REFERENCE:CHANNELS (@108),(@109:123)’)