LabWindows/CVI

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Connecting to multimeter via LAN without VISA library

Solved!
Go to solution

I am connecting my HP33410A via LAN cable to my PC using  VISA library. I'm sending SCPI commands and everything work OK.

But my application must connect also without VISA and for me, it's a big problem. I read some information, that I must use SOCKET connection with TCP functionality.

Is there a simple way to do that?? I was studding some functions in LabWindows supporting SOCKET and TCP protocols. SDK library also support SOCKET connectivity, but for me it's a black magic ๐Ÿ™‚

Could someone post here a code to query a simple command like "*IDN?" using LAN interface without VISA library??

I would be grateful ๐Ÿ™‚

(Sorry for my English ๐Ÿ˜„ I hope you could understand the problem, that I'm describing ๐Ÿ™‚ )

0 Kudos
Message 1 of 4
(4,208 Views)
Solution
Accepted by topic author thenew

I solved the problem. It's simpler than I thought ๐Ÿ˜„ You just have to make a connection to TCP server. Earlier I tried to do that but with wrong port number. I think for most Agilent devices TCP port number is 5025 (I read that in manual for SOCKET connectivity)

I past here a piece of code that show how to make a connection with agilent device:

 

ConnectToTCPServer (&tcpHandle, 5025, "169.254.4.10", TCP_Handlig_Function, 0, 0);
ClientTCPWrite (tcpHandle, "*IDN?", 5, 0);

ClientTCPRead (tcpHandle, buff, 50, 0);

 

And that's all you have to do. Isn't that simple? ๐Ÿ˜›

Message 2 of 4
(4,177 Views)
Thank you for posting that tip. We are planning to develop an application in the near future that will need to connect to an Agilent oscilloscope via LAN, so your suggestion may save me some headache in starting it up Smiley Happy


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 4
(4,151 Views)

You welcome ๐Ÿ™‚

If you're not forced to connect to agilent device by SOCKET, it's la lot easier to use VISA library. You don't need to worry about type of connection nor port number. I had to do this because of my researches about VISA latency ๐Ÿ™‚

0 Kudos
Message 4 of 4
(4,133 Views)