Quote from JnCon on November 22, 2019, 9:32 pmI'm currently working on a project that read values from an .xml file and display them.
The values are the similar format: unit="mm*1/1000" value="8846". I would like to display this both in original and in 8.846 mm format.
It seems easy, but the problem is, I can change the original (8846) value by modify the numbers in a text box, change a trackbar or push + or - buttons parallel. Of course, if the value changed by the text box, I can use the "Text Change" event to do this, if it's changed by trackbar the "Value Changed" event and so on. But I would like to display the mm format when I change any of them.
Is there any possibility to do the division simply by changing the variable value or should I write the script for every component what I use to set up the value?
Other (but not serious), that the .xml file is in UTF8 format, so the accented letters are not displayed correctly.
Thanks in advance.
I'm currently working on a project that read values from an .xml file and display them.
The values are the similar format: unit="mm*1/1000" value="8846". I would like to display this both in original and in 8.846 mm format.
It seems easy, but the problem is, I can change the original (8846) value by modify the numbers in a text box, change a trackbar or push + or - buttons parallel. Of course, if the value changed by the text box, I can use the "Text Change" event to do this, if it's changed by trackbar the "Value Changed" event and so on. But I would like to display the mm format when I change any of them.
Is there any possibility to do the division simply by changing the variable value or should I write the script for every component what I use to set up the value?
Other (but not serious), that the .xml file is in UTF8 format, so the accented letters are not displayed correctly.
Thanks in advance.

Quote from HPW on November 23, 2019, 7:42 amHello,
You can define a subroutine for the mm-code and put the subroutine call everywhere you change the value.
You did not tell where/how you process/parse the XML. There would be the place to handle Format Problems.
Regards
Hans-Peter
Hello,
You can define a subroutine for the mm-code and put the subroutine call everywhere you change the value.
You did not tell where/how you process/parse the XML. There would be the place to handle Format Problems.
Regards
Hans-Peter
Quote from JnCon on November 23, 2019, 2:41 pmHello Hans-Peter,
thank you for your quick reply.
Currently I use this subroutine to do the job (original solution was the same as you mentioned):
:ServoPosInMM
Math "[iSelValueFServo]/1000" "-1" "[iFServoInMM]"
ReturnBut my problem, that I have to call the subroutine from every component's event list where values changed.
Plus, I have to handle 6 independent parameter (read -> display -> modify-> save to xml) so in this case I need 6 subroutines.
It's not a big deal, but if it was a simplier way (e.g. a script runs automatically when a variable value changed), the code could be smaller. No problem, the method remains the original.
In this xml file we stored several data and parameters for products loaded to a PLC.
I need to modify only 6 lines/product that contain the servo positions, not the whole xml file. To select the required lines and find the values I use your hpwControl plugin wich is a great stuff and does the job perfectly.
Hello Hans-Peter,
thank you for your quick reply.
Currently I use this subroutine to do the job (original solution was the same as you mentioned):
:ServoPosInMM
Math "[iSelValueFServo]/1000" "-1" "[iFServoInMM]"
Return
But my problem, that I have to call the subroutine from every component's event list where values changed.
Plus, I have to handle 6 independent parameter (read -> display -> modify-> save to xml) so in this case I need 6 subroutines.
It's not a big deal, but if it was a simplier way (e.g. a script runs automatically when a variable value changed), the code could be smaller. No problem, the method remains the original.
In this xml file we stored several data and parameters for products loaded to a PLC.
I need to modify only 6 lines/product that contain the servo positions, not the whole xml file. To select the required lines and find the values I use your hpwControl plugin wich is a great stuff and does the job perfectly.


Quote from as3856 on November 23, 2019, 10:26 pmThe problem is that there is no line feed. The plugin is Russian-speaking.
--
Somewhere there was a plugin to control file changes .. it would probably be better suited to solve such problems. --
Andrei (as3856)
The problem is that there is no line feed. The plugin is Russian-speaking.
--
Somewhere there was a plugin to control file changes .. it would probably be better suited to solve such problems. --
Andrei (as3856)
Quote from JnCon on November 24, 2019, 11:38 amHello Vadim and Andrei,
I've just tried this plugin, but because of Russian language wont' work properly in english version of NeoBook (I use an older version, not the VisualNeo) - as Andrei wrote before.
Thank you for your recommandations!
Hello Vadim and Andrei,
I've just tried this plugin, but because of Russian language wont' work properly in english version of NeoBook (I use an older version, not the VisualNeo) - as Andrei wrote before.
Thank you for your recommandations!
Uploaded files:
Quote from Vadim on November 24, 2019, 5:43 pm@jncon
After November 27th I will do the translation. Until this time, very busy. You need to wait a bit.
After November 27th I will do the translation. Until this time, very busy. You need to wait a bit.

Quote from Vadim on November 28, 2019, 2:56 pm@jncon
I made a help file using google translator.
I will be glad if you correct the translation and publish the corrected version of this file.
I made a help file using google translator.
I will be glad if you correct the translation and publish the corrected version of this file.
Uploaded files:Quote from JnCon on November 29, 2019, 12:54 pmHello Vadim,
many thanks for your effort, I hope I can do it during next week.
BTW, I took a look at the file and it seems correct by and large.
Hello Vadim,
many thanks for your effort, I hope I can do it during next week.
BTW, I took a look at the file and it seems correct by and large.
