CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > CamSoft Products


CamSoft Products Discuss Camsoft PC based CNC controller products here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-14-2008, 03:43 PM
nelZ's Avatar  
Join Date: Jun 2008
Location: US
Posts: 143
nelZ is on a distinguished road
LOOPING? with Camsoft??

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
Reply With Quote

  #2  
Old 10-14-2008, 05:03 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

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)
Reply With Quote

  #3   Ban this user!
Old 10-14-2008, 05:23 PM
nelZ's Avatar  
Join Date: Jun 2008
Location: US
Posts: 143
nelZ is on a distinguished road

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
Reply With Quote

  #4  
Old 10-14-2008, 05:28 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

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)
Reply With Quote

  #5   Ban this user!
Old 10-14-2008, 05:44 PM
nelZ's Avatar  
Join Date: Jun 2008
Location: US
Posts: 143
nelZ is on a distinguished road

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
Reply With Quote

Sponsored Links
  #6  
Old 10-14-2008, 06:04 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

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)
Reply With Quote

  #7   Ban this user!
Old 10-15-2008, 06:01 AM
Karl_T's Avatar  
Join Date: Mar 2004
Location: Dassel,MN,USA
Posts: 1,318
Karl_T is on a distinguished road

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
Reply With Quote

  #8   Ban this user!
Old 10-15-2008, 10:24 AM
 
Join Date: Apr 2003
Location: United States
Posts: 279
camsoft is on a distinguished road

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)
Reply With Quote

  #9   Ban this user!
Old 10-15-2008, 11:29 AM
nelZ's Avatar  
Join Date: Jun 2008
Location: US
Posts: 143
nelZ is on a distinguished road

Thanks Karl!

Your clip of code stops before M98 & M99 (sub call and return?). I don't know what M93 thru M97 are for.

nelZ
__________________
i build the braces that keep american teeth straight......tick tick tick
Reply With Quote

  #10   Ban this user!
Old 10-15-2008, 12:03 PM
nelZ's Avatar  
Join Date: Jun 2008
Location: US
Posts: 143
nelZ is on a distinguished road

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
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 10-15-2008, 12:10 PM
 
Join Date: Apr 2003
Location: United States
Posts: 279
camsoft is on a distinguished road

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)
Reply With Quote

  #12   Ban this user!
Old 10-15-2008, 12:38 PM
nelZ's Avatar  
Join Date: Jun 2008
Location: US
Posts: 143
nelZ is on a distinguished road

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
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 01:46 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361