Yes, I have taken a look in the example folders however I cannot find one that relates to the PCI 1588 card. All of the examples discuss different cards if im not mistaken. The closest thing I have found and tried utilizing is this thread:
http://forums.ni.com/ni/board/message?board.id=180&message.id=22931&query.id=148547#M22931
I have walked through the code using the NI-Sync API Reference guide and understand the processes that he/she is going through however I cannot seem to duplicate the code. I have tried the following:
----------------------------------------------------------
#include "stdafx.h"
#include <iostream>
#include "conio.h"
#include "nisync.h"
#include "visa.h"
#include "visatype.h"
#include "vpptype.h"
#include "visaext.h"
#include <string>
using namespace std;
int main() {
ViStatus status;
ViChar emsg;
ViSession myVi;
status = niSync_init("PXI3::4::INSTR", VI_TRUE, VI_TRUE, &myVi);
if (status) // error or warning
{
niSync_error_message (myVi, status, emsg);
printf("niSync_init did not succeed: %s\n", emsg);
}
else
{
cout << endl << endl <<"Press any key to terminate program: ";
_getch();
}
return 0;
}
----------------------------------------------------------
When I try to compile this i recieve the errors:
c:\documents and settings\hnelson\my documents\visual studio 2005\projects\1588 test\1588 test\1588 test.cpp(24) : error C2664: 'niSync_error_message' : cannot convert parameter 3 from 'ViChar' to 'ViChar []'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
This is my first time using VC++. I am trying to start small talking to the card and then build from there. I am slowely remembering C++ programming but I am not sure how to fix the error without knowing the ViChar variable type.