10-03-2013 03:36 PM
Hello all,
I've read through a lot of topics here, but only a few address my question. However, I could not find any useful information. So...
I have the NI PXI chassis with an AIO card in it (NI-PXI 6259) and an embedded controller running Windows + LabView. There I run some VI's that generate signals (sine, sawtooth, DC) and output them to hardware. So far so good.
But is there a possibility to pass the signal parameters to the VIs (amplitude, frequency, offset) via Python from a remote computer running Linux. Has anybody tried this before? Could you share some code/point me in the right direction?
Thanks in advance,
maslick
10-03-2013 05:21 PM
I would build the LabVIEW project into a DLL or .NET Interop assembly exposing the methods and accessors as public. There are a lot of good sections in the LabVIEW help file that cover this.
10-03-2013 11:57 PM
I have never tried that specifically with Python on the other end of the connection, but if your python environment can establish TCP/IP connections, the process should be pretty straight forward.
To test it, there is a TCP/IP server example that ships with LV. Try running that on the embedded controller and see if you can talk to it from your python environment.
Mike..
PS: Jeff, your idea is good but there appears to be a problem with establishing outgoing TCP/IP connections from LV-generated .NET assemblies. I recently ran into a situation where a VI built into a .NET assembly consistently failed when trying to establish an outgoing connection (error 63), but the exact same VI built into a conventional executable worked fine.
10-04-2013 04:18 AM
Thanks guys. I could manage to establish connection and exchange strings between Python and the TCP server vi.
But how can I open and run a specific VI remotely from Python?
10-04-2013 07:09 PM
10-06-2013 03:22 PM
@maslick wrote:
Thanks guys. I could manage to establish connection and exchange strings between Python and the TCP server vi.
But how can I open and run a specific VI remotely from Python?
Now we are digging into an area of LabVIEW I have little experience in (GREAT I Might learn something):smileyvery-happy: [edit: I just did]
There are command line options.
See this topic of the help file. Its easier to find on disk than on-line
09-12-2016 03:44 AM
can you please share on how you managed to pass strings from python to labview