[C] GSV-2AS VC++ issue
Verfasst: Mi 25. Apr 2018, 16:25
Hello,
i'm developping a system with straingauss and i'm currently having some issues with the software part.
I try to read the value from a GSV-2AS with Microsoft VisualStudio IDE.
GSVactivate works fine by after the GSVread() fonction is not working for me and return 0.
I'm using the snippets bellow:
I've no linking or dependancies issues.
Am i missing something ?
Thank you very much for your help by advance !!!
i'm developping a system with straingauss and i'm currently having some issues with the software part.
I try to read the value from a GSV-2AS with Microsoft VisualStudio IDE.
GSVactivate works fine by after the GSVread() fonction is not working for me and return 0.
I'm using the snippets bellow:
#include <windows.h>
#include<stdio.h>
#include <stdlib.h>
#include "Megsv.h" // MeGSV header
#pragma comment (lib, "MEGSV.lib") // MeGSV libraries
#define ComNr 5
#define BuffSize 1000
double read(void)
{
double ad = 0;
if (GSVactivate(ComNr, BuffSize) != GSV_OK) // Works fine
{
printf("\n[!] initialisation failed.\n");
return 0;
}
if (GSVread(ComNr, &ad) == GSV_TRUE) // GSVread() return 0 and ad is not updated
{
//printf(" %1.3f\n", ad);
printf("%lf\n", ad);
}
GSVrelease(ComNr);
return ad;
}
int main(void)
{
double val = 0;
val = read();
return 0;
}
I've no linking or dependancies issues.
Am i missing something ?
Thank you very much for your help by advance !!!