Break_da_funk Posted November 3, 2011 Report Share Posted November 3, 2011 Hello! How can I check a com port state: opened/closed by using Visa Serial components? I found property: "Serial settings: Is port connected?" but when I'm trying to use it LabView says: I'll be grateful for help. BR, Artur Quote Link to comment
asbo Posted November 3, 2011 Report Share Posted November 3, 2011 There may be an easier/cleaner way, but you could attempt to open the port; if it fails, it's in use. Make sure you close it again, though. Quote Link to comment
Break_da_funk Posted November 3, 2011 Author Report Share Posted November 3, 2011 There may be an easier/cleaner way, but you could attempt to open the port; if it fails, it's in use. Make sure you close it again, though. Thank You for reply. So...open port and check error string and if error string = null then port status is "opened"? Quote Link to comment
asbo Posted November 3, 2011 Report Share Posted November 3, 2011 Thank You for reply. So...open port and check error string and if error string = null then port status is "opened"? Just wire the error output into a case structure. In the "Error" case, put a "Clear Error" and pass False to your "In Use?" output. In the "No Error" case, close the port and pass out True. Quote Link to comment
Break_da_funk Posted November 4, 2011 Author Report Share Posted November 4, 2011 Just wire the error output into a case structure. In the "Error" case, put a "Clear Error" and pass False to your "In Use?" output. In the "No Error" case, close the port and pass out True. Thank You for the suggestion. 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.