|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||
|
||||
|
Re: recieve data from cRIO
Here is the applicable code from my dashboard. It uses async calls so its a little more complicated.
Code:
Sub BeginGetDataAsync() Implements IDashboardClient.BeginGetDataAsync
_listening = True
_client = New UdpClient(DS_TO_PC_LOCAL_PORT)
_client.BeginReceive(AddressOf Me.GetDataAsync, Nothing)
End Sub
Sub GetDataAsync(ByVal result As IAsyncResult) Implements IDashboardClient.GetDataAsync
Try
Dim endPoint As IPEndPoint = Nothing
Dim bytes = _client.EndReceive(result, endPoint)
ParseBytes(bytes)
Catch ex As Exception
Throw
Finally
If Listening Then
_client.BeginReceive(AddressOf Me.GetDataAsync, Nothing)
End If
End Try
End Sub
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Data delay between Crio and DS | Tom Line | NI LabVIEW | 9 | 17-02-2009 08:40 |
| Capture Data from the cRio | goodsky | Programming | 2 | 13-01-2009 21:27 |
| Sending data from RC to OI | Nathan | Programming | 7 | 03-02-2008 22:32 |
| Did we recieve MS Front Page from FIRST | Mr.G | Website Design/Showcase | 2 | 28-01-2006 15:12 |
| Programming Vex Starter Kit To Recieve From Serial Port | firetrap | FIRST Tech Challenge | 0 | 26-09-2005 17:27 |