08-25-2014 12:47 PM - edited 08-25-2014 12:50 PM
I am trying to communicate with a GPIB device via a custom C++ program. I am using ni488-2.h and the associated obj file.
When I send the commands to the device "manually" through the Measurement & Automation Explorer, everything seems to work fine, consistantly.
However, when I try sending commands via code, per the example provided ("Show Sample") button. Some commands return an error, but not all of them, and not always the same ones.
The Measurement & Automation Explorer seems to wait after I send a command, and displays "Reading..." indicating that it is doing some sort of check to ensure there is data to be read...or something. However the sample code doesn't do this. It's the only difference I can find, without actually being able to see the code M&A Explorer uses.
Any help would be appreciated.
Thanks
EDIT: The device I am communicating with: S380 Dual Channel Optometer (UDT Instruments)
via: GPIB-USB-HS
using drivers (header file etc.) from May/Jun 2014
08-25-2014 01:46 PM
If you installed NI-488.2, it will install sample programs. In Windows 8.1 C:\Users\Public\Documents\National Instruments\NI-488.2\Examples