LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Parameters to Programs?


I am trying to start working with Mindstorms and LabView and have some questsions on general approaches to be used.
I worked through the "Getting Started with the LabView Toolkit for LEGO MINDSTORMS NXT" examples and I understood the difference between NXT Programs (run on the NXT) and Direct Commands (run on the host computer and communicate with the NXT).
I figured out that NXT Programs can be called from Direct Commands using "Start Program". I could Start the Program Basic Move until Touch Sensor.vi.
 
My next milestone is to create a VI that runs on the host computer and uses NXT Programs with parameters. As an example: I want to create a VI where I can set parameters (e.g. Power or Time) for the NXT_MotorTime.vi. Is something like this possible? Or can I only use elements from the NXT Direct Commands Palette and have to create commands like MotorTime on my own? Is it possible to reuse things?
 
Thanks for any help.
Thomas
 
0 Kudos
Message 1 of 2
(5,974 Views)
Why are you trying to use an NXT Program "on the host computer?" The point of a Program is that it's not "on the host computer." If you're "on the host computer," you can (and probably should) use direct commands.

I'm not really clear on what you're doing, but it's my understanding that you already have an NXT Program, and you want to be able to change some of its details from run to run while the computer is connected; if this is the case, I suggest duplicating the functionality of the NXT Program in a Direct Commands sub VI, to avoid superfluous intermediary steps. (Would this be impractical for you?)
0 Kudos
Message 2 of 2
(5,962 Views)