SCILAB LabVIEW Gateway

For those who do numerical computations, a new free tool has been released about a week ago.
If you are familiar with SCILAB (The open source platform for numerical computation) you might be pleasantly surprised that a Scilab_LabVIEW_Gateway is now available.
There is also a Developer Zone article: Connecting LabVIEW with INRIA Scilab 
Has anyone tried it yet?
LabVIEW Champion . Do more with less code and in less time .

Funny story how I run across this...
Years ago, I had installed scilab (3.0?) on a desktop, played around a bit, then forgot it. (We were forced to buy matlab to run some software from another lab). Yesterday I was at that computer, noticed the scilab icon and vaguely remembered what it was. To see if there is a newer version, I went to the scilab site and the word LabVIEW was smiling right at me.
What a coincidence.!
I don't typically use script nodes, but I think it is great to have this alternative. It could be useful for some heavy linear algebra stuff. How is the speed compared to e.g. matlab and mathscript nodes and compare to pure G?
Do you know if it works in built applications if the target computer has scilab installed? (That's actually a relatively easy requirement, because scilab is free. )
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Using "getf" command in Scilab-LabVIEW Gateway

    I am having trouble using the "getf" command in the Scilab-LabVIEW Gateway.
    I would like to load an external Scilab function using the LabVIEW script
    node and perform an operation with it.
    In Scilab, the following code works correctly:
                                 scilab-4.1.1
                          Copyright (c) 1989-2007
                      Consortium Scilab (INRIA, ENPC)
        Startup execution:
          loading initial environment
        -->getf "C:/program files/scilab-4.1.1/macros/dec2bin.sci";
        -->dec2bin(10,4)
         ans  =
          1010
        -->    
    However, when I execute the same code in the Scilab-LabVIEW Gateway, I
    receive the error:
        Error 1048 occured at LabVIEW:  LabVIEW failed to get variable from
        script server. Server:"" in Untitled 1
        Possible Reason(s):
        LabVIEW:  LabVIEW failed to get variable from script server.
    Is it possible to use "getf" in the Scilab-LabVIEW Gateway?
    Thanks,
    Joe
    Attachments:
    scilab_terminal.JPG ‏29 KB
    labview_scilab_error.JPG ‏28 KB

    Hi,
    You may want to contact the persons responsible for creating the Scilab to LabVIEW Gateway.  I have seen this error with scripts usually when it is required to have user inputs and have the user interact with the program.  Sometimes fixing this problem is if you associate the variable being called to an input in LabVIEW.
    I hope this helps,
    Regards,
    Nadim
    Applications Engineering
    National Instruments

  • Using the SciLab LabVIEW gateway

    Has anyone had any success running commands through the SciLab Scripting Node that are avaialble through an installed module in SciLab?  I am trying to run a command (emd) that is available through the EMD ToolBox, but am getting an error (Error 1050 occurred at LabVIEW:  Error occurred while executing script. Error message from server: . in Untitled 3) that doesn't really provide much insight as to what is wrong. Essentially, the input (in) is a 1D array of reals, the output (out) is a 2D array of reals and the code in the node is out = emd(in).  This works when I am in SciLab, but fails when using the SciLab scripting node.  I am able to run other simple scripts using the SciLab scripting node (for example, if I use out = sin( 10 * in), I get a 1D array of reals that is what it should be), so I do not think that this is an issue with the Scripting node.  I can't find much in the way of documentation, so any help would be greatly appreciated.
    I am running SciLab 5.4.0, with the EMD Toolbox installed (installed using ATOMS), LabVIEW 2010 and the current version of the SciLab LabVIEW gateway that is available on the NI website.

    Hi,
    A colleague of mine has some good suggestions on this matter on the following thread:
    http://forums.ni.com/t5/LabVIEW/Scilab-Script-in-L​abview/td-p/748167
    Please let us know if this helps.
    Daniel G.
    Applications Engineer
    National Instruments
    http://www.ni.com/support
    Daniel G.
    Applications Engineer
    National Instruments

  • Scilab Script in Labview

    I am trying to invoke a Scilab (v4.1.2) script in an empty Labview (v8.5.1) VI, and am continually receiving an error simply telling me that an error occurred while running the script. The script works in scilab alone. I've commented out the 'd' input in the script to try and have labview control it just as my first attempt at an interface between these two programs.
    Can anyone see where I am going wrong, or possibly how I could figure errors like this out on my own? It just doesn't point me in any direction to find the error, so I'm stuck.
    Thanks
    Attachments:
    Scilab_labview.zip ‏7 KB

    Hello,
    I see some problems when running the script as well.  It seems there are some slight problems communicating with the Scilab software.
    First, when looking at the text in the Scilab script node, I see an extra character before the new line.  Upon closer investigation, the script contains both a carriage return and a line feed at the end of every line.  This currently causes a problem with the Scilab software.  I was able to eliminate the extra character (the CR) by loading the script from disk in a text editor and copying and pasting it into the script node.
    Second, getcwd may not return what you expect.  It is not the directory in which the VI resides (unless you happened to put the VI in Scilab's default working directory).  You can find out what it returns by simply calling that function and then creating a string output variable on the script node.  Another method to specify the location of your data file is to pass in a string that is the current VI's location on disk.  You can find this using the Programming >> File I/O >> File Constants >> Current VI's Path primitive.  Simply use the Strip Path primitive to get the directory name.  Wire that into the script node as a string input and then append the filename like you currently do.
    Third, comments in the script seem to cause some problems.  The script node doesn't actually return an error, but most of the script simply doesn't execute.  Try removing all your comments from the script.
    Last, the Scilab-LabVIEW Gateway currently does not support plotting from the Scilab software, so your plot commands will not work.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Convert float to rational

    Hello,
    The TIFF tag header protocol requires a data type I am not really conversant with, the Rational Data type: http://en.wikipedia.org/wiki/Rational_data_type
    I need to convert double precision numbers to this data type, e.g. 24.5 needs to be a ratio of two integers: {49,2}. Is there an existing LabVIEW algorithm to perform this operation? All my NI searches keep resulting in Rational ClearCase or Rational Array interpolation. I seem to have found a lot of the theory behind this: http://stackoverflow.com/questions/95727/how-to-convert-floats-to-human-readable-fractions
    But, is this implemented in labVIEW already, or should I implement the above-referenced c-code?
    Thanks,
    Mello
    Data Science Automation
    CTA, CLA, CPI
    SHAZAM!
    Solved!
    Go to Solution.

    I was curious if there were other ways to do this and found that Scilab combined with the LabVIEW Gateway works quite well. The 'rat' function is available in Scilab; Scilab and the LabVIEW gateway were both easy to install...
    http://www.scilab.org/products/other/labview_gateway
    Message Edited by Phillip Brooks on 03-04-2010 08:29 AM
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness
    Attachments:
    scilab_rat.JPG ‏46 KB

  • Fieldpoint​-2010 not found, some IP problem ?

    Hello.
    I try little say what is what I know. I'm automation student in Finland and I should connect MetsoDNA PC-operator and Fieldpoint-2010 together. I'm doing my graduation work and I have big problem what I donät understand.
    We have old system where is LAbview (version 6 or something about year 2002) and that is connect in Fieldpoint. Everything work nice and no problem. Now I should chance to Metsodna in place of labview. And that is problem, because Metso is plugging to Cisco 2950 switch and there should come ethernet connect to fieldpoint. Old labview IP connect is 195.148.xxx.xxx and subnet 255.255.255.0, defaultgateway 195.140.144.20 DNS server 195.148.144.20. Thats work nice and I chance my own computer IP for that and everything work. But when I chance my computer in Metso IP address nothing works. IP is 10.83.xx.xxx and subnet same what Labview, Gateway 10.83.86.1 DNS 195.148.144.100.
    So I see that problem is DNS is last numbers different  chance 20 to 100 and gateway is different. 
    But how I get to fieldpoint give connection to these address? 
    That is only the first and biggest problem. Then I should made OPC connect to that, but one step in time. If I could made that connect to work I have lot of easier to take next step.
    Best regards
    Kimmo

    Hi MariusU
    Yes I tried. In croscover ethernet cable and rs232, no connect. And there was 3com switch between labview computer and fieldpoint and I connect my computer 3com switch and nothing. 
    Okey my own computer addres was other then, and when I chance that in labview computer address everything works and I get connect to fp-2010.
    I know that Metso is not NI product, but there is windows computer where I tried to connect that. And not to direct MetsoACN, I should still get connect I think.  Maybe is wrong say that computer is Metso or Labview, but this how i tried to idenfication these, that you know what i tried to say. These both is normal PC.
    I tried to Ping in FP-address and nothing, but when I chance computer Labview computer IP addres that works over to Cisco. 
    So does FP block some IP address or what is wrong. Like I say first post I got connect over to Cisco same address what is Labview computer, but if IP, gateway,dns is same than other automation network in school that doesn't connecting. I should do OPC-connect to between these and if I doesn't get any connect to there, I cant also do that. 
    I think that Fieldpoint support OPC or so I read in web pages.
    -Kimmo-
    Attachments:
    January Fieldpoint.pdf ‏637 KB

  • Scilab Gateway under Labview 8.2 and 8.5

    Hi Newsgroup,
    i am a Labview Starter and working for a longer time with Scilab.
    Herefore, the gateway function is a nice tool for me.
    When i create a VI with the Scilab Gateway, it works really perfect
    under Labview 8.2.1 (Jubilee Edition), but under Labview 8.5 the VI
    seems to be not correct. The "Run"-Arrow is displayed broken, nothing
    works.
    Funny Effect in Labview 8.5 beside: In a few cases i've seen the
    effect, that my VI works just one time, then never again ?
    Have i done mistakes while installing anything. Or are there hidden
    registry entries ?
    Best Regards
    Andreas

    Andreas wrote:
    i guess, i find one point: In the block diagram window in LabView
    8.2.1 i make a right click on the script-box and open the menu item
    "choose script server". Here, Scilab is displayed and choosen.
    When i do the same in LabView 8.5, the menu item "choose Script
    server" does not show me Scilab. The entry "Scilab" is not available.
    Works just fine here in LabVIEW 8.5. Did you restart LabVIEW after installation?
    Message Edited by altenbach on 10-31-2007 01:00 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SelectScilab.png ‏11 KB

  • Application crashes after closing LabVIEW instance with Scilab 5.2.2

    I use LV 8.21 with the LabVIEW to Scilab Gateway software Version 1.1 (new version from NI homepage)
    I have Scilab Version 5.2.2 installed. We will do some calculation with the LabVIEW Scilab script node.
    Mainly use a call "exec (functionA,-1) Scilab script node. The functionA is a scriptfile outside of the application.
    So far everything is working fine, I can build a LabVIEW application with the application builder.
    If I run the application the calculation inside the Scilab script node are proceeding; I can call
    it many times in a loop without no problem.
    But if I close the instance (the VI with the Scilab script node inside) the application crashes.
    The same problem I have in the LabVIEW development environment  
    Is there a way to "unload" Scilab before I close the VI without a crash. After the Scilab
    calculation I have to close the calling VI and call some other VIs for further calculation
    (but this VIs have no Scilab call)
    I tried with the "exit" and "quit" command in Scilab script node, no success
    any suggestion
    Attachments:
    scilab.GIF ‏5 KB

    Hello
    thanks for the advice. I tried with version 5.1.1   ...    but no success!
    So I went straight back to version 4.1.1 and it works fine, of course I had to remove the comments from the script node 
    So fare I can work with this version.
    So what are the time schedule to fix this problem? It is a very useful tool an I would like to use the latest version of scilab and not an old version.
    Thank you

  • Using hilscher gateway to allow profibus to labview via ethernet

    Could I use a gateway such as this hilscher to communicate between labview and a profibus network (consisting of several S7 315 PLCS) over the ethernet. I want labview to offer some basic control on the profibus network such as start a program cycle on one of the PLCs. Also to be able to read information such as actuator position counters etc. Could I use the TCP/IP features in labview to allow such communication. If I can recieve signals to labview this way. Will it be possible to build a VI to interperate the signals and also send commands that can be interperated by the profibus network. Is there any libraries in Labview dedicated for such communication. I'm new to most of this technology so appologies for asking the obvious.
    Any help is graciously appreciated.
    Peter. 
    Solved!
    Go to Solution.

    I'm not familiar with Hilscher Profibus gateways but I'm pretty sure that they provide an OPC-server that can be accessed through LabVIEW DataSocket functions or for much better performance through LabVIEW DSC. There is also a chance that Hilscher provides a DLL-based API or even LabVIEW vis, but you should check with Hilscher.
    From my own experience I would recommend using a Comsoft FNL gateway. Comsoft is very experienced with LabVIEW and they provide a fast and reliable VI-interface for all of their Profibus interfaces.
    I don't want to bash the Hilscher products, but as (in contrast to Comsoft products) I don't have any experience with their products, I can't give a competent answer about their APIs.
    Best regards,
    Jochen Klier
    National Instruments

  • Using Requirements Gateway with LabVIEW classes

    Does anyone know how to get the NI Requirements Gateway to read coverage information from the documentation contained in a LabVIEW class (.lvclass)?
    Requirements Gateway appears to load the documentation content fine from VIs, controls, .llb, .lvlib, .lvproj etc, but not .lvclass? My LabVIEW keeps crashing out when I try to point Requirements Gateway at a project with .lvclass files!
    If this can't be done then is there a neat way to add requirements coverage information (you know, the "Covers: ID" field) into the class properties, or something near the class maybe, that Requirements Gateway can read?
    Thoric (CLA, CLED, CTD and LabVIEW Champion)
    Solved!
    Go to Solution.

    Hi Manooch,
    Thank you for your prompt reply. The example you attached, with a little alteration to include the coverage ID tag in the class documentation field, does precisely what I need, thank you. The snapshot below shows the LabVIEW class satisfying requirement 2:
    However, this doesn't work in my project. I have similar content, and when I ask Requirements Gateway to analyse the project it shows nothing and then LabVIEW crashes! I'll have to try stripping my project down to the bare bones to find the problematic element. I hate it when this happens....
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Using HP E2050 HPIb gateway with labview

    Hi,
    I was wondering if it is possible to use an HP E2050 Ethernet-HPIB
    gateway (interface) with Labview. National Instruments has a similar
    product (a GPIB-Ethernet interface), but I was wondering if it was
    possible to use the HP product since I have a whole bunch of them lying
    around.
    Thanks,
    Prasun Chaudhuri

    "Chaudhuri, Prasun [WDLN2:2M22:EXCH]" wrote:
    >Hi,>>I was wondering if it is possible to use an HP E2050 Ethernet-HPIB>gateway
    (interface) with Labview. National Instruments has a similar>product (a GPIB-Ethernet
    interface), but I was wondering if it was>possible to use the HP product
    since I have a whole bunch of them lying>around.>>Thanks,>Prasun Chaudhuri>
    Prasun,
    If the HP Gateway has a VISA interface, i.e. you can interact with it through
    VISA calls then you should be able to use it in LabVIEW after installing
    HP-VISA. I've never tried it but it might be worth looking into.
    Kamran Shah
    National Instruments

  • Has anyone used Ethernet Gateway and LabVIEW, communicating with Ethernet/IP protocol ?

    I have a PLC system (Jokab Safety B20)  together with Ethernet Gateway (also Jokab Safety type E1).
    What I want to do is to communicate with this unit using LabVIEW Ethernet/IP.
    Read a couple of data and write a couple.
    Has anyone anything like this with LabVIEW and Ethernet/IP ?
    I'm completely new to using PLC's, but I have made a minimum PLC application, but can't get communication to work with LabVIEW (+ Ethernet/IP).

    i generally use an OPC server to talk to he PLC and then use Datasocket to talk to the OPC server tags.
    if that gaetway thing is an OPC server then you maybe abel to do data socket R/W via it.
    Otherwise the NI OPC server may support that widget and (at the rate I bill out) is a good deal in the eyes of most of my customers.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • LabView and SysTec GW-003-10 CAN-Ethern​et Gateway?

    Is anyone using a SysTec GW-003-10 CAN-Ethernet Gateway with LabView?  Specifically, I'm thinking about using one with a JJ X-ray stepper motor controller.  Thanks in advance!
    Best wishes,
    Will

    Hello Will,
    In case no one posts who has directly already done this, is there anything in particular that you are having difficulties with?  Are you looking for prebuilt code or maybe just an idea of how hard this will be to program.  If you're looking for the specifics, let us know and we'll try to help you out.  There are a few TCP example VIs in the Example Finder that give a good idea of how to set up TCP communication.  Hope this helps!
    ColeR
    Field Engineer

  • LabVIEW et logiciels statistiques (R, Scilab, Matlab, ...)

    Bonjour,
    Nous avons développé des applications mêlant des acquisitions et des calculs statistiques. Les acquisitions et les calculs sont pseudo-temps réel (acquisition/analyse/sauvegarde/affichage en moins d'une seconde).
    Jusqu'à présent, nous passons par une DLL C mais nous aimerions utiliser un logiciel "stat" pour simplifier nos futurs travaux.
    Nous avons entendu parlé du logiciel R. Est-ce possible de lancer un script sous R via LabVIEW et de récupérer les résultats des calculs dans l'appli LabVIEW?
    Si oui, comment et est-ce assez rapide?
    Sinon, avez-vous déjà utilisé Scilab et/ou MatLAB? Qu'en pensez-vous?
    Merci pour votre aide.

    Bonjour,
    Merci pour cette réponse.
    Nous n'aimons pas trop ActiveX car il est un peu trop "Microsoft dépendant". Nous avons eu déjà des problèmes avec une de nos applis en changeant de Word (par exemple): le service informatique ne demande pas notre accord pour installer telles ou telles mises à jour sur un poste...
    Pour le script (Matlab, Scilab), nous avons effectivement vu ces techniques mais cela ne convient pas à l'usage que nous voulons en faire, à savoir:
    - nous recherchons puis validons un protocole statistique avec un logiciel "spécialisé" et plus adapté
    - nous intégrons ces calculs statistiques dans notre appli LabVIEW en minimisant leur requalification.
    En important un script dans un code LabVIEW, rien ne garantit que personne n'a touché par mégarde au code Matlab/Scilab donc nous sommes obligés de revalider les calculs statistiques une fois le programme LV terminé.
    Avec un code compilé, nous pouvons garantir que le code statistique, une fois validé, ne peut être modifié. D'autre part, cela nous permettrait de corriger/modifier éventuellement les calculs sans avoir à requalifier toute l'appli.
    Nous voulons bien "séparer" les 2 parties pour:
    1 - minimiser les étapes de qualification
    2 - simplifier les mises à jour
    Nous cherchons donc un logiciel statistique qui puisse générer un code compilé ou utiliser un protocole de com compatible avec LabVIEW. Nous connaissons bien LabVIEW et ses possibilités mais au niveau logiciel mathématique compatible, nous n'y connaissons rien.
    Des statisticiens nous ont parlé de R mais n'étant pas des programmateurs ni des experts R, ils ne pouvaient pas nous dire s'il pouvait générer des codes compilés et/ou "dialoguer" avec LabVIEW.
    Matlab pourrait, nous a-t-on dit, générer des DLL/EXE mais de là à pouvoir les exploiter sous LabVIEW, nous n'en savons rien.
    Nous continuons à chercher. Encore merci.

  • Callable VEE with LabView? / Accessing HP Lan gateways?

    Hello,
    We have several years worth of HP VEE code written and are now exploring
    LabView as a new development tool. HP VEE provides something called
    "Callable VEE" which loads a server and allows any program which can
    "access C routines" to call HP VEE's userfunctions. Has anyone had
    experience implementing such a hybrid? Can examples be found anywhere?
    While this is probably not the best solution it would give immediate
    access to a lot of proven code. Are there any better solutions to
    accessing the HP VEE code base?
    Also, there are currently several Lan <--> GPIB gateways installed. Is
    there any way LabView can access these lan-drops to access the test
    equipment installed there?
    Alternatively,
    is it possible to set up a computer with LabView as a
    test site and have others log on to it over the lan and access all local
    resources (serial ports & GPIB devices) remotely (without having to use
    Timbuktu) ? Any examples or ideas would be appreciated.
    Thanks in advance for any help,
    joel

    > We have several years worth of HP VEE code written and are now exploring
    > LabView as a new development tool. HP VEE provides something called
    > "Callable VEE" which loads a server and allows any program which can
    > "access C routines" to call HP VEE's userfunctions. Has anyone had
    > experience implementing such a hybrid? Can examples be found anywhere?
    >
    LV has a node called the Call Library Function Node that can call
    functions within a DLL. If the VEE object looks like a DLL, then
    it should work. I'm not aware of any examples laying around, but
    I do know of organizations that use both; so they might be good
    places to start. I know that JPL uses both.
    > While this is probably not the best solution it would give immediate
    > access to a lot of proven code. Are there any better solutions to
    > accessing the HP VEE code base?
    >
    > Also, there are currently several Lan <--> GPIB gateways installed. Is
    > there any way LabView can access these lan-drops to access the test
    > equipment installed there?
    NI sells an Ethernet-GPIB device that I think is similar. The device
    comes with drivers that make it look just like any other GPIB device
    hooked to the computer. If the LAN/GPIB device has drivers, then it
    should be possible to hook it into LV. It is probably access normally
    through HP-VISA drivers. You might want to search the Knowledge Base
    on the NI web site to see if there are any guiding instructions there
    on whether to use the NI-VISA drivers instead.
    > Alternatively, is it possible to set up a computer with LabView as a
    > test site and have others log on to it over the lan and access all local
    > resources (serial ports & GPIB devices) remotely (without having to use
    > Timbuktu) ? Any examples or ideas would be appreciated.
    >
    It is currently possible to write smallish LV client programs that
    talk to a LV server program to carry out the I/O. The programming
    to do the client server stuff is quite easy using the VI Server.
    It is also possible to write the client in most other tools and
    communicate to LV over DCOM using the VI Server's ActiveX interface.
    The interface publishes a class to the EXE to load VIs and make lots
    of other changes, and another class to a VI that allows for Running,
    printing, and lots of other changes. Remote interaction without
    doing the client/server stuff isn't currently possible, but it was
    demonstrated at NIWeek working in web browsers.
    Greg McKaskle

Maybe you are looking for