Jump to content

NickB34

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by NickB34

  1. I think I may travel down the python socket server road with this one. It is probably the best way to implement what I need since I won't have to install any NI stuff on the server side. If only I knew more about programming in python... I'll update if I ever come up with a solution.

  2. I've been able to download the pipes package and have been able to execute the test VI's that are included. Whenever I send the py directive to a command console, I can see it change to python mode. Any command that I send after that causes an error. I see the same behavior when I open python.exe using pipes (instead of cmd.exe py). Any ideas?

    System Command (cmd.exe) Test.vi

  3. I use pipes myself to pump commands to stdin and read from stdout of the python process.  You have to do the string parsing if you want to make sense of the python output in LV, but it is simple to pass commands as if you were typing away at the keyboard.

     

    I am mobile right now, but you should be able to dig up the old OpenG pipes library.  If you are on a linux box then LV has the pipe library built in.

    Darin, please elaborate if you can.... I would love to see an example of this. I'm not on a Linux box, using windows here.

  4. I've posted this in the NI forums, but I thought I might get some more traction here...

     

    Does anybody have any ideas on a way to stream commands to a python console?

     

    A little background on the issue: I am able to control instruments in a system through a .dll that I call using python. I have already implemented a VI that can create a script "on the fly" and execute it to perform simple commands. The problem is that this creates a new instance of python every time I execute a command. It would be very advantageous for me to keep python running and only stop execution when I'm done sending commands.

     

    I have tried accessing python directly from the python .dll through LabVIEW, but this got ugly very quick and I'm not a software engineer  :D

    I have also tried using labpython, but it doesn't seem to be compatible with python 3.3 which is a requirement in the system.

     

     

    Please let me know if you have any suggestions on what path I should head down, Thanks.

×
×
  • Create New...

Important Information

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