LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

the mathscript file won't run past a certain point in the node.

i have this plugged into my mathscript node and it won't run the output past the 2nd to last "if end" please help!!
C=WB*(FL+FR)/(RR+RL+FR+FL)
P=TW*(FL+RL)/(RR+RL+FR+FL)
W=(RR+RL+FR+FL)
 
if WA<0
R=C/(cos((atan((WB*tan((pi/2)-abs(WA))+.5*TW)/C))+YA))/12
end
if WA>0
R=C/(cos(-(atan((WB*tan((pi/2)-abs(WA))+.5*TW)/C))+YA))/12
end
LA=(V^2/R)/32.2
if (WA<0)
LO=PB*.008
WL=W*((P/TW)-(LA)*(CGH/TW))
WR=W-WL      
 WFL=WL*((C/WB)-(LO*CGH/(WB)))
 WRL=WL-WFL
 WFR=WR*((C/WB)-LO*CGH/(WB))
 WRR=WR-WFR
end
if (WA>0)
LO=PB*.008
WR=W*((P/TW)-(LA)*(CGH/TW))
WL=W-WR      
  WFL=WL*((C/WB)-(LO*CGH/(WB)))
 WRL=WL-WFL
 WFR=WR*((C/WB)-LO*CGH/(WB))
 WRR=WR-WFR
end
 
  if ((WA<0) && (YA>0))
BFRL=WRL*.8*.2
end
if ((WA<0) && (YA<0))
BFFR=WFR*.8*.3
end
if ((WA>0) && (YA<0))
BFRR=WRR*.8*.2
end
if ((WA>0) && (YA>0))
BFFL=WFL*.8*.3
end
if (BFFL>0)
M=((((WFL*.8*.3*PB)+(WRL*.6*.2*PB))*(TW-P))-(((WFR*.8*.3*PB)+(WRR*.6*.2*PB))*(P))+((WFL+WFR)*(LA*.8)*(WB-C)-(WRL+WRR)*(LA-.6)*C))/12
end
% It won't calculate M past this point It is just always zero but it will calculate M for the statement above and if i switch them around it will work for which ever is on top
if (BFFR>0)
M=(abs((((WFL*.8*.3*PB)+(WRL*.6*.2*PB))*(TW-P))-(((WFR*.8*.3*PB)+(WRR*.6*.2*PB))*(P))+((WFL+WFR)*(LA*.8)*(WB-C)-(WRL+WRR)*(LA-.6)*C)))/12
end
 
0 Kudos
Message 1 of 2
(2,545 Views)
Hi thomasgtsr,
which are your inputs and outputs? Can you please explain a little bit more in detail what your problem is? Maybe it is possible for you to upload your vi.
 
Mike
0 Kudos
Message 2 of 2
(2,528 Views)