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 07-26-2005, 09:34 PM
 
Join Date: Nov 2004
Location: United States
Posts: 14
plateroomred is on a distinguished road
Basics

Murphy,
Would you please describe in chronological order what happens when a M08 or G01 code is activated. please include input, logic, variable (access and how to define or set variable) and output. Only one example would give me the idea of where to start. Include any process's or macros that are applicable. The information with cnc lite can be vague at times.
Application-----Bridgeport mill with 3 servos.
Any help would be greatly appriciated.
Thanks.
Plateroomred
Reply With Quote

  #2   Ban this user!
Old 07-27-2005, 12:26 PM
 
Join Date: Nov 2004
Location: USA
Age: 50
Posts: 446
murphy625 is on a distinguished road
I wish I could but I know nothing about G codes..

I do not use G codes in my program.. Everything my program does is hard-coded with my own code writing.

If you post the code, I might be able to give you some help but as I said, my machine is NOT a typical CNC machining center.

I only use CNC controls to operate my machine/process but it has nothing to do with actual machining.

If you post the code, I might be able (should be able) to give you an idea of what is going on with it.

I wish I could be more helpful..
Also, just so you know, you got lucky I saw your post because I do not log into this forum as often. Most, if not all, of my problems have been solved and my learning curve is pretty much flat at this point so I dont use the forum so much anymore. Knowing you are looking for help, I will check back shortly to see if I can assist you.

Murphy
Reply With Quote

  #3   Ban this user!
Old 07-27-2005, 12:56 PM
 
Join Date: Jul 2003
Location: Massachusetts
Posts: 33
Bob Pierre is on a distinguished road

This is one I could even answer.

I got this info right out of the manuals.

INPUTS/OUTPUTS is the # character.
You can read the ON/OFF state of any input or output with the # character. You can also set the state of any output to On or Off, but you cannot set an Input because they are read only. 0 means Off and 1 means On.
EXAMPLE: #1=1

VARIABLES are the \ character.
You can have up to 999 variables from \1 through \999 to store any set of numbers, characters or word/number combinations.
\123=.999

The controller does have the ability to store unlimited variable names. A legal variable name is a name that begins with any letter of the alphabet. To save a value to a variable in a G Code program, enclose the math and the variable name followed by an equal sign (=) inside curly braces {}. For example, to store 5.5 to the variable KEEPME: {KEEPME=5.5}

For example, to do math to an existing X axis coordinate in a G Code line where X needs to have .75 added to its value, write the G Code line like this:

N100 G01 X{5.5+.75} Y6.2 F30

For example, to add the value of a variable to an existing X axis coordinate in a G Code line, enter: N100 G01 X{5.5+KEEPME} Y6.2 F30

G01 and M08 does what ever you want it to do. In most CBK files for default machines G01 moves the axes in a linear motion using the GO command internally or for CNC Lite/Plus it just moves as a industry standard G01 would do.

You can look up each command in your M08 MCODE.FIL file to see what your is doing and modify it if you want.

Bob
Reply With Quote

  #4   Ban this user!
Old 07-29-2005, 08:23 PM
Karl_T's Avatar  
Join Date: Mar 2004
Location: Dassel,MN,USA
Posts: 1,318
Karl_T is on a distinguished road

I'll discuss how flood is set up on my knee mill, similar to yours. I'm sure yours is not set up this way (yet)

Here's the M08 and M09 code:


'coolant on
IF #18=1 THEN #33=1:LIGHT 9;ON
IF #18=0 THEN MESSAGE Flood switch is off
-----M8

'coolant off
#33=0
LIGHT 9;OFF
-----M9

There's also this lines in the inputio.fil:

IF #18=0 THEN #33=0:LIGHT 9;OFF 'Turn off flood

IF #19=0 THEN #33=0:LIGHT 9;OFF 'Turn off flood
IF #19=1 THEN #33=1:LIGHT 9;ON 'Turn on flood


The hardwiring is:

A three position (on1-off-on2) toggle switch is hooked up to inputs #18 and #19. The on position is connected to input#19 and the auto to #18. It is labelled "Flood ON-OFF-AUTO. #33 output powers the flood coolant pump(thru a relay).

The program:

The first line in M08 (IF #18=1 THEN #33=1:LIGHT 9;ON) checks to see if flood is in the auto position, then powers output #33, turning on the flood coolant pump. A light is also lit on the screen. If the positon switch is not in AUTO the coolant does not come on.
The second line(IF #18=0 THEN MESSAGE Flood switch is off) sends a message to the display if the coolant switch is not in the auto position.

Extra credit (inputio):

Lines in the inputio file run only when an input changes state.

IF #18=0 THEN #33=0:LIGHT 9;OFF 'Turn off flood
runs if move the flood switch to off from AUTO - it turns off the coolant pump and light on the screen

IF #19=0 THEN #33=0:LIGHT 9;OFF 'Turn off flood
runs if move the flood switch to off from ON- it turns off the coolant pump and light on the screen

IF #19=1 THEN #33=1:LIGHT 9;ON 'Turn on flood
runs if move the flood switch to on - it turns on the coolant pump and light on the screen


This is handy for the operator, he can turn the flood on and off with both a switch and the M08 and M09 code.

Karl
Reply With Quote

  #5   Ban this user!
Old 07-30-2005, 04:01 PM
 
Join Date: Nov 2004
Location: United States
Posts: 14
plateroomred is on a distinguished road
Very Helpfull

To all replies,
Thank you very much, I have already had success with some of the M codes. All of your suggestions helped for me to get a better understanding of some of the basics. But I still have a ways to go.
Once again Thanks,
Plateroomred
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 07-30-2005, 06:08 PM
 
Join Date: Nov 2004
Location: USA
Age: 50
Posts: 446
murphy625 is on a distinguished road

Post some more questions.. We (I) will be happy to do our best to move you along.

I owe this forum allot for the information I have got from it. I need to pay it back.. LOL..

Post away!!
Reply With Quote

  #7   Ban this user!
Old 08-04-2005, 04:50 PM
 
Join Date: Nov 2004
Location: United States
Posts: 14
plateroomred is on a distinguished road
Thanks for the offer Murph

Murphy625,
I am still having a hard time getting a grasp of this variable thing. I sure would appreciate your take on it, even if it doesnt directly apply to my 3 axis Bridgeport.
Thanks Again,
Plateroomred
Reply With Quote

  #8   Ban this user!
Old 08-04-2005, 05:09 PM
 
Join Date: Apr 2003
Location: United States
Posts: 279
camsoft is on a distinguished road

plateroomred,

Hopefully this Larry (we won't disclose your full name) but, if so your package is relatively new, although there has been a version update that we can give you, so you are more than welcome to call us or write down your questions to us here at CamSoft tech support. Don't worry that your questions are basic, we will show you how to find the answers or examples by electronically searching using the Search for Solutions button. You can search for answers using key words like a web-browser faster than you can log onto CNC Zone. Even if they are un-orthodox we can provide an example.


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

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

Ok.. I will try to make this sound as easy and as simple as it really is..

Variables are referred to by the \ mark. My camsoft package gives me 999 different variables I can use any way I like. I don't know why camsoft gives 999 as opposed to 10,000 of them or just 500 but that's the way it is.. You don't need to use all of them but if your program gets big, keep in mind you are limited to 999. (your program make provide more)

So, lets say my machine has a speed setting or something like that.. The program I wrote gives me 10 speed settings.. 1 = slow and 10=fastest.. Now that I have a format to tell the machine how fast to go, I need a way to store that variable.. The next step is to pick an unused variable.. In my case that would be between 1 and 999.
So, I like the number 50 so I am going to use the variable 50 as my speed setting.
In code, I would refer to this variable as \50 The backslash tells the software that you are referring to a variable number.. So lets say I want a slow speed.. I would set variable \50 to something low like 2. In my code it would look like this:
\50=2
Actually, my code also requires that I put a "!" in front of all lines of code. (I don't know why but it is required..) The proper format would actually be
!\50=2
I am not sure if your code requires the exclamation point or not.
That says make variable 50 equal the value of 2.. I could also test to see if the variable is set at a specific number by doing this:
!IF \50>2 THEN SAY HELLO WORLD
The line of code above says If variable 50 is greater than 2 then use the speech engine and make the computer say the words HELLO WORLD. (your speakers need to be turned up)
On that note, testing to see if code works using the "SAY" command is a great way of instantly checking to see if you did it right..
Now... even though this example uses variable 50 "\50" as my speed control, you could just as easy have picked any of the 999 different variable numbers that are available. (your camsoft package may have more or less)
I used the term speed control just for an example.. the variable 50 could be made to refer to any function of your controller.

One question.. How much programing experience do you have? Do you understand the basics of programming any software? how a computer runs code in an organized pre-determined way?

Here is another example(s) of what I just explained.

!\50=3 'this line sets the speed to 3
!IF \50<2 THEN SAY THE SPEED IS TO SLOW
!IF \50>5 THEN SAY THE SPEED IS TO FAST

The above code first sets the variable 50 to a value of 3 for testing purposes. The code then checks to see if variable \50 is less than 2 and if it is, the computer will say "The Speed Is To Slow". The next line after that checks to see if the value of variable 50 is greater than 5 and if it is, it makes the computer say "The Speed Is To Fast".

Is this making sense?

Here is another one.. We are going to mix things up a little and manipulate a variable "pragmatically". Don't try to make sense of speed control or anything like that.. this example will be completely hypothetical.

!\33=5
!\34=10
!\33+\34=\55

The above code sets the variable 33 to a value of 5. The next line sets the value of the variable 34 to a value of 10. The 3rd line does a little math by adding 2 variables together, then placing the answer into variable 55 which would then equal 15 so variable 55 would end up being 15.

Is this making sense?

Hope this helps..
Murphy
Reply With Quote

  #10  
Old 08-05-2005, 11:13 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

Plate,
I can tell you're starting from scratch, but that's okay, we all have to start from somewhere

Your computer executes logic statements, which can take many forms, but one form is a simple algebraic expression. However, if you write a logic statement with fixed values (called constants) in it, there is only one possible outcome for that expression, because everything has a fixed value.

So a variable is just like what you learned in school:
A + B = C

This expression has millions of possible uses, because each letter A and B can be assigned any value at any time.

Camsoft reserves small letter names for one type of variable, and for other types, it uses what Murphy has described, a \ followed by a number. It is simply a naming convention that Camsoft dreamt up, nothing mysterious once you understand it.

Programming is fun to learn once you get a few of the basic rules under your belt. It takes some cleverness to reduce what you want to control, to the rigid rules of logic that your computer can execute correctly under all circumstances.
__________________
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

Sponsored Links
  #11   Ban this user!
Old 08-06-2005, 08:19 PM
 
Join Date: Nov 2004
Location: United States
Posts: 14
plateroomred is on a distinguished road
Thanks Murph

Thanks for your time Murph, you too Hu. I will try some experimenting when I get back from vacation, I can hardly wait, I get to visit the inlaws in Cleveland.
Thanks again,
Plateroom(Larry)red
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:33 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