Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB with VS2005

The only prior experience I have had with GPIB is modifying other peoples code in VB6.
These projects had 2 NI modules in them:
  • NIGLOBAL.bas
  • VBIB-32.bas
Typically the main commands used were
  • ibwrt
  • ibrd
  • ibclr
  • ibdev etc
I am now trying to develop a new project from scratch in VS2005.
What is the recommended way of doing things?
0 Kudos
Message 1 of 8
(4,473 Views)
0 Kudos
Message 2 of 8
(4,462 Views)
Thanks for those links. Although the threads do seem a bit jumbled without a definitive answer.
This Knowledge base article seems to point to API
http://digital.ni.com/public.nsf/websearch/4043FBAE3E3CBD3386256D9600538319?OpenDocument

I'll report back later if I manage to do anything useful with it.
0 Kudos
Message 3 of 8
(4,459 Views)

If your instruments are newer and can communicate using VISA, the example using VISA-COM as written by Makoto in one of the threads works. I was able to verify that.

I have two older HP counters 1970s vintage which don't work with VISA. That's when you'll need to use the NI-488 calls and add references to them in your VB2005 project. Examples are at C:\Program Files\National Instruments\MeasurementStudioVS2003 . That subdirectory will most likely not be there since installation of .NET component is NOT installed by default for NI-488.

Message Edited by nyc on 08-18-2006 09:33 AM

0 Kudos
Message 4 of 8
(4,458 Views)
Thanks nyc.
I am in the same situation in that I can't use VISA either and I need to use the 488.2 calls.

I had a look at the SimpleReadWrite program but I can't work out what is going on.
It is really badly written with no comments or guidance about what it is doing.

Do you have a clearer example that you could post?
0 Kudos
Message 5 of 8
(4,438 Views)
AE did a nice conversion of the NIGLOBAL and VBIB-32 files here.
http://forums.ni.com/ni/board/message?board.id=140&message.id=2565&view=by_date_ascending&page=2

I think I'll use those for now.
0 Kudos
Message 6 of 8
(4,432 Views)

I'm not sure what you mean by "poorly written".

Those projects file are for VB.NET 2003. There are changes between VB.NET 2003 and VB.NET 2005.

I opened the SimpleReadWrite project into VB2005, and it will automatically convert it.

In general, Visual Basic 2005 is a big change from Visual Basic 6.

0 Kudos
Message 7 of 8
(4,395 Views)

At first I didn't think it was using any coding conventions.

Although on second glance it is using CamelCase. (I prefer Hungarian)

There are no comments at all.

It doesn't explain what all the commands are doing and what is necessary when you want to expand.

 

0 Kudos
Message 8 of 8
(4,392 Views)