CONFigure:DIGital
Syntax
CONFigure:DIGital <width>, [<voltage>,] [<polarity>,] (@<ch_list>)
Description
This command configures the specified channels for unbuffered (no memory) input operations but does not initiate the scan. This command allows you to set the desired channel width, threshold voltage (34950A only), and logic polarity (34950A and 34952A only) for scanning. The channels associated with the specified operation are automatically reconfigured as input channels.
The CONFigure command does not place the module in the "wait-for-trigger" state. Use the INITiate or READ? command in conjunction with CONFigure to place the instrument in the "wait-for-trigger" state.
Used With:
34950A Digital I/O Module (digital input channels only)
34952A Multifunction Module (digital input channels only)
34959A Breadboard Module (digital input channels only)
Parameters
Name |
Type |
Range of Values |
Default Value |
<width> |
Discrete |
{BYTE|1|WORD|2|LWORd|4} BYTE (or "1" byte): 8
bits 34959A: Only valid configurations are BYTE/WORD. |
This is a required parameter |
<voltage>1
|
Numeric |
Desired threshold voltage between 0V and 5V, with 20 mV resolution. MIN = 0V, MAX = 5V |
0.8V (TTL) |
<polarity>2 |
Discrete |
{NORMal|INVerted} |
NORMal (active high) |
<ch_list>
|
Numeric
|
One or more digital input or output channels in the form (@sccc). 34950A: s101
through s104, s201 through s204 |
This is a required parameter
|
1 Variable threshold voltage is available only on the 34950A. 2 Variable polarity is available only on the 34950A and 34952A. |
Remarks
If this command is directed to the first channel on a bank on the 34950A (i.e., channel 101 or 201) this command will reset all handshaking parameters (see CONFigure:DIGital:HANDshake command) and the buffered memory mode will be aborted and disabled.
When you specify a range of channels with this command, any channels that are invalid will be ignored (no error will be generated) but the first and last channel in the range must be valid for the selected function.
Changing the channel width will disable buffered (memory) operations and clear memory on the specified digital channels (see [SENSe:]DIGital:MEMory:ENABle command).
To set the threshold voltage independently (34950A only), you can use the [SENSe:]DIGital:THReshold command.
To set the logic polarity independently, you can use the CONFigure:DIGital:POLarity command.
The *RST command will clear the scan list and set all measurement parameters to their factory settings. The Instrument Preset (SYSTem:PRESet command) will not clear the scan list; however, this command will clear reading memory.
Examples
The following program segment configures the 34950A in slot 3 for two 16-bit words and then selects an "active low" polarity (the optional threshold voltage parameter is omitted in this example). The READ? command places the module in the "wait-for-trigger" state, scans the channels once, and then sends the results to reading memory and the instrument's output buffer.
CONF:DIG
WORD,INV,(@3101,3103) !Width
= 16 bits, Polarity = active low
ROUT:SCAN (@3101,3103) !Add
channels to scan list
READ? (@3101,3103)
Typical Response: 65487,64972
The following program segment configures the 34952A in slot 5 for one 32-bit word and then selects an "active high" polarity. The INITiate command places the module in the "wait-for-trigger" state, scans the channel once, and stores the reading in memory. The FETCh? command transfers the reading from reading memory to the instrument's output buffer.
CONF:DIG
LWORD,NORM,(@5001) !Width
= 32 bits, Polarity = active high
ROUT:SCAN (@5001) !Add
channels to the scan list
INIT
FETC?
Typical Response: 529755