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 > Mazak, Mitsubishi, Mazatrol


Mazak, Mitsubishi, Mazatrol Discuss Mazak, Mitsubishi and Mazatrol systems here!


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 02-10-2009, 11:20 AM
 
Join Date: Feb 2009
Location: USA
Posts: 10
Jan d. is on a distinguished road
Question How do I read the value of an F-type parameter into a macro variable?

On the Mazatrol Matrix, I want to read the value of an F-type parameter into a macro variable.

I know how to change the value using G10L50, but I want to know what the value is before I change it.

Any ideas???


Thanks, Jan.

Last edited by Jan d.; 02-10-2009 at 03:51 PM.
Reply With Quote

  #2   Ban this user!
Old 02-10-2009, 03:50 PM
 
Join Date: Feb 2007
Location: USA
Posts: 193
jimiscnc is on a distinguished road
question

by "F type variable" do you mean F parameter?

The EIA programming manual is good for user macro info.

The G10 L50 stuff is in the MAZATROL programming manuals in the "3 digit g code" section. 3 digit g code is a form of ascii text man readable mazatrol. the 3 digit g code gives you the means to read and write parameters on the fly, but theres a lot more science than that!

-jim
Reply With Quote

  #3   Ban this user!
Old 02-10-2009, 03:53 PM
 
Join Date: Feb 2009
Location: USA
Posts: 10
Jan d. is on a distinguished road

Originally Posted by jimiscnc View Post
by "F type variable" do you mean F parameter?


-jim
Sorry, yes, it is a parameter as I state in the heading. I corrected it. Thanks, Jan.
Reply With Quote

  #4   Ban this user!
Old 02-10-2009, 04:08 PM
 
Join Date: Feb 2007
Location: USA
Posts: 193
jimiscnc is on a distinguished road
got it

try this

go to DATA I/O

go to machine parameters. or user parameters.

switch TEXT OUTPUT softkey on. and commence to offload the selected files in TXT OUTPUT format.

this will output the selected parameters in man readable format, so you can see how it should be programmed.

i dont think theres a way to pull parameters out via system registers. the eia book in the macro section discusses all things that are in system registers.

mazak user macro formats are very similar to fanuc.

jim
Reply With Quote

  #5   Ban this user!
Old 02-10-2009, 04:18 PM
 
Join Date: Feb 2009
Location: USA
Posts: 10
Jan d. is on a distinguished road

Originally Posted by jimiscnc View Post
try this

go to DATA I/O

go to machine parameters. or user parameters.

switch TEXT OUTPUT softkey on. and commence to offload the selected files in TXT OUTPUT format.


jim
That is exactly how I figured out how to write them. And that works great. I do it every day.

However, in my G-code program, I load a fixed number to this parameter, 84 in my case. Or 212 to set bit 7 to 1. If someone were to set bit 0 to 1, I need to load 85 and 213. But right now, 84 and 212 are hard coded, so my programs will always set this parameter back to the old numbers.

What I want to do is the following:
1: read the parameter into macro variable.
2: if less then 128, add 128 and re-write.
3: else do nothing.

This would make sure that only bit 7 is changed form 0 to 1.

To flip ibit 7 back to 0, I would do the following:
4: read the parameter into macro variable.
5: if less then 128, do nothing.
6: else subtract 128 and re-write.

The missing link is that I can't figure out how to read the parameter!


Jan.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-11-2009, 08:21 AM
 
Join Date: Feb 2009
Location: USA
Posts: 10
Jan d. is on a distinguished road
peek and poke

Apparently peek and poke are not available on most new controls anymore.

Mazak all but told me that you just can't read parameters like the F-type ones.

WTF?

You can easily change them, but you can't read them? Like going down the highway at 100mph without being able to see the road ahead.
Reply With Quote

  #7   Ban this user!
Old 02-11-2009, 11:40 AM
 
Join Date: Dec 2007
Location: United States
Posts: 195
MrMazak is on a distinguished road
Smile

There is a reason you can't change them, it's dangerous! If you need to change a parameter temporarily use Mazatrol TPC and convert to 3 digit g-code. The TPC setting will convert to code for you and you wont need macro programs to do it. G422-G423 (I have never tried this so be careful!) It may be an option if you can't use the macro variables. If you have a sample of what you want to do post it and I may have addition places I can search for ideas.
Reply With Quote

  #8   Ban this user!
Old 02-11-2009, 01:00 PM
 
Join Date: Feb 2009
Location: USA
Posts: 10
Jan d. is on a distinguished road

Originally Posted by MrMazak View Post
There is a reason you can't change them,
That is not the issue. It is real EASY to change them using G10L50. And I know it is dangerous. But changing is NOT the issue.

I just can't read them. I can not do something like #555=#88006092. It seems as if parameters are not linked to #-variables. You can't get to them.

In my case I need to read an F parameter. I need to change bit 7. I want to read the parameter into a #-variable (which I can not figure out how to do) and add 128 to it (which is easy) and write it back (which is easy).

Why can't I read the value of a parameter under G-code control?

I can understand to "write protect" these parameters. But it is so super simple to write to them under G-code control, why can I not read them???? What's the harm in reading them???????



Jan.
Reply With Quote

  #9   Ban this user!
Old 02-11-2009, 02:08 PM
 
Join Date: Dec 2007
Location: United States
Posts: 195
MrMazak is on a distinguished road
Smile

Maybe try Mazak KY tech support for macro and parameter issues. There may be an R register bit that will let you see F parameters somewhere. Local tech center help doesn't deal with issues like macros often. Try MMS forum "ask an expert" maybe Mike Lynch has some ideas, he has helped me out with macro issues before. Good luck.
Reply With Quote

  #10   Ban this user!
Old 02-11-2009, 08:15 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

PEEK/POKE macros aren't available. Actually, the old strings don't work because the Matrix layout is different from the previous versions. I think PEEK/POKE will work once the strings are figured out or published.

Which F parameter are you trying to read? You can probably 'backdoor' this if you know where the data comes from that you're trying to read.
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 02-12-2009, 06:44 AM
 
Join Date: Feb 2009
Location: USA
Posts: 10
Jan d. is on a distinguished road

Originally Posted by psychomill View Post
PEEK/POKE macros aren't available. Actually, the old strings don't work because the Matrix layout is different from the previous versions. I think PEEK/POKE will work once the strings are figured out or published.

Which F parameter are you trying to read? You can probably 'backdoor' this if you know where the data comes from that you're trying to read.
I am looking for F94. I need to change bit 7 on the fly.
Reply With Quote

  #12   Ban this user!
Old 02-12-2009, 10:50 AM
 
Join Date: Dec 2007
Location: United States
Posts: 195
MrMazak is on a distinguished road

F94 will only update at power on, so unless you can reboot the control on the fly your out of luck. There must be some other way around whatever you are doing besides this method.
Reply With Quote

Reply

Tags
f-type parameter read




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
Fanuc drill macro with variable depth and fixed retract point trey88 Fanuc 4 10-26-2008 10:42 AM
g65 macro parameter firecat69 General Metal Working Machines 0 05-24-2007 08:50 AM
Macro variable example I programmed today. theemudracer G-Code Programing 1 03-07-2007 08:50 PM
Macro variable for current tool diam ? Shizzlemah Fadal 3 10-30-2006 08:47 AM
convert rf45 type to belt variable speed and some cnc info? ataxy Knee Vertical Mills 20 09-03-2006 10:58 AM




All times are GMT -5. The time now is 12:31 AM.





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