โ05-04-2009 05:51 PM
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 ๐ )
Solved! Go to Solution.
โ05-05-2009 09:39 AM
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? ๐
โ05-06-2009 08:14 AM
โ05-06-2009 04:41 PM
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 ๐