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.
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.
06-10-2013 05:21 PM
Hello I am working on a project where I want to make a closed loop simulation using arduino UNO. Is it possible to do so ? I am using accelerometer as a sensor and stepper motor. I am familiar to labview and I have made a programming for accelerometer to read using arduino it works great and I also have my stepper motor working. My goal is to make accelerometer read the acceleration and give it to stepper motor to make it work. Can anyone help me ASAP ?
Solved! Go to Solution.
06-11-2013 09:58 AM
Hello there,
Thanks for using the NI Discussion Forums! If you are looking to make closed loop simulations with arduino, I recommend you to try out the NI LabVIEW Interface for Arduino Toolkit. You can try out the “Stepper Motor Example” and combine it with the “Analog Read Pin” VI example.
I hope this helps.
06-11-2013 03:40 PM
Hello Daniel,
thanks for your help. I did install the vipm as well as the interface for arduino longback.I have my own programming for the MMA7361accelerometer to read and now I am working on the stepper motor and a closed loop connection. I am little bit confused how the "Arduino Input Pin" example will be connected to the stepper motor.vi example as it divided into number of parts. It consists of "stepper write" , "stepper configure", "stepper to go". I am not really sure how and where it should go and connect.
06-11-2013 04:23 PM
Hello,
I would recommend you to follow the Producer/Consumer architecture to implement both examples. In your case, your producer loop would be the “Arduino Input Pin” example and your consumer will be the whole “Servo Example.vi” plus the logic to set the angle depending on the acceleration read.
07-24-2013 05:02 PM
In the acclerometer output waveform graph, the x-axis stand for time in milliseconds and the y-axis stands for amplitude. So what does the units for this mean whether should I take them as in G's or in m/sec^2 as sometimes the values start from 2 and reach til 150 in y-axis.
07-24-2013 06:22 PM
If you drill into the Analog Read Pin VI, you find that there is a "Send Receive" VI. The comments say that after the processing done, you read in volts. The MMA7361L datasheet says that the sensitivity is software selectable, either 800 mV/g (if you select 1.5g) or 206 mV/g (if you select 6g). If your sensitivity is 800 mV/g and your voltage is 150 V, your acceleration would be 150 V / (0.8V/g) = 187.5 g. Obviously the y axis value isn’t scaled.
Volts Read [V] / Sensitivity [V/g] = Acceleration [g]
What I’d recommend is to read in a known voltage, like a battery. If the voltage is not what you’re expecting, try to modify the “Volts Per AtoD Bit” constant so get the value you expect. After that, you can make the voltage to acceleration conversion like I described above.
11-14-2013 06:13 PM - edited 11-14-2013 06:15 PM
Might work with state machines, this Mamera trajas structured manner, ie for example you could do the reading first and then the engine control is just one sujerencia, I hope you serve