04-14-2010 07:44 PM
I have a project in which I must use a a biosignal to control a Lego robot in real time. My group is using a DAQ to read an EMG signal into the computer. We are trying to use the RMS of this signal to control the power of the Servo motors that drive the robot. However, the DAQ assistant can not be loaded into the NXT (the error message says something about password protection).
Is there any way to read the RMS from another vi and feed it into the vi that is loaded into the NXT?
In general terms, what I would like to do is use the root mean square of a biosignal read by a DAQ to control the power of the Servo motors, in real time.
Any help would be greatly appreciated.
04-15-2010 12:20 PM
You won't be able to run DAQmx VIs on the NXT. The error message is misleading -- the problem is that the DAQ VIs weren't written to run in the NXT's virtual machine.
Instead, you should create two separate VIs. The first VI will run completely on the PC, will acquire the EMG signal, and then pass messages to the NXT over Bluetooth indicating how much power the motors should get.
The second VI will run completely on the NXT, will read messages from one of the Bluetooth mailboxes, and then feed that power value into a motor control VI.
If Bluetooth is not an option for you, you could use just one VI running on the PC, and use the NXT direct command VIs to set motor power over USB. (The drawback is that your NXT is now tethered to the computer.)