Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

HiSLIP communications problems

Solved!
Go to solution

I have a computer-controlled instrument that NI-MAX doesn't recognize. I need to communicate with it over ethernet, so I decided to implement a HiSLIP server. I chose HiSLIP, since according to Wikipedia, is intended to replace VXI-11 (also, it looked a lot simpler to implement than VXI-11 did).

 

I was able to get a server to handle the synchronous and asynchronous channel setup for a single client (NI-MAX). I have the server running on a different computer, listening on port 4880 (the HiSLIP server port). I set up a manual VISA TCP/IP resource on the client machine: "TCPIP0::192.168.0.4::hislip0::INSTR" - I then tried to validate the instrument in NI-MAX. On the server, I reported all of the packets to debug the connection process:

<< synchronous session >>

NI-MAX:SYN

Server:SYN-ACK

NI-MAX:ACK

NI-MAX: HiSLIP Initialize message. client protocol version: 0xffff, client vendor id: 0xfefe (NOTE: this appears to be an error in NI's client code: the protocol version should very likely be 1, the vendor id should be 0x4e49 - )

Server: HiSLIP InitializeResponse message. overlap mode: synchronous, protocol version: 1.0, session id: 1

 

<< asynchronous session >>

SYN, SYN-ACK, ACK

NI-MAX: HiSLIP AsyncInitialize, session id: 1 (which is what it should be)

Server: HiSLIP AsyncInitializeResponse. server vendor id: <I supplied a correct code, extracted from a Wireshark pcap file.>

NI-MAX: HiSLIP AsyncMaxMessageSize. (NOTE: there appears to be a malformed packet sent by NI. The standard specifies that there be an 8-byte size sent)

Server: HiSLIP AsyncMaxMessageSizeResponse max message size: 272 (which is 256 + 16).

... after this, everything becomes strange. NI-MAX reports that the "instrument" is successfully opened, but the icon still shows a red disconnected icon.

 

We have an instrument that has a HiSLIP interface, but right now I don't have access to it. Has anyone else had any experience with communication over HiSLIP with NI-VISA/NI-MAX? The NI end of the communication appears to be strange, and does not conform to standards?

http://ivifoundation.org/downloads/Class%20Specifications/IVI-6.1_HiSLIP-1.1-2011-02-24.pdf

 

 

 

0 Kudos
Message 1 of 10
(4,685 Views)

I have to admit that there have been very few cases that have popped up with HiSLIP but I'll try and help as much as I can. Looks like there were several solved forum posts about some general questions that may help (not sure if you've seen them):

 

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Can-VISA32-dll-extend-to-support-HiSLIP-If-c...

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/hislip-discovery/td-p/2983005

 

Also, what version of NI-VISA do you have installed onthe computer? What does the device look like in Windows Device Manager? 

Aulia V.
0 Kudos
Message 2 of 10
(4,650 Views)

I'm running NI-VISA 18 on one computer, and NI-VISA 17.5 on the other ... 

 

Thanks for referencing the other posts, I had not found them before.

The first post seemed to cover how to properly form the resource strings, which apparently I did correctly.

 

The second post mentioned some discovery  protocols that I wasn't aware were supported, but would make the final product much easier to use, but as of right now, I am just manually inputting the data into NI-MAX.

 

What is happening to me is that I am getting unexpected contents of HiSLIP packets. This could very likely be because I didn't understand the protocol as it was described in the IVI Foundation's document ... but I read it carefully ... 

0 Kudos
Message 3 of 10
(4,627 Views)

Sorry, to clarify, I have a standalone computer running the prototype HiSLIP server. I have tried to connect to this "instrument" with both NI-VISA 17.5 and 18.0

0 Kudos
Message 4 of 10
(4,626 Views)

This is what it looks like now in NI-MAX, 169.254.0.5 is the HiSLIP "instrument."

0 Kudos
Message 5 of 10
(4,625 Views)

As your not getting any bites from the NI Visa guys here I would try posting your question here: http://forums.ivifoundation.org/topics.html

Need to join the forum first.

 

0 Kudos
Message 6 of 10
(4,610 Views)

Great - thanks, I will probably try that next ...

 

I got my hands on an instrument that communicates with HiSLIP, and captured part of a session. It appears that the first suggestion that mDNS was also used by NI-VISA may be part of the issue.

0 Kudos
Message 7 of 10
(4,608 Views)

This maybe of interest also: http://kiener-muenchen.de/hislip/

 

0 Kudos
Message 8 of 10
(4,605 Views)

No mDNS explains why Visa Interactive and NI Max doesn't see the instrument but you should be able to write your own program that does the Visa Open call on your device without needing mDNS

 

0 Kudos
Message 9 of 10
(4,604 Views)
Solution
Accepted by topic author crackerplz

For whoever might have the same problem, the solution was that theAsyncMaximumMessageSize was set too small. Section 2.7 of the IVI specification for HiSLIP mentions that there is a VISA constraint on the size of synchronous messages of 256 (payload) + 16 (header) = 272 bytes (this value for the maximum synchronous message size is not configurable in the protocol, it simply is the number). I had conflated this with the AsyncMaximumMessageSize.

 

Watching a real HiSLIP device communicate with NI-MAX, the device returned 2^20 for the size of this number. The "right" answer for the number is obviously expected to be large by NI-MAX. I tried 512, which worked. I will likely set it much higher in practice.

0 Kudos
Message 10 of 10
(4,599 Views)