04-04-2013 08:37 PM
As soon as I upload LIFA Base to my Arduino Uno (R1), both motors connected to Pins 5 and 6 start running continuously at full speed (not desirable).
When I use the following VI that is written for my motor shield, it works correctly:
https://decibel.ni.com/content/docs/DOC-27770
However, when I push the "Stop" button the motors go back to running at full speed.
How can I fix this in the arduino code?
Thanks
-Steve
04-05-2013 02:20 AM
Try this cleaned up version of that VI (I removed the analog inputs since they don't relate to the shield based on the info on the website).
I added a the "Set Digital Pin Mode" VIs because you should always set the pin mode before using a pin. Then, I added the "Set Digital Pin" VIs immediately after the loop to set the motor speed to zero when you hit the stop button.
Let me know if it works.
04-05-2013 04:21 PM
I'm sorry. I was ambiguous with my first post. My problem is not with the VI, it is with the arduino sketch (LIFA Base). As soon as I uplaod the sketch to the arduinon, both motors start running full blast.
Thanks,
-Steve
04-05-2013 04:36 PM
The VI that I posted above was intended to address the motors being on after you hit the stop button. As for when you upload the sketch, you might need to set the appropriate pins to 0 in the firmware (possibly in the setup section). So, try changing the setup code in LIFA_Base.ino:
void setup()
{
// Initialize Serial Port With The Default Baud Rate
syncLV();
// Place your custom setup code here
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
digitalWrite(5, LOW);
digitalWrite(6, LOW);
}
04-06-2013 08:19 AM
This worked. Thanks! The reason I didn't do such a thing to begin with, was that I hadn't analyzed the code to see how the interface worked and to ensure I wasn't going to break the labview interface by setting pins in setup().
07-15-2013 02:11 PM
but how i can use PID for controlling This Dc MOTOR with Labview interface arduino thank's
09-08-2013 12:39 AM
I would like to do that too! PID and DC motor control from a Temperature sensor input.
09-08-2013 03:23 AM
After a really quick search on Google, I found this short and sweet video about a PID control (Doesn't even require the PID toolkit): http://www.youtube.com/watch?v=qMydcfZ_ZSs
11-10-2013 03:46 PM
Nathan, I have been trying to make the labview interface work with my motor shield (OSEPP version http://osepp.com/products/shield-arduino-compatible/motor-servo-shield/) I can not seem to get it. Would it be possible to post the L293D_&_L298_Interface_Arduino.vi file that is compatible with LabView 2010?
My biggest uncertainty is what Arduino pins correspond to the various motors on my OSEPP motor shield? According to osepp, it should be the same as the adafruit version (but my shield has 4 motor connections etc.. ) so I am a bit confused.
Thanks for any help,
-Tom
11-10-2013 08:46 PM
Here it is for LabVIEW 2009