Author Topic: Logging data with Keysight Command Expert  (Read 1773 times)

0 Members and 1 Guest are viewing this topic.

Offline moosebiscuitTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Logging data with Keysight Command Expert
« on: January 23, 2024, 11:42:12 pm »
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!
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 7061
  • Country: ca
Re: Logging data with Keysight Command Expert
« Reply #1 on: January 24, 2024, 01:42:52 am »
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.
« Last Edit: January 24, 2024, 01:47:12 am by Bud »
Facebook-free life and Rigol-free shack.
 

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: us
Re: Logging data with Keysight Command Expert
« Reply #2 on: January 24, 2024, 03:49:31 am »
SDS1204X-E Siglent Oscilloscope. I am using a program called Keysight Command Expert

Sounds 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.

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.

And 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...?

for example: C1:PARA? 1.0033555e+4 for my measurements. All I want is the number in 0.000 form for further calculations.
=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.
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 7061
  • Country: ca
Re: Logging data with Keysight Command Expert
« Reply #3 on: January 24, 2024, 07:18:13 am »
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.
Facebook-free life and Rigol-free shack.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf