4

Is it possible to receive data from a serial port in Labview using an event callback? Similar to DataReceived event callback in .NET serial port class? If yes, I would appreciate a link to an example VI. All the examples I have seen use the synchronous send/receive approach. I would assume that the callback event, if possible, must happen in a separate thread.

My device streams (ASCII) data out very fast, about 1000 data points per sec

Soundar Rajan
  • 517
  • 2
  • 7
  • 17
  • I'm interested to know why you're thinking of doing it this way - are you having problems dealing with the received data at the moment? – nekomatic Jan 06 '14 at 11:48

1 Answers1

3

You could poll the serial port and if the number of bytes exceeds a threashold (I used samples of 4 bytes), read that data and generate a user event. In another thread you could handle the events like normal events:

enter image description here

Ton Plomp
  • 3,020
  • 1
  • 18
  • 35