10-05-2000 03:20 PM
10-05-2000 03:55 PM
10-06-2000 03:24 AM
06-02-2009 11:23 AM - edited 06-02-2009 11:24 AM
I had a similar problem. i have a Newport ESP301 and am connected via USB.
i comunicate with it as if it were a serial port.
I want to scan all COM ports to find this device and then connect to it.
i open the connection using the "Serial Port Init.vi" as the Visa property to do this didn't work.
I then go through all the COM ports sending a "VE" command which will return the ESP301 identification.
Once I find it I and have used the "Serial Port Init.vi" i use VISAs to communicate with it from then on in lots of other VI's.
interestingly I open and close all my VISA sessions in the other VI's and all is OK, I just have to make sure that i have run "Serial Port Init.vi" at least once before at the beginning.
If the ESP301 is switched on and off again then the "Serial Port Init.vi" returns an error. I have to restart LabVIEW in order to make "Serial Port Init.vi" work and reestablish communication with the ESP301.
When I followed Henriks advice for "close automatically VISA sessions" I no longer had to reboot LabVIEW in order to reestablish comms once the ESP301 was turned on and off. (NOTE: This is now located in Tools>Options>Environment)
06-02-2009 12:56 PM
This is an 8 1/2 year old thread you are commenting on. As Dennis said, you should be using the VISA functions rather than and old serial driver VI's.
Are you saying you are still having trouble with your VI and need help?
If so, please tell us what versions of LabVIEW and VISA you are using. And post your VI so we can help you troubleshoot.
06-03-2009 04:14 AM
Hi,
I was actually just adding some more detail about how I had "solved" a similar problem so as a help to other people. I realise this is an old thread, but I hoped my comments were still relevant and could help someone.
The LabVIEW vis examples from Newport were very lite and all used Serial Port vi's
My two aims are: (Find device COM port.vi)
1. Scan all COM ports and identify what is connected at each port
2. Communicate with the instrument through VISA only.
I have got it working but I know that I shouldn't have to use the old Serial vi's (open USB.vi) so I have gone back and replaced the Serial vi this with a VISA (open USB(VISA).vi) so that it is consistent with the rest of my code. Thanks for embarassing me into doing this as I have now actually solved the problem rather than a work around. 😉
The only thing I can't set is the buffer size as the old serial port vi does. Any ideas.
I have attached the relevant VI's. Thank you very much for offering to help.
many thanks
06-03-2009 06:34 AM
stubon wrote
The only thing I can't set is the buffer size as the old serial port vi does.