From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WiiMote subVI

I have modified the VI posted at http://decibel.ni.com/content/docs/DOC-1353 to connect the WiiMote to Labview and it works great at displaying X,Y,Z acceleration (the only data I want). However, I need to take this data and manipulate it. The block diagram for the VI is already very crowded and I'd like to turn the file into a subVI that will output X,Y,Z acceleration so I can connect it to waveform plots, algorithms, timers, etc.
 
I have attached the VI which works when used with the http://www.codeplex.com/WiimoteLib .NET managed library and the ziped Wiimote managed files in the first link.
 
When I try to insert my sub VI and display the X,Y,Z values, no data is displayed when I run the program. It works fine when I double click on the subVI I created and click run. Why wont it work as a sub VI and is there a way I can fix this so I can get output accelerations on a clean block diagram?
 
Thanks. 
 
 
0 Kudos
Message 1 of 2
(2,343 Views)

You say you are using the attached VI as a subVI?

 

One problem you'll have is that it is architected to be a top-level VI.  It has a while loop that is stopped with a stop button.  So if it runs, the only way you'll be able to stop it is if the front panel is open and you hit the stop button.

 

You may want to rewrite it as an action engine.  Then you can create 3 actions for it Open/Initialize, Get Data, Close.  The Open would be called first and get and maintain the reference to the object.  Get Data returns the XYZ when ever you call it.  Close will close out the reference.

0 Kudos
Message 2 of 2
(2,330 Views)