LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

math script execute hangs

Hello
I have the problem that the attached vi hang it up when I let it run as executable. (LAbview 😎 There is no error message to see and when I let it run as source code (vi) everything is working well.  What could be the failure?
 
Matlab script
%* Initialisation not used for LabView
LabView ='';
%LabView = 'DISABLE';   %;File runs standalone in Matlab
if strcmp(LabView,'DISABLE')
  Ts = 2000;
   ki = 0.00025;
  ki = 0.051
  kd = 1/(4 * ki)
  kd = 127;
   kd = 0.5;
end
% Start of LabView program
Ss = 1/Ts;
ti = Ss / ki;
td = kd * Ss;
complex_value = false
if ( 4*td < ti )
  complex_value = true;
  tb = (ti/2* (1 + sqrt(1- 4*td/ti)))
  ta = (ti/2* (1 - sqrt(1- 4*td/ti)))
   if (ta ~= 0)
     fa = 1/ ta /2/pi;
   else
     fa = 99; 
  end 
  if (tb ~= 0)
     fb = 1/ tb /2/pi;
  else
    fb = 99
  end 
else
    fb = 0;
    fa = 0;
end       
0 Kudos
Message 1 of 2
(2,176 Views)
Hi,
 
unfortunately it looks like this:
 
LabVIEW 8 MathScript does not currently support the LabVIEW Application Builder: After creating a VI-based application, it may be desirable to create a stand-alone executable or DLL to distribute the application. If any VI in your application uses a MathScript node, it cannot currently be built into an executable using the LabVIEW Application Builder. Unfortunately, there is no error generated and there is no workaround at this time. So, for now, you should not use the MathScript node in LabVIEW applications that you intend to build.
 
Best regards
 
Alex Rudolph
NI Switzerland
Message 2 of 2
(2,163 Views)