Want to write a Complete Control Software: In C# Do I have to know C and C++???


Results 1 to 12 of 12

Thread: Want to write a Complete Control Software: In C# Do I have to know C and C++???

  1. #1

    Cool Want to write a Complete Control Software: In C# Do I have to know C and C++???

    Greetings,

    I Want to write a Complete CNC Control Software, for my company, and for my customers, in Visual Studio 2010 C#.
    Do I have to know C and C++??? Or plain VB coding?

    When reading some of the answers, it seems a mix... one language one place, another elsewhere... is all your code current for C#, or do I have to use other software for macros and so forth, like the tool change code I just saw in another thread.

    If I have to use several languages, that almost gets confusing? What structure or syntax to use one time, what the next??

    I really like the C# Visual Studio programming.

    I am planning the whole future of my developments, around one controller... which I believe will be the KFlop.

    The control seems to be the right pricing for what I wish to do. Also for my machines, and for my customers machines.
    The controls performance and features are well able to do what I want.

    Also you seem to be all over the tech. support side of this.

    Note: To avoid people telling me to use Mach 3, or any others like Kelly, DestCNC and so forth, like EMC. blah, blah, blah,... and why write your own... because I just don't like anything out there, and I believe I have in my head, what will be a great alternative, to all the above. Not only for me, but to sell to my customers.

    Thanks in advance for your help?

    Similar Threads:
    GOLDCNC5, BLUECNC4, GreenCNC3, RedCNC2L, SilverCNC2; CNC Software!
    www.truemachineautomation.com - ETL UL508A CSA CERTIFIED INDUSTRIAL CONTROL PANEL SHOP


  2. #2
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default

    Hi Jeffserv,

    There are a number of options to write code on the PC. Users like to use many different languages. Our underlying PC Libraries to perform Coordinated Motion, Trajectory Planning, GCode, etc... are written in MFC C++. But if you wish to write C# .NET code then the .NET interface makes that possible without caring or knowing what language the libraries are in.

    Besides the built in functionality KFLOP only supports adding User C programs. Programs written to run in KFLOP (not the PC) must be written in C. C works well for small, simple, low-level, real-time control tasks. You usually must make use of some C programs. But usually these can be minor changes to existing examples.

    It is usually easier to write and debug code for the PC. So it is usually preferable to write code that runs on the PC. But the PC is not real-time (it may sometimes freeze for a second or more). In some applications it may be ok to occasionally have a delay, but in other applications missing a deadline would be disastrous.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Banned
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    238
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    Trying to wake Jeff up.
    I am currently in the same boat as you. But maybe there is a way to develop in Visual C# some stand alone Console app. I have to look deeper into this.



  4. #4
    Member hanermo's Avatar
    Join Date
    Aug 2004
    Location
    barcelona
    Posts
    780
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    I suggest you first analyse you needs and resources.
    Writing a complete cnc control is impossible. Haas are still working on their, 25 years after starting, and spend a lot of money every year fixing issues.

    Writing a simple subset is maybe possible.
    Do you have any idea of the complexity of a cnc control ?

    Modals ? Front and rear toolposts ? Scaling ?
    Rotated control axis ?
    Tool offsets ? Co-ordinate systems ? IJ arcs ? Debugging small scalar values ? Trapping erros ?
    4th and 5th axis issues ?

    G-code standards ? Which will You use ?
    Canned cycles ?

    Back ends ? Trajectory planners ? Multiaxis geometry ?
    Front end ? Graphics displays ?

    I wrote a 3D CAD system when I was 18.
    Took 11.000 lines of bcpl code and 400 days of coding, after 3 years of study in stuff.

    Doing a control is considerably harder and a lot more work. Its also more finicky, and you MUST follow some standards.
    Unless you want to forget Gcode.

    IF you forget gcode, its then a non-supported, closed system, with support only from the original, small, non-resourced vendor with no track record and history.

    I could probably make a control.
    I would use a db for the middle end, and a dedicated front end team (interface, hid, graphics, display list), and back end (trajectory planner, mappings) team.
    Budget approx 3M, with a detailed proposal in 60 days listing the issues and proposed solutions.
    It would take me about 1.5 years, with a demo in 6 months, and 12 people working on it.

    I have done about 15-20 complex big systems, of similar scope, and have a 27 year track record with 100% success on technical solutions working in complex systems.

    I am just saying, you probably dont really have the problem mapped out in detail.

    It will be 90% less work to learn a control (siemens, gsk, mach3, linuccnc, whatever) and write a new front end shell on it. And less than 10% of the cost.



  5. #5
    Banned
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    238
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    hanermo, I'm not under minding the complexity of the project.
    I am fluent in assembly language, so the controller part is no prob. As for the PC side, that's where I come short. But I have access to software engineers if needed. I wasn't thinking of doing a control for the masses, just for myself. Just a project I could work on when it's cold outside.

    You make it sound like it's impossible. I beg to differ. Many have made their own and although they are not selling it and making tons of money, they are happy with it and enjoy having created something completely different and unique. G-Code is obviously a must, as no need to re-invent the wheel.
    Ok, well thanks for your opinion and have a good day.



  6. #6
    Member
    Join Date
    May 2005
    Location
    canada
    Posts
    1662
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    jeffserv's business is posted in his signature,
    He's not trying to compete with Haas in the machining center market..... or at least I wouldn't assume that's his goal.

    Anyone who says "It only goes together one way" has no imagination.


  7. #7
    Member
    Join Date
    Mar 2004
    Location
    Wisconsin
    Posts
    413
    Downloads
    31
    Uploads
    1

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    IF I was a programmer, the last thing I would do is write something for Windows.... not at this date... not after watching the flop of Windows 8. They already have publicly defined it as another Windows ME / Vista. Every time they change something, and that's about what they are good at (so people spend more).... you have to make changes to keep up. Its a planned money game. You would be far ahead to build a Linux FE in my opinion... it too may change, but at least one can run an old Linux box with a bit more security than an old windows box. Keep in mind that many of us have to keep our windows based controls connected to a LAN, which is often connected to our modems.

    Have you installed windows lately ? Takes a few HOURS to get it fully up to date..... Linux Mint or Ubuntu ?? About 15 minutes from an empty hard drive and your ready to go.

    Windows doesn't excite me much anymore.... Just saying......

    Chris L


  8. #8
    Member Tkamsker's Avatar
    Join Date
    Oct 2010
    Location
    Austria
    Posts
    1189
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    I am an developer Since 3cdecades with machining Background ...
    I work with linuxcnc on source code Level ..
    So my question what do you Try to achieve ? And why do you want to do it ?
    I can Not See any benefit in it ..
    But i will watch that Tread with interest ...


    Gesendet von meinem SM-N9005 mit Tapatalk



  9. #9
    Member hanermo's Avatar
    Join Date
    Aug 2004
    Location
    barcelona
    Posts
    780
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    Jeffserv want to write a *machine controller* that reads Gcode.
    And mentions assembler in the next post.

    There seems to be no notion of the complexities in machine control, gcode, or user interfaces.
    Or the actual mechanics of how to move machines.

    I just mentioned some things that are obvious to anyone who has actually done something remotely similar in scope.

    A machine controller with Gcode is NOT linear moves driven by small moves in an uncontrolled manner.
    Why do you think mach4 has taken at least 4 man years so far, working from a working example (mach3) with source code ?

    It is very easy to move some steppers, slowly, in a non-controlled manner, by outputting some pulses.
    Actually controlling a machine with standard gcode is completely different.

    Just doing a gcode interpreter, is a complex project.
    Modals (at least 8, in mach3), tool offsets, and work coordinates are the first step.

    Then come the approx 10 critical features, I listed in my first post, you must work with, and decisions on how to handle them.

    Then comes deciding are you going to work with iso std, fanuc, haas, mach3, linuxcnc or something else.
    Do you support conditionals ? (If .. else). ? Why not ?
    Multi spindles ? How ?
    M-codes ? How ? How many ? What standards - Haas, Fanuc, Machn, linuxcnc, something else ?

    Its like the usb motion controllers. Almost all are crap.
    NONE work well with full functionality.

    Gcode is not hard, but there are lots of subleties.



  10. #10
    Member
    Join Date
    Mar 2004
    Location
    Wisconsin
    Posts
    413
    Downloads
    31
    Uploads
    1

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    >>Its like the usb motion controllers. Almost all are crap. >>NONE work well with full functionality.

    Hanermo, Can you expand on this ? I have taken interest in those usb "newcomers" over the last few years, mostly because of their price point. It appears that those who have surfaced in the last 3 or so years have shot for the retail $500 mark,... software, complete with pulse generating (primarily) hardware.

    What USB controls have you had experience with ? Planet, Eding, Kflop, Flashcut ??

    While I sure would have liked to purchase and play with some of these $500 USB options just for the thrill, when a new machine needs a control, I always came full circle back to Flashcut because I know for a fact it delivers FULLY on its claims. That HAS made it well worth the roughly double the money just knowing what your going to get, and not have to rely on a few zillion different operational experiences you have to study up on in half a dozen forums.

    I dont feel that there is an inherent "problem" with just the fact that the communication is via USB.... I dont think your necessarily saying that USB is the problem but more or less the actual software DEVELOPMENT is ? You right perhaps in that case in light of everything you relate. A "CNC Control" is a tall and complicated order. Frankly, Flashcut has met that tall order thru out the serial port years and also the USB era to date.

    Regards USB as the METHOD of transmission, it is obviously clear that the physical connectivity between devices of all sorts is becoming more and more limited with advanced wireless tech. Yet, wireless tech wouldn't seem to be my choice to actual RUN a machine with. Then, there is too, the wired Ethernet methods, but physical connections for that too is waning because of wireless tech.

    Whats left other than USB as the best option for anyone to develop around currently ? How long can one imagine that USB communication methods will last ? One certainly has no assurances of any traditional physical connections lasting anymore... they change this stuff faster than one can keep up... ISA, PCI, etc.

    Perhaps you can expand when you have time as it seems you have some helpful background.

    Chris L


  11. #11
    Banned
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    238
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    Quote Originally Posted by datac View Post
    >>Its like the usb motion controllers. Almost all are crap. >>NONE work well with full functionality.

    Hanermo, Can you expand on this ? I have taken interest in those usb "newcomers" over the last few years, mostly because of their price point. It appears that those who have surfaced in the last 3 or so years have shot for the retail $500 mark,... software, complete with pulse generating (primarily) hardware.

    What USB controls have you had experience with ? Planet, Eding, Kflop, Flashcut ??

    While I sure would have liked to purchase and play with some of these $500 USB options just for the thrill, when a new machine needs a control, I always came full circle back to Flashcut because I know for a fact it delivers FULLY on its claims. That HAS made it well worth the roughly double the money just knowing what your going to get, and not have to rely on a few zillion different operational experiences you have to study up on in half a dozen forums.

    I dont feel that there is an inherent "problem" with just the fact that the communication is via USB.... I dont think your necessarily saying that USB is the problem but more or less the actual software DEVELOPMENT is ? You right perhaps in that case in light of everything you relate. A "CNC Control" is a tall and complicated order. Frankly, Flashcut has met that tall order thru out the serial port years and also the USB era to date.

    Regards USB as the METHOD of transmission, it is obviously clear that the physical connectivity between devices of all sorts is becoming more and more limited with advanced wireless tech. Yet, wireless tech wouldn't seem to be my choice to actual RUN a machine with. Then, there is too, the wired Ethernet methods, but physical connections for that too is waning because of wireless tech.

    Whats left other than USB as the best option for anyone to develop around currently ? How long can one imagine that USB communication methods will last ? One certainly has no assurances of any traditional physical connections lasting anymore... they change this stuff faster than one can keep up... ISA, PCI, etc.

    Perhaps you can expand when you have time as it seems you have some helpful background.
    I think he had bad experiences with some cheap boards. Flashcut is definitely a safe way to go.
    Once all this USB Serial and Ethernet craze will be over, the only remaining option will be hard wiring, like it was a few years ago. Yes the old screw terminal and wire will probably make a comeback. Or then again, we will have to buy ready made solutions with big dollar signs. Or maybe the home DIY guys will again outsmart everyone by not listening to the rhetoric and forge ahead.

    hanermo should be encouraging people who think they can. Not discourage them to the point of no return. Without hope, what is the point of anything?
    Even those in the know, (engineers), may laugh at the thought even amongst themselves, , but they never flat out say it's impossible. If they do, they need to quit engineering and go back to school and learn another profession.

    Sorry for waking up this old thread, just thought I'd see if he got anywhere with it.



  12. #12
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1041
    Downloads
    0
    Uploads
    0

    Default Re: Want to write a Complete Control Software: In C# Do I have to know C and C++???

    I don't know about other usb motion controllers but I have used k-flop. I have also used Haas , hurco and Fanuc. I know that kmotion doesn't do everything that some of the other controllers do. I am curious to know what functionality people see kmotion as lacking. I know that you can use k-flop and kanalog to retrofit any of the above controls using the same motors ,drives, etc.. that came on the machines originally. What other controllers am I missing that are more versatile? Functionality and versatility are somewhat a matter of perspective. The high dollar controls are integrated solutions and it costs tons of money to add things after the design stage is over. Boards like k-flop are totally different from that outlook. They are open source so you can add just about any functionality you need without starting from scratch or moving to a single use platform. It's also just a fraction of the cost of the industrial platforms and will integrate with hardware that is already existing. It seems like for the market and price point they are in there is really not anything comparable.

    Ben



Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Want to write a Complete Control Software: In C#  Do I have to know C and C++???

Want to write a Complete Control Software: In C#  Do I have to know C and C++???