Home > Forum > Controllers SlimLine e Netsyst (LogicLab) > Creation of web pages setting/displaying variables
- This topic has 3 replies, 2 participants and was last updated 2 months, 2 weeks ago da Sergio Bertana.
-
AuthorPost
-
February 7, 2024 at 2: 01 pm #75843AuthorlessIdle
Can I have some general indications for writing web pages where I can set the values of the variables and constants that I have defined in the program. That is, I would like to set from the web page/browser the values that define all the parameters of the modbus that I query (IP, port, slave ID, starting address, number of bits to read etc...)
And maybe then another web page where I see the modbus values that the PLC publishes (light on/off, dim value etc....)
In LogicLab where there are the various POUs there is also a "resources" section where HMI objects can be defined. I haven't found an explanation of what they are and how to use this section in any manual (here in my opinion there is a lack of documentation). Do they serve my purpose? I saw that they can be linked to variables, but then where do I find them?
I read that you can create html pages and copy them to the PLC's web folder. But I see that you can only access variables defined in DB100 (which I assume is the PLC memory).
What address are the variables and constants that I have defined in my programs running on the PLC? How do I declare them in the html page?
February 7, 2024 at 2: 05 pm #75846Sergio BertanaAdministrator ForumFor the creation of customizable web pages you can refer to this article. In all the examples in the article the HTTP server integrated into the operating system is used, this server operates only with variables allocated in the DB100.
As you can see in the explanations, by defining TAGs the server in the display automatically replaces the TAG with the value of the indicated variable. Similarly, by defining ARGs the browser sends the defined value to the server which will be stored in the indicated variable.
So to use this technique you just need to allocate all the variables you want to operate on in DB100. Currently I believe it is allocated automatically so it will be enough to define a location in the DB100.
The whole scenario changes if you instantiate the FB instead HTTPServer which allows you to manage the sending and receiving of data to the browser directly from the PLC program. In the example shown, the data is exchanged in JSON but you can use any other type of formatting, it depends on your program.
February 7, 2024 at 2: 46 pm #75849GiussargParticipantGood morning, I'm interested in the topic, I just wanted to do the same thing.
Following what is indicated:
Where can I find documentation for using the “resources” section of LogicLab?
How must the declaration of a variable/constant be made to be allocated in DB100?
Is there a tool that allows me to structure html pages, both for data and for layout?February 9, 2024 at 7: 58 am #75851Sergio BertanaAdministrator ForumLet's start by clarifying the tab Resources of LogicLab, this tab allows you to enter the management of our Picoface and the display integrated into the systems Netlog which as you can see are two end-of-life products. So this tab has nothing to do with web pages.
The variables in DB100 are assigned like any other variable, a name, a type and an allocation address are defined, the variables allocated in the addresses from DB100.0 to DB100.2047 are not retentive, those allocated in the addresses from DB100.2048 to DB100.4096 .XNUMX are retentive.
Another precaution on systems with ARM architecture, like all our systems, the variables must be allocated to an address aligned with the type of variable, therefore while the one-byte variables can be allocated to any address, the 2-byte variables must be allocated to addresses divisible by 2 and 4-byte variables must be allocated to addresses divisible by 4.
As an HTML editor we do not have a specific program, it is possible to use one of the many tools available online.
-
AuthorPost
- You must be logged in to reply to this topic.