09-01-2018 09:15 AM
I want to PID control a DC motor using arduino uno and labview software. I used "control and simulation loop" to write the labview code.
The question is: Is it possible to send that code (that includes the control and simulation loop) to the arduino using "MakerHub Linx" module or 'arduino" module ?!
Thanks in advance
09-03-2018 07:31 AM
@muneerkun wrote:
The question is: Is it possible to send that code (that includes the control and simulation loop) to the arduino using "MakerHub Linx" module or 'arduino" module ?!
The actual code? No. You can, however, create a sketch for your Arduino to read the input values and pass that data on to your LabVIEW application which then performs the PID calculations and sends that to the Arduino which then changes whatever values. Or, to do this properly, you will need to implement your PID logic in an Arduino sketch. I image there are PID modules out there for Arduino you can use as a base.
09-03-2018 02:47 PM
First of all, thank you for your answer, but can you check the attached picture?
The attached picture shows the block diagram I have used. Unfortunately, my arduino board is not working, so I can't check if this block diagram will work.
I don't understand why you are saying that it can't be done. In the block diagram, I used the "Control Design and Simulation" module to PID control (or lead-lag compensate) the motor. Also, I used the MakerHub Linx module in order to communicate with the motor and sensor that are connected to the arduino board.
As I mentioned, I can't test this block diagram in reality, but I have a feeling that it may work.
P.S.: This is a task for me, and it is not allowed to use the Arduino IDE software. I can only use the arduino hardware board. However, I must use LabVIEW in programming. If you can help me, I will be very appreciated.
Thanks in advance
09-03-2018 06:50 PM
My understanding is that Linx has sketches already built up to do certain tasks on the Arduino. So that will handle the communications part.
09-04-2018 04:30 AM
Thank you so much! I will try to test this code in reality.