Discussion:
VXI-11 Server Example
(too old to reply)
Brian F.
2007-06-21 20:40:16 UTC
Permalink
Hello. 
 
Thank you for posting to the NI Discussion Forums.
 
The VXI-11 protocol is fully supported by NI-VISA version 2.6 (or later) on Windows, Solaris and Linux operating systems.  The following website has great information on how to use VISA and MAX to configure communication with the device:
 
Using 3rd-Party Ethernet-Based GPIB Devices with the Measurement and Automation Explorer
<a href="http://digital.ni.com/public.nsf/allkb/ABB6C9CB8E09B5BF86256C47006E09C1" target="_blank">http://digital.ni.com/public.nsf/allkb/ABB6C9CB8E09B5BF86256C47006E09C1</a>
&nbsp;
That said, I am a bit unsure if this is exactly what you are looking for.&nbsp; My understanding is that you currently have an app that controls an instrument.&nbsp; However, now you want that same app to control a LabVIEW VI.&nbsp; Can you explain this a bit further if this is correct or am I misunderstanding you?&nbsp; The information I included above is more for using LabVIEW to control the instrument and eliminate the legacy app.&nbsp; This would be fairly easy to implement so maybe, even if you hadn't considered this route, you could completely eliminate the legacy app and just use LabVIEW and the instrument.&nbsp;
&nbsp;
Let me know a little more about your application and I will be happy to continue helping you!
&nbsp;
Brian FApplications Engineer
National Instruments
&nbsp;
&nbsp;
BernieR
2007-06-22 16:40:19 UTC
Permalink
Yes, I need to write the server side.&nbsp;&nbsp; Our customer sent me a bit spec on the VXI-11 protocol, but I thought I could take the easy route and find an existing example in LabVIEW.&nbsp; I've had to develop C++ CIN's in the past to provide capapability to unsupported LabVIEW network protocols in the past, so that shouldn't be a big problem once I find the C code.
Thanks for the reply.
BernieR
2007-06-22 16:40:18 UTC
Permalink
Hi Brian,
&nbsp; Thanks a million for the quick response.&nbsp;&nbsp; This is the 1st time I've used the NI Discussion Forum, so I wasn't sure what to expect.&nbsp;&nbsp; Anyhow, you are exactly correct.&nbsp; My LabVIEW application needs to be commaned from a legacy client application.&nbsp;&nbsp; My LabVIEW application provides the low-level interface to our board.&nbsp; The legacy application is a customer application written in another language.&nbsp;&nbsp; The legacy application uses VXI-11 protocol to control another VXI-11 compliant device.&nbsp;&nbsp; We need the legacy application to control our board using the VXI-11 protocol.&nbsp;&nbsp; You could say I need to write the device driver for a new VXI-11 compliant device interface.&nbsp;&nbsp;
Thanks Again.
BernieR
2007-06-22 17:10:17 UTC
Permalink
Thans for the Info.&nbsp;&nbsp; I'll look into NI-Device.&nbsp;&nbsp; That sounds like the ticket, if I can get a hold of it.&nbsp;&nbsp; It sounds like this may be more work than expected.&nbsp;&nbsp;
Update :&nbsp;It looks like VIX-11 is part of the LXI spec.&nbsp; Maybe I could find an example in LXI as LXI is more current.&nbsp;

<a href="http://www.lxiconnexion.com/articles/1006/LXI%200610%20Device%20Control.pdf" target="_blank">http://www.lxiconnexion.com/articles/1006/LXI%200610%20Device%20Control.pdf</a>

Thanks again for the help.

ps.&nbsp; Our product is still in R&amp;D, so I can't really talk about it.&nbsp; The initial command interface is very simple, but will grow as we implement new interfaces.
pachook
2008-06-03 22:40:12 UTC
Permalink
Hello everyone, I think I may have simmilar problem as the founder of the thread, that's why i am not starting new one, just writing here.As my thesis I am doing server that will support vxi11 protocol for Visa library clients (for example LabVIEW software). I've implemented all server (or most) server functions, but now I am facing some significant problems.Problem 1The server does not see all input parameters that are passed while calling viOpen function ( this function has clientID, device, lock and lock_timeout ). My XDR structure looks like that :struct Create_LinkParms {&nbsp;&nbsp;&nbsp; long clientId;&nbsp;&nbsp;&nbsp; BOOL lockDevice;&nbsp;&nbsp;&nbsp; u_long lock_timeout;&nbsp;&nbsp;&nbsp; char *device;};while debugging on server during create connection only parameters I see getting to server are client ID and device, lockDevice and lock_timeout are always 0, no matter what values I put on viOpen call.Problem 2This problem is noticed while trying to execute Visa Write or Read in asynchronously mode. I got a visa error like that one in attachment. The problem is I am not sure what 'tells' visa that it is enabled for async events. I suspect that it may be caused by the type or values in structure that is returned after creating link on server (viOpen calls a function on server which input parameters are Create_LinkParms, and return value is like this one below)struct Create_LinkResp {&nbsp;&nbsp;&nbsp; Device_ErrorCode error;&nbsp;&nbsp;&nbsp; Device_Link lid;&nbsp;&nbsp;&nbsp; u_short abortPort;&nbsp;&nbsp;&nbsp; u_long maxRecvSize;};If anyone has a clue how can it be solved I would be very grateful, thanks in advancePacHOOk


visaError.JPG:
Loading Image...
Sputnikrent
2008-06-04 22:10:10 UTC
Permalink
Hi pachook, What API are you using to communicate with the server, and which version are you using? Also, what version of NI-VISA are you using? You can find this by going to Measurement &amp; Automation Explorer &gt; Software &gt; NI-VISA. The version number will appear on the right window pane.Could you explain a bit more about how you are creating programming the server to support the VXI-11 protocol?In LabVIEW, VISA writes and reads default to async, and you can change this by right-clicking on the subVI and choosing Synchronous I/O mode &gt; Synchronous. There is more information about this <a href="http://digital.ni.com/public.nsf/allkb/726FB2F4044B2B9C8625646D00766713?OpenDocument" target="_blank">here</a>. Could you additionally perform an NI-Spy capture and upload the .log file here so we can take a look? This would help us troubleshoot things further. There is more information on how to do this <a href="http://digital.ni.com/public.nsf/allkb/8D890EC09B15C05A86256E6F007E3E86?OpenDocument" target="_blank">here</a>.
pachook
2008-06-04 23:10:08 UTC
Permalink
Hello Sputnikrent,thank you for your reply,to communicate with the server I use LabVIEW 7.1 with 4.2 version of VISA. Sorry but I dont really get what do you exaclly mean by API :)I also tried to communicate to server using simple C - code like this one here <a href="http://kmeif.pwr.wroc.pl/elektron/interfejsy/wyklad_a2/sample.zip" target="_blank">http://kmeif.pwr.wroc.pl/elektron/interfejsy/wyklad_a2/sample.zip</a> I did try to use NI-Spy (results you can find below)I also attach my test vi.The aim of my task is to do an environment close to real server and device as possible, so that for users (students) switching beetween my server and device model and real one will be just changing IP address of the server.<a href="http://kmeif.pwr.wroc.pl/elektron/interfejsy/wyklad_a2/sample.zip" target="_blank"> </a> In order to get usability of real vxi server I did my server code and XDR file using Distinct RPC library. The *.x file was designed basing on specification of vxi protocol..I hope it helped a littlePacHOOk


ViOpen with lock.pdf:
http://forums.ni.com/attachments/ni/140/30258/1/ViOpen with lock.pdf


testvxi.vi:
http://forums.ni.com/attachments/ni/140/30258/2/testvxi.vi


VisaOpen without lock.pdf:
http://forums.ni.com/attachments/ni/140/30258/3/VisaOpen without lock.pdf
Sputnikrent
2008-06-06 19:10:12 UTC
Permalink
Hi pachook, What is the server you are refering to, is this an actual PC, or is this a VXI-11 instrument? Like cymrieg mentioned, the information might be parsed differently depending on what you are communicating with. Let us know!
pachook
2008-06-07 11:40:11 UTC
Permalink
Hi all, thanks for your interest, the server I am refering to is a pc with server software on it (the one I am developing), but I also did some tests with vxi 11 instrument.I would be happy to investigate the network, and compare my server results with vxi, but right now the laboratory I could do it is quite busy (espacially with network communication)we shall see in few weeks i guess.
cymrieg
2008-06-05 13:10:15 UTC
Permalink
Pachook,
&nbsp;
I think you are going to have to revert to using a packet sniffer like wireshark to see what is going on between the client and server. It does help to have a VXI-11 instrument (server) that you can observe the handshake. Agilent and NI do this slightly differently and different instrument also respond differently.
&nbsp;
Loading...