Error 1047 in LabVIEW 8.2: LabVIEW failed to send variable to the script server. Server:""
I am working with the evaluation version of labVIEW as well and I have run into another error. I am using a MATLAB script node within a for loop and attempting to pass the for loop counter variable into the script. When I run the code it brings up a 1047 error and says "LabVIEW failed to send variable to the script server. Server:"" ". I looked up the error online which seems to have roots in a failed auto initialization of MATLAB. Is there something that I can do in labVIEW to fix the problem or is it strictly a MATLAB error? I really appreciate your help.
We have a knowledgebase document on our system referring to this issue. Try reading through <a href="http://digital.ni.com/public.nsf/allkb/2B3FF46C8512C4F786256CF30071BE53?OpenDocument" target="_blank">this</a> and attempting what it says. If you still have problems, please post again.
...Matlab DLL vs Matlab script in LabView
I have some question for those who successed to import the Matlab DLL's to LabView :smileyhappy: :
Is there significant time difference between processing the matlab routine thru the DLL and between the Matlab script in LabView ?
For the RT program that I am doing in LabView the time is very impotent, and as I measured , the code writen in Matlab script
takes 10 times more then the same C code using DLL ( 20ms. vs 2ms.) . As I understand, importing DLL from Matlab to
LabView is not so easy, so before I "step at the deep" I would like to ask, if I would have the shorter time in Matlab DLL, than in Matlab script?
Are you actually running this application in the LabVIEW Real-Time OS? The Matlab Script uses ActiveX calls and only works on a Windows Operating System. Calling the dlls in Call Library Function Node would be a more difficult that using the Matlab Script Node. You will need the function names in the dll as well as the parameter list.
...Launching non-blocking MATLAB scripts on a linux server from MATLAB on Windows
I have a linux box with MATLAB installed on it. I want to launch some MATLAB scripts on it from MATLAB on my desktop PC, but I don't want the command to block, i.e. I want the command prompt re-appear immediately, and for the command to be run asynchronously on the box. To be clear, every command I send should start a new instance of MATLAB on the linux box, and run in that. There is no communication between the two MATLABs once the command is sent.
I can do this from a linux PC fine, using:
a = round(clock);
str = sprintf('ssh cvg-1 "nohup /opt/matlab2010a/bin/ma...Display Matlab messages when the function is called by Labview via Matlab script
I use Labview (version 6.1) to send variables to Matlab (version 7.0.4) via Matlab script and I would like to display some message on the command window of Matlab.
The messages are displayed when I call my Matlab function from the command window of Matlab but not when the function is called from Labview.
Do you have any idea how to solve this problem ?
...Why can I not re-launch a Matlab script from within LabView after exiting the Matlab application?
I am currently using LabView 6.1 and Matlab 5.2.
When I insert a script node into LabView, I can run it as many times I
want to, as expected.
However, if I exit Matlab after executing my vi, I have to exit
LabView as well to be able to run the script again. Can anybody solve
This is a problem with LabVIEW that seems to be fixed in LabVIEW 7.
The fix is to programatically not allow Matlab to be exited.
...Script Matlab In Labview
Buongiorno a tutti,
sono nuovo di questo forum. Sono un tirocinante presso l'universit� di Napoli Federico II e sto familiarizzando con l'ambiente LabView. Mi � stato assegnato il compito di eseguire uno script Matlab mediante LabView (le macchine su cui lavoro possiedono la versione 7.0 e 8.5). Se mi sapete dare qualche informazione ve ne sarei grato o anche qualche link visto che sto agli inizi.
Sorry, can you move this question to italian community?
...Using VI server from DIAdem script :: Syntax (documentation) for properties and methods of VI Server objects (for non-labview programmers)
I am using DIAdem 10.0 Advanced, LabVIEW 8.0 PDS. I would like to start a LabVIEW IHM from a VBS script. I use VI Server to call my VI from DIAdem.
Here is the script and the VI I use (VI attached):
Dim lvapp, vi, viPath, paramName(1), paramVal(1)Set lvapp = CreateObject("LabVIEW.Application")viPath = "C:\TEST\test.vi" Set vi = lvapp.GetVIReference(viPath)vi.FPWinOpen = TrueparamName(0) = "Input"paramVal(0) = 10paramName(1) = "Output"paramVal(1) = 0Call vi.Call(paramName, paramVal)Call lvapp.Quit()
I found a similar example on your web site.
I need to know the syntax for all the other properties and methods of a VI object (method like Get or Set Control Value for example).
Is a documentation (other than the LabVIEW help which is dedicated for LV programmers) exist in order to be able to use all the features of VI Server from another environment (CVI, VB, ...)?
Is it possible to call a VI with VI Server with the parameter "Wait until done" to FALSE? (run a VI asynchronuously from DIAdem)
Thanks for your answer.
I finally found a way to get the documentation of VI Server. I can view the "LabVIEW.TLB" type library file with a OLE/COM Object Viewer (a utility from the Windows SDK).
...Re: Matlab script in Labview
hi ... im trying to use matlab codes in labview... but i can't get the input data type right
i've attached my codes.. could anyone teach me how to change the data types....
do i need anything to run ,matlab codes ?? i heard about something called activeX .. could anyone please hepl me ?? thanx
i just found out that labview 7.1 does not support matlab toolbox...
im not so familiar with matlab and i have codes using the toolbox.. is there any thing i can do about that?
i've attached my matlab codes.. please help me
When you use LabVIEW to run MATLAB through M-script nodes, you need to
have MATLAB and any toolboxes you want to use installed on your
machine. What is really happening is LabVIEW is opening MATLAB up
behind the scenes (using ActiveX, which is included in Windows) and
sending your script to it. LabVIEW doesn't really care about the MATLAB
toolboxes. If your script works in MATLAB, it should work from a
M-script node in LabVIEW.
If you could provide a little more information, it may help debug your
program. Can you run "ver" in MATLAB and post the results so we can see
what toolboxes you have installed? Also, I'd suggest running your
script in short bits to help identify where the bug is.
hi chris .. thanks for the reply ...
here'...Problem using Matlab Script in Labview
I'm a relative new user of labview. I've to work on both
matlab and labview. But I'm not able to execute any matlab script in
labview as it returns an error saying "Error message from server". I'm
currently using Labview-6 and Matlab-6.5. I tried with the Matlab
running. It did not help. Could anybody help me out regarding this as
it is a very urgent requirement for my task.
Try reading this article from our website, I think it addresses your issue.
<a href="http://digital.ni.com/public.nsf/websearch/CE309627064A3D5686256A9C005B0A5F?OpenDocument" target="_blank">http://digital.ni.com/public.nsf/websearch/CE309627064A3D5686256A9C005B0A5F?OpenDocument</a>
I hope this helps.
Casey Weltzin, National Instruments
...how to get matlab scripts to work with GUIDE
Hi, i have 3 matlab scripts. ive started to use Guide to create a GUI, but i dont know how to diplay the script in guide.
can anyone help please. thanks.
vishan <firstname.lastname@example.org> wrote in message <18898876.78998.1246880042205.JavaMail.email@example.com>...
> Hi, i have 3 matlab scripts. ive started to use Guide to create a GUI, but i dont know how to diplay the script in guide.
> can anyone help please. thanks.
When you create a GUI, MATLAB automatically creates an m-file for it. You can just copy and paste your script into this m-file where y...matlab script window in labview 7.0
In labview 7.0 the matlab window associated with the scripts server is
normally hidden and not accessible to the user. In LV 6.x it was and
provided a flexible and interactive way of collecting, analyzing and
storing data as matlab workspace.
Is there an alternative way to access the script server and its
workspace under LV 7 ?
The script server window is not hidden on my machine and I am using LV
7 with Matlab R12. I am not sure how to change this setting (or even
if it's possible).
...I get error 1048 when using a MatLab script node
Hi, I've been getting error 1048 (LabVIEW failed to get variable from server) when using a MatLab script node in my VI. Previously I was getting error 1047 (LabVIEW failed to pass variable to server) but I fixed that by putting "scriptNodeWait = 500" in labview.ini. I have read all of the help and knowledgebase documents and previous posts but can't get anything to work. The code definitely works in MatLab. Is there anything I can do to figure out what's going on?I'm running LabVIEW 8.2 on Windows XP with MatLab 7.4.0 (R2007a)
The full error is "LabVIEW: LabVIEW failed to get variable from server. Undefined function or variable '*my variable*'."
Also, the example file Lorenz Diff Eq.vi works fine.
Can you verify that any outputs of the script node are being created in the script? For example, if your script node has an output called "myvariable", make sure that the script inside the node creates a variable called "myvariable". If you can post the VI that is causing the problem, I may be able to help you more.
...Calling a VB Script and Matlab code from LabVIEW GUI.
Can anyone help me out in Calling a VB Script and Matlab code from LabVIEW GUI? GUI will be developed in Labview and currently we have some scripts written in VB and Matlab and we need to incorporate the same through LabVIEW. Can anyone let me know how this can be implemented?
My first question is, why not write your program in LabVIEW instead of VB? Is the code already written in VB? If so, consider compiling your code into a dll and then using a Call <a href="http://zone.ni.com/reference/en-XX/help/371361B-01/glang/call_library_function/" target="_blank">Library Function Node </a> to call that dll. As for the Matlab portion of your question, consider the <a href="http://zone.ni.com/reference/en-XX/help/371361B-01/gmath/mathscript_node/" target="_blank">MathScript node</a> as an option.
Yes the codes are already developed in Excel , VB and Matlab. I have to interface all the three codes with labview insuch way that i should pass inputs and captures outputs from the codes after executing. I have test for matlab and it's working with matlab script. But i don't know how to do with Excel sheet. VB part I haven't tried yet, as after Excel i have to look for it.
how can i interface Excel Sheet with labview using Active X?
...labview unable to send variable to matlab script sever
i am using LV-8. whenever i use matlab script node to solve two simultaneous non-linear equation it generates an error message"unable to send variable to matlab server".
Please help me in this matter.
what other methodws can i use to get solution of such equation.
You need to define the variables x, y, z. For example, by adding the following lines to the beginning: x = 0;y = 0;z = 0;
...getting clusters from LabVIEW ActiveX Server with Excel/VBA
Hello,my colleague and I are trying to control a LV from Excel (VBA) by ActiveX.I.E.:We do something like :-------------------------Set LV = createObject("LabVIEW.Application")Set VI = LV.GetVIReference("Path_to_VI")ParamNames(0) = "Input1"ParamNames(1) = "Input2"ParamNames(2) = "Output"ParamValues(0) = 1ParamValues(1) = 3.1415Call VI.Call(ParamNames,ParamValues)msgbox("output =" & ParamVals(2))
-------------------------------This works perfectly for simple data types (int, double, float, string, etc )Now we need to transfer more complex structures, which are originaly LV-clusters.But we did not find any clue on how do that (especially receive clusters) in the help or on the internet.Is there any chance to succeed ???TIA,Thomas
Actually, working with clusters is really really easy. Through the magic of - well something - a cluster in LV comes out in the VBA environment as an array of variants. There was an activex example that shipped with V7.1 that showed this very thing. I couldn't find them in V8 so here is the 7.1 stuff. Check out the macros in the Excel spreadsheet... This show running the VI in the development environment, but if this looks interesting I can fill you in on how to make it work in an executable.Mike...
...error: 1050 using matlab script node in labview
i m facing the error 1050 while executing a simulnk
program ............i was trying to invoke a program of coupled tank
that i modeled in Matlab through the built in function of
LabVIEW( "matlab script node")......... PLEASE HELP
Thanks in Advance
Pavan Kr Kahar
Hi, I am not very clear as to what your problem is. Are you using the Scrip Node from within LabVIEW? Can you please post a screenshot for clarification?
...Help Importing into Labview for use as a matrix in Matlab script node
I was hoping someone could help me out with a labview / Matlab script
problem. I'm using Labview to allow someone to specify which file to
load, inparticular a Labview measurement file appears to load my text
file in a spreadsheet format(which is what I want, see ex. text file
code below), then I want to use the loaded file as an input into my
Matlab script box as a matrix for use in the Matlab code. Can I do
This is my text file.
So the Labview measurement file seems to space everything out into a
matrix format like I want, but I can't tell if there are any errors in
the matlab script or whatnot. I'm using events to wait for the user
input. The matlab script has a variable named DATA as the input
variable in matrix format, then I just connected this variable to the
output from the measurement load file box, but it doesn't work,
thanks for any help.
P.S. I also am having a problem with my event structures. I have an
event, that is inside a while loop like the code suggests, but when I
run the program the button I click gives me the results I want, but if
I click it a second time the program freezes or doesn't respond...
I think the "Spreadsheet String to Array" function will serve your purposes here. You need to convert your comma delimited file into a 2D array. The Spreadsheet String to Array function does this for you. See the attached example.
As for for your second qu...How to get url of current url from included script on different server
I have a banner script that is included in php on a website but the
actual script is hosted on a different site allowing me to only edit
one file to update the script.
I need to store in a variable the hostname that the included script is
being run on NOT the master url where it is hosted.
Everything I try gives the url of where the script is hosted and NOT
the location of the page where it is being called from which is what I
want as I need be able to tell the banner script not to show the banner
for the site which is it on.
Venturer said the following on 10/01/2006 09:52:
> I have a banner script that is included in php on a website but the
> actual script is hosted on a different site allowing me to only edit
> one file to update the script.
> I need to store in a variable the hostname that the included script is
> being run on NOT the master url where it is hosted.
I'm assuming you're include()-ing the script as something like:
Is the remote server set to execute PHP or not?
* If it is, then script.php is being run on the remote server, not the
local server, so you're actually include()-ing the *output* of
script.php, not the PHP code itself. In which case, you will need to
either pass the hostname in the request for script.php, e.g.:
* If the rem...Server to server = Server client to server?
For a server to server connection, is the connecting server considered
as a client of the accepting server or is it not?
I have the following classes:
Connection <--- base class of the following two
ClientConnection <--- client
ServerConnection <--- server
ServerClientConnection <--- server as a client of another server.
But then I came across something that states "A client is anything
connected to a server that is not another client".
Just remember! Server ( programm ) is always listening a connections!!!
&g...how to do complex engineering calculation in labview.I tried using MATLAB script
I am trying to use matlab script node to solve two complex equation.But i get different errors everytime i run my program.sometimes 1048 sometimes 1050 and sometimes it says LABVIEW could not extract variable from Matlab.I am attaching my MATLAB script node with this thread.Please Help me out to get rid of this problem.
I am using LV-8 and MATLAB R-2006a.
Hi Praween, not able to look at your vi at the moment, but have you tried to do your calculation with simple LabView functions?LabView has Complex datatypes and math functions are able to calc with complex numbers...
Hi Praween, beside my little MatLab knowledge I tried to replace your formula with equivalent LV code...
Thanks for reply.But there's a bit of misunderstanding of problem from your side.
I meant how to calculate the value of x and y by simultaneously solving the two equation(with given values of t1,t2 and z=100).Thrugh your LV code you are just formulating the two equation,but not giving the value of x and y .To remind you x and y are not controls rather they are indicators.
Hi Praween, I just read an explanation of the "solve()" command, but I don't see their correct use in your MatLab structure!?!Where is the equation to solve? You only give one side of the equation, but the solut...no automatic maltlab startup with matlab script used in Labview 6.1
When I insert a matlab script node in my VI and I run this VI, Matlab won't automatically startup.
On a other setup I'am using Matlab 6.1 with Labview 6.1 and there Matlab does starts automatically and the VI works great.
On this setup I'am using Matlab 7 with Labview 6.
Does anybode know how the solve this problem?
I already installed the NI patch mathscript.dll but that didnt work.
...What server PC is recommende for Labview server?
I am constructing a Labview web server based remote intrumentation system, and i have instaled this server on a generic PC that often suffers from system crashes. I know i can install this server on a better machine that wont fail after several days or month of operation?. I am thinking of a custom PC formed by me with a Dual Core processor, al least 1Gb RAM, enough hard drive space, Intel motherboard and a good power source. Also i am thinking on a Dell Server, or HP machine that would garantee lots of day of good work.
What would you do?
Thanks and best regards
What would you do?
Find out why it's crashing first. Is it crashing due to the LabVIEW app, or from a crappy OS?
I think the problem resides in the OS , but i dont know if its because a bad driver installation (Labview doesnt participate on this i think). The thing is i must access my computer remotely often to apply little updates the the Labview program, but it happens that after a few days i am unable to accces it because of this reboots ; when i check the PC , windows tells me that a severe error ocurred, windows crashed because of a bad driver instalation or something like that, it also says that a blue screen was displayed because of system failure ( The blue screen with memory adreesses is one of the worst system crash that windows can make in my experience) and i must send an error report.
Just fo...Send scripts to Cygwin from matlab script
I am currently building a GUI over a numerical model that was initially designed to run under Linux. However, I'd like to make my package as much as possible platform-independent, so I adopted the Cygwin option for Windows.
However, I didn't manage yet to find the way to send my script and my variables to be interpreted under Cygwin. The problem is that the model will be in a folder that will dynamically change with every different user. Also, different variables will be fed to the model by the user, so I need to pass them from the Matlab command.
I obviously tried t...can Matlab support 32-bit matlab version scripts on 64-bit version of matlab
can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ?
please do answer this question
"Gangamma " <firstname.lastname@example.org> wrote in message <email@example.com>...
> can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ?
Yes, Matlab program written in 32/64 bits are compatible accepted MEX file.
64-bit version can handle larger array but does *NOT* improve speed.