Author Topic: Test Equipment Use cases with Chatbots  (Read 946 times)

0 Members and 1 Guest are viewing this topic.

Offline brunoant4510Topic starter

  • Newbie
  • Posts: 3
  • Country: us
Test Equipment Use cases with Chatbots
« on: April 24, 2025, 03:04:53 am »
Recently, I have been using ChatGPT and CoPilot to write test automation scripts for my oscilloscope for general electronics testing (mostly bus decode analysis).  ;D It has been helpful in getting started with automating test equipment via SCPI commands. Although not always correct, it has been useful in pointing me in the right direction to find the specific commands.  :-\

But I wanna know how others have been using AI chatbots with Test Automation, specifically when trying to generate automation scripts with raw SCPI commands. I've had decent luck, but nothing substantial.

Anyone have experiences in or related this?
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 3570
  • Country: us
  • Not An Expert
Re: Test Equipment Use cases with Chatbots
« Reply #1 on: April 24, 2025, 03:07:00 am »
I've been feeding ChatGPT whole SCPI command sets from instrument data sheets and having it make the python interface drivers for me.  It doesn't get it 100% right, but once it understands the command structures it saves a TON of busy working going through all the SCPI commands.
 

Offline DH7DN

  • Regular Contributor
  • *
  • Posts: 142
  • Country: de
    • DH7DN Blog
Re: Test Equipment Use cases with Chatbots
« Reply #2 on: April 24, 2025, 10:07:36 am »
Saving tons of time via Chatbot, it's worth trying! At least you can design a quick prototype and expand it to your needs.
If you can break down your big Test Automation problem in small chunks, the chance is high that you will get some useful results.


"Measure 200 waveforms, remove noise and do FFT with Tektronix TDS3034B" will get you nowhere  :-DD
« Last Edit: April 24, 2025, 10:21:44 am by DH7DN »
vy 73 de DH7DN, My Blog
 

Offline baldengineer

  • Contributor
  • Posts: 10
  • Country: us
  • James
    • Personal Blog
Re: Test Equipment Use cases with Chatbots
« Reply #3 on: April 24, 2025, 02:18:39 pm »
Can you give an example of the output you're getting from the LLM?

I'm trying to understand wha you mean by interface drivers.
Fan of making things beep, blink, and fly.  AddOhms video creator, KN6FGY. Oh, and Bald.
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 3570
  • Country: us
  • Not An Expert
Re: Test Equipment Use cases with Chatbots
« Reply #4 on: April 24, 2025, 07:22:44 pm »
Can you give an example of the output you're getting from the LLM?
I'm trying to understand wha you mean by interface drivers.

Sure.  I mean a python SCPI/interface command driver.  The last one I did was a KWR102 power supply. 
https://www.welectron.com/mediafiles/manuals/korad/Korad_KWR100_Manual.pdf

I told ChatGPT that is uses UDP for sending messages, and I wanted a class with get/set methods for each command in the list.  I then pasted the list of SCPI commands from the manual:
Code: [Select]
...
ISET05:10.5
Set the current to 10.5A
ISET05?
Query the current setting value of the current
VSET05:12.5
Set the voltage to 12.5V
VSET05?
Query the current setting value of the voltage
IOUT05?
Query the current output value of the current
VOUT05?
Query the current output value of the voltage
BEEP05:
BEEP:1 turn on the buzzer,BEEP:0 turn off the buzzer
...

and it made the methods:
Code: [Select]
...
    def setCurrent(self, current):
        """Set the current to the specified value
        Args:
            current (float): Current value in A
        """
        s = self.device.udpSend(f'ISET:{current}')
       
    def getSetCurrent(self):
        """Query the current setting value
        Returns:
            float: Set current value in A
        """
        s = self.device.udpSendRecv('ISET?')
        return float(s.strip('\n'))
       
    def setVoltage(self, voltage):
        """Set the voltage to the specified value
        Args:
            voltage (float): Voltage value in V
        """
        s = self.device.udpSend(f'VSET:{voltage}')
       
    def getSetVoltage(self):
        """Query the voltage setting value
        Returns:
            float: Set voltage value in V
        """
        s = self.device.udpSendRecv('VSET?')
        return float(s.strip('\n'))
...

Yes, this is all trivial stuff.  But that's even more reason why doing that by hand for all the commands sucks.
« Last Edit: April 24, 2025, 07:24:54 pm by Smokey »
 
The following users thanked this post: thm_w, baldengineer

Offline brunoant4510Topic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Test Equipment Use cases with Chatbots
« Reply #5 on: April 25, 2025, 06:37:43 am »
I agree that having an AI chatbot attempt to produce the desired results from something like the example you gave would be a challenge, especially without any prior knowledge or context of the test instrument or the syntax of SCPI commands.
I attempted something similar using a programmer's manual for an oscilloscope and using RAG with Nvidia's ChatRTX, and the output was decent but not the desired intent. I don't quite remember the exact prompt.
 

Offline brunoant4510Topic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Test Equipment Use cases with Chatbots
« Reply #6 on: April 25, 2025, 06:39:54 am »
It seems like in general most user will use AI chatbots (like ChatGPT) to write test automation scripts for their own instruments.
But I am also curious if anyone has used AI chatbots for things like Electrical engineering concepts (i.e. "What is an I2C protocol signal?" or "Tell me more about Eye diagrams"). My guess is that you can easily search these without too much trouble.

I am also curious if anyone has had any experience with AI chatbots being able to troubleshoot test instruments with really complex signals. For example, "Why is my PCIe Gen 3 decoding showing incomplete packets on my oscilloscope?".

I feel that these would be much more difficult questions because the AI chatbot would need to somehow query the state of the instrument as well as understand what would be common causes of these troubleshoot. :(
 

Offline pdenisowski

  • Super Contributor
  • ***
  • Posts: 1081
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Test Equipment Use cases with Chatbots
« Reply #7 on: April 25, 2025, 10:29:42 am »
But I am also curious if anyone has used AI chatbots for things like Electrical engineering concepts (i.e. "What is an I2C protocol signal?" or "Tell me more about Eye diagrams"). My guess is that you can easily search these without too much trouble.

Or you can view 100% human-generated content on these topics, including I2C :)

https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8
 
The following users thanked this post: jjoonathan, brunoant4510


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf