DG2052 VISA :MMEM:DOWN - Page 1
Forum section: electronics / testgear

author: microwavesafe
author_rank: Newbie
timestamp: April 12, 2025, 07:46:40 am
content: I'm trying to use the :MMEM:DOWN commands to transfer waveforms to the DG2052 signal generator. I'm new to RIgol and arbitrary waveform generators in general. I have PyVISA connecting over ethernet, I can read the ID, make folders, save state etc. But I can't get the :MMEMory:DOWNload:FNAMe or :MMEMory:DOWNload:DATA to do anything. The example in the manual:MMEM:DOWN:FNAM "C:\state" /* Creates a "state" file in the internal memory (Disk C)*/:MMEM:DOWN:DATA #15Hello /* Loads the data "Hello" into the "state" file of the internal memory*/doesn't do anything. I've tried just using FNAM, but this doesn't create a file, as the manual suggests it does. My guess is the exact filename and format of the binary data is important, but that information seems difficult to find.I did ask support and they were helpful but told me to use Ultrastation, I don't have Windows so this is not an option, plus I want to be able to automate these devices so PyVISA is much more appealing. Has anyone successfully sent waveforms to this or similar devices?

author: microwavesafe
author_rank: Newbie
timestamp: April 14, 2025, 11:39:17 am
content: After several attempts at getting ultra station to do anything in a virtual machine, it is now talking to the DG2052. I ended up installing ultra sigma which just freezes on launch but seemed to install something that got ultra station to work. Can't say I'm very impressed with the software.Anyway, looking at the network traffic, it doesn't use :MMEM:DOWN commands to send the waveforms, it seems to use :SOURce1:DATA:DAC16 to send it. This command isn't even in the programming manual. The full command I have in the capture is:SOURce1:DATA:DAC16 VOLATILE,END,#532768<data> .I understand the # part but I've no idea about the volatile and end. I thought it might be a sequence terminator, but I can't see any evidence of that in the stream. I've attached a hex dump and pcap of the tcpip stream in case anyone is interested.Has anyone used the :SOURce1:DATA: commands before?

author: microwavesafe
author_rank: Newbie
timestamp: April 14, 2025, 12:11:20 pm
content: I've simplified the waveform to a DC of 64 points. This makes the output more obvious0000029C 3a 53 4f 55 52 63 65 31 3a 44 41 54 41 3a 44 41 :SOURce1 :DATA:DA000002AC 43 31 36 20 56 4f 4c 41 54 49 4c 45 2c 45 4e 44 C16 VOLA TILE,END000002BC 2c 23 33 31 32 38 00 00 00 00 00 00 00 00 00 00 ,#3128.. ........000002CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........000002DC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........000002EC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........000002FC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........0000030C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........0000031C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........0000032C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........0000033C 00 00 00 00 00 00 0a 00which seems to be 64 points of 16 bit 0's with line termination. I will give this a go in code.

author: microwavesafe
author_rank: Newbie
timestamp: April 14, 2025, 03:04:19 pm
content: I realise that I'm just replying to myself, but hopefully this is useful to someone. I have a rough draft of some code that sends a sine wave to the DG2052, there were some more issues to iron out. First, all data had to batched into 32768 maximum byte blocks, and polled to check it had completed. The END in the SOURce command was for the last block, whereas CON was used to send all previous blocks.See attached code for an example. It seems to be working for me and it might just save someone some time.