Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

C++ source code of visa32.libOptions

Have anybody c++ source code for visa32.lib functions. If i am using VC++ and want to use ni488 functions like ibrd and ibwrt etc on my PC but not use VISA functions, Is it possible to communicate tek Scope via LAN? If yes then how? help someone

0 Kudos
Message 1 of 6
(4,473 Views)

NI-488 functions are only for a IEEE-488 (GPIB) connection. A LAN connection is not GPIB.

0 Kudos
Message 2 of 6
(4,471 Views)

If you have ever used VISA library before for controlling GPIB instruments, LAN is almost the same.

The only basic difference is the VISA address when viOpen() call.

 

GPIB is like "GPIB0::1::INSTR"

LAN is like "TCPIP::192.168.1.20::INSTR"

 

I believe the Tek scope understands 488.2 and SCPI commands, so write and read operation is exactly similar as GPIB.

0 Kudos
Message 3 of 6
(4,452 Views)

If i dont use tekVISA then through LAN how i send write and read commands to my Tek scope. In reality we are controlling some instruments through LAN with one software build in VC++. In those some instr dont have VISA bcz they are not of tek. They can accept only SCPI commands. We want to be generic read and write methods that should read the write all sort of instr.  

0 Kudos
Message 4 of 6
(4,434 Views)

It is irrelevant whether your other instruments are from Tek or not. You just need some licensed version of VISA (as long as it supports LAN communication) from any vendor. The instrument does not care whether the VISA library you are using is from Tek, Agilent, NI, etc. The instrument itself does not know or even care if you are using VISA or lower level TCP/IP communication.

 

The only generic instrument communication api is VISA.

0 Kudos
Message 5 of 6
(4,427 Views)

If you are using Tek Scope product, I believe you have at least a valid user license for Tek Visa, which may be enough for VC++ apps controlling through LAN (VXI-11 or SOCKET). So I recommend you to try VISA programming because the programming manner is completely same as GPIB.

 

If you want to avoid VISA anyhow, you will have to write TCPIP program code using Winsock API. The ibwrt(), ibrd(), etc, are very specific to NI GPIB control, so these functions can not be used for LAN instr. You need write TCPIP codes with Winsock.

 

Plus, the Tek Scope may have 2 alternative protocols -- VXI-11 and SOCKET.  If you write TCPIP code, VXI-11 is too difficult to program because it requires SUN (Oracle) ONC RPC knowledge. A 3rd party library of RPC may help you but such library is relatively expensive. SOCKET is easier for coding.

0 Kudos
Message 6 of 6
(4,421 Views)