LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

program the offset until a valid pressure reading between 50 to 150

i am working on a project to make the current process automated.
the system is currently working as follow.
when the system gets into manual programming mode, the front panel display
Mode =1
PressA Gain = 7
Offset = 0

when I want to program a device for instant..
i would type in
Program Rev1=No Parm=Mode Mode=1 N_5kOpt=1 IegmGn=1 Spare=1 ;
Program Rev1=No Parm=PressA Offset=0 Gain=7 ;

if my offset is 0 and the valid pressure reading is between 50-150, then i would use that offset.

if my valid pressure = 511 and i want to get my valid pressure to be 50-150, i would do something like this..
511-80=431
431-80=351
351-80=271
271-80=191
191-80=111   YES

i want to get 111 because it is between 50-150.

lets say that i have a chart of the offset

Offset   Valid Pressure
3B          511
3C          431
3D          351
3E          271
3F          191
0            111



There is a total of 64 offsets
If the valid pressure is NaN = 0

currently, i would type in
Program Rev1=No Parm=PressA Offset=3F Gain=7 ;

check valid pressure value to see if its between 50-150;
if it is not, go up or down in the chart to get a valid pressure.

Program Rev1=No Parm=PressA Offset=3E Gain=7 ;

check valid pressure value to see if its between 50-150;
if it is not, go up or down in the chart to get a valid pressure.

Program Rev1=No Parm=PressA Offset=3D Gain=7 ;


would anyone got an idea of how to approach this algorithm?




Message Edited by krispiekream on 03-24-2008 05:30 PM
Best regards,
Krispiekream
0 Kudos
Message 1 of 3
(2,568 Views)
I found out how to do this method,
but i am facing one problem..
can someone help me solve this...
i only want to use the first call only once..yet it is always true once its true one time..



Message Edited by krispiekream on 03-26-2008 03:21 PM
Best regards,
Krispiekream
Download All
0 Kudos
Message 2 of 3
(2,537 Views)
thank you everyone, but it works now

Best regards,
Krispiekream
0 Kudos
Message 3 of 3
(2,519 Views)