Forum Replies Created

Viewing 15 posts - 16 through 30 (of 61 total)
  • Author
    Posts
  • in reply to: keyboard disable #9153
    ZeRider
    Participant

      Hi Ralph,
      I confirm the button is correctly parameterized by the -1/+1 but no change with the keyboard input.
      The default button is always validated par the “ENTER/RETURN”
      Thanks for reporting the bug.

      in reply to: keyboard disable #9151
      ZeRider
      Participant

        Hi Ralph,
        thank for proposal but seem to not work on my computer (HTBasic 10.1.3 + Windows 11) … 🙁
        When I press “ENTER” it’s still like I click on “YES”

        CLEAR SCREEN
        KEY LABELS OFF
        CONTROL KBD,7;3
        !
        !**************
        ! MESSAGE BOX :
        !**************
        Btn=0
        !
        P$(1)=”File Storage ?” ! Button 0=YES / Button 1=NO

        DIALOG “QUESTION”,P$(1),Btn
        !
        IF Btn=0 THEN PRINT “Storage File : YES”
        IF Btn=1 THEN PRINT “Storage File : NO”
        !
        KEY LABELS ON
        CONTROL KBD,7;0
        END

        in reply to: HTBasic and visa32.Ddll #9089
        ZeRider
        Participant

          Great, I’m glad everything is working now !!!
          Good job Mathieu

          in reply to: HTBasic and visa32.Ddll #9087
          ZeRider
          Participant

            Hi Mathieu,
            Do you want to test this?

            LONG Retour
            LONG Session

            !———————————————————
            Default: ! VI Open Default RM
            !———————————————————
            DISP “—> VI OPEN DEFAULT RM : In progress …”
            !
            DLL GET “STDCALL LONG VISA32:viOpenDefaultRM” AS “Vi_open_default” ! Function
            !
            Retour=-1000
            Retour=FNVi_open_default(Session)
            !
            SELECT Retour
            CASE 0
            PRINT “> VI OPEN DEFAULT RM”
            PRINT “VIsession =”;Session
            CASE ELSE
            Type$=”DEC”
            Valeur$=VAL$(Retour)
            CALL Convert(Type$,Valeur$,Dec,Hex$,Bin$)
            PRINT “* VI OPEN DEFAULT RM : Retour=”;Retour
            CALL List_error(Hex$)
            END SELECT

            With the two SUB below … :

            SUB Convert(Type$,Valeur$,Dec,Hex$,Bin$)!*********************************
            Convert: ! Conversion DEC/HEX/BIN
            !*********************************
            SELECT Type$
            CASE “DEC”
            Dec=VAL(Valeur$) ! DECIMAL
            Hex$=DVAL$(Dec,16) ! DEC2HEX [8]
            Bin$=DVAL$(Dec,2) ! DEC2BIN [32]
            CASE “HEX”
            Hex$=Valeur$ ! HEXADECIMAL
            Bin$=DVAL$(DVAL(Hex$,16),2)! HEX2BIN [32]
            Dec=DVAL(Hex$,16) ! HEX2DEC [8]
            CASE “BIN”
            ALLOCATE B$[32]
            Bin$=Valeur$ ! BINAIRE
            B$=Bin$ !
            IF LEN(Bin$)<16 THEN B$=RPT$(“0”,16-LEN(Bin$))&Bin$
            IF VAL(B$)>10000001 THEN B$=RPT$(“1”,15)&B$
            Dec=DVAL(B$,2) ! BIN2DEC
            Hex$=DVAL$(DVAL(Bin$,2),16)! BIN2HEX [8]
            Hex$=Hex$[5,8] !
            DEALLOCATE B$
            END SELECT
            Exit: !
            SUBEND
            !
            SUB List_error(Hex$)!***************************************************
            List_error: !
            ! Liste d’erreurs extraites du document “NI-VISAProgrammersManual.pdf”
            !
            ALLOCATE Code$[80],Value$[80],Meaning$[200]
            !
            N: DATA “VI_SUCCESS”,”0″,”Operation completed successfully”
            DATA “VI_SUCCESS_EVENT_EN”,”3FFF0002″,”Specified event is already enabled for at least one of the specified mechanisms”
            DATA “VI_SUCCESS_EVENT_DIS”,”3FFF0003″,”Specified event is already disabled for at least one of the specified mechanisms”
            DATA “VI_SUCCESS_QUEUE_EMPTY”,”3FFF0004″,”Operation completed successfully but queue was already empty”
            DATA “VI_SUCCESS_TERM_CHAR”,”3FFF0005″,”The specified termination character was read”
            DATA “VI_SUCCESS_MAX_CNT”,”3FFF0006″,”The number of bytes read is equal to the input count”
            DATA “VI_WARN_CONFIG_NLOADED”,”3FFF0077″,”The specified configuration either does not exist or could not be loaded using VISA-specified defaults”
            DATA “VI_SUCCESS_DEV_NPRESENT”,”3FFF007D”,”Session opened successfully but the device at the specified address is not responding”
            DATA “VI_SUCCESS_TRIG_MAPPED”,”3FFF007E”,”The path from trigSrc to trigDest is already mapped”
            DATA “VI_SUCCESS_QUEUE_NEMPTY”,”3FFF0080″,”Wait terminated successfully on receipt of an event notification There is still at least one more event occurrence of the requested type(s) available for this session”
            DATA “VI_WARN_NULL_OBJECT”,”3FFF0082″,”The specified object reference is uninitialized”
            DATA “VI_WARN_NSUP_ATTR_STATE”,”3FFF0084″,”Although the specified state of the attribute is valid it is not supported by this resource implementation”
            DATA “VI_WARN_UNKNOWN_STATUS”,”3FFF0085″,”The status code passed to the operation could not be interpreted”
            DATA “VI_WARN_NSUP_BUF”,”3FFF0088″,”The specified buffer is not supported”
            DATA “VI_SUCCESS_NCHAIN”,”3FFF0098″,”Event handled successfully Do not invoke any other handlers on this session for this event”
            DATA “VI_SUCCESS_NESTED_SHARED”,”3FFF0099″,”Operation completed successfully and this session has nested shared locks”
            DATA “VI_SUCCESS_NESTED_EXCLUSIVE”,”3FFF009A”,”Operation completed successfully and this session has nested exclusive locks”
            DATA “VI_SUCCESS_SYNC”,”3FFF009B”,”Asynchronous operation request was actually performed synchronously”
            DATA “VI_ERROR_SYSTEM_ERROR”,”BFFF0000″,”Unknown system error (miscellaneous error)”
            DATA “VI_ERROR_INV_OBJECT”,”BFFF000E”,”The given session or object reference is invalid”
            DATA “VI_ERROR_RSRC_LOCKED”,”BFFF000F”,”Specified type of lock cannot be obtained or specified operation cannot be performed because the resource is locked”
            DATA “VI_ERROR_INV_EXPR”,”BFFF0010″,”Invalid expression specified for search”
            DATA “VI_ERROR_RSRC_NFOUND”,”BFFF0011″,”Insufficient location information or the device or resource is not present in the system”
            DATA “VI_ERROR_INV_RSRC_NAME”,”BFFF0012″,”Invalid resource reference specified Parsing error”
            DATA “VI_ERROR_INV_ACC_MODE”,”BFFF0013″,”Invalid access mode”
            DATA “VI_ERROR_TMO”,”BFFF0015″,”Timeout expired before operation completed”
            DATA “VI_ERROR_CLOSING_FAILED”,”BFFF0016″,”Unable to deallocate the previously allocated data structures corresponding to this session or object reference”
            DATA “VI_ERROR_INV_DEGREE”,”BFFF001B”,”Specified degree is invalid”
            DATA “VI_ERROR_INV_JOB_ID”,”BFFF001C”,”Specified job identifier is invalid”
            DATA “VI_ERROR_NSUP_ATTR”,”BFFF001D”,”The specified attribute is not defined or supported by the referenced session or event or find list”
            DATA “VI_ERROR_NSUP_ATTR_STATE”,”BFFF001E”,”The specified state of the attribute is not valid or is not supported as defined by the session or event or find list”
            DATA “VI_ERROR_ATTR_READONLY”,”BFFF001F”,”The specified attribute is read-only”
            DATA “VI_ERROR_INV_LOCK_TYPE”,”BFFF0020″,”The specified type of lock is not supported by this resource”
            DATA “VI_ERROR_INV_ACCESS_KEY”,”BFFF0021″,”The access key to the resource associated with this session is invalid”
            DATA “VI_ERROR_INV_EVENT”,”BFFF0026″,”Specified event type is not supported by the resource”
            DATA “VI_ERROR_INV_MECH”,”BFFF0027″,”Invalid mechanism specified”
            DATA “VI_ERROR_HNDLR_NINSTALLED”,”BFFF0028″,”A handler is not currently installed for the specified event”
            DATA “VI_ERROR_INV_HNDLR_REF”,”BFFF0029″,”The given handler reference is invalid”
            DATA “VI_ERROR_INV_CONTEXT”,”BFFF002A”,”Specified event context is invalid”
            DATA “VI_ERROR_QUEUE_OVERFLOW”,”BFFF002D”,”The event queue for the specified type has overflowed (usually due to previous events not having been closed)”
            DATA “VI_ERROR_NENABLED”,”BFFF002F”,”The session must be enabled for events of the specified type in order to receive them”
            DATA “VI_ERROR_ABORT”,”BFFF0030″,”The operation was aborted”
            DATA “VI_ERROR_RAW_WR_PROT_VIOL”,”BFFF0034″,”Violation of raw write protocol occurred during transfer”
            DATA “VI_ERROR_RAW_RD_PROT_VIOL”,”BFFF0035″,”Violation of raw read protocol occurred during transfer”
            DATA “VI_ERROR_OUTP_PROT_VIOL”,”BFFF0036″,”Device reported an output protocol error during transfer”
            DATA “VI_ERROR_INP_PROT_VIOL”,”BFFF0037″,”Device reported an input protocol error during transfer”
            DATA “VI_ERROR_BERR”,”BFFF0038″,”Bus error occurred during transfer”
            DATA “VI_ERROR_IN_PROGRESS”,”BFFF0039″,”Unable to queue the asynchronous operation because there is already an operation in progress”
            DATA “VI_ERROR_INV_SETUP”,”BFFF003A”,”Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state)”
            DATA “VI_ERROR_QUEUE_ERROR”,”BFFF003B”,”Unable to queue asynchronous operation”
            DATA “VI_ERROR_ALLOC”,”BFFF003C”,”Insufficient system resources to perform necessary memory allocation”
            DATA “VI_ERROR_INV_MASK”,”BFFF003D”,”Invalid buffer mask specified”
            DATA “VI_ERROR_IO”,”BFFF003E”,”Could not perform operation because of I/O error”
            DATA “VI_ERROR_INV_FMT”,”BFFF003F”,”A format specifier in the format string is invalid”
            DATA “VI_ERROR_NSUP_FMT”,”BFFF0041″,”A format specifier in the format string is not supported”
            DATA “VI_ERROR_LINE_IN_USE”,”BFFF0042″,”The specified trigger line is currently in use”
            DATA “VI_ERROR_NSUP_MODE”,”BFFF0046″,”The specified mode is not supported by this VISA implementation”
            DATA “VI_ERROR_SRQ_NOCCURRED”,”BFFF004A”,”Service request has not been received for the session”
            DATA “VI_ERROR_INV_SPACE”,”BFFF004E”,”Invalid address space specified”
            DATA “VI_ERROR_INV_OFFSET”,”BFFF0051″,”Invalid offset specified”
            DATA “VI_ERROR_INV_WIDTH”,”BFFF0052″,”Invalid source or destination width specified”
            DATA “VI_ERROR_NSUP_OFFSET”,”BFFF0054″,”Specified offset is not accessible from this hardware”
            DATA “VI_ERROR_NSUP_VAR_WIDTH”,”BFFF0055″,”Cannot support source and destination widths that are different”
            DATA “VI_ERROR_WINDOW_NMAPPED”,”BFFF0057″,”The specified session is not currently mapped”
            DATA “VI_ERROR_RESP_PENDING”,”BFFF0059″,”A previous response is still pending causing a multiple query error”
            DATA “VI_ERROR_NLISTENERS”,”BFFF005F”,”No Listeners condition is detected (both NRFD and NDAC are deasserted)”
            DATA “VI_ERROR_NCIC”,”BFFF0060″,”The interface associated with this session is not currently the controller in charge”
            DATA “VI_ERROR_NSYS_CNTLR”,”BFFF0061″,”The interface associated with this session is not the system controller”
            DATA “VI_ERROR_NSUP_OPER”,”BFFF0067″,”The given session or object reference does not support this operation”
            DATA “VI_ERROR_INTR_PENDING”,”BFFF0068″,”An interrupt is still pending from a previous call”
            DATA “VI_ERROR_ASRL_PARITY”,”BFFF006A”,”A parity error occurred during transfer”
            DATA “VI_ERROR_ASRL_FRAMING”,”BFFF006B”,”A framing error occurred during transfer”
            DATA “VI_ERROR_ASRL_OVERRUN”,”BFFF006C”,”An overrun error occurred during transfer A character was not read from the hardware before the next character arrived”
            DATA “VI_ERROR_TRIG_NMAPPED”,”BFFF006E”,”The path from trigSrc to trigDest is not currently mapped”
            DATA “VI_ERROR_NSUP_ALIGN_OFFSET”,”BFFF0070″,”The specified offset is not properly aligned for the access width of the operation”
            DATA “VI_ERROR_USER_BUF”,”BFFF0071″,”A specified user buffer is not valid or cannot be accessed for the required size”
            DATA “VI_ERROR_RSRC_BUSY”,”BFFF0072″,”The resource is valid but VISA cannot currently access it”
            DATA “VI_ERROR_NSUP_WIDTH”,”BFFF0076″,”Specified width is not supported by this hardware”
            DATA “VI_ERROR_INV_PARAMETER”,”BFFF0078″,”The value of some parameter—which parameter is not known—is invalid”
            DATA “VI_ERROR_INV_PROT”,”BFFF0079″,”The protocol specified is invalid”
            DATA “VI_ERROR_INV_SIZE”,”BFFF007B”,”Invalid size of window specified”
            DATA “VI_ERROR_WINDOW_MAPPED”,”BFFF0080″,”The specified session currently contains a mapped window”
            DATA “VI_ERROR_NIMPL_OPER”,”BFFF0081″,”The given operation is not implemented”
            DATA “VI_ERROR_INV_LENGTH”,”BFFF0083″,”Invalid length specified”
            DATA “VI_ERROR_INV_MODE”,”BFFF0091″,”The specified mode is invalid”
            DATA “VI_ERROR_SESN_NLOCKED”,”BFFF009C”,”The current session did not have any lock on the resource”
            DATA “VI_ERROR_MEM_NSHARED”,”BFFF009D”,”The device does not export any memory”
            DATA “VI_ERROR_LIBRARY_NFOUND”,”BFFF009E”,”A code library required by VISA could not be located or loaded”
            DATA “VI_ERROR_NSUP_INTR”,”BFFF009F”,”The interface cannot generate an interrupt on the requested level or with the requested statusID value”
            DATA “VI_ERROR_INV_LINE”,”BFFF00A0″,”The value specified by the line parameter is invalid”
            DATA “VI_ERROR_FILE_ACCESS”,”BFFF00A1″,”An error occurred while trying to open the specified file Possible reasons include an invalid path or lack of access rights”
            DATA “VI_ERROR_FILE_IO”,”BFFF00A2″,”An error occurred while performing I/O on the specified file”
            DATA “VI_ERROR_NSUP_LINE”,”BFFF00A3″,”One of the specified lines (trigSrc or trigDest) is not supported by this VISA implementation or the combination of lines is not a valid mapping”
            DATA “VI_ERROR_NSUP_MECH”,”BFFF00A4″,”The specified mechanism is not supported by the given event type”
            DATA “VI_ERROR_INTF_NUM_NCONFIG”,”BFFF00A5″,”The interface type is valid but the specified interface number is not configured”
            DATA “VI_ERROR_CONN_LOST”,”BFFF00A6″,”The connection for the given session has been lost”
            DATA “VI_ERROR_MACHINE_NAVAIL”,”BFFF00A7″,”The remote machine does not exist or is not accepting any connections”
            DATA “VI_ERROR_NPERMISSION”,”BFFF00A8″,”Access to the remote machine is denied”
            RESTORE N
            !
            !
            ON ERROR GOTO Exit! Error Not Found in the list …
            I=0
            Value$=”NotFound”
            !
            PRINT “Value = “;Hex$
            !
            WHILE Value$<>Hex$
            READ Code$,Value$,Meaning$
            I=I+1
            END WHILE
            !
            PRINT “ERROR CODE (“&VAL$(I)&”) : “;Code$
            PRINT “Meaning : “;Meaning$
            !
            Exit: OFF ERROR
            SUBEND

            in reply to: Possible “SAVE AS” issue #9078
            ZeRider
            Participant

              Same “bug” with 10.1.3 HTBasic version

              Generally I always use the old “RE-STORE” command for my program recordings 🙂

              in reply to: Integrated pdf print ? #8955
              ZeRider
              Participant

                If you install Free FOXIT Reader PDF you can configure your Print driver in your Device setup as “Foxit Reader PDF Printer”

                in reply to: Programming modern SCPI equipment over the USB port #8652
                ZeRider
                Participant

                  I never test the 10.2 HTBasic version. I’m still on 10.1.
                  Have you try to read data with a STRING variable ?

                  DIM I$[200]
                  !
                  OUTPUT Analyzer;”:CALC1:MARK1 ON”
                  OUTPUT Analyzer;”:CALC1:MARK1:X:POS 1″
                  !
                  I$=””
                  OUTPUT Analyzer;”:CALC1:MARK1:Y?”
                  ENTER Analyzer;I$
                  I$=TRIM$(I$)
                  PRINT I$

                  in reply to: Programming modern SCPI equipment over the USB port #7540
                  ZeRider
                  Participant

                    Hi, I think you could try to connect directly your device to PC through USB.

                    DIM Cmd$[80],Response$[1024]
                    !
                    Isc=13 ! Free Interface Select Code
                    Devname$=”USBInstrument1″ ! Your Instrument Find in AGILENT Connection Expert / USB Interface
                    ON ERROR GOSUB Erreur
                    LOAD BIN “USBS;DEV “&Devname$&” ISC “&VAL$(Isc)&” TIME 10″
                    !
                    Identity: Response$=””
                    Cmd$=”*IDN?”
                    OUTPUT Isc;Cmd$
                    ENTER Isc;Response$
                    !
                    PRINT Response$
                    GOTO Exit
                    !
                    Erreur: OFF ERROR
                    ERROR RETURN
                    !
                    Exit: END

                    in reply to: Programming modern SCPI equipment over the USB port #7532
                    ZeRider
                    Participant

                      Hi,
                      I think you can download programming manual here : https://www.siglenteu.com/resources/documents/spectrum-analyzers/
                      For example in this document “ProgrammingGuide_PG0703P_E02A.pdf” you will found SCPI commands overview and some programming example at the end.
                      As I see, it’s seem very similar to KEYSIGHT programming.
                      Please find some lines extract of my dedicated E4990A Analyzer HTBasic code
                      Hope that could help …

                      !——————————————————————
                      ! ANALYZER KEYSIGHT E4990A
                      !——————————————————————
                      Analyzer=717
                      !
                      Fstart=1000 ! KHz
                      Fstop=20000 ! KHz
                      Fstep=50 ! KHz
                      Npoint=((Fstop-Fstart)/Fstep)+1! #
                      Average=256 ! #
                      !
                      OUTPUT Analyzer;”*CLS” ! Interface Device CLEAR
                      OUTPUT Analyzer;”:SYST:PRES” ! Initial Setup
                      !
                      !—————————–
                      ! SETUP CHANNEL1
                      !—————————–
                      OUTPUT Analyzer;”:DISP:WIND1:TRAC1:Y:SPAC LIN” ! Set Y-Axis at LIN Format
                      OUTPUT Analyzer;”:DISP:WIND1:TRAC2:Y:SPAC LIN” ! Set Y-Axis at LIN Format
                      !
                      OUTPUT Analyzer;”:DISP:WIND1:TRAC1:STAT ON” !
                      OUTPUT Analyzer;”:DISP:WIND1:TRAC2:STAT ON” !
                      OUTPUT Analyzer;”:DISP:WIND1:TITL OFF” !
                      OUTPUT Analyzer;”:DISP:WIND1:LAB ON” ! Axle Labels
                      !
                      OUTPUT Analyzer;”:CALC1:PAR1:DEF Z” ! Set Measurement parameter Trace1 : |Z|
                      OUTPUT Analyzer;”:CALC1:PAR2:DEF TZ” ! Trace2 : Phi
                      !
                      OUTPUT Analyzer;”:CALC1:PAR:COUN 2″ ! Nb of Trace = 2
                      !
                      !—————————–
                      ! SETUP STIMULUS1
                      !—————————–
                      OUTPUT Analyzer;”:SENS1:SWE:POIN “&VAL$(Npoint) ! Set Number of Points
                      OUTPUT Analyzer;”:SENS1:FREQ:STAR “&VAL$(Fstart)! Set START Frequency
                      OUTPUT Analyzer;”:SENS1:FREQ:STOP “&VAL$(Fstop) ! Set STOP Frequency

                      OUTPUT Analyzer;”:SENS1:SWE:TYPE LIN” ! Set SWEEP Type at LIN
                      OUTPUT Analyzer;”:SENS1:AVER:COUN “&VAL$(Avg) ! Average
                      OUTPUT Analyzer;”:SENS1:AVER:STAT OFF”
                      OUTPUT Analyzer;”:SENS1:APER 1″ ! Measurement Time FAST
                      !
                      OUTPUT Analyzer;”:SOUR1:MODE VOLT” ! Set OSC Mode
                      OUTPUT Analyzer;”:SOUR1:VOLT 750E-3″ ! Set OSC Level
                      OUTPUT Analyzer;”:SOUR1:ALC OFF” ! Turn OFF ALC
                      !
                      OUTPUT Analyzer;”:CALC1:AVER:COUN “&VAL$(Avg) !
                      OUTPUT Analyzer;”:CALC1:AVER:STAT ON” !
                      OUTPUT Analyzer;”:CALC1:AVER:CLE” !
                      !
                      END

                      in reply to: Help with using HTBFileopen.dll, please! #7443
                      ZeRider
                      Participant

                        CAT instructions could be very useful to put all the files selected with your criteria in a list :

                        Nb_file=0
                        Directory$=”D:\Calibration Measurement”
                        CAT Directory$;NAMES,COUNT Nb_file
                        !
                        ALLOCATE Catalog$(1:Nb_file)[80]
                        Selection$=”*.Cal”
                        !
                        CAT Directory$ TO Catalog$(*);SELECT Selection$,COUNT Nb_file,NAMES
                        !
                        FOR I=1 TO Nb_file
                        PRINT I,Catalog$(I)
                        NEXT I
                        !
                        PRINT
                        PRINT “Nb File=”;Nb_file
                        !
                        END

                        in reply to: Help with using HTBFileopen.dll, please! #7441
                        ZeRider
                        Participant

                          An alternative solution would be to use the “FILE WIDGET” or the “DIALOG FILE” from Basic Plus (BPLUS) but there’re adapted for manual file choice.
                          For a file choice by software the CAT function could be use

                          in reply to: Need help with HTBasic code #5290
                          ZeRider
                          Participant

                            Hi,
                            Advice : Add some PRINT in your code to see the different data values at each step
                            You will see if data are extracted from array well defined in your code : For example, L=D(I*2-1) and R=D(I*2) are always 0 (?)
                            or if array dimensions are compatible with your loop …

                            in reply to: Is HTBasic still under development and/or supported? #5284
                            ZeRider
                            Participant

                              Hi Jr,
                              Do you try to download your HTBasic Demo version from the Download page?
                              I just try and seem to working well for me.
                              Here in France, I buy my HTBasic licence from Techsoft.de
                              The guys are reactive and have good support because they are also HTBasic developer
                              Regards,
                              ZeRider

                              in reply to: HT Basic Git Diff Tool #5255
                              ZeRider
                              Participant

                                Hi, do you try Beyond Compare from Scooter software ?
                                Work great if you copy-paste the HTBasic code with text format choice

                                in reply to: DLL help #4995
                                ZeRider
                                Participant

                                  Solution found !!!

                                  Size=100
                                  ALLOCATE Data$[Size]
                                  !
                                  DLL GET “STDCALL LONG Piplx_w32:_PIPLX_CardId@16” AS “Identity”
                                  Status=FNIdentity((Session),(Card),Data$,(Size))

                                Viewing 15 posts - 16 through 30 (of 61 total)
                                Scroll to Top
                                HTB icon

                                Please Sign In