Jump to content

TCP/IP communication using Labview


Recommended Posts

I have a H&H PLI Series Electrical Load in my laboratory. I am targeting to control this device by giving instruction using LABVIEW. Currently, as a interface medium I am using ethernet (LAN) for communication. I have downloaded specific driver (H&H PLI series) required for this device to use in LabVIEW. I am facing some difficulties in it such as providing SCPI commands which is in manual to this device but not receiving response from it. I need some help to resolve this matter. I am not able to understand the issue. I need some help. 

delta2.vi

Link to comment
2 hours ago, dipanwita said:

I have a H&H PLI Series Electrical Load in my laboratory. I am targeting to control this device by giving instruction using LABVIEW. Currently, as a interface medium I am using ethernet (LAN) for communication. I have downloaded specific driver (H&H PLI series) required for this device to use in LabVIEW. I am facing some difficulties in it such as providing SCPI commands which is in manual to this device but not receiving response from it. I need some help to resolve this matter. I am not able to understand the issue. I need some help. 

delta2.vi 37.21 kB · 2 downloads

So you say you downloaded a driver but program the entire communication in plain calls anyhow. Why that?

First thing would be that commands need to be terminated. Try to add a \n or maybe \r\n to the *IDN? command too.

Also, while the case of the commands usually shouldn't matter for SCPI command, you do not need to write the syntax from the programming manual literally. The convention is, that the uppercase letters are required (short form), while the lowercase letters are optional (long form). Some instruments allow partial optional characters and other only understand either the exact short form or the full long form command parts in a single command.

One potential problem is that the native TCP nodes only have 4 messages modes for TCP Read. And neither is usually perfect for normal instruments. You would want to use the termination character mode, but there is only the option to use CR AND LF. Many instruments send either one of them but not necessarily all of them. Standard mode kind of still works but the Read will timeout as it can't read the actually asked amount of characters. This will slow down your communication a lot. Better is usually to go and use VISA instead for these cases.

Link to comment

I'm guessing that you are new to LabVIEW. It appears that you found your driver on the NI site (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E962513CF06C2315E0440021287E6E02) and followed this link:

image.png.1ff5c969a094c4bcc027ff4cd5625a25.png

You probably installed the driver, but then skipped down to the bottom and followed the link on how to use Ethernet to control your instrument. Those instructions are for the case where the instrument driver doesn't exist or failed to download.

image.png.bcde308dbeebc8fc3f961b59c783a913.png

 

You missed the part in the middle (step 7) to look for and USE the driver.

The driver I found looks very clean and should work as a starting point for you.

You will need to learn the basics of LabVIEW.  I would suggest that you start on the NI site for new user help. NI has dedicated resources to support new users. 

LAVA is a LabVIEW related site, but the name stands for LabVIEW Advanced Virtual Architects. Beginning questions are not likely to receive much help...

Edited by Phillip Brooks
Link to comment

If you haven't already I suggest that you install Wireshark on your computer. This will allow you to analyze the ethernet traffic and help you debug.

As a disclaimer I am sure there are many other well-suited communication analyzers but Wireshark is the default tool for me. :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.