WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 03-10-2015, 11:38 AM
shall6 shall6 is offline
Join Date: Dec 2014
Posts: 9
Question Vizard Matlab interface - no data printing


I've been trying to set up a way for matlab to talk to Vizard. Eventually, I want to be able to take sensor data that is real-time processed in matlab and use it in Vizard. Right now I'm just trying to set up a simple UDP connection. This is what I have:

ip = 'LocalHost'; port = 4950;
u = udp(ip,port);

fprintf(u, 'testdata')

import viz
import viznet
dataNetwork = viz.addNetwork('LocalHost');
def onNetwork(e):
if isinstance(e,viz.RawNetworkEvent):
print e.raw_data


Nothing prints in Vizard. It just loads. I tried running the matlab code and the Vizard code in different orders. I've sent the matlab "fprintf" command again, then I run the Vizard code again. Matlab claims something sent, but I don't see it.

Eventually, I want to change "print e.raw_data" to "var = e.raw_data" and save the data as a variable, "var", then use the value of "var" as a command, the same way I would use a keyboard button-push.

What am I missing, and will saving as a variable work when it gets going?

Thank you,
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interface between Matlab and Vizard Shweta Vizard 8 06-30-2014 10:40 AM
Iinterface between MATLAB and Vizard suraj Vizard 7 07-17-2012 10:02 AM
MATLAB and vizard xingtzu Vizard 1 01-15-2008 11:25 AM
Matlab and Vizard brystewa Vizard 1 09-18-2006 04:11 PM
MATLAB and Vizard eagleman Vizard 4 06-10-2005 12:42 PM

All times are GMT -7. The time now is 06:17 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC