From: Scott H. <st...@ma...> - 2005-01-17 03:52:50
|
At 1:11 +0100 1/17/05, Rolf Kalbermatter wrote: >Martin Henz wrote: >> I have to change my job or my customers, before I can change > > the oS :-> Which came first, the chicken or the OS? > > I don't know who really is responsible for this effect, but >> I can access the serial ports if I call the OS functions >> directly (without VISA). > >I think you can do so as well in VISA. The problem is that the >pop-up menu is not dynamically repopulated whenever the resources >change. But VISA should probably be able to access a port as soon >as it gets available. I got this tip from a VISA developer awhile back. It didn't seem to work for me at the time and I worked around it another way. I started messing with some settings in the visaconf file and they got into my master copy that was destributed and hosed all my systems..... Those darn rusty nails in the attic. But this is a possible solution FWIW. The goal was to programmatically read the VISA conf file with the config file VIs (it almost works, but works well enough) and then could set aliases for the various VISA ports. (IE "Blue HP DMM" for GPIB0::5::INSTR, etc.) >Scott, > >I do believe that I have a solution to your question about programmatically >updating the list the VISA I/O control displays. First of all, I would >like to say that this is a round-about way of doing it and that we cannot >guarantee that it will continue to work in future versions of LabVIEW. >That being said, however, it is unlikely that we will change the behavior. >To programmatically force a refresh: >1) Touch the visaconf.ini file (ie so that the modified date on the file >changes) >2) Using a property node for the VISA I/O control, set the "Visible" >property to FALSE >3) Using a property node for the VISA I/O control, set the "Visible" >property to TRUE > >This will force a refresh: whenever the VISA I/O control becomes visible, >LabVIEW asks VISA if it needs a refresh. VISA checks to see if the >visaconf.ini file was changed since it last read it. Since you touched the >file, VISA believes that a change has occurred and will actually perform >the refresh and LabVIEW will display the new results in the VISA I/O >control. > >Also, changing the "Refresh" settings in the visaconf.ini will not help >solve your problem. Some of them are not even used any longer. Must >likely, visaconf.ini will be cleaned up to remove the unused settings to >avoid future confusion. |