:DISK:FILE:READ?
Query Syntax
:DISK:FILE:READ? "filename"<maximum buffer length>
Where <maximum buffer length> is optional.
Description
Returns binary data from a file on Infiniium 2026's file system to the host computer. The query takes a filename 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 you are transferring data from a file locally on Infiniium's file system, you could use Windows PC drive sharing to transfer the file.
See Definite-Length Block Response Data for more information.
SCPI commands that perform general file I/O operations are limited to Standard Infiniium File Types and Standard Infiniium Folders.
Returned Data Type
The :DISK:FILE:READ? query returns binary byte values as definite-length block data. 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 Infiniium 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.
file = '"C:\\Users\\user-name\\Documents\\Keysight\\Infiniium\\Screen Images\\test_image.png"'
data = Infiniium.query_binary_values(':DISK:FILE:READ? ' + file,
datatype='B',
header_fmt='ieee',
container=bytes)