ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access DataSocket Server from MATLAB / C program

I would like to read (and eventually write) data from a DataSocket Server using MATLAB.
Currently, I am just using low-level UDP commands to send data from LabVIEW to MATLAB, which works but is somewhat cumbersome and prone to programming errors. Using NI's DataSocket appears to be a much more elegant solution.
Has anybody written code to connect to DataSocket servers using MATLAB, C or C++? Is the DataSocket protocol specified somewhere?
0 Kudos
Message 1 of 5
(4,683 Views)
You will find some examples in the LabVIEW example finder that I think will help you.  You can go to Help >> Find Examples... and search for DS Write.vi to find this file.  There are other examples if you search DataSocket.

These other links may help you:
DataSocket Transfer Protocol (dstp) Overview
Protocols for DataSocket and DataSocket Server

Message Edited by Brian R on 09-04-2007 09:33 AM

Message Edited by Brian R on 09-04-2007 09:34 AM

0 Kudos
Message 2 of 5
(4,653 Views)
Dear Brian,

thank you for your help. I have succeeded in posting data to a DataSocket server from LabVIEW, and I can read it from another LabVIEW program. Now, I would like to access this data from other programs than LabView. Is there some C / C++ / MATLAB example code on how to do this?

Thank you

Rasmus
0 Kudos
Message 3 of 5
(4,644 Views)

Have you look at measurement studio ? I think they expose access to read Datasocket or variable from c side.

 

 

0 Kudos
Message 4 of 5
(4,640 Views)

The following article shows how to do this in Measurement Studio.  [link removed; article no longer available]
Thanks!

 
0 Kudos
Message 5 of 5
(4,630 Views)