LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ethernet programming

I am trying to write a VI that will control an oscilloscope through the Ethernet interface. I am having some trouble. (1) wsock32.lib? where and what is this? and Do I need it? (2) how to use NI-VISA for this purpose, or should I use a third party library. (3) Any expample programs in labwindows? seems all the examples are in labview.
0 Kudos
Message 1 of 5
(3,385 Views)
I am assuming that you osciloscope has an ethernet interface, and if that interface is enabled for ethernet communication with a PC there should normally be a .dll and .lib files that allows you easy access to the supported fuctions and features of the scope. If they do not support the scope with a nice and easy .dll they should supply you with a document detailing the communication protocol and you would have to write your own function interogating and handling the response to the scope using the CVI TCP libraries.

Building a GUI that looks like the scope is easy after that. You could Use an image and overlay the controls and graph over the image and that gives it a really close look and feel to the scope.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 5
(3,385 Views)
Hi,

I would first check out http://www.ni.com/idnet for an instrument driver to see if there's one already made for your scope. If you cannot find one there, I would then ask the manufacturer for any drivers they may have. These would be the recommended ways to communicate with your scope, since the interface would be already defined for you. If you can not find either, then I would look into possibly using NI-VISA calls to control your ethernet scope. There are some good links to our knowledgebase and some other forum posts about this. I can link you to some of them here:

NI-VISA and ethernet instruments


NI-VISA, TCP, MAX


NI-VISA, TCP tutorial


Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 3 of 5
(3,385 Views)
I d/led the driver for the scope. how do I use this to communicate with it?
0 Kudos
Message 4 of 5
(3,385 Views)
Hello,

Usually all the drivers come with an example. Look for the folder where you installed the driver or where you downloaded it and look for one example. If it is an instrument driver that uses VISA, it should contain at some point a configuration or OPEN VISA vi, then a Write or Read VI and then a Close VISA.
If it is a TCP driver, then probably you will have a VI where you open the TCP session, configuring the IP address and the port, then the Write or Read and then the Close.
I hope this helps.

Best Regards,
Ricardo Santa Olalla
National Instruments.
0 Kudos
Message 5 of 5
(3,385 Views)