Hello, i'm using labwindows to communicate with a GPIB 488.2 Card, which is connected to an other card.
My problem is that i've made a basical programm with only a function "send". It works once and after it returns me this error when i click on "send":
thread id 0x00000528: Function Send: (iberr == 1 [0x1]).
The thing is that the GPIB Card works with a labview programm, so the card is ok.
Here is the source file i've used :
#include
#include
#include
#include "essai.h"
static int panelHandle;
int main (int argc, char *argv[])
{
int GPIBDev;
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "essai.uir", PANEL)) < 0)
return -1;
GPIBDev = ibfind ("gpib0");
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
}
int CVICALLBACK QuitCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
QuitUserInterface (0);
break;
}
return 0;
}
int CVICALLBACK call (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
Send (0, 10, "a", 2, 1);
break;
}
return 0;
}
I hop you will be able to help me.
Thanks.