Logi.Cad 3
Hello,
I'm a classic plc programmer and now I'm testing RevPi & Logi.Cals 3.
how I can store some values in the memory area, that don't lose it these values after cold start or reboot the device, like a memory table of standard plc?
Thanks.
Rafa.
I'm a classic plc programmer and now I'm testing RevPi & Logi.Cals 3.
how I can store some values in the memory area, that don't lose it these values after cold start or reboot the device, like a memory table of standard plc?
Thanks.
Rafa.
Hi Rafa,
I am sorry, but permanent variables, that keep their values even if you turn the system off and on again, are not supported at the moment.
We plan a real hw solution for that, but I can't tell when it will be available.
One solution would be to write the data a file from time to time. But there you will have to handle the problem, that data written to a file shortly before the system is turned off will usually get lost. You should have older versions of the file as fallback.
Mathias
I am sorry, but permanent variables, that keep their values even if you turn the system off and on again, are not supported at the moment.
We plan a real hw solution for that, but I can't tell when it will be available.
One solution would be to write the data a file from time to time. But there you will have to handle the problem, that data written to a file shortly before the system is turned off will usually get lost. You should have older versions of the file as fallback.
Mathias
Thanks for your comments.
Can I save the values with Logi.cad 3 to a mySql database or similar using for example html-json and retrieve them?
Rafa.
Can I save the values with Logi.cad 3 to a mySql database or similar using for example html-json and retrieve them?
Rafa.
Hi Rafa,
maybe you should give https://www.sqlite.org/ a try. It supports atomic operations and is more lightweight compared to a mysql server.
maybe you should give https://www.sqlite.org/ a try. It supports atomic operations and is more lightweight compared to a mysql server.
Thanks Dirk.
SQLite works fine in a c-block and now I can insert data into a database.
Exists a library for accessing DIOs or variables defined in LogiCad 3 through php to display them on a web page?
Rafa.
SQLite works fine in a c-block and now I can insert data into a database.
Exists a library for accessing DIOs or variables defined in LogiCad 3 through php to display them on a web page?
Rafa.
interesting discussion...
Please note that if you use the RevPi Core eMMC for a data base: eMMC as any flash device has a limited number of erase/write cycles and thus is not intended for continuous high rate data logging! You should push data up into the cloud or to a server to permanently store and retrieve it. Or use a traditional hard disk drive via USB if you need to have this local.
Please note that if you use the RevPi Core eMMC for a data base: eMMC as any flash device has a limited number of erase/write cycles and thus is not intended for continuous high rate data logging! You should push data up into the cloud or to a server to permanently store and retrieve it. Or use a traditional hard disk drive via USB if you need to have this local.
Unser RevPi Motto: Don't just claim it - make it!
What Volker mentioned is an important fact which I forgot.
If you dont need historical data, you can move your database file to /tmp which is in memory.
Then you have to recreate it on startup i.e. by copying it form a permanent storage.
But the DIOs are accessible via the names defined in PiCtory.
There is example code in C and Python available in the download section to show how to do this.
For atomic access to the process image we recommend using the IOCTLs of the piControl driver.
So you should be able to find the variable by using one of the IOCTLs. But as mentioned here
https://bugs.php.net/bug.php?id=59336
IOCTLs will not be natively implemented in PHP at the moment. Therefore in PHP you should
call i.e. a python script which performs the IOCTLs and acts as a data provider.
If you dont need historical data, you can move your database file to /tmp which is in memory.
Then you have to recreate it on startup i.e. by copying it form a permanent storage.
I have no details about the possibilities of LogiCad 3. Maybe the LogiCals support can answer this.Exists a library for accessing DIOs or variables defined in LogiCad 3 through php to display them on a web page?
But the DIOs are accessible via the names defined in PiCtory.
There is example code in C and Python available in the download section to show how to do this.
For atomic access to the process image we recommend using the IOCTLs of the piControl driver.
So you should be able to find the variable by using one of the IOCTLs. But as mentioned here
https://bugs.php.net/bug.php?id=59336
IOCTLs will not be natively implemented in PHP at the moment. Therefore in PHP you should
call i.e. a python script which performs the IOCTLs and acts as a data provider.
Is possible the Logi.Rts webserver installation in the RevPi Device?
Hi rafa,
I am not sure what you mean.
The logiRTS ist already installed, but there is no web server from logicals as far as I know.
Mathias
I am not sure what you mean.
The logiRTS ist already installed, but there is no web server from logicals as far as I know.
Mathias
- juergen
- Official 3rd Party Support logi.cals
- Posts: 37
- Joined: 10 Nov 2016, 14:14
- Location: St. Pölten
- Contact:
at the moment it is not possible to share the variables through php.dirk wrote:What Volker mentioned is an important fact which I forgot.
If you dont need historical data, you can move your database file to /tmp which is in memory.
Then you have to recreate it on startup i.e. by copying it form a permanent storage.
I have no details about the possibilities of LogiCad 3. Maybe the LogiCals support can answer this.Exists a library for accessing DIOs or variables defined in LogiCad 3 through php to display them on a web page?
But the DIOs are accessible via the names defined in PiCtory.
There is example code in C and Python available in the download section to show how to do this.
For atomic access to the process image we recommend using the IOCTLs of the piControl driver.
So you should be able to find the variable by using one of the IOCTLs. But as mentioned here
https://bugs.php.net/bug.php?id=59336
IOCTLs will not be natively implemented in PHP at the moment. Therefore in PHP you should
call i.e. a python script which performs the IOCTLs and acts as a data provider.
What do you think about MQTT?