CONFigure:DIGital:DIRection
Syntax
CONFigure:DIGital:DIRection <direction>, (@<ch_list>)
CONFigure:DIGital:DIRection? (@<ch_list>)
Description
This command configures the specified digital channels for input or output operations.
Used With:
34950A Digital I/O Module (digital input/output channels only)
34952A Multifunction Module (digital input/output channels only)
34959A Breadboard Module
Parameters
Name |
Type |
Range of Values |
Default Value |
<direction> |
Discrete |
{INPut|0|OUTPut|1} |
INPut (0) |
<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
|
Remarks
The selected direction applies to the channel width on the specified channels. Use the CONFigure:DIGital:WIDTh command to set the desired width. Depending on the width specified, the channel numbering is modified as shown below. For example, if you specify the width as a 16-bit WORD on the 34950A, channels 101 and 102 are combined and addressed collectively as channel 101.
34950A |
Bank 2 |
Bank 1 |
||||||
BYTE (8 Bits): |
Ch 204 |
Ch 203 |
Ch 202 |
Ch 201 |
Ch 104 |
Ch 103 |
Ch 102 |
Ch 101 |
WORD (16 Bits): |
Ch 203 |
Ch 201 |
Ch 103 |
Ch 101 |
||||
LWORd (32 Bits): |
Ch 201 |
Ch 101 |
||||||
|
|
|
||||||
34952A |
Bank 1 |
|
||||||
BYTE (8 Bits): |
Ch 4 |
Ch 3 |
Ch 2 |
Ch1 |
|
|||
WORD (16 Bits): |
Ch 3 |
Ch 1 |
|
|||||
LWORd (32 Bits): |
Ch 1 |
|
If the specified channels are part of a scan list (see ROUTe:SCAN command), changing the direction will to an output will clear the scan list.
Changing the direction will disable buffered (memory) operations on the specified digital channels (see [SENSe:]DIGital:MEMory:ENABle and SOURce:DIGital:MEMory:ENABle commands).
The selected direction is stored in volatile memory and will be set to "INP" when power is turned off or after a Factory Reset (*RST command).
Return Format
The query command returns "INP" or "OUTP" for the specified channels. Multiple responses are separated by commas.
Examples
The following program segment configures the 34950A in slot 3 for two 16-bit words and then configures the channels for output operations.
CONF:DIG:WIDTH WORD,(@3101,3103)
CONF:DIG:DIR OUTP,(@3101,3103)
The following query returns the state of channels 101 and 103 on the 34950A in slot 3.
CONF:DIG:DIR? (@3101,3103)
Typical Response: OUTP,OUTP
The following program segment configures the 34952A in slot 5 for one 32-bit word and then configures the channel for input operations.
CONF:DIG:WIDTH LWORD,(@5001)
CONF:DIG:DIR INP,(@5001)
The following query returns the state of channel 1 on the 34952A in slot 3.
CONF:DIG:DIR? (@5001)
Typical Response: INP