Keysight file transfer format using SCPI commands and sample data - Page 1
Forum section: electronics / testgear

author: prasimix
author_rank: Unknown
timestamp: October 10, 2017, 02:47:00 pm
content: I'd like to know if anybody can provide me more information about Keysight's file transfer protocol/data format for exchanging data between instrument and controller application using SCPI commands such as:MMEMory:DOWNload:DATA <binary_block>,MMEMory:UPLoad? <filename>, orMMEMory:TRANsfer <fileName>,<dataBlock>What I found so far is minimal and comes from publicly available programming manuals where for example MMEM:TRAN data format is presented with simple example:QuoteThere is a note that file must be no larger than 20MB. It is possible that data exchange of e.g. 10MB is one 10MB long string? Or it is sliced to many chunks? If yes, how long they are?In other case, MMEM:DOWN:DATA include this example:QuoteAlso any sample data is more then welcome. Thanks in advance.

author: lundmar
author_rank: Frequent Contributor
timestamp: October 10, 2017, 03:54:33 pm
content: I don't know the particular instrument. However, I would bet that it just transports the data as one big block assuming your are using the VXI protocol or raw TCP SCPI to communicate your SCPI commands. Either way TCP will take care to break down and reassemble the data block so you don't have to worry about that. The 20 MB limit is likely dictated by buffer limits of the instrument and how they have implementd file handling. Also, it's not a string block, its a data block so you can write any binary data you need.

author: lundmar
author_rank: Frequent Contributor
timestamp: October 10, 2017, 04:08:39 pm
content: Btw, if you are running on a GNU/Linux system then you might find this useful:http://lxi.github.io

author: prasimix
author_rank: Unknown
timestamp: October 10, 2017, 04:22:33 pm
content: Quote from: lundmar on October 10, 2017, 04:08:39 pmFinal application will be cross-platform (i.e. at least Linux, Mac, and Windows) but yes, I'm on Linux (my colleague that is software developer use Windows as primary OS), so your suggestion is relevant. Idea is to provide communication via serial and telnet first, and then using VXI-11 and LXI.It would be nice if someone could also provide some sample data that generate any Keysight instrument that has e.g. SENSe:ELOG commands, like N6700 PSU (huh, I know, that is a real beast, not easily find on a DIYer's bench, but who knows who else is on this forum.

author: JonM
author_rank: Unknown
timestamp: October 11, 2017, 02:59:55 am
content: I have some small tools (in Perl and R, but the SCPI could be easily translated) to download data from scopes. They were developed with my Keysight DSOX3024T. A friend did some testing on a Rigol scope but there was an issue with the scale factor and I have not investigated further.https://github.com/meekj/oscilloscopeTools

author: ollopa
author_rank: Regular Contributor
timestamp: October 11, 2017, 08:13:58 am
content: It's just a standard block transfer. The first digit after the # symbol is the number of digits to parse as the data length, then comes the data length, then comes the data, and theN a scpi eom which is a newline. #15 means length of length = 1, length of data = 5. You can see that the lArgent possible file is 999999999 bytes: #9999999999. Internal buffers typically limit this to a smaller value. You can chunk it up however you want as it will just keep concatenating data until length is achieved.