EasyManua.ls Logo

VTI Instruments EX1000A - Page 112

VTI Instruments EX1000A
320 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VTI Instruments Corp.
112 EX10xxA Programming
ViInt32 vtb_in;
vtex10xxA_get_vtb_input(vi, &vtb_in);
if (vtb_in & 0x80)
printf(“Bit 7 is high”);
else printf(“Bit 7 is low”);
if (vtb_in & 0x10)
printf(“Bit 4 is high”);
else printf(“Bit 4 is low”);
if (vtb_in & 0x01)
printf(“Bit 0 is high”);
else printf(“Bit 0 is low”);
The vtex10xxA_set_vtb_output function is used to set the static level that each channel of the
trigger bus will assume if/when enabled as an output. Enabling, however, is done with the
vtex10xxA_set_vtb_output_enable function (see below). This function accepts a value that
represents the desired state of the 8-bit bus, specified in either decimal (0 through 255) or hex (0x00
through 0xFF). Within the 8-bit field, the MSB corresponds to VTB channel 7 and the LSB
corresponds to VTB channel 0.
The vtex10xxA_set_vtb_output_enable function enables or disables the output functionality of
each channel of the trigger bus. Once enabled, a channel will assume the level specified with the
vtex10xxA_set_vtb_output function (see above). When not enabled as an output, a channel
becomes tri-stated. Input functionality on each channel is constant regardless of its output
functionality. This function accepts a value that represents the desired output enable state of the 8-
bit bus, specified in either decimal (0 through 255) or hex (0x00 through 0xFF). Within the 8-bit
field, the MSB corresponds to VTB channel 7 and the LSB corresponds to VTB channel 0.
Example: This code block sets bit 7 (high) and bit 6 (low) of the trigger bus and then enables them
as outputs.
vtex10xxA_set_vtb_output(vi, 0x80);
vtex10xxA_set_vtb_output_enable(vi, 0xC0);
The vtex10xxA_get_vtb_output query is used to obtain the programmed output state of the trigger
bus. The response to this query is a decimal value from 0 to 255 that represents the programmed
output state of the 8-bit bus. However, since the outputs must be enabled, it does not necessarily
represent the true output state. The vtex10xxA_get_vtb_output_enable query is used to obtain the
output enable state of each channel. The response to this query is a decimal value from 0 to 255 that
represents the output enable state of the 8-bit bus. Within the 8-bit field, the MSB corresponds to
LXI Trigger Bus (VTB) channel 7 and the LSB corresponds to LXI Trigger Bus (VTB) channel 0.
Example: This code block queries the output state and output enable state of the trigger bus and
reports the states of bit 4.
ViInt32 vtb_out;
ViInt32 vtb_outen;
vtex10xxA_get_vtb_output(vi, &vtb_out);
vtex10xxA_get_vtb_output_enable(vi, &vtb_outen);
if (vtb_out & 0x10)
printf(“Bit 4 is set high”);
else printf(“Bit 4 is set low”);
if (vtb_outen & 0x10)
printf(“Bit 4 is enabled”);
else printf(“Bit 4 is not enabled”);
The vtex10xxA_set_vtb_pulse function is used to generate a 1 s pulse on selected channels of the
trigger bus. The pulse will occur only if the selected channels are enabled as outputs. When a channel
is programmed with a static level of high, the pulse will be low-going. When a channel is

Table of Contents

Related product manuals