Results 1 to 2 of 2

Thread: How to check light state

  1. #1
    Registered Drew's Avatar
    Join Date
    Apr 2004
    Location
    Gonzales LA.
    Posts
    79
    Downloads
    0
    Uploads
    0

    How to check light state

    I want to know if I can code something like this or the correct way to do it:

    IF LIGHT5 = OFF THEN MESSAGE MACHINE NOT HOMED

    I know I could shadow the light with a varable if this is not possible.
    Thanks Drew


  2. #2
    Registered Karl_T's Avatar
    Join Date
    Mar 2004
    Location
    Dassel,MN,USA
    Posts
    1,361
    Downloads
    0
    Uploads
    0
    You'll have to use a variable flag every time you change the light state, then check that variable.
    Example

    LIGHT4;ON:\104=1
    ...
    ...

    IF\104=1THEN...


Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.