Custom display component
-
Hello,
You described a process for custom switch component.
But, is it applicable for custom displays as gauges or specific links lines ?
Here is a gauge I would like to realise,
The rounded arc, could change color, with a variable value, and the center iron turn auround the arc with a specific angle.
The center Iron could change color too.
For exemple for a speed gauge.
Many thanks any replies
-
@Tourneur Hi! Thanks for your question. Yes, this is possible using basic animations. The green line will rotate according to the desired signal.
Have a look at the example: 0301-08 HMI Animation DEMO.
Kind regards,
Tomas -
Hello, Cechurat,
First of all, i send you my apologies for this very late reply.
Before responding to you, I would like to understand how can I realize this component.
First of all, I readed the script tutorial in this previous forum :
https://www.rexcontrols.com/forum/viewtopic.php?pid=180#p180And try to start from the first exemple #4, in case to understood the principe of realisation.
But, start one thing :
This tutorial, start by :
Open a blank document in inskape (Without "RexHmi Config object")
Does i need to install a generic version of Inskape, a no Rex version ?
Does it couldn't risk to detect the rex version, and froze if I install this generic version into my computer ?
Second thing,
At step 12, Mr Sobota, said, add the ns0:tag
Ok, but how could do it ?
I try to compare with issues found on forum, but with a certain clearly differences.
Does it this tutorial I have to see step by step ?
Or does I completly not in the correct way ?Thanks any help
-
@Tourneur Hi! For the gauge sketched at the beginning of this topic you don't need any hand coding and the old forum post is overkill.
Just have a look at the example 0301-08 HMI Animation DEMO and read HMI documentation - Chapter 3.3.1 Group Animation: https://www.rexygen.com/doc/ENGLISH/MANUALS/RexHMI/RexHMI_ENG.html#x1-180003.3.1
Kind regards,
Tomas -
Hello Cechurat,
Quite good thing !
First I could realize an analog control from HMI panel,
And effectively, I succeeded to control line iron of my proper gauge.But, in my particular case,
I would like to control the pivotation of the needle, with it end fixed on the center of the circle, like an watch clock needle.
My actualy problem, is that the needle turn completly, like it center point is on the center of the line of needle.
How could I change this pivot point ?
Or let the one end fixed on a desired point ?I think you understood what I try to explain, but have a look on my picture :
At 0 needle is not pivotate around the circle
At 20 needle, normaly must pivotate at 20% around the circle, but here, you can see, needle turn around itself.Not my desired search...
Thanks
-
@Tourneur Hi! What a progress - great!
You just need to change the pivot point by means of the Inscape editor. Feel free to Google any Inkscape-related documentation on this (e.g. https://www.tutorviacomputer.com/inkscape/rotate-flip-objects/)
Note: Once the object is "animated" by REXYGEN Extension I recommend you to delete the object, change the pivot point and make the animation again.
Good luck!
Tomas -
Hello Tomas,
Thanks in advance for the trick !
My gauge start to look like the real one,
With little bit difference like the color.I had fews setting with the starting angle, but with the bracket keys trick, it work so good !
Thanks a lot for help !
Now I have to reproduce it with the real colors and other parameters like circle colors change.
Does it be possible to save this animation group as a custom component ?
Or does I need to rebuilt it at everytime I require it ?Thanks again a lot Tomas !
-
@Tourneur Hi,
glad you made it work!
Yes, it is possible to make a custom component (separate SVG file). For more details see example "0301-12 HMI with External file".
Cheers,
Tomas -
Hello Tomas,
After read and read again the first lines of the procedures,
Unfortunately, I cannot arrive to register my component.If we take your "procedure note", in the exemple 0301-12,
I would like to register my gauge,
In first step I select my circle and needle as group of component.An error flag appear with this message :
Does it mean I need a background square for my component ?
In the procedure, at line 11, "check external file and close the dialog with ok
Does it mean in group animation window : Ticking "import content of the group from external file"If yes, I have some troubles with "import content", meaning for me we not export the selection, but rather the reverse.
I tried to redesign the component on a blank page with a square as a background with the circle and the needle, and repeat the procedure.
And tick external file square.In the procedure, at line 15, "open the extenal file and had some content"
When we tick this case and close the group box by ok, it register the component automaticly ?
But where ?
I try have a standalone component which could use on any independant project.
Does I need to apply rather the procedure for a custom button explained at the top of the forum ?
Can you help me
Thanks