7
Answers

Serial port C# wpf received data continuous

Ask a question
gagan kumar

gagan kumar

12y
11.5k
1
've made a GUI in WPF to read data via RS232 and.The only problem is I have to keep pressing a button to send a 'Receive data' command to my controller via RS232 so it sends the data back. I want to implement  this in continuously/real time so I don't have to keep pressing a button to communicate with my device. I've  written while loops and that just freezes my program, i've  also tried a checkbox so if it's checked it gets data and that also freezes the GUI.using backGroundWorker i want to do or Threads, below is my code please, TextBox1 is Receiving Data,TextBox2 is Sending data, am binding Receiving data to textbox1 string"Message", see code as attachemnt
thanks


Answers (7)