SOURce:DIGital:DATA:BIT

34980A

SOURce:DIGital:DATA:BIT

Syntax

SOURce:DIGital:DATA:BIT {0|1}, <bit>, (@<ch_list>)

SOURce:DIGital:DATA:BIT? <bit>, (@<ch_list>)

Description

This command sets or clears individual bits on the specified digital output channels. The channels associated with the specified operation are automatically reconfigured as output channels.

Used With:

  • 34950A Digital I/O Module (digital output channels only)

  • 34952A Multifunction Module (digital output channels only)

  • 34959A Breadboard Module (digital output channels only)

Parameters

Name

Type

Range of Values

Default Value

<bit>

 

Numeric

Bit number on the specified channel. The acceptable range is based on the channel width set by the CONFigure:DIGital:WIDTh command.

BYTE (8 Bits):  0 (LSB) to 7 (MSB)
WORD (16 Bits):  0 (LSB) to 15 (MSB)
LWORd (32 Bits):  0 (LSB) to 31 (MSB)

34959A: Only valid configurations are BYTE/WORD.

This is a required parameter

<ch_list>

 

Numeric

 

One or more digital output channels in the form (@sccc).

34950A: s101 through s104, s201 through s204
34952A: s001 through s004
34959A: s001 or s002

This is a required parameter

 

Remarks

  • This command automatically reconfigures the channels associated with the specified operation as output channels. You can use the CONFigure:DIGital:DIRection? or SOURce:DIGital:STATe? command to determine whether the specified channels are configured for input or output operations.

  • Changing the direction will disable buffered (memory) operations on the specified digital channels (see SOURce:DIGital:MEMory:ENABle command).

  • 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.

Return Format

The query command returns "0" or "1" indicating the value of the bit on each digital output channel specified. Multiple responses are separated by commas.

Examples

The following program segment outputs a "1" to bit 10 on channels 101 and 103 on the 34950A in slot 3.  

CONF:DIG:WIDTH WORD,(@3101,3103)  !Set channel width
SOUR:DIG:DATA:BIT 1,10,(@3101,3103)
 !Set bit 10 to "1"

The following command queries the state of bit 10 on channels 101 and 103 on the 34950A in slot 3. The values are transferred to the instrument's output buffer.

SOUR:DIG:DATA:BIT? 10,(@3101,3103)

Typical Response:  1,1

The following program segment outputs a "1" to bit 6 on channel 1 on the 34952A in slot 5.  

CONF:DIG:WIDTH BYTE,(@5001)  !Set channel width
SOUR:DIG:DATA:BIT 1,6,(@5001)
 !Set bit 6 to "1"

The following command queries the state of bit 6 on channel 1 on the 34952A in slot 5. The value is transferred to the instrument's output buffer.

SOUR:DIG:DATA:BIT? 6,(@5001)

Typical Response:  1

See Also

CONFigure:DIGital:DIRection

CONFigure:DIGital:WIDTh

SOURce:DIGital:DATA[:<width>]

SOURce:DIGital:STATe