Hello Guest it is April 19, 2024, 10:03:20 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Chaoticone

Pages: « 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 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 »
71
Show"N"Tell ( Your Machines) / Re: The Evolution of my Machine
« on: August 14, 2019, 10:42:45 PM »
Thanks, good to know. Wiring, cabinet design and component selection are what I see as troublesome spots most often. Aside from that most that practice due diligence (reading manuals, researching, testing, etc.) usually get on pretty well.

Solid advice on the motion device. There are several good ones and the ESS is certainly in that list. Too often buying the cheapest ends up being the most expensive.

72
Mach4 General Discussion / Re: Jog Speed DRO
« on: August 14, 2019, 06:51:35 PM »
What DRO Code is assigned to that DRO?

73
Mach4 General Discussion / Re: Retrofit masterwood Y coordinates problem
« on: August 13, 2019, 10:13:34 PM »
If the dimensions machined are accurate it sounds like you are not locating in the part accurately. Shift your Y work offset by the amount it is off.

74
Mach4 General Discussion / Re: Creating M-Code to activate Outputs
« on: August 10, 2019, 04:17:38 PM »
If all you want to do is to turn on and off an output from G Code, you should try using M64 and M65 
Look on page 60 of the Mach4 G Code programming manual for mill and router style machines.   
M64 P2   this will turn on output 2
M65 P2   this will turn off output 2

Yup, that is what I was talking about earlier. Forgot they ended up being rolled into Mcodes though.

75
Well, it is like this. We maintain the default screens. Users have to maintain their custom screens. The default screens in industrial were changed to be the same as hobby screens strictly to help us keep it all maintainable. I hope this standardization of default things in Mach4 continues. As developers we will change things from time to time. However this does not change anything in your custom screen (assuming of course you have saved your custom screen as something unique/other than a default screen name). But this does not mean that changes we make will not break your custom screen. It just depends on what we change. Take for example our recent move to lua 5.3 from 5.2. This was a necessary change in Mach4 but it may well have broken some users customizations. This is why it is so important to keep good records and copies of your customizations. You may need to edit them any time you update. Naturally we weigh it all out and try to keep such changes to a minimum but it does happen. Just the nature of progress.

Yes, the old Ind. screen should be fine in the new build. But at some point it won't be. Anyone can still use it but it is theirs to maintain if they want to keep using it.

76
Quote
There are a couple of other issues with the software  - it doesn't seem to remember any of my settings (in the plasma screen) between sessions - I have to manually enter them each time - not a big deal - I guess this could be due to it being a dev version.

No, that is not because it is a dev version. It shouldn't be doing that. Not sure why yours would be. Can't repeat it here. If you started with a clean install and the default profile and screen I see no reason for it. If you have anything custom start looking at that.

The THC module creates the registers and sets the relative ones to persistent. You should be able to launch Mach, set all the variables, close Mach and launch Mach again and all the variables should be whatever you set the variables to in the last session. If that isn't happening you have a problem unique to your setup. Custom script, screen, corrupt machine profile, antivirus, etc.

Quote
Sometimes the program stops after a pierce saying the a the OB motor took to long to move - 4 seconds (I'm para-phrasing here - I do not have the exact error message)... seems to happen after about 20 or so profiles in a single file. Agh - lots a messing about trying to reset/re-start the program and trying not to lose position.

When it does this look on the Machine Diagnostics tab. What does it say machine state (little lower than midway down on left side) is?

You can also try to make the the time longer by adjusting the Diagnostic, Regfile, iRegs0/nf/thc/MoveTimer value. 4 is the default value and stands for roughly 4 seconds. Try it at 8.

77
Mach4 General Discussion / Re: add image
« on: August 09, 2019, 11:28:15 AM »
Yes and yes.

Operator, Edit Screen, Screen, Manage Images, Add

To change the image of a screen entity define the image of whatever property it is relative to using scr.SetProperty. All property names are visible in screen edit mode when you click the entity.

scr.SetProperty("SceenEntityName", "Bg Image", "MyImage.png")

or

scr.SetProperty("SceenEntityName", "Image Up", "MyImage.png")

78
Mach4 General Discussion / Re: Button script
« on: August 08, 2019, 10:44:34 AM »
No problem, i understand. But do yourself a favor and go ahead and do it right while your doing. If not you will spend more time doing it. Likely much, much more time.

Learn how to do it right for one and you know how to do it right for all.

79
Mach4 General Discussion / Re: when to use rc = ?
« on: August 08, 2019, 02:35:12 AM »
Hi,
ideally you would use rc (return code) on EVERY API call.

Lets take a typical Lua API:

hsig,rc=mc.mcSignalGetHandle(inst,mc.OSIG_OPUTPUT23)

This API requires two parameters (or inputs if you prefer the term) namely an instance number and a number identifying the output
signal for which you want a handle. Note that mc.OSIG_OUTPUT23 actually evaluates to a number.....the text string is called an 'enumeration'
and is done that way because humans remember names better than numbers.

This API has two returns, one is the handle we wanted but also a return code.

When the Lua function, in this case mcSignalGetHandle(), is returned it returns values in the form of a stack. The stack is read from the lefthand most
entry.

Thus:
hsig=mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT23) is perfectly OK. The variable hisg will hold the correct value after the call has been executed.
the variable rc will be on the stack but if you don't read it thats OK.

However:
hsig,rc=mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT23) is also perfectly OK. The variable hsig will have the required handle AND rc will have a return code.

Most of us don't bother with return codes and we consequently get a lot of code errors without understanding why. Expert programmers read return codes EVERY
API call and they have far fewer crashes.

I myself are somewhere in between, certain APIs which give trouble I test completely, others I don't bother.
Also if you write code for a newcomer to Lua then including all the extra code just to read return codes often confuses the newcomer which is definitely
not helpful..........but tends to start a bad habit, namely that of not reading return codes.

Craig


Well said, spot on.

The default screens and profiles are all set up to take advantage of the included mcErrorCheck (I think that is the name) module.

80
Mach4 General Discussion / Re: Button script
« on: August 07, 2019, 06:57:25 PM »
Quote
The sleeps are really not for the code, they are for a delay as the outputs are activating air cylinders and we can not have the next output activated till the cylinder has finished its stroke.

If that is the case then you should have sensors that tell you when the cylinders have finished their stroke. And the way to hold it up until it does is to use the mc.mcSignalWait api and wait for that confirmation signal to go to whatever state it goes to confirming it has finished it's stroke.

Put some checks in you macro to find out where it is breaking.........
mc.mcCntlSetLastError(inst, "Step one finished, cylinder 1 should be retracted")
mc.mcCntlSetLastError(inst, "Step two finished, cylinder 2 should be retracted") etc.

Pages: « 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 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 »