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 11-10-2005, 05:13 AM
Karl_T's Avatar  
Join Date: Mar 2004
Location: Dassel,MN,USA
Posts: 1,318
Karl_T is on a distinguished road
Favorite Camsoft trick

This is an advanced trick that works for CNC Pro. I spend nearly all my time editing logic after the initial setup work on a new machine. I found going through CNCSetup to edit the logic files cumbersome at best.

First, a little explanation of how Camsoft Pro writes your setup files. CNCSetup saves an ASCII file as a *.cbk when you do a file save. It writes a whole bunch of ASCII *.fil files when you do a file restore. When CNC.exe loads it reads these files, not the *.cbk.

The files I found of most interest are:
Mcode.fil - your Mcodes
Gcode.fil - your Gcodes
Macro.fil - your macros
inputio.fil - your interrupts for input changes
startup.fil - initial startup logic

Because these files are ASCII, you can edit these files directly with any text editor. I just use notepad. I made my CNC machine control window slightly less than full screen and put shortcut links to each of these files visible in the unused area.

With the control still running, I can bring up any logic file of interest to examine the logic. An edit can then be made. You can just click "file save" in your editor, exit CNC.exe and reload CNC.exe to try the new logic.

When I have the new logic right, I load CNCSetup and do a save to write a new *.cbk. In my case CBKs are saved with a date and version in the name e.g.. Mazak 11 10 05 a.cbk. I also put a HUGE number of comments with date right in my logic. Really saves time when you want to change something a year later. Or, in my case, the next week.

Of course, if you screw up some file structure, you can REALLY hose things up. So, be careful and make sure you understand everything before trying this yourself.

Karl
Reply With Quote

  #2   Ban this user!
Old 11-10-2005, 09:05 AM
 
Join Date: Apr 2005
Location: usa
Posts: 5
Billyboy is on a distinguished road

Hey Karl,

Thats a good idea. This is the kind of stuff I read CNC Zone for.

billy
Reply With Quote

  #3  
Old 11-10-2005, 09:45 AM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

Speed up your Galil card. This is described in the Galil manual under the TM command.

The default servo update rate is 1000 microseconds, but even with standard firmware, this can be reduced to as little as 375 microseconds on the DMC1842, which is what I opted for, since there is no penalty. The cards can run even faster, but then you lose some programming options with it.

The reasons to do this? Better response time of the servos and of the onboard I/O.

This is a quite simple adjustment to program into the Galil card, but it makes for a lot of changes in your various settings in your Camsoft setup. The servos have to be retuned since the PID is way out of wack by doing this, and your motor speed, acc/dec settings have to be multiplied by .375 (or whatever unit you have opted for), and the feedrate variable has to be set in startup.fil as
\73=37.5
Again, the exact value of this factor would be contingent upon the update rate you have decided to use. You did leave \73 attached to the feedrate variable, right?

It is a good idea to do a final check of your system, to make sure that a programmed move that should take exactly one minute to execute, actually takes exactly one minute, no more, no less. This is very critical in setup of a lathe, since an improperly proportioned feedrate variable will result in thread cutting that is off pitch.

In my system, I actually found that I had to adjust the feedrate variable from 37.5 down to 33.5 to get it perfect.

Rapidspeeds are affected by this update rate, however these values are controlled directly by encoder counts, so by reducing your Camsoft Rapidspeeds by the .375 factor, they will be equivalent to what they were before you changed the speed of the card.

Also, some care is required to control the feedrate variable in your InputIO.fil, if you have manual feedrate override buttons. Here is the relevant example from my file:

IF#17=1THEN\273={\273+.1} 'feedrate increase pushbutton located on right side of feedhold button
IF#19=1THEN\273={\273-.1} 'feedrate decrease pushbutton located on left side of feedhold button
IF\273<0THEN\273=0 'minimum feedrate override is zero, or equivalent to feedhold
IF\273>2THEN\273=2 'maximum feedrate override is 200%
\73={33.5*\273} : DISPLAY4 {\273*f} : DISPLAY2 {\273*100} 'when feedrate variable \73=33.5, actual commanded feedrate is at 100% by external clock.
EXIT
__________________
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)

Last edited by HuFlungDung; 11-10-2005 at 10:48 AM. Reason: damn smilies ;)
Reply With Quote

  #4   Ban this user!
Old 11-10-2005, 10:24 AM
 
Join Date: Jul 2003
Location: Massachusetts
Posts: 33
Bob Pierre is on a distinguished road

Good idea Karl. I will try this later today and Billy Boy is right. I would rather read useful ideas like Karl's than read those negative comments from the same people.

HuFlungDung this is a good idea too. This would be great if I could figure out what you just said. I will try this over the week end and post my notes.

Bob
Reply With Quote

  #5   Ban this user!
Old 11-10-2005, 10:27 AM
 
Join Date: Apr 2003
Location: United States
Posts: 279
camsoft is on a distinguished road

Both of you gentleman are very clever. We want to compliment you with your knowledge and both of these very good suggestions.

Bobs and Billys observation is worth mentioning also because we have been noting the same patterns here. Ideas such as Karls and Huflungdung are what we believe CNC Zone readers want too.

We thought we should add the fact that when you employ Karls idea that if you do make any edits that you must exit the controller and re-start it so that the changes to the logic can be compiled and take affect.

Tech Support
CamSoft Corp.
(951) 674-8100
support@camsoftcorp.com
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

Sponsored Links
  #6   Ban this user!
Old 11-10-2005, 11:04 AM
 
Join Date: Mar 2004
Location: United States
Posts: 36
intrusion is on a distinguished road
Editing the .FIL files

If you edit the .FIL files directly with NOTEPAD make sure to turn word wrap OFF. If word wrap is on by accident then you can alter longer lines of code and not know it until you run the machine and get an error.

Example:
' This is one long line of code and they can be much longer.
' This needs to be on one continuous line not two lines to run.
IF#16=1THENIF#17=1THENIF#19=1THENIF\401=1THENRAPIDSPEED 1;5000

Example:
' This is the same example but with word wrap turned on and the notepad
' window shortened becasue of screen space or whatever reason, maybe
' the guy likes short windows. But you can see the line is now on two lines
' of code and caused an invalid statement.
IF#16=1THENIF#17=1THENIF#19=1THENIF\401=1THENR
APIDSPEED 1;5000

' THENR at the end of the first line is not a valid statement and will produce an error
' APIDSPEED 1;5000 is not a valid command on a line by itself and will produce and error

I would suggest for begginers that they use the CamSoft editor because there is no option for word wrap so they will never run into this problem.
Reply With Quote

  #7   Ban this user!
Old 11-11-2005, 11:18 AM
 
Join Date: Nov 2004
Location: USA
Age: 50
Posts: 446
murphy625 is on a distinguished road

Sorry Intrusion, I have to disagree with you....

I have been using notepad.exe to directly edit the .fil files from almost the first day I bought the camsoft software. My entire application is finished and seems to work good, and to this day, I still have no clue how to use the camsoft visual interface to program what I want.

I just found it much MUCH easier to use notepad than the visual stuff... Maybe its just me and the way I learn because I have some history with VB programing in Microsoft Access. (I used to write entire applications)..

I never thought I would love notepad so much!!!! LOL

Murphy
Reply With Quote

  #8   Ban this user!
Old 11-11-2005, 12:17 PM
 
Join Date: Mar 2003
Location: USA
Posts: 332
keithorr is on a distinguished road

I don't use the visual editor either, too cute. Murphy have you tried the "Edit Other Motion Control Files" on the setup interface? All the files are there from a pulldown so I don't have to have multiple windows open when I update the different .fil files.
Reply With Quote

  #9   Ban this user!
Old 11-11-2005, 12:56 PM
 
Join Date: Mar 2004
Location: United States
Posts: 36
intrusion is on a distinguished road
Editing the .FIL files

Murphy,

Yes, you are correct about the Visual Process Editor, however what I am reffering too is as Keith said there is a System File Editor (text based) just like notepad that you can use when you click on the "Edit Other Motion Control Files" button in the SETUP program. This is what beginners should use so they do not accidently do I as described earlier.

I myself use a programmers editor, but this is not for beginners either or people who are not that comfortable with computers and programming. The System File Editor provided by CamSoft is the easiest error proof way to program in CamSoft.
Reply With Quote

  #10   Ban this user!
Old 11-11-2005, 01:14 PM
 
Join Date: Nov 2004
Location: USA
Age: 50
Posts: 446
murphy625 is on a distinguished road

Ok. Im not sitting infront of my camsoft computer, and its been a good 7 months since I have needed to mess with it so my memory may be a bit skewed..

I remember clicking on the "Edit Other Motion Control Files" and I did not like what I got. I barely even remember what it was but I do remember I went straight back to the notepad.exe.

To this day, I still like notepad better. Having a dozen windows open is not unusuall for me anyhow. My quick launch bar at the bottom of my computer is usually 2 or 3 rows anyhow Over the years, I have become very proficient at having 10 to 20 windows open at the same time. I guess we each have our quirks..

My post was not in any way meant to degrade the camsoft software.. I live and swear by it.. I'm just not crazy about the built-in programming interface they came up with. (and from what I am reading, you guys like notepad better also?)

One thing I do like VERY VERY much is the way we can label each IO and Variable number with a "tag" and a short note. Oh god that saves so much time and effort.. without that ability, I would be screwed!!!! I have an aux IO board installed and I also use around 300 different Variables..

Murphy
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-14-2005, 11:43 AM
 
Join Date: Jul 2003
Location: Massachusetts
Posts: 33
Bob Pierre is on a distinguished road

On last weeks Notepad subject I have found it easier for me to look at the whole CBK file all at once in Notepad. This way I can search for variables and make changes through out the whole file quickly.

Last week I said I would post after implementing HuFlungDung's suggestion on how to speed up the motion card. I have got the Camsoft system dialed in perfectly now so I decided to wait until a time when I wasn't so busy. This is a fantastic tip and I will try this later. Thanks for the great idea.

Bob
Reply With Quote

  #12   Ban this user!
Old 07-11-2006, 05:28 PM
 
Join Date: Jun 2005
Location: usa
Posts: 4
emti95 is on a distinguished road

I use a program called notespad.exe. It offers more flexibility than notepad, and opens new files in tabs. It works great.
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





All times are GMT -5. The time now is 01:36 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