09-23-2012 07:53 PM
Hi there,
I got this error pretty often. When it happens, MAX can not validate the serial port, I have to shut off Labview, then MAX can validate the seril port, after this, I open the Labview and start to run my vi again, then the same error comes again till I restart my computer.
The Labview version I'm using is 2009 sp1 and VISA version is 4.6.2. Is this a bug of VISA? Anybody knows how to fix it?
Any suggestion will be greatly appreciated.
Best Regards,
Weny
09-24-2012 01:42 AM
Hi Weny,
Do you close the "COM PORT" when you close the application?? That could be one reason. Or do you run any other application (No LabVIEW) which uses the same port???
When you get this error, before closing LabVIEW, just open new VI, place "VISA Resource Name" on block diagram. Select the COM port, close it.
Then try running your application.
09-24-2012 02:23 AM
@weny wrote:
Hi there,
I got this error pretty often. When it happens, MAX can not validate the serial port, I have to shut off Labview, then MAX can validate the seril port, after this, I open the Labview and start to run my vi again, then the same error comes again till I restart my computer.
The Labview version I'm using is 2009 sp1 and VISA version is 4.6.2. Is this a bug of VISA? Anybody knows how to fix it?
Any suggestion will be greatly appreciated.
Best Regards,
Weny
First thing you need to check is your MAX is not using this port parallely when you are running the VI, or vice versa.
Second thing to check is while your LabVIEW instance is open, you are using the CLOSE VISA function before you stop the VI.
If both these methods don't work, then a system process might have reserved the com port and is no longer available for LabVIEW/MAX.
To findout and to kill the process using that COM port, use Process Explorer application from sysinternals and navigate to find>serial.
The case where you need to restart your PC to get this working points to a problem where a system process is reserving the serial port.
09-24-2012 10:47 AM
Thank you very much for helping!!!
Yeah, you guys are right! I didn't do well on error managing yesterday. Now I added flush receive/transmit buffer and close VISA function after error happened. Everything works perfect!
Thanks again!
Weny