Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2016-11-25 14:43:08

benfilteau
Member
Registered: 2015-11-01
Posts: 24

Upload program from the PI

Hi,

Maybe we can do it right now but i don't know how. Is there a way we can upload the application from the raspberry PI to the programming computer ? It is a feature i have in some of my plc brand and it is very useful when i'm not sure if i have the last version. Of course i can see the version compare but if i am away with my personnal computer and Rexdraw it will be very usefull. If it is not possible, it will be a nice thing to have with a selection box to save the program in the RPI.

Also, is it possible to have three or four programs running on the raspberry pi and access them with only one web server (or one per application)

Thanks

Benoit

Offline

#2 2016-11-28 10:07:34

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Upload program from the PI

Hi Benoit,

thank you for your suggestion. This feature is already on our ToDo list.
For now, you can try a workaround with some limitations:

  1. Add "HMI" function block to your executive.

  2. Specify "SourceDir" parameter.

  3. All content from "SourceDir" except WebBuDi or RexHMI source files will be copied into
    "HmiDir" if "IncludeHMI" is enabled. (for more details see HMI function block docs)

  4. Default path on the target device is "/rex/www" - can be configured by rexcore.cfg file - see RexCore Configuration Guide

There is no unified way how to transfer the project files back to your programming computer. For example, it is possible to use WinSCP.

Note: This approach is originally meant to be used only for HMI related files - therefore all the files can be accessed via web interface (possible security issue if you want to keep your project files hidden for some reason)

benfilteau wrote:

Also, is it possible to have three or four programs running on the raspberry pi and access them with only one web server (or one per application)

Yes, it is possible to have several programs (we call it "tasks") running on one target device. Both options for HMI are possible - one web page accessing all tasks or separate web pages (connected by links). For multiple HMI webpages on the target device see /viewtopic.php?pid=2#p2

If you require any further information, let me know.

Regards, Tomas

Offline

#3 2016-11-28 21:55:44

benfilteau
Member
Registered: 2015-11-01
Posts: 24

Re: Upload program from the PI

Hi Tomas,

Thanks for your answer.

After reading my question about the tasks i was not clear. I was aware about that we can run 4 tasks connected to one master exec. But can we have more than one exec and tasks in one PI and the most important point, can the programs talk to each others. By doing that i can have 20 trends in one program always connected to an unused tag. When i need to trend a new variable i just connect it to an empty tag aleady connected to the trend block. In my other program, the process control. So when i download to the PI i will not loose my trend history.

It is a bit hard to explain very clearly. I did ask about keeping the trend after a download and it was not possible. So i'm trying to find another way to do it.

Also, i was looking at the CSS file to modified to change the color and the logo of the blue banner on the web page but i do not find the location of the good one to change. Can you help ?


Thanks

Benoit

Offline

#4 2016-11-29 07:15:12

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Upload program from the PI

benfilteau wrote:

....connected to the trend block. In my other program, the process control. So when i download to the PI i will not loose my trend history.


If you assign an archive to the TRND function block then you will not loose your data. Then you can use the TRND FB for fast short time trending and the archive can be used to store the long time trending (reduce amount of data by averaging over a certain period)

Offline

#5 2016-11-29 13:26:44

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Upload program from the PI

Hi Benoit,

if your only motivation for multiple programs running simultaneously is a trend history, I would suggest the same as scoobsalamander already did in previous post - trend connected to the archive (thank you, scoobsalamander, for sharing your experiences).

Another option is use of external database and sending data from Rex Control System via database driver.

benfilteau wrote:

Also, i was looking at the CSS file to modified to change the color and the logo of the blue banner on the web page but i do not find the location of the good one to change. Can you help?

I see your point that our logo and blue banner doesn't always full-fill all design expectations and needs. However, customisation of RexHMI is available on individual basis. Please contact our sales department for more details.

Regards, Tomas

Offline

#6 2016-11-29 14:06:36

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Upload program from the PI

benfilteau wrote:

Also, i was looking at the CSS file to modified to change the color and the logo of the blue banner on the web page but i do not find the location of the good one to change. Can you help?

Maybe one of these topics can help you ....


Auto including 'MyCSS' style sheet is not working properly

or....

Creating a button in Inkscape

Offline

#7 2016-11-29 23:20:26

benfilteau
Member
Registered: 2015-11-01
Posts: 24

Re: Upload program from the PI

Hi.

I'm a little bit confused about the trend block and the archive now. As far as I know, the TRND object in HMI can't access the arc block. Has this changed lately?

I always use only 1 minute record over weeks nothing fast here. We read gaz sensors in a mine. I may be better with another trend tools but i'm on a two very secure networks with one RPI. The RG45 port on my PLC network and i use ethernet dongle on the corporate side and rex in the middle. It works perfectly. This is why i'm trying to find another way of staying simple with only rex control tools. I can't go out for things like google chart or plotly. That is why i want to have an historian and a process control program.

Thanks for your helps,

Benoit

Offline

#8 2016-11-30 14:01:47

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Upload program from the PI

Hi Benoit,

sorry for confusing you. HMI can't access archives still. The archives can be accessed only via RexView for now (will be improved in future).

I can think of two possible solutions:

Extra Raspberry responsible only for trends
Extra Rex Runtime which will only collect data from all sensors and display it HMI.
The communication between Rex runtimes can be provided by REST API.

RexHMI display still images produced by external tool
Current version of RexHMI has new component called ImageChanger - it refreshes image on specified trigger signal.
EPC function block can be used to save text file with sensor data. This data will be processed afterwards by external graphic tool (we have good experiences with gnuplot) and saved as image (.png) in RAMDISK. The images can be displayed in RexHMI.
This procedure can be triggered for example every minute or so depending on your needs.

Regards, Tomas

Offline

#9 2016-12-03 10:47:03

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Upload program from the PI

benfilteau wrote:

......

I can't go out for things like google chart or plotly. That is why i want to have an historian and a process control program.

Thanks for your helps,

Benoit

...maybe you should take a look at Node-red. In collaboration with a MySQL database I think you should be able to store longterm data and visualise it on a dashboard.

https://www.npmjs.com/package/node-red-contrib-graphs

By means of the REST API you can exchange data between REXcontrols and NODE-RED.

Last edited by scoobsalamander (2016-12-03 10:52:25)

Offline

#10 2016-12-12 22:10:27

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Upload program from the PI

Another great way to store data is by using the time series database Influxdb and for visualisation of the data you can use Grafana (web based GUI)

At the moment I'm still using Node-red to send my data to the Influx database but this should also be possible straight from REXcontrols. (I think)


(Influxdb - HTTP API)

Some info to start with.....  http://padcom13.blogspot.be/2015/12/inf … na-on.html

All can be used offline without an internet connection.....

Last edited by scoobsalamander (2016-12-12 22:11:04)

Offline

#11 2016-12-13 12:27:49

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Upload program from the PI

Example of use of Grafana. This dashboards shows the data I collect from my Daalderop boiler by means of a Opentherm Gateway and are stored in a InfluxDB database.

I have no experience in long time use ... but until now it is doing fine.


2016-12-13-12_21_41-REX.png

Offline

#12 2016-12-13 23:24:10

rexpeter
Member
Registered: 2016-09-06
Posts: 67

Re: Upload program from the PI

Hi Scoobsalamander,

Very interesting topic. I really like that. Need to investigate more in that direction I guess.....
Thanks a lot for sharing this.

Regards,
Peter

Offline

Board footer

Powered by FluxBB