LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

XlOpenport vector library

Hi, I am writing a driver for vector xl Hardware interfaces, the h/w type is XL_HWTYPE_VN1630. I have got succesful status for these interfaces.

xlOpenDriver();xlGetDriverConfig();xlGetApplConfig;xlSetApplConfig;xlGetChannelIndex.

But when I tried to open port using xlOpenPort interface, I am getting porthandle as a invalid port.and one more very strange thing is happend that sometimes its giving valid port and sometime not. I am not understanding why this type of thing is happening. below is my code:

 

   XLstatus         xlStatus = XL_ERROR;

   XLaccess         m_xlChannelMask_both;

  XLaccess         xlPermissionMask;

  char             tmp[100];

 

m_xlChannelMask_both = m_xlChannelMask[MASTER] | m_xlChannelMask[SLAVE];

xlPermissionMask = m_xlChannelMask_both;

xlStatus = xlOpenPort(&m_xlPortHandle, "LIN", m_xlChannelMask_both, &xlPermissionMask, 256, XL_INTERFACE_VERSION,XL_BUS_TYPE_LIN);

 

 

if (m_xlPortHandle == XL_INVALID_PORTHANDLE)


{

      qDebug()<<"m_xlPortHandle"<<m_xlPortHandle;

  return XL_ERROR;

  }

 

Please suggest where I have to look for the these error.It will be great help.

Thanks in advance

0 Kudos
Message 1 of 1
(3,705 Views)