LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Are there any up to date DataSocket examples for Labwindows/CVI

Solved!
Go to solution
I am trying to use data socket to return data from test equipment using WiFi.  I want to use DataSocket, but all the examples I have found for Labwindows/CVI are using out of data DataSocket API functions.  Are there any more recent examples available to demonstrate how to setup a data socket connection and transfer data?
0 Kudos
Message 1 of 7
(5,614 Views)
Solution
Accepted by topic author Pete@SELEX

Hi,

 

Would you like to take a look at this example Transferring an ASCII Text File Using DataSocket and see if it helps?

Message Edited by Mark M on 10-07-2008 03:29 PM
Best regards,

Mark M.
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 7
(5,583 Views)

Thanks for the answer Mark, but I have already looked at this one.  The problem I have is that even this example uses out of date API calls.  For example DS_Open() where this has been replaced by DS_OpenEx().  Also I am unsure if I need to have calls to the Data Socket Server.  What I am trying to do is use Data Socket to implement a background monitor system that can provide text messages and data values for the client software to read and display.  The test set is a PXI based solution running TestStand.  This uses WiFi to establish a Remote Desktop connection to a TabletPC.  I would like to piggy back onto this connection to display the debug data and other information to let me know what is going on inside the box.  So is there any more information or help you can provide?

 

 

0 Kudos
Message 3 of 7
(5,544 Views)

Hi Pete,

 

Sorry you have already found that one. I have written a simple example for you using DS_OpenEX() that you may find in the attachment. I wrote some comments in the code but if you have any questions please feel free to ask!

 

The example is based on a simple Reader and Writer model:

 

  • The Writer first opens a connection to the DS Server and updates a value determined by a numeric control on the front panel.The connection should be closed after the user finishes writing the data to the server.
  • The Reader opens a connection to the DS Server first and waits for a event. When an incoming data is received, it calls an event function which stores the data to a variable and displays the value in a numeric indicator on the front panel. The user finishes reading data and closes the connection.

 

For your application, I suggest that the DataSocket Writer program can be running on your PXI which sends the data to a DS Server. This depends on your resources, you can either have a dedicated machine running as a DataSocket Server somewhere in your network (recommended for security reasons), or you can run the Server with the Writer on the same PXI. You can create as many Readers as you like running on different client machines such as your TabletPC or desktop PC as long as it can access the same network to poll the data back from the DS Server.

 

The Writer program can maintain a dedicated connection to the DS server to keep the data up to date all the time, and this does require establishing the connection using DS_Open() or DS_OpenEx(). But as for your client machines, connections should be closed as soon as the required data are acquired in order to minimise the traffic on your network.

 

Hope this helps,

Best regards,

Mark M.
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 7
(5,524 Views)

Hello.

 

Does the writer code works for Kepserver to update the value

 

Regards,

Akshay

0 Kudos
Message 5 of 7
(3,239 Views)

Hello,

I'm getting an error after running the writer code which says 

 

error: Undefined symbol '_DS_DiscardObjHandle@4' referenced in "e:\Writer\cvibuild.dsWriter\Debug\dsWriter.obj".

 

0 Kudos
Message 6 of 7
(3,228 Views)

Need to Load Instruments with the DataSocket library, ...\toolslib\datasock\dataskt.fp

0 Kudos
Message 7 of 7
(2,394 Views)