Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing data socket server from linux client

Hello,

We would like to communicate with a dstp server running on a Windows machine, from a Linux computer (Scientific Linux 6).

The control program is written in Fortran and C and needs to send commands to, and collect data from, the Windows PC using the dstp protocol.

The documentation I could find on NI servers always seemed to refer to Labview and/or Windows APIs.

What installation is required in the case of a Linux client?

Thanks for helping.

0 Kudos
Message 1 of 8
(8,102 Views)

Unfortunately the only C api to datasocket is for CVI. I'm not sure if that is supported on Linux. The DataSocket primitives in LabVIEW are supported on Linux, though.

0 Kudos
Message 2 of 8
(5,999 Views)

CVI does work on Linux: http://sine.ni.com/nips/cds/view/p/lang/en/nid/203157 

0 Kudos
Message 3 of 8
(5,999 Views)

Sorry for being ignorant, but how does this solve my problem? Should I install the full LabWindows environment just to be able to communicate with one instrument via dstp?

And if so, how would I then access the dstp server from an application written in fortran or C?

0 Kudos
Message 4 of 8
(5,999 Views)

Unfortunately, while the CVI environment is supported on Linux, the interfaces for reading and writing DSTP data were implemented using Microsoft's ActiveX technology, so that code is not available on Linux.

The CVI environment does provide an API for accessing shared variable data. One option would be to convert your application to use the shared variable engine rather than the DSTP server to publish data. Another option would be to implement a proxy on the Windows machine which converts messages from the Linux box into DSTP commands. Linux could communicate with the proxy using shared variables (requires CVI), web service requests (can be implemented with any HTTP request), or any other protocol which is convenient for you to use.

0 Kudos
Message 5 of 8
(5,999 Views)

Has anybody tried using LabVIEW Windows binaries with Wine?

Possibly the solution here is to write the as if for a windows machine and run via Wine on the Scientific Linux machine?

Of course you should only do this if you must must must keep data socket.

0 Kudos
Message 6 of 8
(5,999 Views)

Thank you for all your answers. From what  I read, it seems that switching to another protocal (e.g. gpib via enet100) will be simpler for us.

This is a bit frustrating, though.

If NI wants to promote dstp as a cross-platform protocol, it should really consider providing libraries for linux and os x too.

Is this really such a big job for them?

0 Kudos
Message 7 of 8
(5,999 Views)

I wonder if anyone has ever taken WireShark and looked at the data that goes over the wire during a DSTP transaction. I'm pretty sure I have tackled more complex protocols in the past using WireShark and written a LabVIEW VI library for them.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 8
(5,999 Views)