From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Pirani / Penning numeric meters

Hello all,

In the user interface I have to represent a Pirani pressure gauge and a Penning pressure gauges. They are some kind of weird non-linear indicators. Given a 0 to 10V value, the range is something like 1e-2 to 100 for the Pirani and 1e-8 to 1e-4 for the Penning. See pic.

 

Any idea what the best way to represent this may be ?

I couldn't think of a better way than to overlay a numerical meter with a transparent background to a picture of the meter in a Picture control.

0 Kudos
Message 1 of 6
(3,044 Views)

What nice museum you have Smiley Happy

 

I do have these gauges but in digital form, the voltage-pressure relation is logarithmic, the exact scale surely depends on the gauge (I could provide mine but I am not sure if this would really help you...) - so why not use a digital display, i.e., numeric indicator?

0 Kudos
Message 2 of 6
(3,021 Views)

Hello Wolfgang,

the Penning looks log to me, but not the Pirani. On you custom gauges, do you display both scales (010V and hPa) side by side ? If so I'm curious as to how you do it.

0 Kudos
Message 3 of 6
(2,999 Views)

Hello,

here are my details:

I am using TPR 265, IKR 270 and TPG 262 from Pfeiffer.

I can read the pressure values in two different ways, serial or as analog voltages.

The serial readout is the simplest because the conversion is done by the control unit, it returns a character string xxxxEsxx directly giving the pressure reading.

For analog readout the pressure/voltage conversion is p=10^1,25(U-d) where d is a constant depending on the units, for Pascal d=10,75 in case of cold cathode gauge, and p=10^(U-c) where c=3,5 for Pascal for Pirani: so both instruments use a (different) log scale, I only display pressure values because there is no real interest in the voltage readings. Since the Pirani also covers more than 4 orders of magnitude a log scale seems appropriate even in this case, I guess.

I am not sure if this is helpful for you but at least I tried Smiley Wink

0 Kudos
Message 4 of 6
(2,982 Views)

Hello Wolfgang,

 

 I'd be curious if you could use two graph or multiple graphs instead of one and then put them side by side. For example 10^-8 to 10^-6 and 10^-6 to 10^-4 which would give you more flexibility in putting different value ranges.

 

 

Regards,

Ali S.
Applications Engineering
National Instruments
0 Kudos
Message 5 of 6
(2,966 Views)

The formula I found for my Penning is different from yours:

Pressure=10^(0.4*Volt-8)

 

The tentative solution I'm currently using is to overlay a transparent numerical meter over the picture of the physical meter. I use the position of the 0V, 5V and 10V as reference point to position them precisely in software. Here's the code for those interested:

	// Position of 0V, 5V and 10V on a numerical meter of size W/H
	int NM_W, NM_H, NM_L, NM_T;
	GetCtrlAttribute(pnl, PNL_NM0, ATTR_WIDTH,  &NM_W);
	GetCtrlAttribute(pnl, PNL_NM0, ATTR_HEIGHT, &NM_H);
	GetCtrlAttribute(pnl, PNL_NM0, ATTR_LEFT,   &NM_L);
	GetCtrlAttribute(pnl, PNL_NM0, ATTR_TOP,    &NM_T);
	int	NM_0L=NM_W/4.4, 	NM_0T=NM_H/1.385,
		NM_5L=NM_W/2,  		NM_5T=NM_H/2.308,
		NM_10L=NM_W-NM_0L+3,NM_10T=NM_0T;	// +3 is a correction
	
	int P_W, P_H, P_0L, P_0T, P_5L, P_5T, P_10L, P_10T;
	
/*	// This code should read the image size - it doesn't work
	SetCtrlAttribute(pnl, PNL_PIRANI, ATTR_FIT_MODE, VAL_SIZE_TO_IMAGE);
	SetCtrlAttribute(pnl, PNL_PIRANI, ATTR_ZPLANE_POSITION, 0);
	GetCtrlAttribute(pnl, PNL_PIRANI, ATTR_WIDTH,  &P_W);
	GetCtrlAttribute(pnl, PNL_PIRANI, ATTR_HEIGHT, &P_H);
	SetCtrlAttribute(pnl, PNL_PIRANI, ATTR_FIT_MODE, VAL_SIZE_TO_PICTURE);
*/	P_W=2679;	P_H=816;	// Manual size of the image because above code doesn't work

	// Position of 0V, 5V and 10V on the picture of the Pirani
	P_0L=274; 	P_0T=664;
	P_5L=1374;  P_5T=368;
	P_10L=2403; P_10T=654;

	// Go from Pirani position X to NM position X with Pir(X)=A.X+B
	double A=(NM_10L-NM_0L)           /(double)(P_10L-P_0L),
		   B=(NM_0L*P_10L-P_0L*NM_10L)/(double)(P_10L-P_0L);
	SetCtrlAttribute(pnl, PNL_PIRANI, ATTR_WIDTH,  (int)(P_W*A));
	SetCtrlAttribute(pnl, PNL_PIRANI, ATTR_LEFT,   (int)B+NM_L);
	
	A=(NM_5T-NM_0T)          /(double)(P_5T-P_0T);
	B=(NM_0T*P_5T-P_0T*NM_5T)/(double)(P_5T-P_0T);
	SetCtrlAttribute(pnl, PNL_PIRANI, ATTR_HEIGHT, (int)(P_H*A));
	SetCtrlAttribute(pnl, PNL_PIRANI, ATTR_TOP,    (int)B+NM_T);

	// Place those 4 at the bottom, the order is important
	SetCtrlAttribute(pnl, PNL_NM0,     ATTR_ZPLANE_POSITION, 255);	// Arbitrary high value more than nb of controls on panel
	SetCtrlAttribute(pnl, PNL_PIRANI,  ATTR_ZPLANE_POSITION, 255);	// Bottom one

One small problem with this solution is that the 5V are not exactly alligned (and that applies to both the Pirani and the Penning). I don't know where that comes from (image not taken exactly centered, small nonlinearity of the physical meter...).

 

About the bug I mention in my sample code above, see the discussion with master Bozzolo

 

I would have liked to use a custom numerical meter, and I thought that I could use text labels on those, but apparently that is not the case. Also I could not find a proper formula for the Pirani.

0 Kudos
Message 6 of 6
(2,961 Views)