Hello Guest it is April 25, 2024, 03:27:19 AM

Author Topic: Display WHOLE # Only in DRO  (Read 11319 times)

0 Members and 1 Guest are viewing this topic.

Re: Display WHOLE # Only in DRO
« Reply #30 on: December 07, 2012, 05:34:33 PM »
Curiously, I started fresh, put this back in the pump and it works like a charm.
This went crazy later on (yesterday) but might now know why.

MaxStroke = GetUserDRO (1105)
CutLength = GetUserDRO (1100)
SawKerf = GetUserDRO (1104)
 
SetUserDRO (1107,MaxStroke / (CutLength + SawKerf))
SetUserDRO(1106,Fix(GetUserDRO (1107)))

Almost identical to your's TP, does it need the "If" and the Waits ?

NONE of these DRO's (1100,4 & 5) are moving, like an axis ... they are all fixed user entered values.     

Task: See if you can get a SINGLE line script to do what the 2 lines above do.
This is what I thought I had working yesterday that crapped out on me. My "Simple" sample a few posts back.
Will be back later ........
Russ
Re: Display WHOLE # Only in DRO
« Reply #31 on: December 07, 2012, 05:37:38 PM »
Using R3.043.022

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #32 on: December 07, 2012, 08:43:55 PM »
Without the check loop it continuously writes the DRO. With the loop IF the value has not changed it just exits saving the time slice of the write.

yes a single line your way or 2 lines my way(checkloop) should work just fine.

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #33 on: December 07, 2012, 09:03:32 PM »
That is about as short as I can get it dependable.

   
SetUserDRO(1106,Fix (GetUserDro(1105)/(GetUserDro(1100) + GetUSerDro(1104))))
While Ismoving()
Wend
End