06-17-2011 07:23 AM
I am trying to interface with a PCI-SG 2U (IRIG) timing card (Used to made by TrueTime, now Symmetricom). Does anyone have a solution for this card in LV 2009?
If not, can anyone give advice on writing code to interface with .dll file? I am not sure how to pass through the "GENERIC_READ | GENERIC_WRITE" into the function to open the device. The function says to open it is:
TT_OpenDevice(boardID, GENERIC_READ | GENERIC_WRITE, &hDevice)
No clue on how to pass this in. Can anyone help?
Thanks -
Tom
06-17-2011 07:38 AM - edited 06-17-2011 07:47 AM
Hi Tom,
do you have a header file for you dll? If yes, then the values for Generic_Read and Generic_Write should be defined there.
Edit: as you can see here, you should have also the source code if you have the SDK. From there you can read the defined values for what you need.
Mike
06-17-2011 09:15 AM
Thanks Mike. I do have the .h file and the sdk information. I went through and used the Import>Shared Library Tool and was able to find all the header information that way. I guess that my problem/question is, the documentation says that it is a DWORD to pass as an input, but LabVIEW says it is a uint32. I guess the real question is, what the heck do I pass in to the dll function? Should it be the string "GENERIC_READ | GENERIC_WRITE" or something else?
Thanks -
Tom
06-20-2011 01:28 AM
Hi Tom,
it is a number. Connect it as a UINT32. The needed value should be part of the header file.
Mike