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.
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.
01-31-2008 08:36 AM
01-31-2008 08:45 AM
01-31-2008 08:59 AM
The USR keeps its value as long as the VI is in memory, even if the entire hierarchy stops running, so if you ran your code once and then ran it again without unloading the VI, it will return T even on the first call.
Rodnebb wrote:
I decided this worked yesterday but today it doesn't. (Any explanation on that anyone?)
02-01-2008 01:33 AM
02-02-2008 09:54 PM
Here is the path to a vi that I use to check to see if any ports are open you can then use the refnum you need from the array if the port is open. It is also useful if you need to make sure all ports are closed, just run the array into a for loop with a VISA Close.
vi.lib\Utility\visa.llb\Open Sessions.vi
Buddy Haun
CLA, Certified Trainer
02-03-2008 12:11 AM - edited 02-03-2008 12:12 AM
02-03-2008 08:18 AM
The only problem I have with the "detect first time" method is that it is very easy to leave a COM port in an unknown state especially if you have improperly terminated a program and have not exited the LabVIEW system you get a "hung" port. LabVIEW has the port reserved as open but the program no longer has the session. I am attaching a program that should provide the functionality Rodnebb is looking for. I am also attaching another quick vi that I have found very useful and that one is for resetting all open COM ports.
02-03-2008 09:11 AM
02-06-2008 02:07 AM
02-06-2008 09:24 AM