rrojas Posted January 14, 2005 Report Share Posted January 14, 2005 All, I have this odd problem. I'm writing a VI that is supposed to accept input from two seperate serial ports. I am using the VISA Configure Serial Port VI in two different sub-VIs. One sub-VI should output a VISA resource name for COM1, while the other sub-VI should output a VISA resource name for COM3. For some reason, though, whenever I start up my main front panel, both of the VISA resource names are set to COM1. I have to stop the VI, go into my second COM sub-VI and type in "COM3" for the VISA resource name input to the VISA Configure Serial Port VI, save it, and then run my app again. If I close it and reopen it and run it again, the same thing happens. My VISA Resource names always revert to "COM1". Why is this and what can I do to make one sub-VI "take" the "COM3" setting that I specify and use it without me having to stop the execution and changing it manually? Thanks for your time. Quote Link to comment
Mark Balla Posted January 14, 2005 Report Share Posted January 14, 2005 There are 2 things you can do to solve this problem The first is to go the the control on the front panel set the value you want and make it the default value. However I would recommend that you connect this control to an input terminal and wire a constant to in in the calling vi. This method makes it easier to read the code and easily allows the com channel to be changed later. Quote Link to comment
rrojas Posted January 14, 2005 Author Report Share Posted January 14, 2005 There are 2 things you can do to solve this problemThe first is to go the the control on the front panel set the value you want and make it the default value. However I would recommend that you connect this control to an input terminal and wire a constant to in in the calling vi. This method makes it easier to read the code and easily allows the com channel to be changed later. 3525[/snapback] Yes, I was considering adding a control to an input terminal of the sub-VI, but there are strict control restrictions on this app and there would be too many complications if a user could change the COM port on the fly: essentially it would be bad to do so, in this case. However, the default value is my fix. Thanks! :thumbup: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.