LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help in Troubleshooting to open a COM Port

Hello!

 

I had a question regarding reading value from USB for that I have followed CVI/Sample for rs232 which works individually well, but then combining with my application has issue with opening a COM port. I have attached my application over here, any lead would be highly appreciated. Thanks!

 

Download All
0 Kudos
Message 1 of 6
(2,746 Views)

Your code is too complex for anybody to understand the situation, the panel with port settings is not posted (OMEGAUSB) and in 6K+ lines of code only 3 (yes, three!) write/read instructions are present and no Com port opening instruction appears at all Smiley Surprised

Where are you opening the port and with which parameters? Which problems are you having in doing so? Please add some more detail on your situation and post the actual code that opens the port and any error code you are receiving if you want some concrete help from us!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 6
(2,729 Views)

Yes Sure, here is some more information in terms of configuration of Parameters for COM Port, Opening a Com port with OpenComConfig command, attaching only a snippet of code and .uir in snippet form. I actually receive RS232 Error -3, which says to me that my port is not open, snippet for that too. Thanks for help!

Download All
0 Kudos
Message 3 of 6
(2,711 Views)

Try passing an empty string to DeviceName parameter in OpenComConfig (), letting the driver to automatically accommodate the name.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 6
(2,706 Views)

Thanks for the suggestion, tried passing empty string but before i could confirm, i ran into another FATAL error with a piece of code that I am attaching here, could you suggest why? 

0 Kudos
Message 5 of 6
(2,694 Views)

That's not an empty string, is a one-character string with a space embedded!

Note the difference between " " and "". Documentation speaks about a NULL pointer or an empty string to let the driver accommodate device name internally: that's what I have been doing for years now without any problem.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 6
(2,680 Views)