Open kjwoodsISIS opened 3 years ago
The wish VI appears to just log the resistance readings in a graph and show it in a readout box, and doesn't have any buttons. The command is the same for the 372 and 370 to do this so I suspect we can use our existing IOC for the 372 to interact with the 370. This ticket may just involve writing an OPI with the graph in.
The VI in labview modules/drivers also reads temperature, by using another VI to calculate it. We should implement this too and make it accessible as a PV.
Email sent off today to scientists about usage.
Ok, to confirm, on the 370 you can't just query the temperature by the looks of things, and the VI looks to do some magic to try and figure out what the temperature is from a given resistance. Here is the logic from the VI for calculating the temperature (y) with a given resistance (x):
float64 x1=x;
float64 x2=pow(x,2);
float64 x3=pow(x,3);
float64 x4=pow(x,4);
float64 x5=pow(x,5);
float64 x6=pow(x,6);
float64 x7=pow(x,7);
float64 x8=pow(x,8);
if (x >=1714 && x <= 2879)
{
y=pow(10,(3283.88403001697 - (11.164472250607*x1) +(0.0165752666789975*x2) -(1.40217255584636E-5*x3) +(7.38921578250645E-9*x4) -2.48353721963498E-12*x5 + 5.19853402239675E-16*x6 -6.19579952030566E-20*x7 + 3.21912105889538E-24*x8 ));
}
else if (x > 2879 && x < 5887)
{
y =pow(10,(-51.2018527792493+(0.10378459136332*x1)-(8.77905249447912E-5*x2)+(4.11090721880872E-8*x3) -(1.17560376482219E-11*x4) +2.1092217056924E-15*x5 - 2.32346922941378E-19*x6 + 1.43916082497626E-23*x7 - 3.84294467425185E-28*x8));
}
else if (x >=5887 && x < 9210)
{
y=pow(10,(208.130424294871 - (0.212941317821971*x1) +(9.32348582202883E-5*x2) -(2.26700585766409E-8*x3) +(3.30055787266927E-12*x4) -2.87612888293853E-16*x5 + 1.38892545664678E-20*x6 -2.86826761510268E-25*x7 ));
}
else
y=0;
converted to C:
#include <math.h>
float get_temperature(float x)
{
float x1=x;
float x2=pow(x,2);
float x3=pow(x,3);
float x4=pow(x,4);
float x5=pow(x,5);
float x6=pow(x,6);
float x7=pow(x,7);
float x8=pow(x,8);
float y = 0.0;
if (x >=1714 && x <= 2879)
{
y=pow(10,(3283.88403001697 - (11.164472250607*x1) +(0.0165752666789975*x2) -(1.40217255584636E-5*x3) +(7.38921578250645E-9*x4) -2.48353721963498E-12*x5 + 5.19853402239675E-16*x6 -6.19579952030566E-20*x7 + 3.21912105889538E-24*x8 ));
}
else if (x > 2879 && x < 5887)
{
y =pow(10,(-51.2018527792493+(0.10378459136332*x1)-(8.77905249447912E-5*x2)+(4.11090721880872E-8*x3) -(1.17560376482219E-11*x4) +2.1092217056924E-15*x5 - 2.32346922941378E-19*x6 + 1.43916082497626E-23*x7 - 3.84294467425185E-28*x8));
}
else if (x >=5887 && x < 9210)
{
y=pow(10,(208.130424294871 - (0.212941317821971*x1) +(9.32348582202883E-5*x2) -(2.26700585766409E-8*x3) +(3.30055787266927E-12*x4) -2.87612888293853E-16*x5 + 1.38892545664678E-20*x6 -2.86826761510268E-25*x7 ));
}
else{
y=0;
}
return y;
}
I will probs use an asub record to do this
hmm, they may not even use the temperature aspect of it. I am going to fire an email off to find out, as it looks like we can actually use our 372 ioc albeit with a slightly reduced db file for things that aren't supported.
email sent off but no response as of 24/08/21
from the 372 manual:
The Model 372 is designed for trouble-free integration with existing equipment and software that has been built around the previous generation Model 370.
As a WISH scientist I want to be able to control a Lakeshore 370 resistance bridge, so that I can measure and control the temperature in my experiments.
Acceptance Criteria
Notes