:DISK:FILE:READ?

Instrument:
DCA-X
DCA-M
Meas. mode:
Scope
Eye
Jitter
TDR
Flex Apps:
FlexDCA
FlexRT

Query Syntax

:DISK:FILE:READ? "filename" <maximum buffer length>

Where <maximum buffer length> is optional.

Description

Returns binary data from a file on the DCA-X to the PC. The query takes a file name of the binary source file as the argument. The requested binary data is returned in the definite-length block data format which allows any type of device-dependent data to be transmitted over the system interface as a series of 8-bit binary data bytes.

As an alternative, if your transferring data from a file locally on the DCA-X you could use Windows PC drive sharing to transfer the file.

Returned Data Type

The :DISK:FILE:READ? query returns binary byte values as binary definite-length block data queries binary definite-length block data queries binary definite-length block data queries. You must specify this data type in your program language's command that you use to query the data. The specifier for this data type in your programming language will likely be "B" and it is identified in this example with red text. Confirm this with your programming language's documentation. The following is an example of the command used in Python using pyvisa.

The binary contents do not need to be interpreted as integers or floats on the receiving side. Because the data is being send as binary bytes, the endian setting in FlexDCA will not matter. If you plan to save the returned data in a file, the bytes, as received, need to be saved to a file in the order that they are received.

Flex.read_termination = ''
Flex.write_termination = ''
file = '"%USER_DATA_DIR%\\Screen Images\\test_image.jpg"'
data = Flex.query_binary_values(':DISK:FILE:READ? ' + file,
	datatype='B',
	header_fmt='ieee',
	container=bytes)
			

Requires FlexDCA revision A.05.30 and above.