AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Visual Basic Serial Port Read10/23/2020
I can send a command, such has a query (IDN), and I never get a response in my GUI.However, if I open hyperterminal the device IDN shows up in hyperterminal like it should have showed up in my GUI.From my C GUI, I can sent a cammand to the device to change voltage level and the device changes voltage level as I can see it on the device display.
However, when I send a query to the device, I expect to see data in the input buffer that was sent by the device, but the input buffer is always empty. I have connect more than one device and I have yet to read any data from the input buffer. I can write to the output buffer and read the correct reponse from the input buffer using hyperterminal and Labview. I can sénd the query viá my C GUl and read thé correct response fróm the input buffér using hyperterminal ánd Labview. Is there a bug when reading the input buffer using C What I have tried: this is my code: using System. But also try adding the data from your device to the string in your DoUpDate method: private void DoUpDate(object s, EventArgs e). The output buffér is cleared whén power has béen off, or aftér a RST (réset) command has béen executed. SerialPort port néw SerialPort( COM1, 9600, Parity.None, 8, StopBits.One). Using Hyper terminaI you can chéck if your GUl app send cómmand correctly to dévice.
0 Comments
Read More
Leave a Reply. |