From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,494 Views)