# Manipulating the results to display correctly.

I have a UUT that is outputing phase (VOR) and measuring on a R&S FMAV Modulation Analyzer. Everything is working good except my displayed readings in the results window and the report. My UUT is set to 0° while reading 180.0°±0.1U on the FMAV. MetCal displays:

UUT INDICATED     SYSTEM ACTUAL       %TOL

180.0°                        180.05°                90

I want it to display:

UUT INDICATED     SYSTEM ACTUAL       %TOL

0.0°                        180.05°                90

My current MEMC statement is as follows:

MEMC     180.0°               0.1U

I could use an EVAL statement and display the results using the registers and explicit tolerances, but I am hoping there is a better method that I am overlooking. Suggestions?

Scott Prieskop

That's similar to my predicament. This is a simple MET/CAL 101 question, but it’s been so long ago since I’ve encountered this problem, I forgot how to remedy it… The printouts are rounding to whole numbers and leaving off the decimal places.

As an example, in the below pseudo-code snippet, I'm taking a pressure reading from a transducer (via RS-232) and comparing it to a known value entered by the user:

2.004 MEMI      Enter the local gravity corrected reading (from spreadsheet tool)

2.005 MATH      M[2] = MEM

# Transducer full scale is 15 PSIA

2.006 LABEL      GET_RDG

2.007 PORT      ?[I]

2.009 MATH       M[1] = MEM

2.010 OPBR      Pressure reading is: [M1] psia

2.010 OPBR      Click Yes to accept reading, No to fetch another reading

2.011 JMPL      GET_RDG             MEM1 < 0

# Standard is 0.01% rdg., and UUT is 0.02% F.S.

2.012 VSET       UUT_RES = .001

2.013 ACC       15           0.01%

2.014 MATH      MEM=M[1]

2.015 MATH      MEM1=M[2]

2.016 MEMCX  15       psia           0.02/

The user enters 14.999 as the standard reading from the spreadsheet tool, and it ends up in MEM1. The pressure transducer reading is 15.004. The resulting printout should show System Actual of 14.999, UUT reading of 15.004, low limit of 14.996 and high limit of 15.002 (and a FAIL result).

Despite fixing the decimal places at 0.001 using the VSET command in line 2.012, it still shows rounds everything off, showing System Actual of 15, UUT reading of 15, low limit of 15, and high limit of 15. The Crystal Report I'm using is just fine- I use the same report for other instruments and the number of decimals are displayed correctly. Anybody know the answer to this MET/CAL 101 problem?

Ole Gule

set this line to

2.013 ACC       15.000psia           0.01%

and I think it should work.

Ole

Scott Prieskop

That was one of the very first things I tried and it didn't work. It must be something else I'm missing...

Michael Schwartz

What Version of MET/CAL are you running?

William (Bill) Spath

Tarzan271 -- can you provide the MET/CAL procedure code you are using?

ScottBP -- yours is easier

It should be written as

2.013 ACC       15.000'psia'           0.01%

Otherwise MET/CAL tries to parse the prefix and unit causing the lowercase "p" to be seen as pico (10^-12) which changes everything for reporting.

Christian Tarr

Mike,

I am running MetCal 8.1.

Bill,

Here is my code:

12.001  RSLT         =
12.002  HEAD         VOR MODE
12.003  HEAD         -2 { VOR Phase (Degrees)}
12.004  SCPI         [@FMAV][T240000]DEM:AV:V:PHASE_M ON
12.005  PORT         VOR:BEAR:VALUE 0[13][D3000]
12.006  TARGET       -p
12.007  SCPI         [@FMAV][T240000]DEM:AV:V:PHASE?[I\$]
12.008  MATH         MEM = FLD(MEM2, 2, " ")
12.009  MEMC         180.0°         0.1U

• SCPI statement sets FMAV to measure phase
• PORT statement sets the UUT to 0°.
• SCPI statemtent saves phase reading of FMAV to MEM2
• MATH sttatemnent extracts actual phase reading and saves to MEM
• MEMC determines is MEM is within the .01U tolerance

This all works good, except I want the results to show the 0° setting for the UUT INDICATED and the FMAV phase reading (around 180°) for the SYSTEM ACTUAL in the results window and the calibration report.

Thank you for the help.

Ole Gule

1.010 VSET UUT_RES = .001

1.011 MATH MEM=M[2]

1.012 ACC 15 psia 0.01%

1.013 MEME

1.014 MATH MEM=M[1]

1.015 MEMCX 15 psia 0.02/

This works.

Ole

Michael Schwartz

I think if you change line12.009 to MEMCX It will swap the values..

12.009  MEMCX         180.0°         0.1

Christian Tarr

Ole,

What is the point of using the MEME statement then MEMCX? Why not just use MEMC? MEME is an outdated statement since they introducted MEMCX in v6.1 and should only be used for legacy procedures.

Christian Tarr

Mike,

MEMCX only changes whether MEM is used as the UUT indicated or System actual for the results. MEM is where my reading from the FMAV is stored, so MEMC is the correct command to show as SA. The UUT indicated is 0°.

I found the answer from another post by ScottBP.  My working code:

12.001  RSLT           =
12.002  HEAD          VOR MODE
12.003  HEAD         -2 { VOR Phase (Degrees)}
12.004  SCPI           [@FMAV][T240000]DEM:AV:V:PHASE_M ON
12.005  PORT          VOR:BEAR:VALUE 0[13][D3000]
12.006  TARGET      -p
12.007  SCPI           [@FMAV][T240000]DEM:AV:V:PHASE?[I\$]
12.009  MATH         MEM = FLD(MEM2, 2, " ")
12.002  TSET          TDESC = 0.0
12.010  MEMC        180.0°         0.1U

It won't display in the results window correctly, but it works in the report, which is more important. Thanks everyone for the help.

Michael Schwartz

I all you want to do is add the UUT settings you can to  both on the MEMC and MEMCX Lines

12.009  MEMC         180.0°         0.1U    @0.0°_set

12.009  MEMCX         180.0°         0.1U    @0.0°_set

Christian Tarr

That's what I was looking for. I don't know why I overlooked this as I used it in other sections for the frequency setting.

In ver8.1, I had to do the following to get it to display correctly:

12.009  MEMC         180.0°         0.1U    0.0deg_UUT

The @ symbol isn't needed because MetCal automatically throws it in on the report and using the ° symbol puts a wierd A thingy before it. Subing "deg" for "°" displayed the ° symbol properly in the report.

Thanks for the help.