I have add reference "NationalIstruments.NI4882", but can't coding 488.2 command. please see below picture.
My OS is WIN 7 64 bit, VS2013, MAX v15.0.0f0, upgrate to new version.
Below is my code, can't to build, NI488 code can't complete compile.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ivi.Visa.Interop; //VisaComLib
using NationalInstruments.NI4882;
using NationalInstruments.VisaNS;
namespace xxx
{
class Program
{
private MessageBasedSession mbSession;
static void Main(string[] args)
{
int noncontroller;
char[] buffer = new char[100];
int panelHandle;
//Open session to the GPIB board
noncontroller = ibfind ("gpib0");
//Release system control
ibrsc(noncontroller, 0);
//Change GPIB primary address from 0 to 2
ibpad(noncontroller, 2);
while(true)
{
//Update status variable
ibwait(noncontroller, 0);
//Wait until non-controller is listener and ATN line is dropped.
if ((ibsta&LACS)&&(!(ibsta&ATN)))
{
ibrd(noncontroller, buffer, 100); // Read data bytes
buffer[ibcnt] = '\n'; //Add linefeed and 0 to string
buffer[ibcnt + 1] = 0;
Console.WriteLine("Buffer Value{0}", buffer);
//printf("%s", buffer); // Print buffer for C
return;
}
}
}
}
}