LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication

Solved!
Go to solution

Good day!!

I am a beginner in LabWindows / cvi 2017, I got NON-FATAL ERROR (no port is found).  I did        run->break on-> library error after doing this error is clear but it is temporary.

 

my question was

1. how to clear it ? whether I need to install or driver is use for this and what is driver about .

 

2.I have installed  NI requirement gateway , is it helpful for me in clearing the error.

 

3. how to allocate bits in header files .h 

 

Regards,

esakki

0 Kudos
Message 1 of 8
(4,534 Views)
Solution
Accepted by topic author esaki

As per your question #1, it appears that CVI is not able to find the port you are trying to open, so the real question is: is that specific port available in the system? In your PC Device Manager you can find the list of available ports in the system so you can check if any port actually exists and which number it has. As per my experience, if a port actually is listed in Device Manager then CVI can access it (with a few exceptions for virtual devices, e.g. ports created by Moxa Ethernet-to-serial servers). I never had to use NI requirement gateway so I cannot help you for Q2.

 

As per Q3, I cannot understand what you are doing: can you clarify your question?



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 8
(4,399 Views)

Good day sir,

 

I used the specific port  com no 6 (silicon laboratories CP210 x USB to UART bridge) which is available in my device manager list.  But I am not able to get my receiver data through this port. 

 

I am doing a project in which i have to create GUI .uir then coded in ANSI C which is similar to c in that i have add header file .h  so i need to allocate bytes range  for my GUI .

 

how to allocate byte range in the header file .h

 

Thanks for the support.

Regards,

esakki

 

   

0 Kudos
Message 3 of 8
(3,899 Views)

Ok, is the correct driver installed on the system for  your usb-to-com device? Can you post a screenshot of the device manager?

Second, are you receiving any error in serial communications? If so, can you post your code and tell us which error you are receiving on which line?

 

As per your second question, I seem to understand that you need to allocate a buffer for incoming messages. This is just as simple as adding something like that in your code:

 

char     buffer[lenght];

 

 

In your situation it may be worth looking at the examples that ship with CVI on serial communications: you can find them by searching for "Serial" in the Example Finder (Help >> Find Examples... menu item).



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 8
(3,795 Views)

I got NON FATAL ERROR function opencomconfig (return value==6[0Xfffffa]) no port found 

 

OpenComConfig (comno, "", 115200, 0, 8, 1, 125000, 125000);

 

driver version: 6.7.5.1893

 

esaki_0-1577168416715.png

as per my second question:  error got clear

 

thanks for your support

0 Kudos
Message 5 of 8
(3,519 Views)

Normally if a port is present in Device Manager it can be opened in CVI as well, with some notable exceptions like the Moxa units I told before which can be opened only if actually active and reachable from the system but are anyway listed in DM.

I can suggest to try deleting the device and have it reinstalled byt he OS just in case the original installation went someway wrong; similarly, a search for an updated driver can be an option.

Finally, I would suggest to try the function published by Martin Saxon and see if it lists your com port: I never had problems connecting to a port found by that function.



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 8
(3,097 Views)

good day!!

 

how to update driver in windows 10 

0 Kudos
Message 7 of 8
(3,057 Views)

I cannot help you specifically in this respect, but I would start searching in Silicon Labs site for an up-to-date driver



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 8 of 8
(3,047 Views)