Page 2 of 3 FirstFirst 123 LastLast
Results 13 to 24 of 30

Thread: Visual Basic Controller Project

  1. #13
    Registered
    Join Date
    Oct 2006
    Location
    South Africa
    Posts
    48
    Downloads
    0
    Uploads
    0
    Hi Victor

    I would also like to help if i can. I am not a VB programmer by trade, but can help out here and there. i also have a Stepper table as well as a small test board to run the steppers via pc interface.

    it would be nice to see this project revived.

    cheers

    Anthony


  2. #14
    H.O
    H.O is offline
    Registered
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    886
    Downloads
    0
    Uploads
    0
    Hi,
    1. Why did you choose CreateWaitableTimer approach for timing control? It appears that its nanosecond resolution is an overkill for this since this function needs to be called 50,000 times a second at most for a regular microstepper controller. So, we only need 20 ms resolution which is attainable with regular VB timer.
    I'm no VB expert but 50,000 times per second = 50kHz = 0.02mS = 20uS as in microseconds, not 20mS. Can you really get 20uS resolution with an ordinary VB-timer?


  3. #15
    Registered
    Join Date
    Sep 2007
    Location
    United States of America
    Posts
    32
    Downloads
    0
    Uploads
    0
    I have read other places that a pulse frequency anywhere close to this high is impractical for Windows (without serious hacking of the operating system). I would love to be proven wrong about this!!! I think timers might help, but I don't think they are the entire problem. I have been very interested to finding out what limits the pulse frequency. Is it Windows, VB, timer used, circuit, stepper motor, etc??????

    Love to help out with this anyway I can!!!

    To date, I can get maybe 650 pulses per second with my very simple circuit (ULN2003), but as I mentioned above, I cannot put my finger on the limiting component. My suspicion is that it is indeed Windows; therefore, a timer with nanosecond resolution that has to run through a millisecond resolution platform is irrelevant.

    w102acd


  4. #16
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    121
    Downloads
    0
    Uploads
    0
    A little bit of documentation would be a great addition, any notes available?

    Jon


  • #17
    Registered
    Join Date
    Feb 2008
    Location
    usa
    Posts
    2
    Downloads
    0
    Uploads
    0

    Completely revised program for simple lasing/etching

    I decided to use simple For-Next loops for obtaining sub-msec resolution in outputting the microstep signals. This way, a user controls not individual microsteps but groups of 4000-40000 microsteps in 0.1 - 1 sec intervals. This is adequate for my application, which is lasing/etching of simple rectangular shapes. Here I attach the VB program along with notes and a picture of my setup. The main advantage of this versus an earlier program is the ability to control the X-Y stage based on the visual input from the CCD camera mounted on the microscope. The program also has an Autolasing feature, where the user can click on the left-top and right-bottom corners of the rectangle and the program will automatically etch the specified shape. Feel free to use and modify this program for your application.
    Victor Pikov
    Attached Files Attached Files


  • #18
    Registered
    Join Date
    Sep 2007
    Location
    Philippines
    Posts
    1
    Downloads
    0
    Uploads
    0
    Anyone still working on this project?


  • #19
    Registered neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3,424
    Downloads
    0
    Uploads
    0

    Cool I am looking.

    I would like to keep this alive. I am looking...

    I am using the LPT for a 4 bit data analyzer at 400MHz. With a fifth line for start/stop.
    That is data change capture with 2.5nS resolution, time stamped into a file after I fill memory or turn off the switch.
    If you were using windows then this would be not possible. It is DOS.
    In Windows if you disable() interrupts Windows just says you are not interested in interrupts, and honors your enable() in some future timeslice if you ask it to. Because everything is virtual it only looks like timers and stuff work well. Windows goes off into the weeds on a regular basis. If you use a fast enough machine you can get VB6 to do respectable controlling. A few low level hooks via some drivers can overcome some timing problems like running timers/counters without Windows introduced errors.
    Mach3 handles these problems well. Look inside the Mach3 drivers to get some idea of how this can be made to work. You need to be able to feed a queue that is processed by a low level driver to defeat Windows timeslice theft when you need the CPU most.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.


  • #20
    Registered
    Join Date
    Sep 2005
    Location
    UK
    Posts
    1
    Downloads
    0
    Uploads
    0

    Anyone Still Working On This Project ??

    i have just started leaning VB2008.net and i have managed to get most of WinCNC working in .net
    is anyone else trying to do this i would be interested in their code!


  • #21
    Registered
    Join Date
    Apr 2005
    Location
    us
    Posts
    403
    Downloads
    0
    Uploads
    0
    Just stumbled onto this thread, and I too am investigating using visual basic express 2008 to control stepper motors via inpout.dll and the printer port and am also in the beginning stages of coming up to speed on visual basic. (I've converted 2 minilathes which is documented is the mini lathe section but using mach2). My current project is tracking solar collectors, and I visualize using visual basic and outputting az & el data from a data base to move the collector every 15 minutes or so. With the price of electric going up I want to develope a tracking scheme where I can drive multiple collectors and PV panels (the price of the PV is suppose to drop in the near future because of some new technology). By tracking the sun, the effeciency of the panel can increase some %50 percent. By tracking using calculations, instead of actually tracking the sun, you are able to track even during cloudy days on the days when you are only able to catch a little sun here and there.

    So, anyway maybe we can keep this thread going for a little while longer.

    Ron


  • #22
    Registered
    Join Date
    May 2007
    Location
    usa
    Posts
    14
    Downloads
    0
    Uploads
    0
    Total cnc noob, several years vb coding and considerable uC/embedded programming exp.

    Again Im just getting my feet wet w/cnc, so be gentle. Is the goal of the VB project to have the pc run the motors realtime? If so I think this will be very difficult w/any windows based platform.

    I would think a better approach would be to have an uC based controller run the stepper drivers while being updated by the pc. Isnt this the typical operating scheme for cnc?

    I can tell from exp attempting to use vb.net < version 3.5 (2008) has some severe bugs in IO components. Since version 2008 tho I havnt expd any issues.

    Im very interested in this project.


  • #23
    Registered pminmo's Avatar
    Join Date
    Jun 2003
    Location
    St. Peters, Mo USA
    Posts
    3,325
    Downloads
    0
    Uploads
    0
    VB is a great tool to build a quick user interface, but this is no simple task to do it correctly. The meat of a cnc controller though has to be a precise timed IO routine. MACH3 for example has a minimum 25khz kernel, and can have up to a 100khz kernel. Someone familiar with Windows Internals and drivers is really needed to build that kernel. My educated guess is the kernel timing needs to output step/dir pulses based on a buffer the background builds as it's intrepreting G-code and doing trajectory planning. That needs to be a low latency timed event. At 50khz that's an update every 25us which doesn't seem like a real difficult task, but you don't want that 25us wondering from 50us one iteration to 15us the next iteration. The emc guys have some applicable documentation:

    http://www.linuxcnc.org/content/view/42/13/lang,en/

    http://wiki.linuxcnc.org/cgi-bin/emc...HardwareDesign

    Trajectory planning:
    http://wiki.linuxcnc.org/cgi-bin/emc...imple_Tp_Notes
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com


  • #24
    Registered
    Join Date
    May 2007
    Location
    usa
    Posts
    14
    Downloads
    0
    Uploads
    0
    I agree, especially now that windows is designed around the net framework where everything is managed. You run into all kinds of "race" conditions which either corrupt or crash what your doing. I have little exp writing services which is a nightmare due to the inability to debug them and no exp writing kernels. When I do use vb it is usually to create a gui or database for an embedded system that is running io realtime.

    wayne


  • Page 2 of 3 FirstFirst 123 LastLast

    Similar Threads

    1. Taig Mill, US Digital MS23, Controller???
      By marjamar in forum Taig Mills & Lathes
      Replies: 3
      Last Post: 02-07-2007, 10:16 AM
    2. Open Source CNC Controller Specification
      By gregmary in forum DIY CNC Router Table Machines
      Replies: 28
      Last Post: 12-04-2005, 10:58 PM
    3. Visual Basic Controller - pulse width?
      By dwwright in forum Visual Basic
      Replies: 16
      Last Post: 08-03-2005, 12:57 PM
    4. New Visual Basic forum
      By CNCadmin in forum Visual Basic
      Replies: 1
      Last Post: 02-27-2005, 08:36 PM
    5. Some basic controller questions
      By Mwilhelm10 in forum General Electronics Discussion
      Replies: 1
      Last Post: 10-09-2003, 01:45 PM

    Tags for this Thread

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.