07-18-2024 07:18 AM - edited 07-18-2024 07:22 AM
HI everyone,
I' m working on a project that requests to program a PXI 6682H board in order to generate a PPS.
I started from an exmple provided by labview named "generate PPS and wait.vi" and I tried to implement the sequence of functions using the LabWindows/CVI functions.
That's the code I have written on CVI:
07-19-2024 01:49 AM - edited 07-19-2024 01:54 AM
It's always a good idea to add error checking to function calls: return code can offer useful informations to detect problems in the code or the system.
What I can tell is that there seems to be an error in the first line: TimSynch_ResName_6682H must be passed as a pointer in order to retrieve a value to use in subsequent code. On the other hand, if this variable is defined as a pointer then the following function calls must be tailored accordingly.
07-19-2024 10:53 AM
Dear Roberto,
Many thanks for your quick and helpful response.
There was no problem in the first line since I was already passing a pointer, which I didn' t include in the first message in order to keep it cleaner, but your suggestion about adding an error check really helped me finding the problem in the function CreateClock(), and I solved it by simply changing the following parameters :
- high and low ticks;
- start time seconds,nanoseconds,fractionalNanos;
obtaining this -> niSync_CreateClock (TimeSynchro_6682H, NISYNC_VAL_PFI1, 100, 100, 0, 0, 0, 0, 0, 0);
I really appreciated your help, best regards.