1. Hey guyz. Welcome to the All New Phlatforum!



    Sign Up and take a look around. There are so many awesome new features.

    The Phlatforum is a place we can all hang out and

    have fun sharing our RC adventures!

  2. Dismiss Notice

Lamp Button

Discussion in 'Mach3' started by Evil-Tunes, Dec 31, 2008.

  1. Evil-Tunes

    Evil-Tunes Moderator Staff Member

    Offline
    Messages:
    659
    Trophy Points:
    16
    Location:
    Southern N.J.
    I added a Lamp button with a Led over top of it but can't get the LED to light with the button.
    The lamp button works great. I just used output #2 pin 9 (Flood Toggle)for the port.

    Just make sure U untick disable flood relays under spindle setup.

    I know someone else wanted a light button also(firetrappe) I think?

    Here is the screenset


    MK/// Screenset Seperate vacume/Spindle Buttons





    E-T Attached files [​IMG] PhlatScreenSet_V2.5 _light.zip (4.2 MB)Â Phlatprinter1024_MK3 _vacuum_spindle.zip (4.1 MB)Â [​IMG] [​IMG] [​IMG]
     
  2. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Dude you rock! that is cool! Thanks for the detailed post.

    9 times out of ten when I am working with led's I hook up the wrong leads you might want to see if you have them backwards, just a thought.

    And the lamp button add as well. Too cool ET too cool..
    Thanks again
    Mark
     
  3. firetrappe

    firetrappe Member

    Offline
    Messages:
    192
    Trophy Points:
    16
    Location:
    England UK
    Nice work ET! I can use the second output from my relay board now :cool:

    Mark, I think ET was refering to the 'virtual' LED above the button in the screenset.

    Cheers,
    Si.
     
  4. Evil-Tunes

    Evil-Tunes Moderator Staff Member

    Offline
    Messages:
    659
    Trophy Points:
    16
    Location:
    Southern N.J.
    9 times out of ten when I am working with led's I hook up the wrong leads you might want to see if you have them backwards, just a thought.


    I think you misunderstood I can't get the "Led button" in the Screenset to light when I hit the lamp button.


    E-T
     
  5. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
  6. Evil-Tunes

    Evil-Tunes Moderator Staff Member

    Offline
    Messages:
    659
    Trophy Points:
    16
    Location:
    Southern N.J.
    no I didn't see that one That should do the trick. :D

    Thanks Mark

    E-T
     
  7. Evil-Tunes

    Evil-Tunes Moderator Staff Member

    Offline
    Messages:
    659
    Trophy Points:
    16
    Location:
    Southern N.J.
    ok I found the problem. lol I didn't use the spindle button that is for the router. stuped E-T
    I used the Flood button because I use a Flood Lamp. so I got the screenset fixed and It works Great. Now I will look into getting the screen size bigger



    Thanks.

    E-T

    P.S. uploaded the new screenset here and top post
    Attached files Phlatprinter1024_V2.5 _light.zip (16.8 KB)Â
     
  8. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Great job E-T a really nice mod you have here.
    Thank you for sharing it
    Mark
     
  9. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    et, you killed the jog screen! Hit the tab key to see what I mean.
     
  10. Evil-Tunes

    Evil-Tunes Moderator Staff Member

    Offline
    Messages:
    659
    Trophy Points:
    16
    Location:
    Southern N.J.
    wow I see that I did! I havent seen that screen since I calabrated the PP. Should be a easy fix and will look at it when I get home.


    Thanks Flash


    E-T

    [edit] It should be Fixed now Let me know ?
     
  11. power67

    power67 New Member

    Offline
    Messages:
    32
    Trophy Points:
    0
    Location:
    NH
    Evil, I am trying to get the second relay to work and having some issues, I have all the settings that you showed set the same. Is there somethinkg else that may cause the spindle to work but not the flood/light switch? Let me know.

    Thanks
     
  12. power67

    power67 New Member

    Offline
    Messages:
    32
    Trophy Points:
    0
    Location:
    NH
    I found one issue, my machine for whatever reason is not outputting on pin 9 so I switched it to pin 1 and they both work now.

    Also, I found that if you change the OEMcode for the led next to the spindle to 116, (Spindle on) the LED will stay on all the time that the spindle is turned on. Try it.
     
  13. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Cool Ross, glad to hear you have it working.
    And thank you for the tip as well
    Mark
     
  14. MartinT

    MartinT Member

    Offline
    Messages:
    109
    Trophy Points:
    18
    Awesome E-T!

    I see you have the Router also relayed, can you amplify on the settings, and how it works (like when you hit print, the router goes on and when the job is finished it shuts off) I have the relay board as well, and wanted to do a similar thing with the router and lights.

    Do you need to edit each Gcode file to give an ON command and an OFF command?, or is it all controlled by MACH3 itself? and how?)

    Hope you can light me up (pun intended!)

    Best regards,
    Martin
     
  15. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Martin the code is already in the Phlat code to turn the motor on and off at the start and end of each file run automatically :D
    You will see it in the code as M3(spindle on) at the start of the code and M5(spindle off) towards the bottom.
     
  16. Evil-Tunes

    Evil-Tunes Moderator Staff Member

    Offline
    Messages:
    659
    Trophy Points:
    16
    Location:
    Southern N.J.
    The router/spindle :arrow:
    The gcode created in SU automaticly puts in a M3 S8000 . 8000 is the spindle speed you set up in SU.
    and at the end of the Gcode a MS0 that turns the spindle off. There is no need to change the code.

    The Light :idea:
    The light button is the only control for it now. There is no gcode to turn that on/off unless you put it in manuelly. I'm not sure how to do that at the moment.

    You can use the double relay as a single if you wanted to use a vac attachment.
    I am going to use the light button for the Vac as I can't see the bit on the MKII and don't use the light as much. I could easily change the relay to do both ;) but , for now I will keep it on the Light button.


    Cheers
    E-T
     
  17. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    If you guys want to add some gcode that will print in all your files you can edit PhlatMill.rb. Look for the section like this for lines that are printed at the beginning of the gcode file:[pre] cncPrint("%n")
    cncPrint("(#{PhlatScript.getString("PhlatboyzGcodeTrailer")%$PhlatScriptExtension.version})n")
    cncPrint("(File: #{PhlatScript.sketchup_file})n") if PhlatScript.sketchup_file
    cncPrint("(Bit diameter: #{bit_diameter})n")
    cncPrint("(Feed rate: #{@speed_curr})n")
    cncPrint("(Material Thickness: #{material_thickness})n")
    cncPrint("(Material length: #{@material_h} X width: #{@material_w})n")
    cncPrint("(www.PhlatBoyz.com)n")
    @comment.split("$/").each{|line| cncPrint("(",line,")n")} if !@comment.empty?

    cncPrint("G90 G20 G49n") # G90 - Absolute programming (type B and C systems)
    #cncPrint("G20n") # G20 - Programming in inches
    #cncPrint("G49n") # G49 - Tool offset compensation cancel
    cncPrint("M3 S", @spindle_speed, "n") # M3 - Spindle on (CW rotation) S spindle speed
    and this for the end:[pre] cncPrint("M05n") # M05 - Spindle off
    cncPrint("G0 Z0n")
    cncPrint("M30n") # M30 - End of program/rewind tape
    cncPrint("%n")

    Right after the spindle speed line you can add your own cncPrint line. It looks complicated but is very simple if you just want to add a specific code. Everything after the pound (# M3 .......) is a Ruby script comment and doesn't show up in the output file. The "n" is a linefeed and is mandatory or your next line of gcode will print on the same line. If you wanted to turn on the flood coolant you could add a few lines like this: cncPrint("M8", "n") # Turn on coolant[/pre] cncPrint("M9", "n") # Turn off flood and mist coolant[/pre]
     
  18. theothers

    theothers Administrator Staff Member

    Offline
    Messages:
    761
    Trophy Points:
    18
    Location:
    New Jersey
    Great info Tim. Very helpful. Thank you!!
     
  19. MartinT

    MartinT Member

    Offline
    Messages:
    109
    Trophy Points:
    18
    E-T and others, I have the spindle all setup thanks to your help, it's almost like magic to hear the Rotozip turn on by "itself" when the cutting starts!!!
    I'd say the relay board is a "MUSTHAVE" !
    Thanks again, now for my next project I need some buttons...

    Laterrrr,
    Martin
     
  20. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Planing one of these perhaps!? :D
    [​IMG]
     
  21. MartinT

    MartinT Member

    Offline
    Messages:
    109
    Trophy Points:
    18
    That one would be very hard to outclass (as in: impossible! :lol: ), but yes I am trying to come up with something... :mrgreen:
     
  22. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Looking forward to it Martin. You mods so far have been top notch so I can't wait to see what you have planed
    Mark
     
  23. ewo

    ewo Moderator Staff Member

    Offline
    Messages:
    701
    Trophy Points:
    18
    Location:
    Indiana
    Dude you rock :)

    Thanks for this screen set. I have everything working super
    I just wanted to say thank you for this ! :D
     
  24. dz1sfb

    dz1sfb Member

    Offline
    Messages:
    116
    Trophy Points:
    18
     
  25. Evil-Tunes

    Evil-Tunes Moderator Staff Member

    Offline
    Messages:
    659
    Trophy Points:
    16
    Location:
    Southern N.J.
     

Share This Page