Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ 1422 serial connection within VC++

Hi
I posted this in Machine Vision but mabye i got the wrong section.  Sorry if if i am over posting

I have an IMAQ PCI 1422 card and wish to connect to the serial port using VC++.  I have created a small application within VC++ that uses clallserial.h, clallserial.lib.  I have queried the clGetNumPorts command and get CL_ERR_NO_ERR and 0x00000000 back for the number of ports.

I have also connected to clallserial.dll directly using,

UINT32 numPorts(0);

HMODULE WINAPI handle = LoadLibrary(_T("C:\\WINDOWS\\system32\\clallserial.dll"));

TclGetNumPorts1* clGetNumPorts1 =  (TclGetNumPorts1*)::GetProcAddress((HINSTANCE)handle,"clGetNumPorts");

INT32 test1 = clGetNumPorts1(&numPorts);

 I get CL_ERR_NO_ERR as the return value but still get 0x00000000 for numPorts.

 
 I have used the NI Camera File Generator and sent serial commands to my camera and received responses back, so I know the serial port on the IMAQ PCI-1422 is working

 Am I missing something?

Thank you in advance

Peter Haigh
0 Kudos
Message 1 of 2
(3,136 Views)
Hi Peter,

Reply to this message has been added to this thread.

Regards
JamesC
NIUK and Ireland

0 Kudos
Message 2 of 2
(3,123 Views)