on start up

Results 1 to 6 of 6

Thread: on start up

  1. #1
    Member maki's Avatar
    Join Date
    Feb 2011
    Location
    Slowenia
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default on start up

    question: iz it possible to make one time event, when machine start first time some program and the stays ON?
    F.e.: my code for "on start"

    M62 P1 Q1
    G04 P10
    (print,OnStart script @ Line: #<line,0>)

    but, I don' like it because it delays 10 sec everytime I start new program. Is there some solution that will skip delay if P1 is ON?

    Similar Threads:


  2. #2
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1304
    Downloads
    0
    Uploads
    0

    Default Re: on start up

    Check #OnInit section of Expr.txt
    https://www.cnczone.com/forums/plane...-expr-txt.html



  3. #3
    Member maki's Avatar
    Join Date
    Feb 2011
    Location
    Slowenia
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default Re: on start up

    Thank you, but this exceed my knowledge...



  4. #4
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1304
    Downloads
    0
    Uploads
    0

    Default Re: on start up

    If I understand correctly there are two questions here.

    1. How can I turn output on when TNG starts?
    2. How can I skip wait if output is already on?

    1:
    - Open or create "Expr.txt" file in you profile folder.
    - Find or create new "#OnInit" section
    - Add comand that will turn output on,. For examle:
    Code:
    #OnInit
    print('Expr: OnInit');
    cmd("Machine.Output", 4 ,1);
    This will turn output 5 on (note that first output has number 0).
    Message will also be printed to output window.

    2.
    Do this in your Onstart script.
    Code:
    #<out1>  = #<_hw_output_num|1>
    M62 P1 Q1
    o<chk> if [#<out1> EQ 0]
      (print, Waiting 10s)
      G04 P10
    o<chk> endif

    .



  5. #5
    Member maki's Avatar
    Join Date
    Feb 2011
    Location
    Slowenia
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default Re: on start up

    THANK YOU !!
    Works like a charm!
    Didn't know that 2 files neded adjusting - coding.
    Why I need that? Because the fuse is on edge and some delay neded when machine starts first time to VFD goes to ON, delay for VFD is recomended before spindle starts. When ewerything is ON, works perfect.
    I am driwing that on IO 1 port with SSR.



  6. #6
    Member maki's Avatar
    Join Date
    Feb 2011
    Location
    Slowenia
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default Re: on start up

    THANK YOU !!
    Works like a charm!
    Didn't know that 2 files neded adjusting - coding.
    Why I need that? Because the fuse is on edge and some delay neded when machine starts first time to VFD goes to ON, delay for VFD is recomended before spindle starts. When ewerything is ON, works perfect.
    I am driwing that on IO 1 port with SSR.



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

on start up

on start up