element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum cann't work a stepper motor with labview, arduino and easy drive 4.4
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 1 reply
  • Subscribers 416 subscribers
  • Views 308 views
  • Users 0 members are here
Related

cann't work a stepper motor with labview, arduino and easy drive 4.4

e14 Contributor
e14 Contributor over 14 years ago

Hello

I'm new to labview and arduino, I have installed all the needed software and hardware need to run labview and arduino uno.

I have an easy drive 4.4, stepper motor and power supply.

 

I have done all the arduino learning kit electrical circuit using labview and all worked OK, so I think i have all the needed software and hardware correctly.

when i tried to operate a stepper motor using the labview example (the one which comes with the LVIFA) nothing happens, i tested the motor and the hardware using the arduino example code and the motor works.

 

can someone help me i'm quite desperate.

 

arduino code:

 

 

int Distance = 0; // Record the number of steps we've taken

void setup() { 
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
}

void loop() {
digitalWrite(9, HIGH);
delayMicroseconds(100);
digitalWrite(9, LOW);
delayMicroseconds(100);
  Distance = Distance + 1; // record this step
 
  // Check to see if we are at the end of our move
  if (Distance == 3600)
  {
  // We are! Reverse direction (invert DIR signal)
if (digitalRead(8) == LOW)
  {
digitalWrite(8, HIGH);
  }
  else
  {
digitalWrite(8, LOW);
  }
  // Reset our distance back to zero since we're
  // starting a new move
  Distance = 0;
  // Now pause for half a second
  delay(500);
  }
}

 

 

 

 

 

thank.

kobi

  • Sign in to reply
  • Cancel

Top Replies

  • YT2095
    YT2095 over 14 years ago +1
    I don`t code arduino (or any type of C language) but having looked at your program, the algorythm is a very simple one, so that would say to me that it`s a Syntax problem or a H/ware problem. does it compile…
  • YT2095
    0 YT2095 over 14 years ago

    I don`t code arduino (or any type of C language) but having looked at your program, the algorythm is a very simple one, so that would say to me that it`s a Syntax problem or a H/ware problem.

    does it compile correctly?

     

    a simple test for the program would be to write one that flashes 2 LEDs.

    say a red and a green one for instance, make the Red flash 10x with the green LEd off, then after these 10 flashes turn the Green LED on and flash the red one 10 more times again, and then turn the green LED off again and go back to the beginning.

     

    in this simple idea, the Red LED displays the pulses per Step for your motor, so in effect you`ll stepp 10x in a dirrection.

    when the Green led comes on, this indicates to Change the dirrection, and the red flashes 10x to move in this new direction.

     

    if you can get that working, then it`s simply a case of changing the delays between flashes (so your motor isn`t too slow), and also the amount of flashes so that you see the motor turn a good distance before changing direction.

     

    so 10 red flashes with green off, then 10 red flashes with green on, go back to the start...

     

    hope that helps you understand the workings a little at least image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube