Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Programming modern SCPI equipment over the USB port #8653
    K9VMY
    Participant

      Check with Ralph, we spent many e-mails working on this issue.
      It starts with \n “Newline” issues from these instruments.
      1 Your original code did not return the instrument’s ID. Here are the changes I made to make it work.
      ***************************************************************
      Newl$=CHR$(10)
      ON ERROR GOSUB Erreur
      Isc=18
      Devname$=”USBInstrument1″ ! Your Instrument Find in AGILENT Connection Expert / USB Interface
      Devname$=”SVA1032X” ! I changed the name of my device with the HTBasic Tools–>Devices
      LOAD BIN “USBS;DEV “&Devname$&” ISC “&VAL$(Isc)&” TIME 10″

      Identity: Response$=””
      OUTPUT Isc;”*IDN?”&Newl$; !!!! NOTE THE NeWL$ and especially the SEMICOLON AT THE END of the line!!!
      ENTER Isc USING “#,50A”;Response$ !!! We found that formatting allowed HTBasic to read the string
      CLEAR SCREEN
      PRINT Response$
      PRINT “ISC Setup Success”
      WAIT 10
      GOTO Exit

      Erreur: OFF ERROR
      ERROR RETURN
      **************************************
      Result was printed on the screen as:
      Siglent Technologies,SVA1032X,SSA3PCDX5R0598,3.2.2.5.0
      ISC Setup Success

      Next I played around with formatting the output statement for reading the marker, here is the code I came up with.
      **************************************
      Newl$=CHR$(10)
      ON ERROR GOTO Err
      B$=””
      OUTPUT @Analyzer;”:CALC:MARK1:FCO:X?”&Newl$; !!!SEMICOLON PUT one at the end of all of our output statements!!!
      ENTER @Analyzer USING “#,6A”;B$ !!!Only 6 characters
      Marker=VAL(B$)
      Err: OFF ERROR
      PRINT ERRM$ !!!Print an error to prevent program from halting
      PRINT B$
      PRINT “Marker Frequency= “;Marker;” MHz”
      **************************************
      Again Check with Ralph, we had a very long exchange, he contacted other resources that helped define the problem.
      HTBasic was written around old GPIB/HPIB instruments, the new stuff is designed entirely differently and CR/LF is not used even ignored by them. So extreme changes need to be made in HTBasic code to accommodate them.
      The “Agilent Connection Expert” APP (Windows 10) was the main tool in verifying that it wasn’t an equipment issue!!!
      Also “Agilent Interactive I/O tool” APP came along with it. I know I got it with my Agilent 82357B USB-GPIB interface CD,
      I have it on all of my machines.

      Hope this helps,
      Thanks again for all of Ralph’s help!!!
      73

      in reply to: Programming modern SCPI equipment over the USB port #8651
      K9VMY
      Participant

        I noticed that your program only has OUTPUT Statements.

        My program works great, until I try to read a marker with my analyzer.

        I can turn it on a peak signal and send the following commands.

        OUTPUT Analyzer;”:CALC:MARK1:FCO:STAT ON”
        OUTPUT Analyzer;”:CALC:MARK1:FUNC FCO”
        OUTPUT Analyzer;”:CALC:MARK1:FCO:X?”;B ! This statement asks for data from the device

        When I try to read the result with:
        ENTER Analyzer;B
        The program times out and give me an error: “168 in 2380 Device Timeout”

        Traditionally I have used this procedure, it seems to no longer work with 10.2 or the new trial software.

        Also, I noticed in a previous post in setting up the USB driver you had an ON ERROR statement
        That program has an ENTER Statement, but the *IDN? never returns anything.

        Your thoughts on reading from an instrument

        in reply to: Programming modern SCPI equipment over the USB port #7541
        K9VMY
        Participant

          Thank you, Very helpful!!!
          Have GREAT day

          in reply to: Programming modern SCPI equipment over the USB port #7533
          K9VMY
          Participant

            Thank you for the example.
            I see that your program uses a GPIB Controller (7) plugged into the USB port. Obviously, the E8990A is set to 17.
            I have 2 Agilent 82357B GPIB Interface for my PC and a Siglent USB-GPIB Adapter which has a USB-A connector and a female GPIB connector. Unfortunatly, I cannot plug either into the USB-B GPIB port on the instrument.

            The other option would be to use the USB-A to USB-B cable to the instrument, but I don’t know what address to use for the Analyzer= line in your code? Would it be Analyzer=17? since there is no Adapter?

            Again, many thanks

          Viewing 4 posts - 1 through 4 (of 4 total)
          Scroll to Top
          HTB icon

          Please Sign In