Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Mode VB6 example doesn't work on PCMCIA 4050

Hi,

I tried to run the example for continuous measuring in my VB 6 IDE. The program runs fine, but won't return any value. All other example programs work.
Is it a known problem?

Best regards Christian

0 Kudos
Message 1 of 4
(7,387 Views)

Which example do you use exactly? If this example uses the "waveform mode" then it will not work with your hardware. You would need a 4070 for example to use the waveform-mode.

Could you post the example, or the source-code of the exampel you use?

André

 

0 Kudos
Message 2 of 4
(7,367 Views)
I used the "Cont Acq Multiple Samples" example from the Driver CD and tried to change the external trigger into a software trigger.

Do you find the Error in the Code?

-------8<---------------------------------------------

        'Open a session to the instrument
        If CheckError(niDMM_init(InstrDesc.Text, VI_TRUE, _
                VI_TRUE, VI)) Then GoTo Error
   
        'Configure the acquistion
        If CheckError(niDMM_ConfigureMeasurement(VI, CtlVal(measFunction), _
                    Val(Range.Text), Val(Resol.Text))) Then GoTo Error
   
        'Set the powerline frequency
        If CheckError(niDMM_ConfigurePowerLineFrequency(VI, _
                    CtlVal(PwrLineFreq))) Then GoTo Error
               
        'Set trigger source and delay
        If CheckError(niDMM_ConfigureTrigger(VI, NIDMM_VAL_IMMEDIATE, 0)) Then GoTo Error
       
        'Set trigger slope
        If CheckError(niDMM_ConfigureTriggerSlope(VI, triggerSlope)) Then GoTo Error
           
        Call niDMM_SendSoftwareTrigger(VI)
           
        'Set the number of measurements
        If CheckError(niDMM_ConfigureMultiPoint(VI, 1, NIDMM_VAL_SAMPLE_COUNT_INFINITE, NIDMM_VAL_IMMEDIATE, _
                    0#)) Then GoTo Error
   
        'Set sample trigger slope
        If CheckError(niDMM_ConfigureSampleTriggerSlope(VI, triggerSlope)) Then GoTo Error
       
        'Initiate the measurements
        If CheckError(niDMM_Initiate(VI)) Then GoTo Error
       
        'Turn on timer to check for available data from the DMM
        FetchTimer.Enabled = True
0 Kudos
Message 3 of 4
(7,356 Views)

To use a software-trigger you have to changes some things:

1.   If CheckError(niDMM_ConfigureTrigger(VI, NIDMM_VAL_IMMEDIATE, 0))  change to   If CheckError(niDMM_ConfigureTrigger(VI, NIDMM_VAL_SOFTWARE_TRIG, 0))

2. The line Call niDMM_SendSoftwareTrigger(VI) must be moved below the line  If CheckError(niDMM_Initiate(VI))

If all this does not help, you will have to do a little bit more debugging. What happens after the initiaalisation? Does the fetch - function returns invalid or no data, or does it return 0?

 

0 Kudos
Message 4 of 4
(7,346 Views)