scheduled tasks


Results 1 to 7 of 7

Thread: scheduled tasks

  1. #1
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default scheduled tasks

    hello, i intend to share some codes that i use for different types of scheduled tasks

    what kind of things do you schedule ? or you wish to schedule ? kindly !

    Similar Threads:
    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  2. #2
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: scheduled tasks

    [ craft "x" parts from a bar ]

    ... put the bar inside, don't clamp the chuck

    ... call a "sensless gauging" program:
    ...... counter from main program is reset
    ...... turret comes in front of the chuck at a specific distance
    ...... pull the bar on the turret / tool + close the chuck
    ...... auto Z occurs
    ...... check if detected Z is within a "safe range" ( not too close to chuck / not too far from the chuck)
    ...... straight face at Z0.3
    ...... if face is not clean, repeat the program without unclamping the material
    ......... thus, the "safe range" should allow repeating the program a few times, being sure that nothing happens when tools go closer to the chuck

    ... call a program that initializes a common variable with a value that represents the number of parts
    ...... i like to call this type of programs as presseters, because they preset the number of loops inside the main program
    ...... i may have 2,3, etc such programs, depending on the length of the material / bar

    ... call the main program, that cuts the frontal at Z0
    ...... this program will repeat as many times as it was told by the previous program

    this does not require the operator to edit variables inside the parameters page

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  3. #3
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: scheduled tasks

    [ do something only once per power on-off session ]

    this requires a boolean statement, that changes the value of truth only once per power on-off session

    obviously, such things are not needed for cncs running 24/7

    after power on, VTIME[2..6] are all 0 until VTIME[1] is executed



    VTIME variables may return actual "year / mounth / ... / seconds", by reading data from the current_system_time

    current_system_time is updated automatically, while VTIME is not

    for example, displaying current time : h/m/s may be done by using VTIME[4..6]

    to do it properly, the current_system_time must be read, so VTIME[4..6] will show good values; otherwise wrong values will appear

    current_system_time may be read by using VTIME[1]

    VTIME[1] will update data inside of it, but also in VTIME[2..6]



    VTIME is like an array with 6 cells

    data in each cell may be read by VTIME[cell=1..6]

    however, the content of the array is updated only when VTIME[1] is executed ( or when the value of VTIME[1] is desired to be read )

    otherwise, if VTIME[1] is not executed, cells 2..6 will store data from the moment of the previous update, thus from the last VTIME[1]

    between cnc_power_on and VTIME[1], cells 2..6 will contain 0

    after VTIME[1] :
    ... cells 2 & 3 will never be 0
    ... cells 4-6 will be 0 if hour , minute or seconds is 0



    this behaviour of the VTIME, that is not updated automaticaly, is there to reduce system load

    otherwise, the control will keep updating the VTIME in background, even if it is not required

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  4. #4
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: scheduled tasks

    [ do something at a specific moment ] for example at 10am

    a window has to be defined, like when waiting for something / somebody : you start getting prepared 5 minutes before, and you lose interest after a while, if nothing happens

    ... if moment inside 10am window than do something
    ... if difference between "moment" & "10am" is inside the 5 minutes window than do something
    ... if | VTIME [ 4 ] * 3600 + VTIME [ 5 ] * 60 + VTIME [ 6 ] - 10*3600 | <= 300 than do something

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  5. #5
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: scheduled tasks

    [ do something at specific intervals ], relative to a reference moment

    recording the reference moment : variable = VDIN [ 100* ]

    doing something if interval ocured :

    Code:
        IF [ [ VDIN [ 100* ] - variable ] <= desired_interval ] N_next_time
            do something now
         N_next_time


    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  6. #6
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: scheduled tasks

    examples :
    ... post #2 : looping a program, so to deliver a required number of parts from a bar
    ... post #2 : changing the way a program performs :
    ...... skipping barr puller operations on last part
    ...... changing barr puller travel when bar gets shorter
    ... post #3 : there is a machining log, and this log washes its laundry only once per cnc power on-off sesion
    ... post #4 : same log as above creates machining reports at specific moments ( eq : 3pm between shifts )
    ... post #5 : when machining short parts, i send the turret to Z+limit at every 2 hours; it does not happen always at 7 9 11 13 etc, but at intervals of circa 2 hours



    all are running in background; there is no need to select explicity scheduled programs or to edit common variables
    that's the point of this thread : keeping a low profile

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  7. #7
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: scheduled tasks

    [ do something inside a looped program, only in continuous mode, only after a full loop occured ]

    hello i started thinking about this when using indexing with low clearances : when the program begins, turret possition can be anywhere, so 1st operation uses an index position with high clearances; after a full loop occured, turret position is known, so in this case is possible to use an index position with low clearances

    is important to know the turret position, so to be sure about the path among which the turret will go to the index position; if this path is secured, than there are no reasons to worry about colisions

    i use LDFB=0 right before GOTO statement, thus i create a local variable after all operations were executed; there is no N**** after this initialization, so this variable won't exist in case of a restart sequence

    inside 1st operation i check if this variable exists " IF LDFB ... " and trigger the indexing type based on it's existance

    LDFB :
    ... LD stands for "local dynamic", thus it is a local variable used inside the dynamic indexing code
    ... FB : first blood

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

scheduled tasks

scheduled tasks