Visual Basic- How is it Used to Program CNC Machines?
Close
Login to Your Account
Page 1 of 2 12 LastLast
Results 1 to 20 of 21
  1. #1
    Join Date
    Oct 2009
    Location
    near Seattle, Washington, USA
    Posts
    1,392
    Post Thanks / Like
    Likes (Given)
    308
    Likes (Received)
    749

    Default Visual Basic- How is it Used to Program CNC Machines?

    While looking for a job, I ran across a NC Programmer position on the Boeing web site that requires working knowledge of Visual Basic. I'm curious to know how it is used to program machines.

  2. #2
    Join Date
    Jul 2009
    Location
    Peoria, IL
    Posts
    11,060
    Post Thanks / Like
    Likes (Given)
    41
    Likes (Received)
    8343

    Default

    Could be helpful in writing CAM posts.

  3. #3
    Join Date
    Sep 2011
    Country
    UNITED STATES
    Posts
    19,279
    Post Thanks / Like
    Likes (Given)
    7561
    Likes (Received)
    6097

    Default

    Quote Originally Posted by charlie gary View Post
    While looking for a job, I ran across a NC Programmer position on the Boeing web site that requires working knowledge of Visual Basic. I'm curious to know how it is used to program machines.
    It should not be. Micros**t product. Maybe I had best consider flying Scarebus after all?

  4. #4
    Join Date
    Oct 2010
    Country
    UNITED STATES
    State/Province
    Oregon
    Posts
    4,324
    Post Thanks / Like
    Likes (Given)
    2946
    Likes (Received)
    1440

    Default

    Charlie, I don't know more about the position than you described, but I expect that Visual Basic is used to extract part data from some bill-of-materials, assembly, or parts database and feed it into a CAM system. Or perhaps the NC programs have already been generated and stored in the database and VB is used to transfer them to the machine controllers.

    At any rate, VB is a fairly common tool for integration with "back end" applications and databases, at least in enterprises which use Microsoft-based applications.

  5. #5
    Join Date
    Sep 2011
    Country
    UNITED STATES
    Posts
    19,279
    Post Thanks / Like
    Likes (Given)
    7561
    Likes (Received)
    6097

    Default

    Quote Originally Posted by sfriedberg View Post
    Charlie, I don't know more about the position than you described, but I expect that Visual Basic is used to extract part data from some bill-of-materials, assembly, or parts database and feed it into a CAM system. Or perhaps the NC programs have already been generated and stored in the database and VB is used to transfer them to the machine controllers.

    At any rate, VB is a fairly common tool for integration with "back end" applications and databases, at least in enterprises which use Microsoft-based applications.
    That fits. Had an IS/IT head and team using it atop MS-SQL and MS-Access to (attempt) do telco billing. Looked sexy. Made enough mistakes they'd now and then have to apologize to customers and run over 60,000 bills all over again. Thankfully, that was but a staggered-week run, not the whole base.

    Dumb stuff. One app coded for month-day-year, DB holding as day-month-year. UK environment, both. Or was meant to be.

    "Just a Consultant", couldn't fire him, just assigned him harmless duty, hired his replacement. Replacement fired the lot of them, moved it over to unix where billing was old-hat for telco, cut most of the rest of the then-idled Win-Weenies.

    Got the impression it was not easy to troubleshoot or debug VB, nor do QA on it when used with an MS DBMS. Could have been just his poor staffing choices, rather than Microsoft. Or both, of course...

    "Enterprises".. larger than a kitchen table ebay seller of used ladies' pantyhose... (the ladies, not the pantyhose) who use Microsoft "business" software are called "optimists" first, "gamblers" during , "failures" after.

    T'was ever thus..

    At the VERY least.. one sheds MSO and MS own, uses a Win-platform only if no other option, but... runs a decent THIRD PARTY Line of Business app that needs only the MS environment, I/O, GUI, etc.

    Boeing - once of Boeing Calc and BCS - is doing that MS-own MS stuff?

    Must be places with a brighter future, then.

  6. #6
    Join Date
    Jan 2007
    Location
    Flushing/Flint, Michigan
    Posts
    6,414
    Post Thanks / Like
    Likes (Given)
    267
    Likes (Received)
    5207

    Default

    How else would you tie your Excel spreadsheet to your cnc or vice versa?
    As stated correctly above by sfriedberg it's the most common "glue" used for integration and automating tasks outside the controller due to it's ease of use, simplicity and readability.
    VB based machine controllers are rare ducks but I have seen $400,000 machines running Labview for the whole shebang so who knows.
    But NC programmers should not be playing with the inside of a control so most likely support stuff outside of the real cnc controller and perhaps VBA not VB.
    Bob

  7. #7
    Join Date
    Jan 2007
    Location
    Flushing/Flint, Michigan
    Posts
    6,414
    Post Thanks / Like
    Likes (Given)
    267
    Likes (Received)
    5207

    Default

    Quote Originally Posted by thermite View Post
    ....

    Got the impression it was not easy to troubleshoot VB, nor do QA on it. ....
    I've got nothing here.
    If you can't troubleshoot VB or run a QA on it you should not be paid to program.
    I use it to teach entry level programming to button pushers who care to show up for the unpaid, after-hours lessons in how computers work.
    Yes it is messy and simple, .net fixed much but made it more complicated.

    One thing to note is that NC programming is very different than computer programming.
    Perhaps "Ivory Tower" but I have never seen RS-274 as "real" programming.

    Try to troubleshoot and verify under all possible errors very lengthy Fanuc macros. VB seems clean.

    Holes for sure in MS-sequel and Access processed under VB in a large transitional system so I do understand this foobar mess.
    Not sure why a sane person would do such other than being underpaid.
    Bob

  8. #8
    Join Date
    Sep 2011
    Country
    UNITED STATES
    Posts
    19,279
    Post Thanks / Like
    Likes (Given)
    7561
    Likes (Received)
    6097

    Default

    Quote Originally Posted by CarbideBob View Post
    I've got nothing here.
    If you can't troubleshoot VB or run a QA on it you should not be paid to program.
    I use it to teach entry level programming to button pushers who care to show up for the unpaid,after-hours lessons in how computers work.
    Every cnc in my building is running under a VB based controller.
    Bob
    Gambler phase, then. Good luck!


  9. #9
    Join Date
    Jan 2007
    Location
    Flushing/Flint, Michigan
    Posts
    6,414
    Post Thanks / Like
    Likes (Given)
    267
    Likes (Received)
    5207

    Default

    Quote Originally Posted by thermite View Post
    Gambler phase, then. Good luck!

    The luck has held out so far.
    Only a few decades and many million parts.
    40,000+ lines of I admit, "shitty" VB code inside. It started before there was VB and I embraced Basic as a good and bad language.
    Not as obtuse as assembly, perhaps C better but it is so hard to read .
    "Real programmers do in it Hex", I have the tee-shirt.
    Some of us still count clock cycles and know the interaction when we write real time code.
    The newer MS systems are much improved.
    I am a rebel, I was a big hater in the earlier (later) days, OS2, DR-Dos, anything I could do to escape.

    I know from conversations your background to before there where desktop computers.
    Not sure your aversion to the MS world, I got my dick knocked into the dirt for doing the same and lost a big market and likely enough money to buy my own private island .
    Bob

  10. Likes thermite liked this post
  11. #10
    Join Date
    Sep 2011
    Country
    UNITED STATES
    Posts
    19,279
    Post Thanks / Like
    Likes (Given)
    7561
    Likes (Received)
    6097

    Default

    Quote Originally Posted by CarbideBob View Post
    The luck has held out so far.
    Only a few decades and many million parts.
    40,000+ lines of I admit, "shitty" VB code inside. It started before there was VB and I embraced Basic as a good and bad language.
    Not as obtuse as assembly, perhaps C better but it is so hard to read .
    "Real programmers do in it Hex", I have the tee-shirt.
    Some of us still count clock cycles and know the interaction when we write real time code.
    The newer MS systems are much improved.
    Bob
    Ah well. Skip the first fifteen or twenty years of relay, gear-wheel, hollow state both analog & digital, enter with the modern age, 1974 or so:

    Twinned HP 3000 Mark III, HP MPE-3000. For lack of any better toolset, 55,000 lines of HP's own version of BASIC.. which was BASIC in name only, and 'sin tax' only mostly.

    There was no "goto". There was DO...DOEND. Or a branch to a LABEL that contained a subroutine, and - sort of a COME FROM when it returned.

    It was what I had.

    BOM explosion, 4,000 SKU capable, the Jewelry Manufacturing Division I headed?

    ISAM DB under a BOM so fast off S-100 with slew-rate-tuned 8" FDD that an adapted Data Printer 1064 chain-train needed external buffers. Written in? Ray Duncan's LMI forth.
    Atrocious core-hog, too. 13 greedy kilobytes. Mind, 8K was for the text editor and pretty-printer for business correspondence. Forth is like that. The more definitions you have in the vocabulary, the fewer you needed to have to begin with, so it sorta shrinks as it grows?

    It was what I had.



    Also expanded the programmed learning we used our in-house-developed POS terminals to train-up staff on. Chairman's Son had written the first part of it. In COBOL.

    No sweat. COBOL is good people. LOVED the "divisons" and starting out with "environment division" and such.

    By WTF, Fred, why an interactive individualized, network distributed programmed learning system in Mike-Foxtrot batch-bitch COBOL?.

    "It was what I had."

    Fast-forward, C&W. Marvelous pan-global fault/trouble-ticket/provisioning/recording toolset. Meet Hugh Mayhew, the developer over a pint, London. Find out he coded the database and all the HMI in...FORTRAN.

    "It was what I had"


    Now .. guy named Bob sez he did a lot of work in MS VB?

    It was what he had?

    OYE! Surely there must be LIMITS to this s**t eventually?

    If *I* were to be the one admitting to that instead of you?

    My old friends would be suspicious that "what I had" was probably tertiary syphilis!



    And Real programmers do it first with solder. Then wire-wrap. Where owning more than one color of wire is CHEATING!

    To implement better I/O. Called "Octal" thanks!


  12. #11
    Join Date
    Jan 2007
    Location
    Flushing/Flint, Michigan
    Posts
    6,414
    Post Thanks / Like
    Likes (Given)
    267
    Likes (Received)
    5207

    Default

    Maybe octal was better but I fear we have digressed and lost most of the attention here as to why a employer looking for a "NC" programmer would want a VB skill set.

  13. Likes JLarsson, BSCustoms liked this post
  14. #12
    Join Date
    Sep 2011
    Country
    UNITED STATES
    Posts
    19,279
    Post Thanks / Like
    Likes (Given)
    7561
    Likes (Received)
    6097

    Default

    Quote Originally Posted by CarbideBob View Post
    Maybe octal was better but I fear we have digressed and lost most of the attention here as to why a employer looking for a "NC" programmer would want a VB skill set.
    Let us hope someone within Boeing is simply trying to find staff that they can give a cheap and dirty consistent test to. Then actually develop the 'winners' towards a different toolset.

  15. #13
    Join Date
    Jun 2006
    Location
    PA
    Posts
    546
    Post Thanks / Like
    Likes (Given)
    13
    Likes (Received)
    29

    Default

    I do a lot of computer programming and have used VB.net frequently to automate programming tasks for customers. Often, these projects involve interfacing with a database, .csv file, or spreadsheet and translating that data into cnc code.
    However, the only reason I can think of that they would want a typical cnc programmer to have VB experience is because the macro language built into some cad and cnc programming software is sometimes similar to VB.

    btm

  16. Likes thermite liked this post
  17. #14
    Join Date
    Nov 2007
    Location
    canada
    Posts
    465
    Post Thanks / Like
    Likes (Given)
    63
    Likes (Received)
    192

    Default

    SolidWorks, for one, still has VBA in it. There are a couple CAM softwares that still have it as well. I think Microsoft is trying to kill VBA and move everyone to VB.net, some companies using CAD CAM automation are making the leap from VBA to .net before the cut off actually happens. This could be the reason behind the posting of VB skills...although I guess it should more correctly say VB.net
    Keep in mind, if you posses VB skills (or any other computer language) you are probably capable translating those to many other automation skills such as macro B. And with the industry 4.0 coming into full swing, computer programming skills are going to be brought to the forefront very quickly.

  18. #15
    Join Date
    Sep 2011
    Country
    UNITED STATES
    Posts
    19,279
    Post Thanks / Like
    Likes (Given)
    7561
    Likes (Received)
    6097

    Default

    Quote Originally Posted by btm View Post
    I do a lot of computer programming and have used VB.net frequently to automate programming tasks for customers. Often, these projects involve interfacing with a database, .csv file, or spreadsheet and translating that data into cnc code.
    However, the only reason I can think of that they would want a typical cnc programmer to have VB experience is because the macro language built into some cad and cnc programming software is sometimes similar to VB.

    btm
    Exactly.

    May not be able to do much with "logo", but it surely gets the concepts of tool motion control across fast enough for a screener to ascertain whether a body can grasp the concepts to do far more yet with whatever other tools they must learn to get by with.

    Most of us have dabbled in dozens of languages out of curiosity - even HOPE!

    We learn to USE whatever "company" toolsets as are put on our plate.

    Same-same as the Pilgrim standing at a machining centre he don't personally own.

    Only "religion" to any of that is eatin' reg'lar like and paying the other bills.

  19. #16
    Join Date
    Jan 2007
    Location
    Flushing/Flint, Michigan
    Posts
    6,414
    Post Thanks / Like
    Likes (Given)
    267
    Likes (Received)
    5207

    Default

    Quote Originally Posted by goooose View Post
    ... I think Microsoft is trying to kill VBA and move everyone to VB.net, some companies using CAD CAM automation are making the leap from VBA to .net before the cut off actually happens. ...
    As a programmer I don't understand what you are saying here. Have you worked in VB3, 6 ,VBA and VB.net? C sharp?
    C is not what it used to be also.
    It's a oops world now yet one can still do VB whatever without a whole lot of understanding of the guts underneath.
    This has always been my love for the language, it is easy to teach to newcomers for basic stuff.
    Bob

  20. #17
    Join Date
    Nov 2007
    Location
    canada
    Posts
    465
    Post Thanks / Like
    Likes (Given)
    63
    Likes (Received)
    192

    Default

    Quote Originally Posted by CarbideBob View Post
    As a programmer I don't understand what you are saying here. Have you worked in VB3, 6 ,VBA and VB.net? C sharp?
    C is not what it used to be also.
    It's a oops world now yet one can still do VB whatever without a whole lot of understanding of the guts underneath.
    This has always been my love for the language, it is easy to teach to newcomers for basic stuff.
    Bob
    VBA is visual basic for applications. It is inside of Office products, Word, Excel, Outlook, etc. VBA is Visual Basic 6...it was discontinued some time ago. Microsofts plan was to kill it and have those that were using the VBA interface move to something like Visual Studio where they could use an updated language such as C# or VB .net

    VBA is still alive though. However, Microsoft stopped issuing licenses to new companies prob 10 years ago. Those who had it in their software could keep using it. I guess some of those companies were big enough to get Microsofts attention (SolidWorks), and VBA not only remains but it got an update to a 64 bit version with VBA7.

  21. #18
    Join Date
    Jun 2006
    Location
    Near Seattle
    Posts
    4,410
    Post Thanks / Like
    Likes (Given)
    2463
    Likes (Received)
    1106

    Default

    "based", "driven by", "controlled by" and "marketing stuff" vs "what is underneath"

    People will call some control containing no fanuc parts at all "fanuc based" - what they mean is "some variant of G-code style programming"

    In 2006 (I think) at IMTS I was introduced to an Okuma staffer described as high level software type, and he seemed to fit the bill. Salesman had claimed that OSP... was "windows based" - uh yeah, sure. (I was still employed writing Windows at that point... The windows kernel was not designed for such a task...)

    Okuma staffer quickly laid out the reality for me.
    1. There's a Virtual Machine structure inside the control, the VM monitor was based on Tron. Why Tron? Japanese government project, Japanese company, free. (VMMs and Hypervisors are beyond the scope of PM... Go look it up.... It made perfect sense...)

    2. All hard real time machine control was in its own very Righteous partition (duh.)

    3. VBA and the like ran in other containers and allowed coordination with robots, gantrys, other machines, and so forth.

    When I bought my DMG DMU, one option was "windows" - which in that case meant a win2000 system totally parallel to the real controller - basically a costly PC built into the cabinet with some kind of interconnect.

    Neither of things represent running the machine tool hardware in software written in VBA, or pascal, or as windows/mac/linux/beos/os-mvs application. They're just layers and interfaces seen by humans.

    Oh, my Siemans 810 boots up on Caldera DOS.... So much for being PC "independent"....

    VBA and its variants are used as glue to tie lots of things together, and seem easier to structure and manage than things like SQL queries (code injected into the user input stream anyone?)

    So remember, in this industry "based" means "similar enough to that your staff will understand how to begin...."

    Also, VBA bears no real relationship to "basic", it's actually got pretty modern objects/classes, looping controls, procedures, and so forth. A lot of its complexity comes from being embedded in powerful "system apps" like Word or Excel. Claiming "you should just write an app instead of using excel" exhibits a profound misunderstanding of the economics of such efforts.

    So one presumes Boeing is looking for people who can use VBA scripting to bolt things together....

  22. Likes CarbideBob, sfriedberg liked this post
  23. #19
    Join Date
    Jan 2007
    Location
    Flushing/Flint, Michigan
    Posts
    6,414
    Post Thanks / Like
    Likes (Given)
    267
    Likes (Received)
    5207

    Default

    Quote Originally Posted by bryan_machine View Post
    .......

    Also, VBA bears no real relationship to "basic", it's actually got pretty modern objects/classes, looping controls, procedures, and so forth. A lot of its complexity comes from being embedded in powerful "system apps" like Word or Excel. Claiming "you should just write an app instead of using excel" exhibits a profound misunderstanding of the economics of such efforts.

    So one presumes Boeing is looking for people who can use VBA scripting to bolt things together....
    To a cnc programmer what the heck is an object, class or even a collection?
    VBA gives you a easy interface to the entire win API. Allowing you to take control of all the messages passed to another apps controls or more correctly windows.
    A simple backdoor to make other programs do what you want.

    Maybe not glue things together but understanding and able to modify when needed the glue already there.
    A cnc programmer should not be a systems integrator.
    Different skill sets as a cnc programmer will not have learned to worry about all the things that can go off track.
    Perhaps just VBA in the CAD/CAM system which automates some tasks. Adding a robot or even a auto-gauge should be engineering's job in such a shop.

    Nice thing about VBA is that it is easy to learn the standard stuff as it still is Kurtz's BASIC if you do not get fancy.
    How far apart would a job requirement that asked for some VB knowledge be from the ability to work in C++?
    Bob

  24. Likes bryan_machine liked this post
  25. #20
    Join Date
    Sep 2013
    Country
    UNITED STATES
    State/Province
    Minnesota
    Posts
    167
    Post Thanks / Like
    Likes (Given)
    24
    Likes (Received)
    29

    Default

    Quote Originally Posted by charlie gary View Post
    While looking for a job, I ran across a NC Programmer position on the Boeing web site that requires working knowledge of Visual Basic. I'm curious to know how it is used to program machines.
    Did their web site say it for NX, Creo or Catia by chance? Higher tier areospace and military companies commonly uses those top systems and not nearly as much mid level software.

    I use NX and it has the ability to record journals which are VB. They perform like macros but are much better because they are code based, not based on screen clicks like macros. NX's journaling is a super cool, easy and powerful way to automate many cad, cam and cae tasks. If a user wants something super fancy then some manual VB editing/writing comes in handy but otherwise in NX the VB code is automatically created for you.


Tags for this Thread

Bookmarks

Posting Permissions

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