I have attempted to contact Viewpoint for nearly two weeks now, and
they have not responded to my calls and emails. The functions in the
Visual Basic code are as follows:
Declare Function DIO64_Open Lib "dio64_32.dll" (ByVal board As Integer, ByVal DIOio As Integer) As Integer
Declare Function DIO64_Load Lib "dio64_32.dll" (ByVal board As Integer,
ByVal bnmFile As String, ByVal InputHint As Integer, ByVal OutputHint
As Integer) As Integer
Declare Function DIO64_Close Lib "dio64_32.dll" (ByVal board As Integer) As Integer
Declare Function DIO64_In_Start Lib "dio64_32.dll" (ByVal board As
Integer, ByVal ticks As Long, ByRef mask As Integer, ByVal maskLength
As Integer, ByVal flags As Integer, ByVal clkControl As Integer, ByVal
starttype As Integer, ByVal startsource As Integer, ByVal stopType As
Integer, ByVal stopsource As Integer, ByVal AIControl As Long, ByRef
scanrate As Double) As Integer
Declare Function DIO64_In_Status Lib "dio64_32.dll" (ByVal board As
Integer, ByRef scansavail As Long, ByRef stat As DIO64STAT) As Integer
Declare Function DIO64_In_Read Lib "dio64_32.dll" (ByVal board As
Integer, ByRef buffer As Any, ByVal scansToRead As Long, ByRef stat As
DIO64STAT) As Integer
Declare Function DIO64_In_Stop Lib "dio64_32.dll" (ByVal board As Integer) As Integer
Declare Function DIO64_Out_ForceOutput Lib "dio64_32.dll" (ByVal board As Integer, buffer As Integer, mask As Long) As Integer
Declare Function DIO64_Out_GetInput Lib "dio64_32.dll" (ByVal board As Integer, ByRef buffer As Integer) As Integer
Declare Function DIO64_Out_Config Lib "dio64_32.dll" (ByVal board As
Integer, ByVal ticks As Long, ByRef mask As Integer, ByVal maskLength
As Integer, ByVal flags As Integer, ByVal clkControl As Integer, ByVal
starttype As Integer, ByVal startsource As Integer, ByVal stopType As
Integer, ByVal stopsource As Integer, ByVal AIControl As Long, ByVal
reps As Integer, ByVal ntrans As Integer, ByRef scanrate As Double) As
Integer
Declare Function DIO64_Out_Start Lib "dio64_32.dll" (ByVal board As Integer) As Integer
Declare Function DIO64_Out_Status Lib "dio64_32.dll" (ByVal board As
Integer, ByRef scansavail As Long, ByRef stat As DIO64STAT) As Integer
Declare Function DIO64_Out_Write Lib "dio64_32.dll" (ByVal board As
Integer, ByRef buffer As Integer, ByVal bufsize As Long, ByRef stat As
DIO64STAT) As Integer
Declare Function DIO64_Out_Stop Lib "dio64_32.dll" (ByVal board As Integer) As Integer
The manual for the Viewpoint card gives pretty thorough instructions
for the Labview souce code that also comes with the card. Using these
Labview instructions, I have been able to infer what values I need to
use for most of the variables in each of these functions; however, I
have not been able to make sense of the "mask" and "maskLength"
variables (i.e., what their purpose is, what their allowed values are,
etc.) in the "DIO64_In_Start Lib" and "DIO64_Out_ForceOutput"
functions. These are both functions that I need in order to be able to
write my program, and the "mask" and "maskLength" variables are clearly
the problem.
Of course I have no way of cracking into the "dio64_32.dll" library and
seeing what it consists of. The DIO64 manual can be found here:
http://www.viewpointusa.com/DIO64%20Manual%20Ver%201_04.pdf
and the driver can be found here:
http://www.viewpointusa.com/prod_downloads.php#dio64
Thanks for your response, and again, any help would be greatly appreciated.