VXI VM4016 user manual VXIPLUG&PLAY Driver Examples

Page 44

VXI Technology, Inc.

VXIPLUG&PLAY DRIVER EXAMPLES

/************************************************************************** Function: vtvm4016_setup_and_read_data

Formal Parameters ViSession instr_hndl

- A valid sessionandle to the instrument.

ViInt16 channel_list[]

-This parameter specifies the channels which are to be setup. Only the specified channels will be enabled, the rest will be disabled.

Each channel number in the array has the range : vtvm4016_MIN_CHANNEL_NO (1) to vtvm4016_MAX_CHANNEL_NO (16)

ViInt16 num_of_channels

-This parameter specifies the number of channels in the channel list.

Valid Range: vtvm4016_MIN_CHANNEL_NO (1) to vtvm4016_MAX_CHANNEL_NO (16)

ViReal32 offset[],

-This parameter specifies the offset voltage to be configured for the input channels.

Valid Range:

vtvm4016_MIN_VOLTAGE_LEVEL (-10.00 V) to vtvm4016_MAX_VOLTAGE_LEVEL (9.96 V)

ViInt16 polarity[]

-This parameter specifies the polarity to be configured for the specified channels.

Valid Range: vtvm4016_INVERTED_POLARITY (0) or vtvm4016_NORMAL_POLARITY (1)

ViInt16 voltage_range[]

-This parameter specifies the voltage range to be configured for the specified channels.

Valid Range: vtvm4016_10VOLTS_RANGE (0) or vtvm4016_100VOLTS_RANGE (1)

44

VM4016 Programming

Image 44
Contents VM4016 Page Table of Contents VXI Technology, Inc Warranty Limitation of WarrantyCertification Restricted Rights LegendC L a R a T I O N O F C O N F O R M I T Y EMCGeneral Safety Instructions Terms and SymbolsThis product. Product should be inspected or serviced Support Resources VXI Technology, Inc VM4016 Preface Introduction IntroductionDescription Front Panel LayoutVM4016 Block Diagram VM4016 General Specifications IRQ OutputPreparation for USE InstallationCalculating System Power and Cooling Requirements Front Panel Interface Wiring Setting the Chassis Backplane JumpersSetting the Logical Address Signal PIN Number Analog Comparator PIN Outs1631 Examples of Scpi Commands FETCHCONDITIONED? ProgrammingFETCHLATCHED? FETCHRAW? Inhousepseudo Inhouseregint InhouseregintInhouseregenable Inhouseclearlatch Inputdebounce ExamplesInputmask INPMASK?INPutMASKINTerrupt boolean Where boolean is 0 OFF 1 on InputmaskinterruptInputoffset INPOFFS?Inputpolarity INPutPOLarity NORM,@35Inputrange Outputpolarityexternalinterrupt Outputpolarityexternallatched Application Examples ExampleCommands Description Single Channel OperationControl Page Bracketing a Voltage Sets the external interrupt output to be active highBracketing AN Input Voltage Page Register Access Examples Register MAPFor example Pseudo Register Access VXIPLUG&PLAY Driver Examples VM4016 Programming VXI Technology, Inc Command Dictionary Alphabetical Command ListingIeee 488.2 Common Commands Instrument Specific Scpi Commands NormalScpi Required Commands Command Dictionary Query ParametersCommon Scpi Commands CLSESE Response DescriptionESR? IDN? OPC Query Parameters Query Response DescriptionRST SRE STB? TRG TST? WAI OPCInstrument Specific Scpi Commands FETChCONDitioned?FETChLATChed? FETChRAW? Inhouseclearlatch Inhousepseudo Inhouseregint Inhouseregenable INPutDEBounce INPutMASK INPutMASKINTerrupt INPutOFFSet INPutPOLarity INPutRANGe OUTPutPOLarityEXTernalINTerrupt OUTPutPOLarityEXTernalLATChed Required Scpi Commands STATusOPERationCONDition?STATusOPERationENABle STATusOPERationEVENt? STATusPRESet STATusQUEStionableCONDition? STATusQUEStionableENABle STATusQUEStionableEVENt SYSTemERRor? SYSTemVERSion? Theory of Operation Input Range Control Relay Signal Comparison Interrupt Generation Interrupt Generation Index OUTPutPOLarityEXTernalLATChed