![]() | |
| 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
| ||||
| ||||
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 |
|
#3
| ||||
| ||||
| 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 ;) |
|
#4
| |||
| |||
| 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 |
|
#5
| |||
| |||
| 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) |
| Sponsored Links |
|
#6
| |||
| |||
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. |
|
#7
| |||
| |||
| 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 |
|
#8
| |||
| |||
| 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. |
|
#9
| |||
| |||
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. |
|
#10
| |||
| |||
| 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 |
| Sponsored Links |
|
#11
| |||
| |||
| 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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |