Application examples, Pplication, Xamples – VXI VM4016 User Manual

Page 34

Advertising
background image

VXI Technology, Inc.

34

VM4016 Programming

A

PPLICATION

E

XAMPLES

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

V as the input range for

Channel 1 and 2.

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

Selects +5.25 V 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?

65535

Returns the State of unconditioned
(ummasked and non-inverted) inputs.

FETC:COND?

3

Returns the state of masked and inverted
inputs.

Advertising