Example Vxiplug&Play Driver Function Sequence; Initiate - VXI VT1422A User Manual

Remote channel multi-function dac module user’s and scpi programming manual
Table of Contents

Advertisement

Example VXIplug&play Driver Function Sequence
hpe1422_init(INSTR_ADDRESS, 0, 0, &vi)
hpe1422_reset(vi)
Setting up Signal Conditioning (only for programmable SCPs & RSCUs)
hpe1422_cmd(vi, 'INPUT:FILTER:FREQUENCY 2,(@116:119)')
hpe1422_cmd(vi, 'INPUT:FILTER:FREQUENCY 10,(@14000:14931)')
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)')
hpe1422_cmd(vi, 'OUTPUT:POLARITY NORM,(@124)')
hpe1422_cmd(vi, 'OUTPUT:TYPE ACTIVE,(@124)')
link channels to EU conversions (measurement functions)
hpe1422_cmd(vi, 'SENSE:FUNCTION:VOLTAGE AUTO,(@100:107)')
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)')
140 Programming the VT1422A for Data Acquisition and Control
TRIGGER:SOURCE TIMER
Set the channel-to-channel measurement pacing (channel settling time)
SAMPle:TIMer 4E-5
specify data format
FORMAT ASC,7
select FIFO mode
SENSE:DATA:FIFO:MODE BLOCK
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
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
This example plug&play command sequence puts together all of the steps
discussed so far in this chapter.
(*RST default)
(*RST default)
(*RST default)
may read FIFO while running
all alg vars updated at this time
Reset the module
On-board SCP channels
128 Remote channels
(*RST default)
(*RST default)
(*RST default)
Chapter 4

Advertisement

Table of Contents
loading

Table of Contents