VXI VM4016 user manual Application Examples

Page 34

VXI Technology, Inc.

APPLICATION EXAMPLES

This section contains examples of using SCPI command strings for programming the VM4016 module. The code is functional and will contain a brief description about the operation.

Example 1

In this example, the VM4016 sets the output interrupt polarity on the front panel and the debounce time period for the digital debounce circuitry.

OUTPut:POLarity:EXTernal:INTerrupt NORM

Sets the external interrupt output polarity to

 

high pulse when an interrupt occurs.

INPut:DEBounce 25e-6

Sets input debounce time for all channels to

 

25 s. This will not allow a signal to

 

generate an interrupt unless the channel is

 

active for greater than 25 s.

Example 2

In this example, the VM4016 enables or disables the specified channels for interrupt generation, sets the offset, polarity and voltage range. It returns the value of First Latched register which records the first input channel to cross its threshold and queries the current state of inputs.

INP:MASK 1,(@1,2)

Enables Channels 1 and 2 for interrupt

 

generation.

INP:MASK 0,(@3:16)

Disables Channels 3 through 16 from

 

generating an interrupt.

INP:RANG 10,(@1,2)

Selects ±10 volts as the input range for

 

Channel 1 and 2.

INP:OFFS +5.25,(@1,2)

Selects +5.25 volts as the offset voltage for

 

Channels 1 and 2.

INP:POL NORM,(@1,2)

Selects both Channel 1 and 2 to generate an

 

interrupt when Channels 1 and 2 are

 

greater than the offset voltage.

FETC:LATC?

Returns the active signal in the First

 

Latched Register.

FETC:RAW?

Returns the State of unconditioned

65535

 

(ummasked and non-inverted) inputs.

FETC:COND?

Returns the state of masked and inverted

3

 

inputs.

34

VM4016 Programming

Image 34
Contents VM4016 Page Table of Contents VXI Technology, Inc Certification WarrantyLimitation of Warranty 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 OutputCalculating System Power and Cooling Requirements InstallationPreparation for USE Setting the Logical Address Setting the Chassis Backplane JumpersFront Panel Interface Wiring 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