589,272 active members*
5,108 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Posts
    18

    Question Bug in DateTime?

    The goal here is to find out how long it takes for a specific section of code to run.


    #<dt1> = DateTime[]
    #<hh> = Hour[#<dt1>]
    #<mm> = Minute[#<dt1>]
    #<ss> = Second[#<dt1>]
    (print,Starting Clear Profile at #<hh,0>:#<mm,0>:#<ss,0> using Ball Nose (1/2"))
    G0Z1.1250
    G0X-3.8900Y-1.9635Z1.1250 F250
    G1Z0.3750F15.0
    G1Y1.9635F150.0

    G0Z1.1250 F250
    G0X-2.7180 F250
    G1Z0.3750F15.0
    G1Y-1.9635F150.0
    G1X-2.5227
    G1Y1.9635
    G1X-2.3274
    G1Y-1.9635
    G1X-2.1321
    G1Y1.9635
    G1X-1.9367
    G1Y-1.9635
    G1X-1.7414
    G1Y1.9635

    G0Z1.1250 F250
    G0X1.6779 F250
    G1Z0.3750F15.0
    G1Y-1.9635F150.0
    G1X1.8808
    G1Y1.9635
    G1X2.0837
    G1Y-1.9635
    G1X2.2866
    G1Y1.9635
    G1X2.4895
    G1Y-1.9635
    G1X2.6924
    G1Y1.9635
    G0Z1.1250 F250
    #<dt2> = DateTime[]

    #<hh> = Hour[#<dt2>]
    #<mm> = Minute[#<dt2>]
    #<ss> = Second[#<dt2>]
    (print,Finish Clear Profile at #<hh,0>:#<mm,0>:#<ss,0> using Ball Nose (1/2"))

    #<td> = [#<dt2> - #<dt1>]
    #<ii> = [#<td> MOD 3600]
    #<mm> = [Trunc[#<ii>/60]]
    #<ss> = [#<ii> MOD 60]
    (print,Clear profile completed in: #<mm,0>:#<ss,0>)

    M0

    The code computes the time to complete correctly - based on the DateTime result.

    The problem is that the DateTime *isn't* coming back correctly.

    Check this video out at the :03 second mark. <dt2> is coming back as 11:29:24, but the system clock at that instant clearly shows 11:29:41.

    ???

  2. #2
    Join Date
    Mar 2017
    Posts
    1345

    Re: Bug in DateTime?

    Put line with G09 code before #<dt2> = DateTime[].


Similar Threads

  1. Motor Axis Output TNG bug? JMC Servo bug?
    By 5Carbides in forum PlanetCNC
    Replies: 7
    Last Post: 08-23-2023, 03:22 PM
  2. PP 1.9 bug
    By kvom in forum Novakon
    Replies: 0
    Last Post: 07-29-2019, 02:04 PM
  3. Bug?
    By mcode in forum NCPlot G-Code editor / backplotter
    Replies: 4
    Last Post: 11-18-2013, 01:47 PM
  4. Bug..
    By mcode in forum NCPlot G-Code editor / backplotter
    Replies: 2
    Last Post: 06-06-2013, 01:32 PM

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
  •