LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get VISA read and write failures talking to Cisco switch?

I installed from Cisco_usbconsole_driver_3_1.zip, using the setup32.exe for WinXP.  This was the latest available from Cisco--had to download it from their website.

0 Kudos
Message 11 of 14
(1,116 Views)

No, not outdated driver already installed on the PC.  It had nothing on it (except for the OS and basic office apps).  I installed CVI, TS, drivers, etc fresh.  The Cisco driver was installed from the CD that came with the switch and from most recent stuff on their website per their directions.

 

Anybody have any turkey fueled flashes of brilliance over the holiday?  We're still having this bogus error problem and would appreciate any insight.  The VISA error popups will go away when I build the code in release, but it would be much nicer to know what really is going on here.

0 Kudos
Message 12 of 14
(1,085 Views)

Are you still getting both of these errors?

 

"I get error 0xBFFF003E: Could not perform operation because of IO error (which is not quite true, because it did write what I wanted it to to the switch).  Then on almost every VISA read I get 0xBFFF0015:  Timeout expired before operation completed"

For the viWrite I would have to guess it is an issue with the Serial-to-USB converter. Try a regular COM port.

For the viRead tmo are you sure there is no terminating character being returned from the CISCO. If there is then the SetAttributes are not quite correct you would need:

  ChkErr(viSetAttribute(iHandle, VI_ATTR_ASRL_BAUD, 9600));

  ChkErr(viSetAttribute(iHandle, VI_ATTR_ASRL_DATA_BITS, 8));
  ChkErr(viSetAttribute(iHandle, VI_ATTR_ASRL_PARITY, VI_ASRL_PAR_NONE ));
  ChkErr(viSetAttribute(iHandle, VI_ATTR_ASRL_STOP_BITS, VI_ASRL_STOP_ONE));
  ChkErr(viSetAttribute(iHandle, VI_ATTR_ASRL_FLOW_CNTRL, VI_ASRL_FLOW_NONE));
  ChkErr(viSetAttribute(iHandle, VI_ATTR_ASRL_WIRE_MODE, VI_ASRL_WIRE_232_DTE)); <-- are you sure about this


  ChkErr(viSetAttribute (iHandle, VI_ATTR_TERMCHAR, 0xD));
  
ChkErr(viSetAttribute (iHandle, VI_ATTR_TERMCHAR_EN, VI_TRUE));
  ChkErr(viSetAttribute (iHandle, VI_ATTR_ASRL_END_OUT, VI_ASRL_END_TERMCHAR));
  ChkErr(viSetAttribute (iHandle, VI_ATTR_SEND_END_EN, VI_TRUE));

 
 ChkErr(viSetAttribute (iHandle, VI_ATTR_ASRL_END_IN, VI_ASRL_END_TERMCHAR));
  ChkErr(viSetAttribute (iHandle, VI_ATTR_TMO_VALUE, 5000));

0 Kudos
Message 13 of 14
(1,067 Views)

Yes, I still am getting both errors.

 

Re: the am-I-sure-about-this thing:  Am I sure about what?  The setting for the wire mode?  Just for fun, I tried others, and it told me the device would not support it.

0 Kudos
Message 14 of 14
(1,048 Views)