07-06-2021 11:24 AM
Привет, не так давно начал работать с com портом при помощи библиотеки rs232.h. Требуется отправить команду на com порт для устройства...Идёт запись команды (ComWrt), а чтения не происходит(ComRd), вылетает ошибка, якобы в буфере, хотя на мой взгляд должно быть всё правильно. У кого были подобные проблемы?
07-08-2021 06:59 AM
Hello,
according to Google translate your problem relates to the communication over RS232 channel but I can not see enough details in the images you posted to understand the situation.
Where are you getting the error and which one? I suggest you to trap the return code from each RS232 function that can help you in discriminating the cause: if negative, passing the error code to GetRS232ErrorString () can help. The error code and the exact instruction where you get it are crucial elements to understand what's going on.
As a last hint, you are not using any termination character: does your target device have some requirement about that?
Finally, if you can post in English in the future it will be easier for us to understand your messages.
07-08-2021 03:07 PM
Привет, весли вас не затруднит не могли бы прислать самый простой пример записи и чтения сообщения в COM порт? (самый банальный Hello вполне подошёл бы) , желательно без UIR панелей, просто в консоли. Хочу кое что для себя проверить. Заранее спасибо.
Hi, if it doesn't bother you , could you send the simplest example of writing and reading a message to the COM port (the most banal Hello would be quite suitable), preferably without UIR panels, just in the console. I want to check something for myself. Thank you in advance.
07-09-2021 04:48 AM - edited 07-09-2021 04:49 AM
There are examples in LabWindows CVI that you can look at in order to see how it’s supposed to work. Our “simplest” examples we could send you could not co a better job here.
07-09-2021 07:41 AM - edited 07-09-2021 07:44 AM
In addition to Rolf reply, I can point you to the handy and useful function CVI offers to locate the examples installed on disk: if you select Help >> Find Examples... menu function a search application will start where you can locate the examples searching by argument or keyword or simply browsing into a list. All those listed there are fully working examples that you can study to understand how they work.
In case of serial communications the following examples are available:
double-clicking on one of them will open the example project into CVI.