Automation project need help


Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Jan 2010
    Posts
    21

    Default Automation project need help

    I'm having trouble with math in picbasic pro. I'll give you an over view of what I'm trying to do. I've been automating a few machines that feed out cardboard and cut it off. The feeding is done by a stepper motor directly connected to a roller. I've been using CNC control software to handle this up till now. I'd like to reduce my cost and have a smaller control.

    The roller that the stepper motor is connected to is 1.987” in diameter. So to figure out how much stock is fed out each turn I need the circumference. Which is 1.987 * PI = 6.2423. So with every turn of the stepper motor it feeds out 6.2423 inches of stock.

    I have a 2000 step per revolution stepper motor. So then we take the circumference 6.2423 / 2000 which gives us .003121”. This is how much stock is fed out with every step.

    This is easy in normal computer programming. But working with pic's is totally new to me.

    So far in this project I have a 4X4 keypad working it will store “123A 567B 789C *0#D” in a variable. I also have LCD out put working.

    So basically what I need working is for the user to be able to enter the amount of stock they want. Lets say they enter 60.25” inches. With the “*” as the decimal point on the keypad.

    So with the above equations all I really need to have in my program is a variable is the (steps per inch = .003121) and then you just take 60.25/.003121 = 19304 Then I would just send out 19304 pulses to a pin on the pic to step the drive.

    So my question is how do I work with decimals in 16bit math?

    My other question that goes with this is how do I store multiple keys typed in on the keypad so that if the user types in 60.25 I can work with it?

    I've attached a picture of the stepper motor (bottom left) attached to the machine with the rollers and cardboard feeding though so you can have a better idea of what I'm doing. Thanks.
    Attached Images Attached Images  

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. A Temperature & Humidity Data Recorder Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 9th July 2008, 18:47
  3. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  4. Help on coding/ selecting PIC chip for project
    By lovemeok in forum General
    Replies: 0
    Last Post: - 27th July 2006, 19:21
  5. A category for Project Ideas
    By Pic_User in forum Forum Requests
    Replies: 2
    Last Post: - 23rd June 2006, 07:29

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts