Posted Fri, 17 Nov 2023 17:19:29 GMT by Robertson
Hi 
I have an AFG31152 and I have been using the Mass memory folder M:/ to store my custom waveforms which I upload to AWG by saving from the edit memory (EMEM1). Currently I have lots of waveforms in a folder (M:/waveforms/) that I no longer need, but have automatically generated filenames (such that I don't know the names of all the files in there). 

How can I delete all the files in M:/waveforms? Something like 
afg.write('MMEMory:CDIRectory "M:/waveforms"')
afg.write('MMEMory:DELete "*.tfwx"')
would be ideal but this doesn't work.
Alternatively is there a way to SSH normally into the machine, so I access the file system in a terminal?
Cheers
Posted Mon, 20 Nov 2023 22:11:27 GMT by Teles, Afonso
Hi Robertson,

The MMEMory:CATalog? command will list all the files in the current directory (the description mentions the USB memory but it actually works for all drives, I'm working on getting the documentation updated).
Posted Mon, 11 Dec 2023 15:00:50 GMT by Robertson
Dear Alfonso,

The MMEMory:CATalog? command currently doesn't return all the waveform names - I suspect that because there are quite a lot of them, if they are fed into the output buffer, but I suspect that there are so many it may overflow it or take so much time that the pyvisa connection closes. However currently if I execute:
r = afg.write('MMEMory:CATalog?')

print('{}'.format(r)
I get: 16  immeditely as a response - using Pyvisa with '\n' as a delimiter and  a 30 second timeout.  This means even if the query is executed, I do not get the full response returned to my device. If this is the correct response, then it is unclear to me how to read the output buffer after executing  the CAT? command. 
This is regardless of if I am in the M:/ or M:/waveforms folder.
If I try to query the status of the event queue after executing the above I get: -410,"Query INTERRUPTED".
Please let me know if you have any ideas
Thanks,
Robertson
 

You must be signed in to post in this forum.