SOURce:DIGital:DATA[:<width>]
Syntax
SOURce:DIGital:DATA[:<width>] <data>, (@<ch_list>)
SOURce:DIGital:DATA[:<width>]? [<format>,] (@<ch_list>)
Description
This command outputs an 8-, 16-, or 32-bit digital pattern to the specified digital output channels. The specified channels are 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 |
<width> |
Discrete |
{BYTE|1|WORD|2|LWORd|4} BYTE (or "1" byte): 8
bits 34959A: Only valid configurations are BYTE/WORD. |
If no <width> is specified, the currently configured width is used (see CONFigure:DIGital:WIDTh command). |
<data> |
Numeric |
Specify the bit pattern as a decimal, binary, or hexadecimal
value. |
This is a required parameter |
<format> |
Discrete |
{DECimal|BINary|HEXadecimal|OCTal} |
DECimal |
<ch_list> |
Numeric |
One or more digital output channels in the form (@sccc). 34950A: s101
through s104, s201 through s204 |
This is a required parameter |
Remarks
This command reconfigures the specified channels 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). In addition, changing the channel width will disable buffered operations and clear memory on the specified digital channels.
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 |
|
Use the SOURce:DIGital:DATA:BIT command to set individual bits on the specified digital output channels.
The selected width is stored in volatile memory and will be set to BYTE when power is turned off or after a Factory Reset (*RST command).
Return Format
The query command returns a value representing the bit pattern on each digital output channel specified. Multiple responses are separated by commas.
Examples
The following command outputs a 16-bit digital pattern to channels 101 and 103 on the 34950A in slot 3.
SOUR:DIG:DATA:WORD 52287,(@3101,3103)
The following command generates an error since a 16-bit word can only be sent to channel 101 on Bank 1 (34950A).
SOUR:DIG:DATA:WORD 10493,(@3102) !Generates an error
The following command queries the last word sent to channels 101 and 103 on the 34950A in slot 5. The decimal values are transferred to the instrument's output buffer.
SOUR:DIG:DATA:BYTE? (@3101,3103)
Typical Response: 52287,52287
The following command outputs an 8-bit hexadecimal pattern to channel 1 on the 34952A in slot 5.
SOUR:DIG:DATA:BYTE #HFF,(@5001)
The following command queries the last word sent to channel 1 on the 34952A in slot 5. The decimal value is transferred to the instrument's output buffer.
SOUR:DIG:DATA:BYTE? (@5001)
Typical Response: 255