12-14-2007 11:28 AM
12-17-2007
02:11 PM
- last edited on
04-15-2025
08:46 AM
by
Content Cleaner
Hi James,
You can find Visual Basic examples that are installed with the NI-488.2 drivers in the following directory:
C:\Documents and Settings\All Users\Documents\National Instruments\NI-488.2\Languages\Visual Basic
Since this application may require some advanced programming, you may want to consider contacting an alliance member. The NI Partner Program is a network of more than 600 consultants, system integrators, developers, channel partners, and industry experts partnering with NI to provide complete, high-quality virtual instrumentation solutions to customers.
Regards,
Rima
12-17-2007 04:35 PM
Hi James,
You can also use the NI-488.2 .NET Framework 2.0 Help, which is located in the same directory as the NI-488.2 Help. Once the NI Measurement Studio Help is open, navigate in the tree on the left-hand side to NI Measurement Studio Help >> NI Measurement Studio .NET Class Library. Then you can navigate to either Reference or Using the Measurement Studio .NET Class Libraries to find additional help for the NI-488.2 .NET Library. Good luck!
Regards,
Rima
12-18-2007 11:23 AM
Rima,
Thank you for the reply and the help. All of the code examples I have seen in those places have been either, VB6 or VB .net using 488.2 commands. I unfortunately seem to be stuck in between. I am trying to use a 488.1 board level command in VB .net. I am trying to find out how to replicate the following in VB .net;
ibfind "gpib0"
ibsic
ibcmd "_?@#"
ibwrt "C2"
ibcmd "_"
I thought this would be easier, but I guess I am stuck going to another language or employing someone from the group you mentioned.
Respectfully,
James
12-19-2007 04:57 PM
Hi James,
The 488.1 standard defines the hardware, and not the syntax, so you should reference the manual of the Honeywell device to find the proper commands and termination character. The NI-488.2 driver is backwards compatible with the NI-488.1 language interface. Good luck!
Regards,
Rima
12-19-2007 05:17 PM - edited 12-19-2007 05:18 PM
Rima,
Absolutely! Hits the nail right on the head. That is why I am so focused on the ibcmd command. The handshaking for this unit by the manual, and by my tinkering around requires the steps from my former post, (ibcmd with Untalk, Unlisten, the MTA, and MLA and then a ibwrt with the actual command ( for example "C2" ) and then another ibcmd with an "_" )to make the unit actually do anything via GPIB. These units were made around early 1970 and as such are only 488.1 compliant. Honeywell made up their own handshaking and syntax. Only the later "C" models of these units are capable of understanding 488.2 commands.
12-20-2007 12:27 PM - edited 12-20-2007 12:28 PM
Hi James,
I'm curious how your application is going, have been able to code successfully in VB.net? If you are able to control your device from ibic, you should be able to control it by calling those same commands you used in ibic, but from a VB program. Let me know how things are going.
Ted
12-20-2007 01:26 PM - edited 12-20-2007 01:27 PM
Ted,
Not well. I can indeed get my unit(s) to respond through ibic.exe, but still have not been able to find the equivalent commands in VB.net. I have tried instantiating(sp) an object as a 'board', sending a command to set the ATN line high, and then use a board.Write to send the command, but it does not seem to work. I cannot find what the equivalent command of ibcmd is in .Net. In fact I have just tried to code the same in C++, but I am running into different roadblocks in that direction. (compiler errors, differences between Microsoft C++ and regular C++)
James
12-21-2007 02:16 PM
Hi James,
Unfortunately, there is no easy way to program ibic commands such as ibcmd with VB.net. The most transparent way to do this is to use the gpib-32.dll (installed with NI-488.2). The gpib-32.dll, located at C:\WINDOWS\system32, contains all of the ibic commands, and are implemented as explained in the NI-488.2 help file.
Here is a link to a vb project on the NI webiste which uses the GPIB-32.dll to make ibcmd function calls. I hope this helps.
Regards,
Ted