Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.
I have been trying to use the file I/O commands to write the data from the instrument to a file. I am new to using LUA and TSB. I have been able to figure out how to "write to file" using LUA and a seperate compiler, but I have not been able to do so in TSB. The "io.open", "io.input", and "io.output" commands does not seem to work. I have created a test file named "c:\test.txt", but everytime I try to open this file in the TSB command window, I get the error "2203 file or directory error". Log:
TSP>fid = io.open("C:/test.txt","r")
2203, File or directory error
I am able to run a voltage sweep, store current readings into the buffer (nvbuffer1), and print those readings in TSB, but it fails to export the buffer data to a file.
savebuffer(smua.nvbuffer1, "csv", "data.csv")
produces "2203, File or directory error."
I have a USB flash drive plugged into the front the sourcemeter. Does it need to be formatted in a particular way? It is an 8Gb drive, FAT32 file system currently.
Thank you for any assistance.
- Keithley Applications
- Posts: 254
- Joined: February 28th, 2011, 6:17 am
- Country: United States
Try savebuffer(smua.nvbuffer1, "csv", "/usb1/data.csv")
In order to save to the USB drive you must add /usb1/ at the beginning of your filename. You can see this on page 135 of the 2600A Reference Manual Rev D which is page 7-7 of the actual manual where it explains the savebuffer commands in depth.
Thank you. I had missed the "/usb1/" comment before, but I'm still getting the same error. It seem to be a problem communicating with my USB flash drive because even when I use the front panel (STORE, SAVE, USB1, CSV, SMUA_BUFFER1, smua1buffer000.csv) I get the same error, "Error Code: 2203, File or directory error." Both flash drives I have tried have had the same result. They both light up when plugged in.
I tried to update the firmware with 2600A-850SV2.1.6 on my USB drive, but it claimed "no files found." I was able to update it through TSB.
Also, the example given in the 2600A Reference Manual Rev D on page 558 (19-274) is:
savebuffer(smua.nvbuffer1, "csv", "mybuffer.csv")
Without the "/usb1/", I assumed it would be saved in my TSB workpace folder. What should that command do?
Who is online
Users browsing this forum: No registered users and 1 guest