Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: joeaverage on October 06, 2021, 04:17:58 PM

Title: Gage Block DRO
Post by: joeaverage on October 06, 2021, 04:17:58 PM
Hi All,
I have build 4735 installed and have found a fault that I have not encountered before.

I use the gage block DRO occasionally and normally I would click on the DRO, enter the desired gage block height, hit <Enter> and the
new value sticks in the DRO. With this current build (4735) the value of the DRO is 5.0000 and if I update the DRO and hit <Enter> the value
remains 5.0000.  I've opened the screen editor and the DRO has an EditorProperty of 'In Place', and I would therefore have thought that the DRO should
update, but it does not?

Any ideas?

Craig
Title: Re: Gage Block DRO
Post by: joeaverage on October 06, 2021, 04:39:56 PM
Hi,
I have an earlier build (4162) on my desktop PC and it appears to work as I expect, namely that I can change the DRO by editing the value and hitting
<Enter>. The only difference I can see between the two DROs properties is that the later build (4735) has 'AnalogIn' and 'AnalogOut' properties. Neither
are populated however, but could their existence stop the DRO editor?

Craig
Title: Re: Gage Block DRO
Post by: smurph on October 08, 2021, 02:10:17 AM
Craig, are there any update or modify scripts with that DRO?  If so, look at the screen manual about the update and modify scripts needing to return a value to update the DRO.  4162 did not require this but newer build will. 

Steve
Title: Re: Gage Block DRO
Post by: joeaverage on October 08, 2021, 04:08:45 AM
Hi smurph,
yes, I did compare the On Modify script between the two builds and they are the same. What is it about the later build that requires extra code?
Is there an example of the code required?

Craig
Title: Re: Gage Block DRO
Post by: SwiftyJ on October 08, 2021, 02:34:46 PM
Hi Craig,

The code is something like this..

Code: [Select]
local droVal = select(1,...)  --This gets the value that was entered into the DRO.

droVal = droVal + 1 --Do some stuff

return droVal --Returns the value to the DRO and updates any linked registers etc.

I thought the DRO's were broken too at first, but this way of getting the value from the DRO is so much easier than what I was doing previously
Title: Re: Gage Block DRO
Post by: GOOMBA on October 20, 2021, 10:40:43 AM
Hello,
You just need the DRO on modify, or on update scripts to always return something now.
It's a change they made in the core some time ago, it should be fixed on all the screens in the development versions... which it looks like you're using... hmmmm
I'll check the screens, however if you're using an older screen with a newer build you'll run into this.
We'll start working on another release soon.
Title: Re: Gage Block DRO
Post by: joeaverage on October 20, 2021, 02:16:16 PM
Hi,

Quote
I'll check the screens, however if you're using an older screen with a newer build you'll run into this.

That describes the problem, I am using a older screen set that I have added to over time. I'll try using the current screen set
and update it with my mods.

Craig
Title: Re: Gage Block DRO
Post by: thosj on November 02, 2021, 07:03:20 AM
Hi,

.....I'll try using the current screen set and update it with my mods.

Craig

I've just done this and it was painful!! I was using an OLD version of WX4 modified over YEARS. I've now put all my mods into the current dev build 4759 screenset, so I'm future proof, tee hee!!

I know about using Notepad++ to compare the two screenscript.lua files, but there are other things that are NOT in screenscript.lua that are hard to find. I know, I know, I should have documented all this over the years, but.....!!

Am I missing any way to find all changes in a screenset?

Tom