Kt34400Memory¶
Access interface members using:driver.memoryWheredriveris a reference to the driver’s root interface returned by the constructor.
- class Kt34400Memory¶
Kt34400Memoryinterface.- property auto_recall_select¶
Sets or gets which instrument state will be used at power on if the automatic recall mode is enabled.
- Access:
ReadWrite
- Type:
- property column_separator¶
Specifies the character used to separate the columns in stored data.
- Access:
ReadWrite
- Type:
- copy(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, source_file: str, destination_file: str) None¶
This method copies SourceFile to DestinationFile on the mass memory file system.
- Parameters:
- Returns:
None
- Remarks:
-
- The format for <SourceFile> and <DestinationFile> is "[[<drive>:]<path>]<file_name>", where <drive> can be Internal or USB, and <path> is a folder path.
- Internal specifies the internal flash file system. USB specifies a USB storage device.
- If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
- If <drive> is omitted, is relative to the folder specified by the CurrentDirectory property is used. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
- The combination of folder and file name cannot exceed 240 characters.
- The source file and folder must exist and cannot be marked as hidden or system.
- The destination folder must exist and cannot be marked as hidden or system.
- If the destination file exists, it is overwritten, unless marked as a hidden or system file.
To copy a file to a file of the same name in a different folder, you can specify just the <drive> and/or <path> for <file2>.
- property current_dir¶
This property is used to select a default folder which is used when folder or file names do not include a drive and folder name.
- Access:
ReadWrite
- Type:
- Remarks:
-
- The format for <folder> is "[[<drive>:]<path>]", where <drive> can be Internal or USB, and <path> is a folder path.
- Internal specifies the internal flash file system. USB specifies a USB storage device.
- If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
- If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
- <folder> cannot exceed 240 characters.
- The specified folder must exist and cannot be marked as hidden or system.
- delete(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, location_num: keysight_kt34400.keysight_kt34400.MemoryLocation) None¶
Deletes the contents of the specified storage location.
- Parameters:
location_num (MemoryLocation) – Store location number to delete. Valid values are from 0 to 4.
- Returns:
None
- delete_all(self: keysight_kt34400.keysight_kt34400.Kt34400Memory) None¶
Deletes the contents of all storage locations (0 to 4).
- Returns:
None
- download(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, data: str) None¶
Downloads data from the host computer to a local file in the instrument.
- Parameters:
data (str) – <block> can be an IEEE 488.2 definite- or indefinite-length block.</block>
- Returns:
None
- Remarks:
- The file name must have been previously specified by DownloadFile method. The data in <block> is written to the select file. Any data previously stored in the file will be lost.
- property format_enabled¶
Disables/enables header line and the per-reading information in stored data.
- Access:
ReadWrite
- Type:
- get_catalog(*args, **kwargs)¶
Overloaded function.
get_catalog(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, folder_name: str) -> Tuple[int, int, str]
Returns a list of files in the specified folder.
- param str folder_name:
Folder Name.
- return:
A tuple containing:
memoryUsed (int) : Number of bytes of storage currently used in the folder.
memoryFree (int) : The number of bytes of storage currently available.
fileList (str) : Each file list is in the format ‘<file_name>,<file_type>,<file_size>’.</file_size></file_type></file_name>
- type:
tuple[int, int, str]
- remarks:
- The format for <FolderName> is "[[[<drive>:]<path>[<filespec>]]", where <drive> can be Internal or USB, <path> is a folder path, and <filespec> specifies a subset of files to catalog. Internal specifies the internal flash file system. USB specifies a USB storage device. If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>. If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/". Folder and file names cannot contain the following characters: \ / : \* ? " > < | If <filespec>omitted or is "\*.\*", all files in the folder are cataloged. If it is "\*.sta", "\*.prf" or "\*.csv", only state ("\*.sta), preference ("\*.prf") or data (".csv") files in the folder are cataloged. <FolderName> cannot exceed 240 characters. The specified folder must exist and cannot be marked as hidden or system.
get_catalog(self: keysight_kt34400.keysight_kt34400.Kt34400Memory) -> str
Returns the names assigned to storage locations 0 through 4.
- Parameters:
- Returns:
Assigned Name of the location
- Return type:
str
- get_download_file_name(self: keysight_kt34400.keysight_kt34400.Kt34400Memory) str¶
This method returns the local file name which is downloading from the host computer to the instrument.
- Returns:
Name of the file.
- Return type:
- get_location_name(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, location_num: keysight_kt34400.keysight_kt34400.MemoryLocation) str¶
Returns the name of the specified storage location.
- Parameters:
location_num (MemoryLocation) – Store location number to delete. Valid values are from 0 to 4.
- Returns:
Storage location name.
- Return type:
- get_num_states(self: keysight_kt34400.keysight_kt34400.Kt34400Memory) int¶
Gets the total number of memory locations available for state storage.
- Returns:
Number of memory locations.
- Return type:
- Remarks:
- For the 34410A/11A, this command always returns '+5' (memory location 0 is included).
- get_recall_state(self: keysight_kt34400.keysight_kt34400.Kt34400Memory) str¶
Returns the file name from which the instrument state can be recalled.
- Returns:
Name of the file.
- Return type:
- is_valid_state(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) bool¶
Returns an indication of whether a valid state is currently stored in the specified state file.
- Parameters:
file_name (str) – Name of the file.
- Returns:
True if valid state is stored in the file. False if no state has been stored in the file or if the file does not exist.
- Return type:
- Remarks:
-
The format for <file> is "[[<drive><path>]<file_name>", where <drive> can be Internal or USB, and <path> is a folder path.
Internal specifies the internal flash file system. USB specifies a USB storage device.
If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
If <drive>:<path> is omitted, the folder specified by CurrentDirectory property is used.
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
The combination of folder and file name cannot exceed 240 characters The folder must exist and cannot be marked as hidden or system. as hidden or system. The specified file cannot be empty or marked as hidden or system.
- is_valid_state_enabled(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, location_num: keysight_kt34400.keysight_kt34400.MemoryLocation) bool¶
Queries the specified storage location to determine if a valid state is currently stored in this location.
- Parameters:
location_num (MemoryLocation) – Store location number to delete. Valid values are from 0 to 4.
- Returns:
Returns true if the specified storage state is valid.
- Return type:
- load_state(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) None¶
This method loads the instrument state from a state file. The file name optionally includes the .sta file extension.
- Parameters:
file_name (str) – File name on current directory of mass storage device.
- Returns:
None
- Remarks:
- The format for <FolderName> is "[[<drive>:]<path>]<FileName>", where <drive> can be Internal or USB, <path> is a folder path, and <filespec> specifies a subset of files to catalog. Internal specifies the internal flash file system. USB specifies a USB storage device. If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>. If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/". Folder and file names cannot contain the following characters: \ / : \* ? " > < | If <filespec>omitted or is "\*.\*", all files in the folder are cataloged. If it is "\*.sta", "\*.prf" or "\*.csv", only state ("\*.sta), preference ("\*.prf") or data (".csv") files in the folder are cataloged. <FolderName> cannot exceed 240 characters. The specified folder must exist and cannot be marked as hidden or system. The specified file cannot be empty or marked as hidden or system.
- make_dir(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, folder_name: str) None¶
This method creates a new folder.
- Parameters:
folder_name (str) – Name of the folder to be made.
- Returns:
None
- Remarks:
-
The format for <folder> is "[[<drive>:]<path>]", where <drive> can be Internal or USB, and <path> is a folder path.
Internal specifies the internal flash file system. USB specifies a USB storage device.
If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
<folder> cannot exceed 240 characters. Any intermediate folders must exist and cannot be marked as hidden or system. This property will only create the last folder in <path>, it will not create intermediate folders. To remove a folder, the folder must be empty (no files stored in the folder). You cannot delete the folder selected by CurrentDirectory property.
- move_files(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, source_file: str, destination_file: str) None¶
Moves and/or renames source file to destination file. The file names must include any file extension.
- Parameters:
source_file (str) – Any valid filename. The format is [<drive>:<path>]<file_name>, where <drive> can be Internal or USB, and <path> must be an absolute path.</path></drive></file_name></path></drive>
destination_file (str) – Any valid filename. The format is [<drive>:<path>]<file_name>, where <drive> can be Internal or USB, and <path> must be an absolute path.</path></drive></file_name></path></drive>
- Returns:
None
- Remarks:
- The format for <file1> and <file2> is "[[<drive>:]<path>]<file_name>", where <drive> can be Internal or USB, and <path> is a folder path. Internal specifies the internal flash file system. USB specifies a USB storage device. If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>. If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/". Folder and file names cannot contain the following characters: \ / : \* ? " < > | The combination of folder and file name cannot exceed 240 characters. The source file and folder must exist and cannot be marked as hidden or system. The destination folder must exist and cannot be marked as hidden or system. If the destination file exists, it will be overwritten, unless marked as a hidden or system file
- property recall_auto_enabled¶
Disables or enables the automatic recall of a specific stored instrument state when instrument is turned on.
- Access:
ReadWrite
- Type:
- Remarks:
- If set to true, it automatically recall the power-down state (state file STATE_0 in the root folder of the internal flash file system) or a state file (using Recall property) when instrument is turned on. If set to false, to issue a Factory Reset when instrument is turned on. When shipped from the factory, the instrument is configured to automatically recall the power-down state (state file STATE_0 in the root folder of the internal flash file system) when power is restored.
- remove_dir(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, folder_name: str) None¶
This method removes a folder.
- Parameters:
folder_name (str) – Name of the folder to be removed.
- Returns:
None
- Remarks:
-
The format for <folder> is "[[<drive>:]<path>]", where <drive> can be Internal or USB, and <path> is a folder path.
Internal specifies the internal flash file system. USB specifies a USB storage device.
If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
<folder> cannot exceed 240 characters. Any intermediate folders must exist and cannot be marked as hidden or system. To remove a folder, the folder must be empty (no files stored in the folder). You cannot delete the folder selected by CurrentDirectory property.
- remove_file(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) None¶
Deletes the specified file(s). The file name must include any file extension.
- Parameters:
file_name (str) – File Name.
- Returns:
None
- Remarks:
-
The format for <file> is "[[<drive>:]<path>]<filespec>", where <drive> can be Internal or USB, <path> is a folder path, and <filespec> is a file name or one of "\*.\*", "\*.sta", "\*.prf" or "\*.csv".
Internal specifies the internal flash file system. USB specifies a USB storage device.
If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
If <filespec> is a file name, only that file is deleted. If it is "\*.\*", all files in the folder are deleted. If it is "\*.sta", "\*.prf" or "\*.csv", all state ("\*.sta), preference ("\*.prf") or data (".csv") files in the folder are deleted. The combination of folder and file name cannot exceed 240 characters. The folder must exist and cannot be marked as hidden or system.
- property row_limit_enabled¶
When enabled, limits the maximum number rows per stored .csv data file to one million, including any header row, if enabled.
- Access:
ReadWrite
- Type:
- set_download_file_name(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) None¶
This method downloads the local file for downloading a file from the host computer (Source) to the instrument (Destination).
- Parameters:
file_name (str) – Destination File name.
- Returns:
None
- Remarks:
-
The format for <file> is "[[<drive>:]<path>]<file_name>", where <drive> can be Internal or USB, and <path> is a folder path.
where <drive> can be Internal or USB, and <path> must be an absolute folder path.
- Internal specifies the internal flash file system. USB specifies a USB storage device.
- If <drive> is specified, <path> is interpreted as an absolute folder path.Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
- If <drive> is omitted, the folder specified by the CurrentDirectory property is used. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
- The combination of folder and file name cannot exceed 240 characters.
- The specified folder must exist and cannot be marked as hidden or system.
- If the file exists, it will be overwritten, unless marked as a hidden or system file.
The file will be created if it does not already exist.
- set_location_name(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, location_num: keysight_kt34400.keysight_kt34400.MemoryLocation, location_name: str) None¶
Sets the name for a specified storage location.
- Parameters:
location_num (MemoryLocation) – Storage location (0 to 4) to which the specified name should be applied.
location_name (str) – A string of up to 12 characters. The first character must be a letter (A-Z), but the remaining 11 characters can be letters, numbers (0-9), or the underscore character. Blank spaces are not allowed.
- Returns:
None
- set_recall_state(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) None¶
Specifies which instrument state will be used at power on if RecallAutoEnabled is true. If the RecallAutoEnabled property is false, then a Factory Reset is issued when power is turned on.
- Parameters:
file_name (str) – Name of the file.
- Returns:
None
- Remarks:
-
- Filename as "STATE_0" is associated with the Power-ON Last state. Also is the same as System.SaveState(0) and System.RecallState(0)
- Filename as "STATE_1" to "STATE_4" are associated with System.SaveState(1-4) and System.RecallState(1-4)
- Memory.StoreState("STATE_1") is the same as System.SaveState(1)
- Memory.SetRecallState("STATE_0") refers to System.SaveState(0) state and is the power-ON state
- property storage_enabled¶
Disables or enables instrument state storage.
- Access:
ReadWrite
- Type:
- Remarks:
-
- When shipped from the factory, storage locations 1 through 5 are empty and the instrument is configured to NOT automatically recall the power-down state (location 0) when power is restored.
- store_data(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) None¶
Stores all measurements in the reading memory to the specified data file. The file name optionally includes the folder name and the .csv file extension.
- Parameters:
file_name (str) – File Name.
- Returns:
None
- Remarks:
-
The data is stored in comma-separated value (CSV) format, with one measurement per line in ASCII format.
The format for <file> is "[[<drive>:]<path>]<file_name>", where <drive> can be Internal or USB, and <path> is a folder path.
Internal specifies the internal flash file system. USB specifies a USB storage device.
If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
The combination of folder and file name cannot exceed 240 characters. The destination folder must exist and cannot be marked as hidden or system. as hidden or system. If the destination file exists, it will be overwritten, unless marked as a hidden or system file.
- store_preferences(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) None¶
Stores nonvolatile I/O settings and user preferences to a file. The file name optionally includes the folder name and the .prf file extension.
- Parameters:
file_name (str) – File Name.
- Returns:
None
- Remarks:
-
The format for <file> is "[[<drive>:]<path>]<file_name>", where <drive> can be Internal or USB, and <path> is a folder path.
Internal specifies the internal flash file system. USB specifies a USB storage device.
If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".
- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
The combination of folder and file name cannot exceed 240 characters. The destination folder must exist and cannot be marked as hidden or system. as hidden or system. If the destination file exists, it will be overwritten, unless marked as a hidden or system file.The format for <file> is "[[<drive>:]<path>]<file_name>", where <drive> can be Internal or USB, and <path> is a folder path. Internal specifies the internal flash file system. USB specifies a USB storage device. If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>. If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".- Folder and file names cannot contain the following characters: \ / : \* ? " < > |
The combination of folder and file name cannot exceed 240 characters. The destination folder must exist and cannot be marked as hidden or system. as hidden or system. If the destination file exists, it will be overwritten, unless marked as a hidden or system file.
- store_state(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) None¶
Stores the current instrument state to a state file. The file name optionally includes the folder name and the .sta file extension.
- Parameters:
file_name (str) – File name on current directory of mass storage device.
- Returns:
None
- Remarks:
-
The format for <FolderName> is "[[<drive>:]<path>]<FileName>", where <drive> can be Internal or USB, <path> is a folder path, and <filespec> specifies a subset of files to catalog.
Internal specifies the internal flash file system. USB specifies a USB storage device.
If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>.
If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/".
Folder and file names cannot contain the following characters: \ / : \* ? " > < |
If <filespec>omitted or is "\*.\*", all files in the folder are cataloged. If it is "\*.sta", "\*.prf" or "\*.csv", only state ("\*.sta), preference ("\*.prf") or data (".csv") files in the folder are cataloged.
<FolderName> cannot exceed 240 characters.
The specified folder must exist and cannot be marked as hidden or system.
The specified file cannot be empty or marked as hidden or system.
- Filename as "STATE_0" is associated with the Power-ON Last state. Also is the same as System.SaveState(0) and System.RecallState(0)
- Filename as "STATE_1" to "STATE_4" are associated with System.SaveState(1-4) and System.RecallState(1-4)
- Memory.StoreState("STATE_1") is the same as System.SaveState(1)
- Memory.SetRecallState("STATE_0") refers to System.SaveState(0) state and is the power-ON state
- upload_file(self: keysight_kt34400.keysight_kt34400.Kt34400Memory, file_name: str) numpy.ndarray[numpy.uint8]¶
Uploads the contents of a file from the instrument to the host computer.
- Parameters:
file_name (str) – Name of the file.
- Returns:
A definite length binary block containing the file content.
- Return type:
numpy.ndarray<with dtype:uint8>
- Remarks:
- The format for <file> is "[<drive>:<path>]<file_name>", where <drive> can be Internal or USB, and <path> must be an absolute folder path. Internal specifies the internal flash file system. USB specifies a USB storage device. If <drive> is specified, <path> is interpreted as an absolute folder path. Absolute paths begin with a "\" or "/" and start at the root folder of <drive>. If <drive> is omitted, <path> is relative to the folder specified by the CurrentDirectory property. Relative paths must not begin with "\" or "/". Folder and file names cannot contain the following characters: \ / : \* ? " > < | If <filespec>omitted or is "\*.\*", all files in the folder are cataloged. If it is "\*.sta", "\*.prf" or "\*.csv", only state ("\*.sta), preference ("\*.prf") or data (".csv") files in the folder are cataloged. <FolderName> cannot exceed 240 characters. The specified folder must exist and cannot be marked as hidden or system. The specified file cannot be empty or marked as hidden or system.
