Realize my own "index.hmi.js" file, for my own application
-
Hello,
I am sorry, but...
How we can realize our own "index.hmi.js" file ?
Up to now, I used an example one described in the documentation, "my-project"
And copy/paste the example in a note file.
This subfolder, was proprietary of "my_project".
But now,
I start a personal project, but with it own "index.hmi.js" file.
I searched in documentation, without finding any explaintion for writting our proper "index.hmi.js"
Without this configuration file, I cannot starting anything
How can I constitute this script ?
Thanks you
-
@Tourneur Hello,
please, take a look at the HMI documentation, chapter 4.
Cheers,
Jan -
Hello,
Absolutely a nightmare script !
I thinked, outpass theses type of programming nightmare...
Rexygen noticed programming "without hand coding".
...It's absolutely false.
I don't know by what starting with this script, and don't know if I could arrive to realize any functional script.
I fall from hight with that ...
I could revise clearly my future licence purchasing...
If exist easiest way to realize this script with an existing one, I 'am open...
-
@Tourneur Dear Ludovic,
first of all, please do not confuse REXYGEN control system and visualization. I understand that JavaScript may be beyond someone capabilities. But why did you choose this type of visualization, which is the only one that has to be "programmed"? Have you tried creating a visualization in REXYGEN HMI Designer, where programming is minimal?We will be happy to direct you further if you encounter any problems. We are only asking for substantive contributions. Ideally in full sentences and with a precise description of what doesn't work for you.
Cheers,
Jan -
Hello,
For sure, JavaScript, is truely not my tea cup...
And yes, I am tried to creating visualisation in HMI Designer.And to respond to you query "Why I choose this type of visualisation"
If you know another way, to control the objects in Inkscape, via an I/O interface, I am interested...In occurence "x.xx" must be a voltage value on my display, which I would displaying from Raspberry pi.
And i am actually frozen by this script, constitution since 2 days...
Where many people do this in few minutes...I just require basic help with the constitution of a standard scripts to built, without objects.
If I arrive to built my proper connexion between my visualisation and my target, with input and output, of course I will purchase a license, for sure.
But If I cannot do it by myself, logicaly I will return where a different system, less complex, with a lot of frustrations ...Good evening
-
@Tourneur Hello,
I feel like we might not understand each other. For your visualization, you should use HMI Designer, which you already have. The data for the visualization comes from the program running in RexCore, which runs on your Raspberry Pi. You create a program using REXYGEN Studio on your PC. You make this program by dragging lines and connecting blocks. You don't need to write any code:
The JavaScript you were trying to use is a different type of visualization and does not work with HMI Designer. Let's go back to the basics. Did you look at this manual? It explains what everything is and how to set up RexCore on your device and create your first simple project.
Your project goal is that you will display values from a program running in RexCore in a visualization on a Raspberry Pi with a display, is that right? Will the values be read from any sensors?
Cheers,
Jan -
Hello Jan,
... I understood, that Rexygen Studio, is a functional program, comprising an executable program, and a task program running together.
Without HMI designer, it's like a simple (advanced) PLC.
With HMI designer, operator can interact visualy with the PLC, or simply show somes values from the PLC, in my case, a Raspberry Pi.
In HMI Designer, I have to connect "aliases" objects with my task program in Rexygen Studio, as "connnectors strings".
I think, I not commit error at this point of comprehension...
At chapiter 4.3 (adding a user interface),
I start ,effectively to play in another world, with the creation of "hmisc" subfolder and the "index.hmi.js" file.
If I not commit error, this "index.hmi.js" file, is necessary to etablish a connection between my task and the "aliases", and my visualisation in HMI designer.
This "index.hmi.js", which is, if I correctly understood, is the "script link" between my visualisation in HMI designer and my program Task.
Without it, I cannot etablish link between my task in Rexygen studio and my design in Inkscapte (cause we work with Inkscape).
But If I am not correctly understood real use of this "index.hmi.js", file, wich have a totally another useful, effectively I comited a big stupid thing in sending this query, in the forum.
-
Effectively,
I would like to display values from sensors, but throught an Arduino interface which communicate to the Raspberry Pi board, with a serial bus (RS232).
But at this point I start to etablish analogue link between my task and my design, which is not yet accomplished.
-
@Tourneur Hi, you are basically right about the first part. Only REXYGEN Studio is not a control program. It is a tool in which a program can be created.
To the second part: The index.hmi.svg visualization file contains the connection strings you set there. No additional
index.hmi.jsis needed (it's a different visualization type). It would be great if you went through the process of creating a simple example, which is described in the instructions, the link of which I sent in the last post. There is also a chapter on HMI: https://www.rexygen.com/doc/ENGLISH/MANUALS/RexygenGettingStarted_RasPi/RexygenGettingStarted_RasPi_ENG.html#x1-40000AP.S: You will need to program for data communication via RS232. Communication will need to be set up in the REXYGEN or Python block.
Cheers,
Jan -
Hello, Jan,
First of all,
All my apologies, for my very late replying.After, reading and re-reading of documentation, in particular the "appendix A of Graphical HMI, with Rexygen Designer"
I came back to my house, and I rebuild completly my system task.
And tryed some tricks, to find my miscelanous issues.First of all, I renamed my HMI saved file (in my case) "Ecam_DC.svg", by "e.g.designer.hmi".
A note described on the chapter, explain :
"If you want to replace the WeBuDi interface with Rexygen HMI designer interface just delete the index.hmi.js and save the HMI as index.hmi.svg"
At this point, I didn't know if I have to put a virgin note noted "index.hmi.svg"
So I decided, to not put anything.
None notes in the hmisrc file.
Neither "index.hmi.svg", neither "index.hmi.js"I realized a task with a time generator connected to a display, and configurate the Aliase corresponding to the display in my HMI design.
After some settings, my display run correctly in the page.
Seconds simulate Volts (with no decimals).On picture it is frozen, but with running program the display (BAT 1 voltage), count every second.
After that it could be interesting to show or not the green bars, but I will see after.
Cause in the real use of ELEC DC system, if system is not present, barrs are not visibles.
You can check the picture below
I could try next a little project, with a simple control, sliding or push button, and see if working.
If it will be succefful, I do not think with not pass to licence mode ...
When I spoke (written), etablishing a UART link between the target and a local host (in occurence one Arduino board), It's at the absolutely end of the project.
I just responded to your question with sensoring values.Before do that I have to mastering a "little bit more" the using of Rexygen.
At this time, I am just a little newbie, not again a master Jedi of Rexygen...At this point, I have always not understood, the useful of the notes explained in the documentation.
Particularly this one
"If you want to replace the WeBuDi interface with Rexygen HMI designer interface just delete the index.hmi.js and save the HMI as index.hmi.svg"
Thanks for your great patience
-
@TourneurHello,
Thank you for sharing the details of your progress and providing such comprehensive information. Taking small steps is indeed the best approach and the most reliable way to achieve your goals. If you encounter any further issues, please do not hesitate to reach out.A note in the documentation: "If you want to replace the WeBuDi interface with the Rexygen HMI designer interface, just delete the index.hmi.js and save the HMI as index.hmi.svg" is mentioned because the visualization was created using WeBuDi in the above steps. If you didn't follow this process for WeBuDi, this note is not relevant to you.
Keep up the great work, and we're here to help whenever you need it!
Cheers,
Jan