Hello Guest it is March 28, 2024, 05:42:27 PM

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

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #20 on: December 07, 2012, 12:25:35 AM »
You are the one Driving the boat you tell US. We just throw rocks at you to keep you rowing (;-)

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #21 on: December 07, 2012, 12:57:07 PM »
WELL did it work???

(;-)TP
Re: Display WHOLE # Only in DRO
« Reply #22 on: December 07, 2012, 02:58:24 PM »
It did for a while. Started getting goofy. Intermittent, yhen gradually crapped out entirely.

Ended up with no Pump at all ... put it all in 1 button.

1 line does the math, the next line FIX's the integer to the requested DRO.

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


Tried for hours and cannot make it fail.

Would be nice to have it update automatically in the pump, but this will be OK.

Thanks Guys
Russ

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #23 on: December 07, 2012, 03:02:00 PM »
I think you need to find out WHY your PUMP is failing.  That cannot be a good thing. Here those routines have been running since yesterday without a problem.

(;-) TP
Re: Display WHOLE # Only in DRO
« Reply #24 on: December 07, 2012, 03:08:32 PM »
One thing I noticed, is it possible that it might be goofy acting if the Screen Designer is left running ?
I tried sooooooooooooooo many things last night, I may have confused it. Had Macro's disappearing and saving where the shouldn't be, multiple editors open .... might try again fresh later.
Thanks TP


Oh, and BTW ....
For an experiment, I left the 1 line for the math in the pump and assigned Ger's script to a button, TP's script to another button and some cobbled up script of my own to another button.
All/any of the 3 buttons worked fine ... every time.

Just never could get both functions to play together in the pump.

Went to bed this morning w/a headache, woke up w/a hangover.
« Last Edit: December 07, 2012, 03:18:32 PM by Overloaded »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #25 on: December 07, 2012, 03:18:29 PM »
DO NOT run with multiple editors OPEN it can be a really BAD thing. Leaned that the hard way long ago.   SAME with MachScreen Close it before you load mach3.

I did not mean to hit you in the head with one of the rocks BUT Gerry may have (;-)

(;-) TP
Re: Display WHOLE # Only in DRO
« Reply #26 on: December 07, 2012, 03:21:37 PM »
 ;D
I'll blame you both. >:D
One hit me in the head .... and another went through the floor of the boat. :D

Anxious to try again.
Mind to paste me the EXACT file you have running in the pump ?  ::)

Thanks,
Russ :)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #27 on: December 07, 2012, 03:27:06 PM »
I m not at that PC right now but it is the same code listed above.

If Fix(GetDro(0)) = GetUserDro(1555) Then

End
End If


SetUserDro(1555, Fix(GetDro(0)))
While Ismoving()
Wend

End   
Re: Display WHOLE # Only in DRO
« Reply #28 on: December 07, 2012, 03:37:12 PM »
OK, i'll try it again later tonight.
Keep in mind tho .... there's that other line in the pump that does the math for the dro's.
The scripts must work together, I think this is where I had the problems.
Thanks

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display WHOLE # Only in DRO
« Reply #29 on: December 07, 2012, 04:43:03 PM »
This might work (as I pick up another rock (;-) )  IF you did not need to visually see/update the DRO(1107) then it could be even simpler AND faster to execute. By th ewy what VERSION of mach3 are you running ?



If Fix (GetUserDro(1105)/(GetUserDro(1100) + GetUSerDro(1104))) = GetUserDro(1106) Then
End
End If

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

End