Jump to content

Search the Community

Showing results for tags 'labpython'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Software & Hardware Discussions
    • LabVIEW General
    • LabVIEW (By Category)
    • Hardware
  • Resources
    • LabVIEW Getting Started
    • OpenG
    • Code Repository (Certified)
    • LAVA Code on LabVIEW Tools Network
    • Code In-Development
  • Community
    • LAVA Lounge
    • LabVIEW Feedback for NI
    • LabVIEW Ecosystem
  • LAVA Site Related
    • Site Feedback & Support
    • Wiki Help

Categories

  • *Uncertified*
  • LabVIEW Tools Network Certified
  • LabVIEW API
    • VI Scripting
    • JKI Right-Click Framework Plugins
    • Quick Drop Plugins
    • XNodes
  • General
  • User Interface
    • X-Controls
  • LabVIEW IDE
    • Custom Probes
  • LabVIEW OOP
  • Database & File IO
  • Machine Vision & Imaging
  • Remote Control, Monitoring and the Internet
  • Hardware

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Company Website


Twitter Name


LinkedIn Profile


Facebook Page


Location


Interests

Found 11 results

  1. I'm seeing a slightly weird (and inconvenient) bug with LabPython... I've a Windows 7 64bit machine with 32bit LabVIEW 2012 and 32 bit LabVIEW2013 and both 64bit and 32bit Python 2.7 installed (the former I use standalone, the latter is just for linking to some LabVIEW code that makes use of LabPython). My 32bit python27.dll therefore lives in C:\Windows\SysWOW64\ and I point LabPython to it (for both versions of LabVIEW) and can see in both labview.ini files that the correct key has been added. On LabVIEW 2012, everything work s absolutely fine. On LabVIEW 2013, if I load a VI containing the Python script node, it complains that it can't load lvpython.dll via a debug window message. This is uually followed by a fatal exception, which is not a massive surprise ! If I use the LabVIEW vi API to the LabPython, then I don't have load errors and LabVIEW crashes about as much as it normally does. The only other LabVIEW 2013 setup that I've played with are 32bit Windows 7 machines running 32bit LabVIEW 2013 only, and they seem all fine. My current workaround is to load the VI that creates a session in the LabVIEW vi API mode of LabPython operation, thus forcing the dll to load, which then seems to let me load and use the script node (which sort of makes sense as Windows will use the already loaded dll rather than loading it again) - but it's a little messy and doesn't explain why LabVIEW 2012 works just fine.... Any thoughts anyone as to what's going on ?
  2. I have installed LabPython successfully few days ago. My goal is to experiment the possibility of calling machine learning library from python into the labview environment. So I want to run a LabPython script node that will read two local csv files for the inputs of random forest classifier. The output of the python script is the final predicted class in string format. What I did to make this work: I have set the server path to where my python27.dll located. The script is running fine until it comes through machine learning library. It ran but struck forever to run. I can ran this exactly same code in my cmd command. I believe the issue rises with calling the machine learning library. Is there anyway that I can get around with this or suggest a better way to do without python script node? Thank you, AL Labview 2015 32bits python 2.7 32 bits windows 10
  3. Hi there, I wonder anyone out there having issue installing the latest LabPython v4.0.04. The Laview system i have is 2015 32 bit, windows 10, python 2.7. I tried to install the vip package from sourceforge using VI package manager. Then it showed me error code 8 saying the installation was not completed. Any thoughts anyone as to what's going on ? Could someone who has similar experience help me out on getting Labpython installed in my LV?
  4. Hello there: I have a big project, pretty much already coded in Labview, designed to perform monte-carlo analysis on a set of applications that use data from time synchronized measurements across the electrical power system. The project is designed to be open source and distributable using both built .exe and vipm. Therefore I include ONLY libraries that either come with LV or are OpenG (no third party tools that need to be purchased, and no TestStand). A part I have yet to code is the monte-carlo engine which needs to be end-user programmable. I have an idea for creating my own set of commands and a labview interpreter, but before I do that, I'm thinking that many of my end users will already have some python ability. So I'm trying to decide to use labPython. The problem is that I have not found any documentation or examples for it yet. What I need to do, is have the python script, written by the user, access controls (mainly clusters or 2-D tables), overwrite the LV control values, then start a test run. This is essentially test automation. Python would be nice because then the user can use local variables to calculate the values to be written into the controls. So I'm looking for your advice: Should I give LabPython a try? If so can someone: 1) point me to some documentation 2) point me to some example code (especially how to access controls). 3) tell me where to go when I need to ask for help (this forum or another) Thank you so much.
  5. Hi, I try to use LabPython with Python 2.7.8. After some difficulties in the beginning I am now able to run simple scripts and also import certain modules, for example the following: import numpy sampling = 1/timestep millivoltage = numpy.std(voltage)*1000 But if I now try to add a def statement (like the one below) to the script, the VI gets stuck at PYTHON Execute Script (if it is called) or throws a ZeroDivisionError (if it is just added but not called in the script): def test(): return 0 Are there certain things that are forbidden when using LabPython like certain statements? I just noticed that I have to put the def to the beginning. If I now try to add a self written module to python and try to load it the PYTHON Execute Script VI freezes as well. I attached the file. What would be the right way to use a self written module in LabPython? Can I put the file somewhere, where LabPython is checking? In which directory is LabPython running? Furthermore I wonder if there is any way to run a script file in LabPython, or do I always have to copy the code to a String-Box? Best, Erik timetrace_processing.zip
  6. I want to develop a C++ script server or C++ script node which it works like LabPython. So I want to run my C++ code in text mode in the block diagram of LabVIEW. Now I can run my C++ code in C++ interpreter of CERN's ROOT which can run without compilation. ROOT is good at data analysis, and LabVIEW does well in the data acqisition. I hope the two can be work together. So instead of data processing offline by using ROOT after LabVIEW finish getting the experiment data, I hope that data processing online when LabVIEW getting data. That means I must corporate my ROOT C++ code into LabVIEW which is like LabPython. It is better for me to have a script node like LabPython which can runn the ROOT C++ code. But I google the document about LabPython source code, and could not get any good result. So how can I see the source code of LabPython? I really want to know how develop a script node in Block Diagram of LabVIEW, and any document about this is few. So I will appreciate any help. Best regard, abc4329803
  7. I want to use the Python extension libs such as ROOT (http://root.cern.ch/drupal/content/how-use-use-python-pyroot-interpreter and http://root.cern.ch/drupal/content/production-version-528), but it is strange for me to use the labpython. I write a demo.py to import ROOT(just like this "from ROOT import gROOT, TCanvas, TF1") which is running in LabPython, but it seems to crash for LabVIEW, but it can be used outside of LabVIEW if python it in the command line. And If I run the python script without ROOT lib, it is normal in LabPython. How can I solve it? My python version is 2.6, the ROOT version 5.28, and LabVIEW version is 2011. LabPython version is 4.004. The Python file could not be uploaded, so I change the name from demo.py to demo_python.vi. Please change it after download. And LabVIEW file is also uploaded. My ROOT env config variables are set PATH=%ROOTSYS%/bin;%PATH%set PYTHONPATH=%ROOTSYS%/bin;%PYTHONPATH% So after setting config variables, you can type the command "python -i demo.py" in the python installation directory in the command line. It is normal running, but you could not do it in LabPython using the same code. And My LabVIEW.ini is setting like this: PythonServer=C:WINDOWSsystem32python26.dll Thanks! demo.vi demo_python.vi
  8. I was requested to provide Labview bindings for an app written in mostly in python and I've found LabPython tobe a blessing. However, I run into a nasty problem and I can't really figure who is to blame. In a nutshell: LabPython does not unload python server dll and dll of imported modules (python27.dll and *.pyd) after "PYTHON Close Session.vi" have been executed and VI stopped . For most cases it causes no problem, but numpy module causes LabView to hang when "import numpy" is executed on the second run. I'll greatly appreciate any help with the matter, because I can't even tell who is to blame - labpython, numpy, or LabView In details: 1. Here is a test case 2. When the VI is loaded into memory, only labpython.dll have been loaded - OK. 3. When the VI have been run the python27.dll and a lot of numpy-related dll's are loaded and remain in memory when the VI stops. 4. If I quit the VI, labpython.dll is unloaded, but all other dll's remains - this definitely seems to be wrong. 5. The second run generates an error and hangs on closing Some handles are open at this moment: 6. If I do not quit the VI before second run (skip step 4), there is no error and it hangs on the first labpython VI after "import numpy" execution. I tested this behavior with 1) Labview 2012, labpython 4.0.0.4, python 2.7, numpy 1.7.1 and 1.6.1 2) Labview 2012, labpython 4.0.0.4, python 2.4, numpy 1.4.1 3) Labview 8.5, labpython 1.2, python 2.7, numpy 1.6.1 Test VI is attached to the post. test.vi
  9. This package will be available for download through VIPM in a few days. This release and covers a request for the LabPython package to be view-able under the new 4.x Top Level Menus, and to fix a dependency issue (related to this thread). This package was tested with Python 2.5 on both Windows 7 x86 and Windows XP x86. If any developers want to continue to work on the Labpython project or any other OpenG project just PM me. Kind regards Jonathon Green OpenG Manager
  10. Hi All, On a system we're working on, we are allowing the operator to enter a python script. The script is executed with LabPython, which seems to work well. We implemented the script editing with ScintillaNET (http://scintillanet.codeplex.com/) We also implemented pre-execution script checking (I don’t know the right term for this) with pylint (http://pypi.python.org/pypi/pylint) Attached is an example of our implementation. I’m posting this in case anyone might find it useful. A couple of items that could be improved 1) This implementation used system exec to run pylint, could pylint be run via LabPython? How would you retrieve the output string? 2) Disabling the scintilla .NET control (via a property node) doesn’t fit visually with other LV controls. Could the right look be achieved by manipulating the control's colors 3) Auto indentation hasn’t been implemented. In order for this to work you'll need to install: Python 2.7.2 (This might work with newer version, I haven't tried) http://www.python.org/getit/releases/2.7.2/ logilab-astng-0.23.0 http://pypi.python.o...i/logilab-astng logilab-common-0.57.0 http://www.logilab.o...b-common/0.57.0 pylint-0.25.0 http://pypi.python.org/pypi/pylint SintillaNET 2.2 http://scintillanet.codeplex.com/ If anyone does make improvements to this, please post your updates. Thanks Denis Python Trial.llb
  11. Hi all, I'm a beginer, and I'm french, so sorry formy mystake in programing and in english. I have to use a python script into labview 2010. I use Vi Package Manager to instal Labpython find in OpenG source. It seems that I have a problem if initialisation of Labpython The example box of Labpython doesn't work has you can see on this Print Screen. Thank you for your futur reply. Thibault Menard
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.