Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp/ip ni-visa commands using visual basic

Solved!
Go to solution

what are the dll and bas files i need to communicate with a device via rj45 cable thru visbual basic , i can communicate when i use hyperterminal but i can't via visual basic

 

 

tcpip::192.168.48.11:: this is where i'm stuck

0 Kudos
Message 1 of 7
(12,438 Views)

Hello Neelesh

You would need Visa32.bas file. Here is the knowledgebase  that talkas about developing VISAand GPIB application in VB.

Good luck

 

NI-khil

Message 2 of 7
(12,424 Views)

hi,

 

thanks i found that file. we recently purchased a gpib to usb and i used the call commands and everything worked out fine via visual basic i was able to talk to the device and everything.

 

but i'm still stuck on how to connect to the device via ethernet cable. my address is 192.168.48.11

 

so the way i have to write is  

viWrite&(ByVal vi&, ByVal buf$, ByVal count&, retCount&)

 

 

i have no clue what all that stuff means this is how far i got what do i put after the ipaddress?

 

viWrite&(tcpip::192.168.48.11

 

do you guys have examples for this, if i can't figure it out can we pay national instruments for a software engineer to help us write a program,

0 Kudos
Message 3 of 7
(12,335 Views)

Hi,

 

When you installed NI VISA it should have installed a set of text based examples, generally you can find those example here:

 

C:\Documents and Settings\All Users\Documents\National Instruments\NI-VISA\Examples\C

 

You can also find them through the start menu National Instruments >> VISA >> Examples. The NI-VISA help is also a good reference if your looking for information about individual VISA functions.

 

Thanks

Scott M.

 

Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(12,311 Views)

i found the NI-visa user manual but all the examples they have is gpib, i changed all the gpib stuff to "tcpip::192.168.48.11::inst" but the device did not connect i am trying to send a "*IDN?"

0 Kudos
Message 5 of 7
(12,307 Views)
Solution
Accepted by topic author neelesh2003@comcast.net

Hi,

 

The following tutorial will walk you through some trouble shooting steps to make sure your instrument is connected properly, this should help us figure out where the issues are coming from.

 

Ethernet Instrument Control Tutorial

 

Getting Started with Instrument Control using Ethernet

 

Thanks

Scott M.

Applications Engineer
National Instruments
Message 6 of 7
(12,277 Views)
THANKS!!!:)
0 Kudos
Message 7 of 7
(12,272 Views)