0

NMeas how to show workings on certificate

Hi, can anyone help with a procedure that will allow me to take 3 manually entered readings and the display on the certificate both the initial readings and the final mean value .

I’ve been using the NMeas=3 to enter the three readings but it only displace the mean result on the certificate how do I get it to display the initial working values too. ?

16 comments

Date Votes
0
Avatar
Luis Cardoso

I There

In Code the simple way i found is doing like this example:

1.003 VSET NMEAS = 3
1.004 TOL 2%

1.005 MATH reading = 0
1.006 TARGET -m
1.007 MEMI Insert Reading:
1.008 MATH reading = reading + 1
1.009 IF reading == 1
1.010 MATH M[10] = MEM
1.011 ELSEIF reading == 2
1.012 MATH M[11] = MEM
1.013 ELSEIF reading == 3
1.014 MATH M[12] = MEM
1.015 RSLT = Reading 1 = [M10], Reading 2 = [M11], Reading 3 = [M12]
1.016 ENDIF
1.017 MEME
1.018 MEMC 10V TOL

But should be other ways maybe more simple than this, but at first look this should work for what you need.

Compliments and good work

Luis

0
Avatar
Jamie Elliot

HI Luis ,

Many thanks for you eloquent procedure , you are a Star.

Just wanted ask for a little more help in how I insert this into my current procedure , I'm new to this so learning as I go.

Here's what I have

1.001  ASK+      K

1.002  VSET     Nmeas = 3 ; mfile = mfile.cvs

1.003  RSLT     =

1.004  HEAD    { Mean}

1.005  HEAD    50 Nm

1.006  DISP      Average result at 50 Nm

1.007  MEMI     Enter 3 readings for 50 Nm test . Press <ENTER>

1.008  MEME

1.009  MEME   50

1.010  MEMC   Nm                         1.50U

2.001  HEAD

2.002  DISP    !              Complete.

 

Its not pretty procedure , you one looks much better please any help on insetting your maths function would ne great.

 

Thanks Again.

0
Avatar
James Steeds

Theres is this example in the help?

 

0
Avatar
Luis Cardoso

Yes, you can use that instructions that are in the help file, using the uncertainty parameters, making the code much easier.

In you code could be like this:

1.003 ASK+ K
1.004 VSET Nmeas = 3; mfile = mfile.cvs
1.005 RSLT =
1.006 HEAD { Mean}
1.007 HEAD 50 Nm
1.008 DISP Average result at 50 Nm
1.009 TARGET -m
1.010 MEMI Enter 3 readings for 50 Nm test . Press <ENTER>
1.011 MEMC 50Nm 1.50U
2.001 MATH M[10] = UNCV (1)
2.002 MATH M[11] = UNCV (2)
2.003 MATH M[12] = UNCV (3)
2.004 RSLT = Reading 1 = [M10], Reading 2 = [M11], Reading 3 = [M12]

2.005 HEAD

2.006 DISP ! Complete.

Like i said there are many ways for doing this, The Help file is a valuable help for this, exploring is not a waist of time for the contrary.

Hope this helps you.

Compliments

0
Avatar
Luis Cardoso

And by the way, thanks James for the tip.

I didn't remember the uncertainty parameters for this.

Compliments

0
Avatar
Jamie Elliot

Hi Luis ,

 

Nearly there , just getting an error on the script

E1701  FSC RSTL: Incorrect special instruction or message too long

for 2.004 RSLT  = Reading 1=[M10], Reading 2=[M11}, Reading 3=[M12

 

Not clear where I'm going wrong .

This is great help for teaching me how these scripts work , definitely taking notes on all this info.

Sadly script writing is not my strong point but I'm getting there with your help.

Cheers

Jamie

 

0
Avatar
James Steeds

You have a curly brace instead of a square bracket after M11, and no square bracket after M12.

0
Avatar
Jamie Elliot

Many thanks Luis and James I have successfully managed to create a working procedure , just one small problem left the result the Average result is displayed as :-

Nominal  value     Test Result     Difference 

150.0                    148.5              1.506667

I only want the results to 0.00 decimal places how do I do this particularly the difference which is 6 decimal places.

1.001 ASK+ K X
1.002 ASK- P U F V
1.003 VSET NMEAS = 3
1.004 MATH reading = 0
1.005 TARGET -m
1.006 MEMI Insert readings for 150 Nm < ENTER >
1.007 MATH reading = reading + 1
1.008 IF reading ==1
1.009 MATH M[10] = MEM
1.010 ELSEIF reading ==2
1.011 MATH M[11] = MEM
1.012 ELSEIF reading ==3
1.013 MATH M[12] = MEM
1.014 RSLT = Reading 1 = [M10],Reading 2 = [M11],Reading 3 = [M12]
1.015 HEAD {Average Result=}
1.016 ENDIF
1.017 MEMC 150.0Nm 4.5U

 

Many thanks again I'm sure one of you will have a solution for me 

Cheers

Jamie 

0
Avatar
James Steeds

Mabe try something like this?  My changes are in bold.

 

  1.001  ASK+           K                              X
  1.002  ASK-                        P     U                      F        V
  1.003  VSET         NMEAS = 3; UUT_RES = 0.01
  1.004  MATH         reading = 0
  1.005  TARGET       -m
  1.006  MEMI         Insert readings for 150 Nm < ENTER >
  1.007  MATH         reading = reading + 1
  1.008  IF           reading ==1
  1.009  MATH         M[10] = CRND(MEM, 0.01)
  1.010  ELSEIF       reading ==2
  1.011  MATH         M[11] = CRND(MEM, 0.01)
  1.012  ELSEIF       reading ==3
  1.013  MATH         M[12] = CRND(MEM, 0.01)
  1.014  RSLT         = Reading 1 = [M10],Reading 2 = [M11],Reading 3 = [M12]
  1.015  HEAD         {Average Result=}
  1.016  ENDIF
  1.017  MEMC         150.0Nm        4.5U

 

 

0
Avatar
Jamie Elliot

Hi James ,

Many thanks for the adjustments but the certificate still prints 6 decimal places on the difference value .

Here's a copy of my script in case I've put it down wrong.

=============================================================================
INSTRUMENT: Test mean 2
DATE: 2020-02-13 13:56:20
AUTHOR: Jamie Elliot
REVISION: 1.0
ADJUSTMENT THRESHOLD: 70%
NUMBER OF TESTS: 2
NUMBER OF LINES: 35
=============================================================================
STEP FSC RANGE NOMINAL TOLERANCE MOD1 MOD2 3 4 CON


1.001 ASK+ K X
1.002 ASK- P U F V
1.003 VSET NMEAS = 3; UUT_RES = 0.01


1.004 MATH reading = 0
1.005 TARGET -m
1.006 MEMI Insert readings for 20 Nm < ENTER >
1.007 MATH reading = reading + 1
1.008 IF reading ==1
1.009 MATH M[10] = CRND(MEM,0.01)
1.010 ELSEIF reading ==2
1.011 MATH M[11] = CRND(MEM,0.01)
1.012 ELSEIF reading ==3
1.013 MATH M[12] = CRND(MEM,0.01)
1.014 RSLT = Reading 1 = [M10],Reading 2 = [M11],Reading 3 = [M12]
1.015 HEAD {Mean Value}
1.016 ENDIF
1.017 MEMC 20.00Nm 0.6U

Hope you can see what's going wrong I'm stumped .

 

Cheers

Jamie 

0
Avatar
Luis Cardoso

I there

Please try the folowing, i cant test it at the time:

1.005 VSET NMEAS = 3; UUT_RES = 0.01


1.006 MATH reading = 0
1.007 TARGET -m
1.008 MEMI Insert readings for 20 Nm < ENTER >
1.009 MATH reading = reading + 1
1.010 IF reading ==1
1.011 MATH M[10] = CRND(MEM,0.01)
1.012 ELSEIF reading ==2
1.013 MATH M[11] = CRND(MEM,0.01)
1.014 ELSEIF reading ==3
1.015 MATH M[12] = CRND(MEM,0.01)
1.016 RSLT = Reading 1 = [M10],Reading 2 = [M11],Reading 3 = [M12]
1.017 HEAD {Mean Value}
1.018 ENDIF
1.019 FMT SA = %.2f
1.020 MEMC 20.00Nm 0.6U

This only afects Christal reports presentation not metcal test messages.

Compliments

0
Avatar
Jamie Elliot

Hi Luis,

Thanks for the info but its still displaying the difference result to 6 decimal places.

Help , so close just need to get it to 2 places and we've done it .

Many thanks for your help it is very much appreciated .

 

Cheers.

0
Avatar
Luis Cardoso

I there

When you say "difference" do you mean "error" field on the certificate?

Compliments

0
Avatar
Jamie Elliot

Yes its the error , from the final calculation, the actual readings we enter are all to two decimal places its just when the average result is compared to the nominal value it does not round the error to 2 decimal places.

Think the problem is all to do with the final calculation .

Cheers

0
Avatar
Luis Cardoso

I there

So please put the following before MEMC:

1.019 FMT ERR = %.2f

This will format the Error field on mectal results and if your crystal reports are linked to the right place then will format the error field to 2 decimal.

 

Compliments

 

0
Avatar
Jamie Elliot

Hi Luis,

Still not working , I maybe have to look at the Crystal report setup , but it works with the other scripts.

If you have any other suggestion please send them , I'm so close , going to crack this now.

 

Cheers Again

Jamie

Please sign in to leave a comment.