02-23-2014 07:29 PM
Is there a way to browse the file path of an instrument connected via GPIB? From my experience, only the file system on the local controlling machine is accessible in this manner. I will have files saved within a folder on a PNA but the file name will have a variable characters in the name based upon the date and saved version -- so from an automated testing standpoint, I won't necessarily know the entire file name during execution. If I could using a browse file command to locate and store the file name before running the code, the script would be more streamlined.
An alternative method would be to search the known folder for the beginning of the file name string. I know the List Folder function could do this for files stored locally, but again, this does not access the file system of the PNA controlled via GPIB.
Any suggestions would be helpful. Thank you.
02-24-2014 06:30 AM
That would depend entirely on your instrument. What PNA are you using? Do you have a command reference for it? Do you see is a list folder contents command in there?
02-24-2014 09:18 AM
I'm using an Agilent PNA N5230C and there is nothing in the programming guide command tree that has anything like that. I was hoping maybe there was some type of universal command or relatively simple workaround that may perform the same function.
02-24-2014 09:39 AM
02-24-2014 10:06 AM
The information I was looking for there was how to save certain file information over GPIB (once I found the PNA help site it became trivial as they have that general information on their site). In this instance I am trying to find ways to manipulate files and file structures over GPIB similar to the methods available in the File I/O functions list on LabVIEW. Specifically, I want to search a folder for a file on the PNA and open it without knowing the complete file name (I will know the beginning string but the last couple digits will vary based on a variety of information). If this was on the local machine, I could use List Folder and string Match Pattern functions to find the exact file name, however, I have not seen a way to do this or something comparable with the SCPI commands. I understand this can be quite instrument specific but thought there may be a more general way to do this. I may have to rethink how I'm structuring this portion of my code somehow to avoid this.