Jump to content

Recommended Posts

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Argold
      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.
    • By Erik Hebestreit
      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
×
×
  • Create New...

Important Information

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