![]() |
#3
|
|||
|
|||
I found a UDP Receive block in Simulink. It requires the other end of the communication, which is vizard, to specify the port that receives data. I'm not sure how to do it. I think my code only specifies the port that sends data. Am I missing something?
Code:
import viz viz.go() import socket COMPUTER_IP_ADDRESS = socket.gethostbyname('192.59.88.91') PORT = 25000 #The port to send data on OutSocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) OutSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) def SendData(data): OutSocket.sendto(data,(COMPUTER_IP_ADDRESS,PORT)) vizact.onkeydown(' ',SendData,'hello there') |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
real time collision on animation path | whj | Vizard | 10 | 10-06-2008 04:38 PM |
Real Time Audio Data | lomendil | Vizard | 2 | 06-02-2008 08:18 PM |
Can I get real time Intersense tracking data from another computer on the network? | GoldenSun | Vizard | 4 | 04-30-2008 07:42 PM |
Flagging the Data | Elittdogg | Vizard | 5 | 04-11-2008 11:40 AM |
timer question | Elittdogg | Vizard | 5 | 10-10-2007 02:49 PM |