04-27-2011 12:22 AM
I'm constructing a robot for a school project in which I am needing to use custom NXT inputs and outputs. For my input I am needing the NXT to recognize a voltage sent to it from a metal detector (between 1.5 and 1.9 volts) and then rotate a motor, to specific degrees that correspond to a sorting device I have made. Secondly I need a custom output that will send a voltage to a solednoid to life a plunger to allow a coin to fall through a hole. I am having troubles creating code that will succesfully run, and perform the actions desired....any help will be much appreciated.
Solved! Go to Solution.
04-28-2011 11:11 AM
Hi LracNayr,
Could you be a little more specific as to the nature of your issue. For example, are you not able to output the correct voltage? Do you have an issue with the DAQ driver? Unfortunately, NI do not currently support this product. I have listed a link below that might point you to the right direction.
http://digital.ni.com/public.nsf/allkb/59F9356834A0E85086257244007A3354?OpenDocument
Since NXT is based on LabVIEW 7, we will do our best if you can give us more specific information on your problem.
Regards,
Josh L.
04-28-2011 02:37 PM
The main problem I am having is that I cannot get the NXT to recognize the input and then perform the desired function. I'm new to working with LabView so I don't know my way around and I am used to hard code programming, not data flow.
Attached I have a flowchart that describles the actions of the NXT and the inputs and outputs that are desired. I'm not sure if it will help, but if you could get me pointed in the right direction that would be very helpful.
LracNayr
05-01-2011 11:37 AM
Hi LracNayr,
I'm not familiar with the NXT. What I can offer is going to be more of a top level approach to trouble shooting. I would recommend that you visit the Lego FAQ webpage for more specific trouble shooting steps.
If you are having an issue with reading in the input, the first step I would take is to read the raw voltage output from the metal detector using a DMM. Your metal detector may not be outputting the correct voltage for each of the corresponding coins. Once you have verified that the output voltage is correct, I would go on to test the raw voltage reading with the NXT hardware. With NI products, you can accomplish this using Measurement and Automation (MAX). I do not know if this is possible with NXT, however, the general principle will be the same. You want to verify the output voltage from the hardware first before trouble shooting the software. When that's done, it's unlikely that you will see an error assuming that you are using the appropriate functions.
I hope this helps. As stated before, NI does not support this particular product. I strongly recommend that you visit the link I send you with a previous post.
Regards,
Josh L.
05-01-2011 03:25 PM
Hi Josh,
I got things to work out in the end, just a lot of trial and error. Thanks for checking up and doing what you could to help me.
LracNayr