LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket Python binding

Hi,

is there a (perhaps 3rd party) solution to connect to NI DataSocket from Python?

 

Piotr

0 Kudos
Message 1 of 6
(6,854 Views)

A google search turned up this result http://www.evolt.org/node/60276

Hope this helps

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
Message 2 of 6
(6,809 Views)

yes - Python has built-in library for sockets.

My questions was more if there was/is a lib that encapsulates NI DataSockets.

 

BTW: is there a technical description what is it 'under-the-hood' when one accessesa data socket via 'dstp://machine/item'

If I understand correctly dstp uses TCP port 3015, right?

 

Piotr

 

 

 

0 Kudos
Message 3 of 6
(6,805 Views)

Hi Piotr,

 

There is no encapsulated library that you could use outside of LabVIEW to work with DataSockets. Here is a link to a white paper on how LabVIEW uses datasockets. To answer your question on what port to use, you can use any of the ports not already being used here. So port 3015 should work fine as long as nothing else is using it.

 

Regards,

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
Message 4 of 6
(6,793 Views)
What about Measurement Studio?  There are bindings to C#, C++.
0 Kudos
Message 5 of 6
(6,790 Views)
You are correct and if you look on page 4 of this document you can see that "The DataSocket API is implemented as an

ActiveX control, a LabWindows/CVI C library, and a set of LabVIEW VIs, so you can use it in any programming environment."

 

Here you can find the datasocket library for LabWindows\CVI.  Here is a link to how to create a Datasocket reader/writer with Measurement Studio ActiveX controls.

 

You should be able to use the ActiveX controls that are supported by Python to talk to the DataSocket API.

 

Regards,

 

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 6 of 6
(6,758 Views)