Logging data with Keysight Command Expert - Page 1
Forum section: electronics / general

author: moosebiscuit
author_rank: Contributor
timestamp: January 23, 2024, 11:42:12 pm
content: Good afternoon everybody. I am working on developing a program that automates the performance verification of an SDS1204X-E Siglent Oscilloscope. I am using a program called Keysight Command Expert, and pretty much what it does is executes a sequence of SCPI commands with multiple instruments. You are able to save this sequence as a sequence file and you can export it as well into wrappers such as Python, C+, C#, VB and Excel. I have some experience with Python, so I wanted to use that.My first issue here is that I don't have the option to export with Python. I have Python installed for every user on the PC. If anybody has any input or can help me with this problem, I'm sure I can figure out the rest.The problem that I am running into is after exporting into Excel. I chose excel because I am a little familiar with it, I know the basic functions. When I export to Excel, it displays all of my sequence that I programmed for the tests, which is fine. It's a little convoluted, but I can just move the width of the columns and it is separated properly. My return values are, for example: C1:PARA? 1.0033555e+4 for my measurements. All I want is the number in 0.000 form for further calculations. I've thought of doing various formulas for the column but I feel like I may be going down an unproductive rabbit hole. I played around with Macros and different scripts (I'm not very savvy in this stuff, used Chatgpt for some simple scripts) but nothing seems to work out. I really want to automate this procedure as much as I can. Any help would be greatly appreciated. Any ideas? Thank you!

author: Bud
author_rank: Super Contributor
timestamp: January 24, 2024, 01:42:52 am
content: You should be able to talk to the scope right from Excel, no need to jump over those hoops with Command Expert and Python. Have you considered that?Edit: you still need Keysight VISA software installed. You then call its methods from Excel scripts to read data.

author: abeyer
author_rank: Frequent Contributor
timestamp: January 24, 2024, 03:49:31 am
content: Quote from: moosebiscuit on January 23, 2024, 11:42:12 pmSounds like maybe not a great choice given that command expert main point is to focus on HPAK equipment, and there are lots of other options, but ok.Quote from: moosebiscuit on January 23, 2024, 11:42:12 pmAnd I'm sure someone can figure out your problem, but you don't really give any adequate details to start from. Which python approach are you using (I think command expert offers at least two options), what did you try, what happened, what errors did you get, etc...?Quote from: moosebiscuit on January 23, 2024, 11:42:12 pm=VALUE(TEXTAFTER($A1, ' '))and then apply whatever number format you want once you have a numeric value? This is just a basic formula, don't know why you're going down script and macro rabbitholes.

author: Bud
author_rank: Super Contributor
timestamp: January 24, 2024, 07:18:13 am
content: No need to do even that, just Import data file into Excel as Delimited type and specify question mark as the delimiter. Excel will import your data in two separate columns with the parts before and after question mark.