Hello Guest it is April 24, 2024, 12:29:53 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 »
531
Well, it will definitely make a difference. How big of a difference depends on what it is displaying. But more troubling than a second monitor is what all apps and processes are running? The PC used for Mach should be dedicated to Mach and Mach alone and not have any apps installed (anti-virus, CAD/CAM, etc.) not needed by Mach.

532
This link should help Pedio,

http://www.machsupport.com/software/mach4/#tabs-3

Google "how to find graphics card specs" and add your operating system to the end. Like this......... how to find graphics card specs windows 8

533
Hoy and Pedio, do your PCs specs meet the minimum requirements (particularly the graphics card)? If not, expect such issues with large Gcode files. Note: There is no limit for GPU RAM but the larger the Gcdoe files, the more you need.

Also, why use a laptop? Not that you can't, but since the PC controlling Mach should be a dedicated PC (with no apps loaded non-essential to Mach particularly antivirus) I have never been able to come up with a reason to use a laptop.

534
Mach4 General Discussion / Re: Can i edit or add to a Predefined Macro?
« on: January 26, 2017, 05:05:28 PM »
Have you tried naming it m3?

Got a m3 or m03.mcc or .backup thats needs to be deleted?

535
Mach4 General Discussion / Re: Lua
« on: January 24, 2017, 04:28:40 PM »
Yup, the dither is going to be there without filtering of some sort. You only want it to change the feedrate if the analog input changes by a certain amount (which you can do in code as Daz did with the table) or there could be filtering in the pokeys for anolog inputs (which I think there is). Filtering the input would be much cleaner and what you have already will work just fine with it.

536
Mach4 General Discussion / Re: Send Email
« on: January 24, 2017, 10:15:34 AM »
Hmmmmmmm, that error is being generated in the email function. I wont be able to help much with that. I have tested it again this morning and its working fine for me. About the only suggestion I have is to make sure your password and user name is correct in the function. If that is not the problem hopefully Steve or others will reply.

537
Mach4 General Discussion / Re: Send Email
« on: January 24, 2017, 08:24:54 AM »
This is a tested sample. Obviously the email addresses, host names, ports, passwords, etc. will need to be replaced with the actual ones you plan to use. There are two parts to this example. The button script will go in a buttons clicked script. All it does is run the email function passing it a message (must be a string) as a parameter. The email function goes in the screen load script.

Code: [Select]
--Button Script
email('Hello from a Mach4 machine') --This calls the email function and passes it a message.

--Screen Load Script
---------------------------------------------------------------
-- Email added 8-30-2016
---------------------------------------------------------------
--Helpful link http://w3.impa.br/~diego/software/luasocket/smtp.html
function email(message)
    package.path = package.path .. ';./Modules/?.lua;'
    package.cpath = package.cpath .. ';./Modules/?.dll;'

    -- load the smtp support
    local smtp = require('/socket.smtp')
from = '<fromname@hostname.net>' --email address of sender

    rcpt = {
        '<toname1@hostname.net>', --email address of recipient
'<toname2@hostname.net>', --email address of carbon copied recipient
'<toname3@hostname.net>' --email address of blind carbon copied recipient. They will be blind because we will not list them in the header
    }

    mesgt = {
        headers = {
            from = 'From Name <fromname@hostname.net>', --name and email address of sender. Example: 'John Doe <originaljdoe@anyhost.net>'
            to = 'To Name <toname1@hostname.net>', --name and email address of recipient
cc = 'To Name <toname2@hostname.net>', --name and email address of someone being carbon copied
subject = 'Mail from a Mach4 machine' --email subject
        },
        body = tostring(message)
    }

    r, e = smtp.send{
        from = from,
        rcpt = rcpt,
        source = smtp.message(mesgt),
        server = 'mail.myhost.net', --this is the address or IP of the mail server used to send this email. smtp.gmail.com is one example
        password = 'MailServerPassword', --this is the password you use to access the mail server you are sending from
        user = 'myname@myhost.net' --this is the user name you use to access the mail server you are sending from
    }
    if (r == 1) then --Message was sent successfully
       wx.wxMessageBox('Message was sent successfully.')
    else --There was an error
        wx.wxMessageBox('!!!ERROR!!!\n\n' .. tostring(e))
    end
end

538
Mach4 General Discussion / Re: Lua
« on: January 23, 2017, 09:11:18 AM »
Daz and Jo are having that discussion on another thread currently, but you may already know that, and hence your last post.

Chaoticone, just as a side topic.  You guys all seem to have quite a grasp of how to read, interpret and write the Lua code.  Of course I am a bit bias, but I don't think I am all that slow, but after having done a few hours of sitting and plodding through online Lua tutorials as well as reading the Mach scripting stuff etc., until my eyes go fuzzy, most of it still eludes me.

Did you start off that way, or did you have some background in programming which helped?


Hello Craig,

Yup, I started off that way and still am at times.  ;D I had no background in coding or scripting other than doing some in cypress enable in Mach3. It took me a while to get my head around the few things I think I understand now. For me it boils down to shear determination when it comes to coding. I also have some great mentors that give me a bump when I get stuck. Most all of them are here on the forum. A few other things I consider advantages though are I worked on CNC's for 25 years and all sorts of mechanical, wiring, electronics, and processor based controls for many more years. That helps a lot in knowing how I want things to work. I just have to throw myself into the script until I get it to do that. So yes, lua has been a steep learning curve to me but it really is powerful and many times more powerful than the scripting we had in Mach3. This means we can do things in 4 not possible in 3.  :)

The tips I would give anyone diving in would be to simply quote Craig. He is spot on.

Quote
Hi Craig,
I'm a newbie at LUA coding. I have programmed before in FORTRAN as a student and in more recent years VB and C,
also like to think I'm pretty fair in assembler. LUA has been a bit of a challenge, while it is deceptively simple its power
and flexibility is right up there.

When coding I have
https://www.lua.org/pil/contents.html permanently on the taskbar.

Much of the code that we are trying to produce involves manipulating Mach4 and consequently the Mach 4 API.chm is also
on the taskbar.

The other resource are the existing LUA scripts within Mach4 and LUA Examples in the Mach4Hobby directory, often you can cut
and paste or otherwise adapt examples to your needs.

Craig

I do have a few additional links to share though.

http://www.lua.org/manual/5.2/
http://www.lua.org/pil/contents.html#contents
http://wxlua.sourceforge.net/docs/wxluaref.html
http://docs.wxwidgets.org/3.0.1/
https://www.youtube.com/watch?v=iMacxZQMPXs&index=5&list=PLFJceKphr7ePmkYA1FmagKRPafFiEsnQU&t=1648s

And I cannot overstress how helpful the Mach4API help file is and the existing scripts. Craig said it, I just want to emphasise it.  

539
Mach4 General Discussion / Re: Lua
« on: January 22, 2017, 06:31:00 PM »
Ignore my last post until we know for sure what value that analog register will be at min and max.

540
Mach4 General Discussion / Re: Lua
« on: January 22, 2017, 06:00:09 PM »
I think this should work.

local MinFRO = 50
local hReg = mc.mcRegGetHandle(inst, "NAME OF CONTROLLER/Analog pin 42")
local AnalogIn = mc.mcRegGetValue(hReg)

local FRO = ((AnalogIn * 30.303030) + MinFRO)
mc.mcSpindleSetOverride(inst, FRO)

This should give you a min of 50% and a max of 150% and use the whole sweep of the pot. It doesn't have any rounding in it so it won't jump but that could be a problem if Pokeys doesn't have any filtering (but I think they do).

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 »