Hello Guest it is March 28, 2024, 05:59:29 PM

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 »
641
Mach4 General Discussion / Re: Macro - Pause until input triggered
« on: September 28, 2016, 10:43:48 AM »
Was just looking at that myself.

From the manual......
sigId      A valid signal ID. (NOT a signal handle)

Glad you got it sorted.  :)

How about post the code that worked so others will see what right looks like.

642
Mach4 General Discussion / Re: Macro - Pause until input triggered
« on: September 27, 2016, 03:24:06 PM »
Yup, that is right Daz........ my bad.

643
Mach4 General Discussion / Re: Macro - Pause until input triggered
« on: September 27, 2016, 12:54:37 PM »
In the default screens of the later dev versions the ref all home buttons run the RefAllHome function as a coroutine. This was modified to provide an example for those interested in doing something similar. It will reference all axis and (only after motion is finished) pop up a message box saying referencing is complete. You may be able to do something similar to get the results your looking for.

Code: [Select]
--Button script
--RefAllHome()
wait = coroutine.create (RefAllHome) --Run the RefAllHome function as a coroutine named wait.

--Screen Load Script
---------------------------------------------------------------
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
    mc.mcAxisDerefAll(inst)  --Just to turn off all ref leds
    mc.mcAxisHomeAll(inst)
    coroutine.yield() --yield coroutine so we can do the following after motion stops
    ----See ref all home button and plc script for coroutine.create and coroutine.resume
    wx.wxMessageBox('Referencing is complete')
end

--PLC Script
-------------------------------------------------------
--  Coroutine resume
-------------------------------------------------------
if (wait ~= nil) and (machState == 0) then --wait exist and state == idle
local state = coroutine.status(wait) --Get the status of the coroutine named wait
    if state == "suspended" then --Coroutine named wait is suspended
        coroutine.resume(wait) --Resume coroutine named wait
    end
end

644
General Mach Discussion / Re: Does this product exist?
« on: September 21, 2016, 09:19:11 PM »
Solid advise Rich.  :)

645
General Mach Discussion / Re: Does this product exist?
« on: September 21, 2016, 12:52:04 PM »
Decent switches will have extremely accurate repeatability. The rate the probe is moving at each time the switch is being made is likely the most important variable (slower = higher accuracy).

646
General Mach Discussion / Re: Does this product exist?
« on: September 21, 2016, 10:08:30 AM »
Some use a small cylinder with a couple of prox switches and a plate mounted to the end of the shaft. 1st switch seen as probe input, 2nd switch seen as estop. One end mounts to table/bed so that shaft is pushing in direction of spindle. Something like these. The right single acting cylinder (spring extend) may not even require air to work for this.

https://www.automationdirect.com/adc/Shopping/Catalog/Pneumatic_Components/Pneumatic_Air_Cylinders/Metric_Compact_Air_Cylinders_(H-Series)/H12M020MD-M

https://www.automationdirect.com/adc/Shopping/Catalog/Pneumatic_Components/Pneumatic_Cylinder_Position_Switches/4mm_Square_T-Slot_Cylinder_Switches

647
This link my be helpful.

http://www.machsupport.com/forum/index.php/topic,25616.0.html

EMI (aka noise) can be a real problem and pain to get sorted.

648
Mach4 General Discussion / Re: Mach4 API Help - Jogging
« on: August 25, 2016, 09:02:40 AM »
Yeah, if you want to manipulate an input so that sometimes it is a jog inc. and others times it is continuous you would have to manipulate that inputs action with script. If you do that I would do the same thing, add them to the signal library and write the function with the if statement in it. And, as Mike said earlier, you may be able to use PMC to generate the code for this. I have not played with PMC much. Just enough to know it is a very valuable tool.

649
Mach4 General Discussion / Re: Mach4 API Help - Jogging
« on: August 24, 2016, 12:06:55 PM »
For the Axis Jog, i would just map the inputs to the jog inputs in Machs configuration.

To swap jog modes I would do that in the sig. library in the screen load script.

Not sure what you are using to change feed rate and increment size. If just buttons would do them like swaping the jog mode. If using something with an analog value would probably do it in the PLC script. Not sure how pokeys does that though. Maybe their analogs write to a register or something?

All of the API calls are in the Mach4CoreAPI.chm help file in the docs folder.

You can see how a pendant was set up by looking at the attachments in this post............ http://www.machsupport.com/forum/index.php/topic,32832.msg228065.html#msg228065 That should help.


650
Mach4 General Discussion / Re: Modbus and Sim
« on: August 18, 2016, 12:14:32 PM »
Steve is right Hood. We are all special (you included) and everyone gets a trophy. But you 2 deserve a bigger one because yall are specialer.  ;D

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 »