LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LabView, Arduino, and Easy-Driver to control a Stepper Motor

Highlighted

Hello fair folks of the LabView forums!

 

I am a humble engineering student in need of some advice and input on a project I am working on.

I’ve also done a fair amount of reading on the LabView forums with people trying to use LabView and Arduino to control stepper motors, and I’ve used as much information from each as I could. However the problem I'm encountering now is one which is unique to my VI Configuration.

 

So, here is what has been done thus far:

-Installed LabView Interface for Arduino [LIFA]

-Installed necessary VISA drivers for LabView to communicate with arduino

-Uploaded firmware to Arduino to allow it to communicate with LabView

-Properly wired Stepper Motor with Easy Driver and Power Supply; I have verified this by first using the Arduino independently of LabView, using example code found here.

 

-I have created a VI, and have just recently got it to run without reporting back any errors. While I suspect the behavior I’m encountering has to do with something inside the VI, it is difficult to determine as there are no errors being reported!

 

But here is general problem I am encountering:

-Connect Joystick to USB Port, connect Arduino to USB Port.

-Plug in outlet for Power Supply

-Open LabView VI

-Run LabView VI

-LabView successfully detects Joystick, and Arduino.

-Tilt Joystick; Stepper Motor moves in proper direction, but it only takes a single step. If held, it does not move further. If returned to zero, and then tilted, it again only takes a single step.

 

I know that in the example code, the Arduino issued the step command by writing the signal from LOW to HIGH, and varied the speed by how often it did this.

I assumed that the Write-PWM feature would do this same thing, but perhaps my assumption is wrong. I will continue to tinker with this myself, but I would be extremely grateful for any insight you might be able to lend.

 

I’m thinking, if not the Arduino Write-PMW feature perhaps a simple timing-sequence that could be used to alternate between writing 0 and 1, with the timescale of the sequence being scaled to the X-Axis from the Joystick. But, I am open to suggestions, and certainly appreciate any thoughts you may have to offer!

 

Attached to this is the VI used in this setup, a picture of said VI, as well as a rough sketch of the hardware configuration.

Thank you!

0 Kudos
Message 1 of 7
(11,637 Views)
Highlighted

Hi danjifraga,

 

I am not so familiar with the Arduino toolkit functions, but you may have better luck looking at the Arduino page at:

 

www.ni.com/arduino

 

I'll ask around on Monday to see if anyone is more familiar with the toolkit.

 

Good luck,

 

Brian

 

 

 

 

Brian G.
0 Kudos
Message 2 of 7
(11,596 Views)
Highlighted

I am working on a similar project and would like to be able to see you vi.  My problem is that I am running lab view 2009.  Could you save as the 2009 version so I can take a look a offer some collaborative work?

0 Kudos
Message 3 of 7
(11,589 Views)
Highlighted

Hi Dan and Gabe,

 

Thank you both for your interest in the LabVIEW Interface For Arduino.  Please repost your question at:

 

www.ni.com/arduino

 

These forums are monitored by the Arduino developers.

 

Thanks,

 

Brian

Brian G.
0 Kudos
Message 4 of 7
(11,540 Views)
Highlighted

Do you know if there are any moderators on the LabView forums whom might be able to move our post from this forum to the LabView Arduino forum? I would hate to double-post, though if it is necessary, I can do that as well.

0 Kudos
Message 5 of 7
(11,537 Views)
Highlighted

Danjfraga,

I cannot directly move this post to the Community. Go ahead and re-post to the Arduino page (https://decibel.ni.com/content/groups/labview-interface-for-arduino?view=discussions). This will direct you to the Community where the Arduino developers monitor that page and they'll be able to assist you!

 

Jordan

Forum Moderator

0 Kudos
Message 6 of 7
(11,509 Views)
Highlighted

Hi Dan, Can you upload your arduino sketch so that We can see if everything is configured correctly as that could be your main problem, upload it so that i can test it as i have most of the equipment required in my office,

 

The developer.

0 Kudos
Message 7 of 7
(11,461 Views)