![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| CamSoft Products Discuss Camsoft PC based CNC controller products here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
Okay, I've had progress. Nobody got squshed in the runaways and the tool it threw at me missed (bad programming on that knuckleball). I had a Bandit. It could loop subs etc. I have an Anilam which does as well. I have to either, run a subroutine, or loop back in the program a counted number of times. I don't see in the literature how this works in Camsoft. Any ideas? Hey ! Everyone ! Thanks for the help. I can move the machine now. Camsoft sent me 6.4 because it has better logfile info but I have scarily quiet people around me and must go for now with what I've got. nelZ
__________________ i build the braces that keep american teeth straight......tick tick tick |
|
#2
| ||||
| ||||
| Are you running CNCLite, or what package? Look in the manual for help on the JUMP command and GOSUB command. Those respective commands are typically used in an M97 and M98 code respectively, and the call is made in Fanuc fashion: M97 N_ _ _ R_ _ _ where N is the line number for the start of the sub and R is the repeats. However, in Camsoft, those letters could possibly be altered to other alphabetic characters, depending on what you want. M99 ends the sub and returns to the main program. Check the RETURN command for help on this.
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| ||||
| ||||
| There is no GOSUB in the manual for Lite and Plus. On page 5-27 it has JUMP listed. It does not seem to work in the following. N1 G0X1Y1Z-1 N2 X0Y0Z0 N3 JUMP N1 I'm in MDI when I try. It just does N1, N2 then stops without changing to the "RED Light". The book says M98 only comes with the "plus" package. nelZ
__________________ i build the braces that keep american teeth straight......tick tick tick |
|
#4
| ||||
| ||||
| You cannot use the Camsoft Logic commands directly in the gcode window. They would have to be incorporated into the particular Mcode or Gcode. I don't recall if it was possible to add some code to the mcodes in CNCLite. You could always try it and see, I guess. Take the precaution of not creating a never ending logic loop. You should not reference a line number that occurs before the sub call itself. The sub line number should be unique, and the code for the sub should be placed after the M30 in your program. Main program code, blah, blah; M97 N1000 R1; some more gcode in main program; M30; N1000 (place code for sub after this); M99 (end sub, return to main program); Edit: note: you'll have to come up with the correct characters to possibly replace N and R if your version uses something different.
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| ||||
| ||||
| JUMP This command enables the user to jump or switch the execution of the G-code program to a specified G-code line that contains a match for the parameter after the JUMP command. The parameter may be a line number, an axis position, etc of any identical match that can be found in a G-code line. etc. You're most likely correct but the above highlights the confusing nature of the manual layouts. Thanks, nelZ
__________________ i build the braces that keep american teeth straight......tick tick tick |
| Sponsored Links |
|
#6
| ||||
| ||||
| I have a very old CNC Lite manual, and it does indicate that you must have a "Bonus Pac" installed to use M98. The question is called: "How do we call Subroutines". The code format is laid out for you in the answer, so I would think you must stick with their variable names "P" which references a subroutine that starts with "O" (the letter not the number) and that repeats would be: "L" and not "R". I believe that the way they have written it, the sub program call is actually a subroutine call, as it must still follow the main program M30 as I pointed out above. In a 'real' cnc, a sub program exists elsewhere in memory, but in Camsoft, it would have to be retrieved by calling it with the correct windows path.
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#7
| ||||
| ||||
| You found,IMHO, the greatest weakness in Camsoft. It doesn't do parametric programming. I wrote a number of special M codes as a work around for looping in Gcode. Here's a clip, the message statements explain how to set up your Gcode to loop. MESSAGE MESSAGE To use M93 put statement MESSAGE {LOOPM93=5} <on its own line> MESSAGE N100 <space after this and on its own line> MESSAGE <lines of code> MESSAGE M93 N100 MESSAGE the 5 can be any number MESSAGE the 100 can be any number MESSAGE \93=1 LOADING \55:IF\55=0THENEXIT {LOOPM93=LOOPM93-1} IF{LOOPM93}>0THENJUMP Nn -----M93 MESSAGE MESSAGE To use M94 put statement MESSAGE {LOOPM94=5} <on its own line> MESSAGE N200 <space after this and on its own line> MESSAGE <lines of code> MESSAGE M94 N200 MESSAGE the 5 can be any number MESSAGE the 200 can be any number MESSAGE \93=1 LOADING \55:IF\55=0THENEXIT {LOOPM94=LOOPM94-1} IF{LOOPM94}>0THENJUMP Nn -----M94 MESSAGE MESSAGE To use M95 put statement MESSAGE {LOOPM95=5} <on its own line> MESSAGE N300 <space after this and on its own line> MESSAGE <lines of code> MESSAGE M95 N300 MESSAGE the 5 can be any number MESSAGE the 300 can be any number MESSAGE \93=1 LOADING \55:IF\55=0THENEXIT {LOOPM95=LOOPM95-1} IF{LOOPM95}>0THENJUMP Nn -----M95 MESSAGE MESSAGE To use M96 put statement MESSAGE {LOOPM96=5} <on its own line> MESSAGE N400 <space after this and on its own line> MESSAGE <lines of code> MESSAGE M96 N100 MESSAGE the 5 can be any number MESSAGE the 400 can be any number MESSAGE \93=1 LOADING \55:IF\55=0THENEXIT {LOOPM96=LOOPM96-1} IF{LOOPM96}>0THENJUMP Nn -----M96 JUMP Nn 'to use write M98 N100 to goto N100, ENDLESS LOOP!! -----M97 |
|
#8
| |||
| |||
| Karl, that was a clever use of IF THEN JUMP to make multiple jumping loops in multiple M codes And there's even more methods to do parametric programming and looping, depending if someone has the Lite,Plus or Professional versions. First check the CamSoft Corporation Feature Comparison Chart for your version under the titles of: Parametric logic language for conditional routines: User prompting IF THEN statements to direct program flow & Advanced Math Parametric splines, NURBS & 3D offsets a 3D splined profile M98 and subroutine calls and return In the manual under the title: Example of macro variables used in G code program Notice the parameters at the top of the G code file example Page 8-59 for CNC Professional Page 8-25 for CNC Lite/Plus Under the Logic Command section see: REWIND GOTO JUMP IF THEN ISTHERE MIDPROGRAM GOSUB / RETURN which are the logic equivalents to: M98 L# P# L#=number of loops P#=program number or line number The logic commands can be called from G or M codes to customize the system to taste. Tech Support CamSoft Corp. support@camsoftcorp.com PH 951-674-8100 Fax 951-674-3110 www.cnccontrols.com
__________________ (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#10
| ||||
| ||||
| Karl, In each of your M codes you set /93=1. What is this variable? Don't all those M codes do the same thing? Camsoft, is there a variable list somewhere in my literature? Thanks to one and all. nelZ
__________________ i build the braces that keep american teeth straight......tick tick tick |
| Sponsored Links |
|
#11
| |||
| |||
| nelZ, Yes, there are 2 buttons on the face of the main SETUP screen called Variable Descriptions and Variable Search The descriptions are user defined. Tech Support CamSoft Corp. support@camsoftcorp.com PH 951-674-8100 Fax 951-674-3110 www.cnccontrols.com
__________________ (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#12
| ||||
| ||||
| Thanks Camsoft. It detects when I use a new variable. Karl, the LOADING command saves the program state to the variable \55 my book describes only values of 1,2,3,4,5 and 6 your routine EXITs when it is 0 Camsoft, is a 0 to mean the program is being loaded?
__________________ i build the braces that keep american teeth straight......tick tick tick |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help!- Fanuc O-T looping cycle | Billet Sean | General Metalwork Discussion | 5 | 04-28-2008 02:11 PM |
| Program Looping | Bohemund | CamSoft Products | 7 | 05-26-2007 11:08 AM |
| Sub Looping | murphyspost | Daewoo/Doosan | 8 | 12-27-2006 10:28 AM |
| E-Stop Looping Errors in CamSoft | DA Dave | CamSoft Products | 1 | 05-17-2006 12:05 PM |
| Cutting at multiple depths.. looping ?? | esmiller | Mach Software (ArtSoft software) | 9 | 01-31-2006 05:48 AM |