UCCNC Macro sharing - Page 3

Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 66

Thread: UCCNC Macro sharing

  1. #41
    Member
    Join Date
    Apr 2014
    Posts
    215
    Downloads
    27
    Uploads
    0

    Default Re: UCCNC Macro sharing

    audiokiller,

    I believe there are two methods available... one is available now (using variables or vars#) and the other which "should" be in the next release can have a popup to ask the user for input, either as a string (text) or a double (number)

    The first method, if you have a look at pdf page 51 of the current manual (parametric programming) it explains variables and using vars#.
    http://www.cncdrive.com/UCCNC/UCCNC_usersmanual.pdf

    The way that I prefer is the message box popup (as I don't have to remember to store the vars in advance of me running the macro code.....)
    The following is extracted out of the current development version of uccnc "macro_capability_detailed.htm file within the uccnc documentation folder.

    Function: string TextQuestion(string Questiontext)
    Description: This function shows a Question form waiting for a string as the answer. The text of the question shown on the Form is the parameter.
    Example: string val = exec.TextQuestion("Stop code execution?");

    Function: double Question(string Questiontext)
    Description: This function shows a Question form waiting for a double value as the answer. The text of the question shown on the Form is the parameter.
    Example: double val = exec.Question("What X position to move?");

    If you are running the vars# method, you could put an if statement in the macro to check the current vars# saved is set or have a simple dialog box popup with a yes no question to ask if you've set the vars already (if you have a look at post # 25 in this thread you can see some code I posted which uses the yes/ no messagebox query and you can customise it as required).

    Rob

    Rob



  2. #42
    Member
    Join Date
    Sep 2005
    Location
    Indonesia
    Posts
    1191
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Just curious, can we run uccnc software with any hardware or only run with uccnc hardware product. So that we can replace mach3 with this uccnc software on the same hardware. Thanks.



  3. #43
    Member
    Join Date
    Apr 2014
    Posts
    215
    Downloads
    27
    Uploads
    0

    Default

    Quote Originally Posted by asuratman View Post
    Just curious, can we run uccnc software with any hardware or only run with uccnc hardware product. So that we can replace mach3 with this uccnc software on the same hardware. Thanks.
    You must buy a uc motion controller (uc100 (usb), 300 (usb or Ethernet) or 400 (Ethernet)).... uc300eth is not released yet.

    Uccnc will not work with parallel ports or any other motion controllers.



  4. #44
    Member
    Join Date
    Sep 2005
    Location
    Indonesia
    Posts
    1191
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Thanks for reply. How about post processor, are they available for many software?



  5. #45
    Member
    Join Date
    Apr 2014
    Posts
    215
    Downloads
    27
    Uploads
    0

    Default

    Quote Originally Posted by asuratman View Post
    Thanks for reply. How about post processor, are they available for many software?
    For the most part, I'd say you could use the mach3 post processor... it depends there are a few extra m codes for plasma.

    What software do you use?

    Rob



  6. #46
    Member
    Join Date
    Sep 2005
    Location
    Indonesia
    Posts
    1191
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    What software do you use?
    I want to use fusion360.



  7. #47
    Registered
    Join Date
    Jul 2015
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Quote Originally Posted by robertspark View Post
    audiokiller,

    I believe there are two methods available... one is available now (using variables or vars#) and the other which "should" be in the next release can have a popup to ask the user for input, either as a string (text) or a double (number)

    The first method, if you have a look at pdf page 51 of the current manual (parametric programming) it explains variables and using vars#.
    http://www.cncdrive.com/UCCNC/UCCNC_usersmanual.pdf

    The way that I prefer is the message box popup (as I don't have to remember to store the vars in advance of me running the macro code.....)
    The following is extracted out of the current development version of uccnc "macro_capability_detailed.htm file within the uccnc documentation folder.

    Function: string TextQuestion(string Questiontext)
    Description: This function shows a Question form waiting for a string as the answer. The text of the question shown on the Form is the parameter.
    Example: string val = exec.TextQuestion("Stop code execution?");

    Function: double Question(string Questiontext)
    Description: This function shows a Question form waiting for a double value as the answer. The text of the question shown on the Form is the parameter.
    Example: double val = exec.Question("What X position to move?");

    If you are running the vars# method, you could put an if statement in the macro to check the current vars# saved is set or have a simple dialog box popup with a yes no question to ask if you've set the vars already (if you have a look at post # 25 in this thread you can see some code I posted which uses the yes/ no messagebox query and you can customise it as required).

    Rob

    Rob
    Thank you very much Rob, I will try this and report the result =)



  8. #48
    Member
    Join Date
    Apr 2014
    Posts
    215
    Downloads
    27
    Uploads
    0

    Default

    Quote Originally Posted by asuratman View Post
    I want to use fusion360.
    Sorry I've not used ad360 before, if it has a Mach post processor I would have thought it would be fine.

    Rob



  9. #49
    Registered
    Join Date
    Nov 2006
    Location
    United Kingdom
    Posts
    40
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    I've used Fusion a little and found the "cncrouterparts.cps" post worked fine for what I did.
    It is a modified Mach processor..

    Mark


  10. #50
    Member
    Join Date
    Sep 2005
    Location
    Indonesia
    Posts
    1191
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    I've used Fusion a little and found the "cncrouterparts.cps" post worked fine for what I did.
    It is a modified Mach processor..
    Thanks for the info.



  11. #51
    Registered
    Join Date
    Jul 2015
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    In the latest version of UCCNC 1.2022
    This command not longer works... =(

    Why they have to take out this command???



    Quote Originally Posted by vmax549 View Post
    This will write a string to a file 1 line at a time. IF there is NO such file it creates it and IF there is a file it appends to it.

    // Write one string to a text file.
    string text = "X" +AS3.Getfield(226) + " , Y" + AS3.Getfield(227) + " , Z" + AS3.Getfield(228);
    System.IO.File.AppendAllText(@"C:\uccnc\Probe1.txt ", text+ Environment.NewLine);

    THIS is what the file looks like after 3 probes and writes

    X0.2000 , Y1.9500 , Z-0.6700
    X0.8100 , Y2.7550 , Z-0.1950
    X1.7450 , Y2.4950 , Z-1.2800

    Hope that helps , (;-) TP




  12. #52
    Member vmax549's Avatar
    Join Date
    Oct 2005
    Location
    Lady Lake
    Posts
    1145
    Downloads
    3
    Uploads
    0

    Default Re: UCCNC Macro sharing

    THose are all UCCNC and C# function calls and they are still there. BUT there is a new function that will auto record the probe trip values #5061-5066.

    M40 turns it on
    M41 turns it off.

    You set it all up in the TOOLS /PROBE page.

    Please read the manual (;-) TP



  13. #53
    Member
    Join Date
    Jun 2015
    Location
    Sweden
    Posts
    943
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Quote Originally Posted by audiokiller View Post
    In the latest version of UCCNC 1.2022
    This command not longer works... =(

    Why they have to take out this command???

    // Write one string to a text file.
    string text = "X" +AS3.Getfield(226) + " , Y" + AS3.Getfield(227) + " , Z" + AS3.Getfield(228);
    System.IO.File.AppendAllText(@"C:\uccnc\Probe1.txt ", text+ Environment.NewLine);
    I just tested this code on the 1.2022 an it works.



  14. #54
    Registered
    Join Date
    Jul 2015
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Thank you for your answer vmax549, i will read the manual =)
    Im recofiguring my stepcraft profile to test this new settings, my profiles dont have this new screen, but the command dont work anymore, i have a macro that write the values to a file, the macro run but no values are written, or I have to turn it on the writing with the m40 first?

    Quote Originally Posted by vmax549 View Post
    THose are all UCCNC and C# function calls and they are still there. BUT there is a new function that will auto record the probe trip values #5061-5066.

    M40 turns it on
    M41 turns it off.

    You set it all up in the TOOLS /PROBE page.

    Please read the manual (;-) TP




  15. #55
    Member
    Join Date
    Jun 2015
    Location
    Sweden
    Posts
    943
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Yep, M40 turns it on after collect points with G31 and save the points to file with M41 code.



  16. #56
    Member
    Join Date
    Sep 2005
    Location
    Indonesia
    Posts
    1191
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    How do you guys learn to program macro? Are there any training materials.



  17. #57
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Macros are written in C#, so you need to learn C#.

    But if you've done any programming in Basic or VB, you can probably pick it up pretty quickly by looking at the included macros. There are lists of functions in the UCCNC\Documentation folder.

    Google helps me when I get stuck.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  18. #58
    Member
    Join Date
    Sep 2005
    Location
    Indonesia
    Posts
    1191
    Downloads
    0
    Uploads
    0

    Default Re: UCCNC Macro sharing

    installation folder of the UCCNC software /macro_capability_detail
    Do I need to learn all C language or just instruction on above folder ?



  19. #59
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: UCCNC Macro sharing

    That depends on what you want to do.
    The UCCNC docs only cover UCCNC functions, so you,ll need to know a little more.
    As I said, if you study the included macros, you'll learn a lot of what you need.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  20. #60
    Member
    Join Date
    Apr 2013
    Location
    Sweden
    Posts
    1899
    Downloads
    2
    Uploads
    0

    Default Re: UCCNC Macro sharing

    Quote Originally Posted by asuratman View Post
    How do you guys learn to program macro? Are there any training materials.
    Programming is a trade. Some people go to university, some learn it at home in their spare time to a level which satisfies them. Anyway, a good start is reading a book or two about programming in general to get a basic understanding. UCCNC macros are written in C#, which is basically C, which in turn is a programming language. So, if you know C it is easier, but if you know Basic, Cobol, Ada, Java or any other other programming language than you should not have a steep uphill. If you never programmed then it may not be very easy, but all depends on your own capacities.

    https://www.youtube.com/c/AdaptingCamera/videos
    https://adapting-camera.blogspot.com


Page 3 of 4 FirstFirst 1234 LastLast

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

UCCNC Macro sharing

UCCNC Macro sharing