06-23-2010 09:59 AM
Hello all,
I need to make a *.vi where a user can edit the scale of the Field Point Channels easily.
That means read the current scale, edit and then save it.
MAX should not be used.
HW used: FP 112, Ethernet
Thanks
06-24-2010 04:30 PM
By scale, I assume that you mean range. And while I'm not sure if you will be able to read the current range you can set the range using the Configure Range.vi from the FieldPoint palette.
Hope this helps.
06-25-2010 12:42 AM
Hello
Justin_P, thanks for the replay. But, this is not what I was looking for. I need to change the scaling (Slope and Y-Intercept).
For example: MAX->Data Neighborhood->FieldPoint Items->FP-AI-112@2->Channel 0->Scales.
I need that a non-experienced user can use my *.exe, and change the scaling. Then this change is remembered in the project *.iak file.
Can you help me?
Thanks
06-25-2010 01:28 PM
Use the basic math operators of add and multiply, add your offset (b) and use multiply for slope (m).
Y=mX+b
Or I think there is a linear interpolation function in one of the pallettes.
-AK2DM
06-25-2010 04:12 PM
the_sun:
See attached code I have used before.
-AK2DM
06-28-2010 04:10 AM
06-28-2010 06:29 PM
I would take AK2DM's suggestion and then save the m's and b's to another file that you make on your controller, called something like scales.ini. I wouldn't suggest trying to modify the .iak file to include your scales.
If you could explain to me why you need the scales to show up in MAX, maybe I would better understand your problem and be able to provide a different solution.