Logi.Cad 3

Topics about the Software of Revolution Pi
Post Reply
rafa
Posts: 6
Joined: 30 Jan 2017, 09:08
Answers: 0

Logi.Cad 3

Post by rafa »

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.
User avatar
Mathias
Posts: 130
Joined: 29 Nov 2016, 10:46
Answers: 0

Re: Logi.Cad 3

Post by Mathias »

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
rafa
Posts: 6
Joined: 30 Jan 2017, 09:08
Answers: 0

Re: Logi.Cad 3

Post by rafa »

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.
User avatar
dirk
KUNBUS
Posts: 1942
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Logi.Cad 3

Post by dirk »

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.
rafa
Posts: 6
Joined: 30 Jan 2017, 09:08
Answers: 0

Re: Logi.Cad 3

Post by rafa »

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.
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41
Answers: 1

Re: Logi.Cad 3

Post by volker »

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.
Unser RevPi Motto: Don't just claim it - make it!
User avatar
dirk
KUNBUS
Posts: 1942
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Logi.Cad 3

Post by dirk »

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.
Exists a library for accessing DIOs or variables defined in LogiCad 3 through php to display them on a web page?
I have no details about the possibilities of LogiCad 3. Maybe the LogiCals support can answer this.

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.
rafa
Posts: 6
Joined: 30 Jan 2017, 09:08
Answers: 0

Re: Logi.Cad 3

Post by rafa »

Is possible the Logi.Rts webserver installation in the RevPi Device?
User avatar
Mathias
Posts: 130
Joined: 29 Nov 2016, 10:46
Answers: 0

Re: Logi.Cad 3

Post by Mathias »

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
User avatar
juergen
Official 3rd Party Support logi.cals
Posts: 37
Joined: 10 Nov 2016, 14:14
Answers: 0
Location: St. Pölten
Contact:

Re: Logi.Cad 3

Post by juergen »

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.
Exists a library for accessing DIOs or variables defined in LogiCad 3 through php to display them on a web page?
I have no details about the possibilities of LogiCad 3. Maybe the LogiCals support can answer this.

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.
at the moment it is not possible to share the variables through php.
What do you think about MQTT?
Post Reply