You are not logged in.
Pages: 1
Topic closed
Hi,
I'm intending to use some animations of a simply drawing presenting for instance a bulb that is either ON or OFF indicated by a different color.
How to implement that?
I assume the Image Changer would be the tool for that, but I don't understand how to use that one.
If there is anything written or used as example somewhere, that would be great.
Thanks,
Peter
Offline
Hi Peter,
thank you for your question. Image Changer could be used to achieve described behaviour however it is also possible to use just "opacity" animation (ON image shown/ OFF hidden and vice versa). For more complicated cases I would go for the image changer.
The documentation can be found here: https://www.rexygen.com/doc/PDF/ENGLISH … df#page=22
Please, be aware that there are documentation generator accidentally discarded brackets "{}" in "imagePath" parameter. The "imagePath" parameter in case of using "appendKey" option should look like: /hmi/images/img-{0}.png
The substring "{0}" in the file name will be replaced with any current read value (number, string, ...).)
I also recommend you to have a look at example "0301 - 08 HMI Animation DEMO" which is part of installation. It will give you an idea how to use various animations in REXYGEN HMI Designer.
Hope it will help you. If you run into any troubles, let me know.
Cheers, Tomas
Offline
Thanks a lot Tomas,
I will have a look at it and give it a trial.
Best regards,
Peter
Offline
Hi Tomas,
Thanks for your assistance.
It is clear now to me and for the convenience of others I have posted an example project (edited by admin, see next post for explanation).
This is how the HMI looks like with factually 5 "images" that will change upon pressing the "demo button".
The images show the settings of the component.
The last image is showing where and HOW the files are stored in the HMI folder.
Edited by admin, see next post for explanation:
NOTE: please make sure you have switched OFF the GenerateRexHMI parameter in the HMI block!
If you have that one ON, the HMI folder will be overwritten and all the images that you want to show will be gone!
Regards,
Peter
Last edited by jaroslav_sobota (2018-11-02 12:38:25)
Offline
Hi Peter,
thanks for the example! Though I had to modify it a bit and here is the updated example project.
Let me explain the modifications:
The PNG pictures should be placed in the hmisrc/images subfolder inside the project folder. That way all the pictures will be included in the resulting HMI. See the HMI block documentation for details.
The HMI:GenerateRexHMI parameter should be set to on. That way the SVG source file is automatically processed during project compilation, giving you the most up-to-date HMI without any effort.
It is recommended not to remove the block type from its name, so I changed the name of the block in your task to CNI_ImageChanger.
I have updated the connection strings in the SVG file, so that it correlates with step 3.
I have updated the description in the SVG file (information about path)
The resulting HMI looks like this:
I also noticed there is some bug in the Switch element, which prevents it from animating. Normally the switch is supposed to rotate as you click it.
Thanks again for your post!
Kind regards,
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Hi Jaroslav,
Thank you for the update on this. This certainly will help as there are things that I was not aware of, just figured out by trial and error. Now I'm getting a learning lesson from a professional :-)
Thanks a lot, this helps me and I hope others will benefit of this as well.
Best regards,
Peter
Offline
Pages: 1
Topic closed