Example Code

TCP/IP Custom Device using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

unicate with any third-party web server.

 

Steps to Implement or Execute Code

  1. Unzip the content to the local  disc
  2. Copy the TCPIP folder to C:\Users\Public\Documents\National Instruments\NI VeriStand 201x\Custom Devices
  3. Open Veristand and create a new project or open the existing one
  4. Launch System Explorer, expand the Controller tree, right-click on Custom Devices and select TCPIP
  5. Select the server IP, port and timeout values. Timeout is the amount of time the client Custom Device should wait the server to respond during the initialization stage. The default values are localhost, 6340 and 100ms, correspondingly.
  6. Save the system definition file and close the System Explorer window.
  7. Launch Workspace window.
  8. Drop a Numeric Control to the workspace and map it to Data to Server.
  9. Drop a Numeric Indicator to the workspace and map it to Data from Server
  10. Press ctrl + M to exit Edit Mode
  11. Run Simple TCP – Server.vi. It will wait infinitely to connection from client.
  12. Go to Veristand Project Explorer and run press F5 or Operate->Run
  13. Change the control values in Veristand Workspace and LabVIEW to make sure the Custom Device properly communicates with the server.

 
Requirements

Software:

  1. LabVIEW 2013(or compatible)

 

Steps to Implement or Execute Code

  1. Download the .zip file
  2. Set your desired configuration (a, x1, x2, degrees, etc)
  3. Run the VI

 

Additional Information or References
VI Block Diagram

1.png

I used this custom device in veristand 2014,but the result is the server Vi overspeed(error code 62)and then stop and disconnect with client.

who can help me to get the reason? thank you!

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
wanjun
Member
Member
on

hello,

First,I open the project and then save all and build the custom device.

Then I used this custom device in veristand 2014, but when I start the veristand project, the labview VI will stop quickly because of speed out.

error code 62.

can you tell me the reason, thank you!