Print to Log Immediatly

Kenny K.
Milwaukee, WI

Jun 2, 2015
10 Posts

0  |  0  

Re: Print to Log Immediatly

The UUT sometimes is slow to respond to the IR command, which can cause a false failure on our RF test.  To prevent false failures, I will repeat the test up to two times if needed.

I would like to inform the operator that a re-test is happening, however, it seems like the Print or Append statements only update the log after the test completes.

With the append, the "Carrier Power too low, attempting to test again." is printed after the test result, and with the Print statement, it is printed before the test result.  But in both cases, it only shows up on the test log after the final test is run.

Is there a way to have the test log update immediately during a test so that the operator knows what is happening?

if (b_Temp = True) !If Set Test Mode IR command OK, run TX Test.
    !Loop twice if the carrier Power is too low
    i=0
    Repeat
    vi_IR_RunTransmitCarrierTest(e_CurrentTestPosition,Const_dSARefLevel,Const_dSAAtten,Const_dRSense,"105",Const_dSAExternalGain,st_Error,b_Temp,d_Temp2,d_Temp1,d_Temp4,d_Temp3,st_Error,1)
    handle_vi_error()
    !Check if carrier power is in range. Exit loop if in proper range.
    if((d_Temp1+Const_dTxCableLoss) < Const_dCarrierPowerMax and (d_Temp1+Const_dTxCableLoss) > Const_dCarrierPowerMin)
        st_WaterTestData[e_CurrentTestPosition].b_Retest = False !mark test as not a retest
        i=2 !Set i to greater than stement to exit loop
    else
        if((d_Temp1+Const_dTxCableLoss) < Const_dRetestCarrierPowerMax and (d_Temp1+Const_dTxCableLoss) > Const_dRetestCarrierPowerMin)!check if in retest range
            i=i+1  !increment counter
            Print ( "<P><font size=\"3\" color=\"red\">Carrier Power too low, attempting to test again.</font><P>")
            st_WaterTestData[e_CurrentTestPosition].b_Retest = True !mark test as a retest.
        else
            i=2  !Exit if not in retest range
        endif
    endif
    Until i > 1 !only loop twice
endif

Michael W.
Lititz, PA

Jun 3, 2015
30 Posts

0  |  0  

Re: Print to Log Immediatly

I don't know of a way to update the log immediately but I personally would use a modeless form to let the operator know what's going on.

Solution Available
Victor B.
Lake Forest, CA

Jun 3, 2015
93 Posts

1  |  0  

Re: Print to Log Immediatly

Use the Print statement to add your message to the print queue.  Then follow it with the statement 'Log.Flush()'.  Log.Flush() will force all data in the print queue to be printed to the log immediately.  Log.Flush() does take a few milliseconds so it can slow your test program down if it is overused.

Regards,
Victor Brode



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]