Welcome, Guest
Username: Password: Remember me

TOPIC: Autostart

Autostart 9 years 3 weeks ago #7466

  • eslavko
  • eslavko's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Karma: 0
Hello...

I need to make autostart of runtime after boot of computer.
I was able to got runtime monitor poped in but not started.

So How to do that?
..And even worse the powerup should be after iregular powerof. When I restart machine from poweroff state I need to:

Click 'Reset Runtime' (as otherwise got error that something werid is in database)
Click OK
After some wait
Click Start Runtime
...project running...
Now I need to click 'Start operator Environmemt' button
Click nodes-mesalnica-op
and finally the I need to click 'MesalnicaGraph' button to showup my work...


Can this be automated in some script?!?
should be but...
The administrator has disabled public write access.

Autostart 9 years 3 weeks ago #7470

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3180
  • Thank you received: 502
  • Karma: 133
Hi eslavko,

Normally you install the pwrrt package on an operator or process station, and in this case an startup script for Proview is copied to /etc/init.d with a link in /etc/rc2.d. If you want start Proview at boot a development station you will have to write a simiar script that would be something like

export pwra_db=/usr/pwrp/adm/db
source $pwra_db/pwr_setup.sh
sdf 'projectname'
rt_ini &

After a reboot you don't have reset Proview. The reset removes processes and shared resources and they will not be present after a reboot.

Starting the operator environment when the user has logged in can be done by adding rt_xtt, with the opplace object as argument, as startup application for the Linux user.

Finally you can insert the XttGraph object for the graph you want to open into the Autostart attribute of the OpPlace object.

/Claes
The administrator has disabled public write access.

Autostart 8 years 9 months ago #7630

  • Gierula
  • Gierula's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
Please help.
When I type handheld terminal:

source pwra_db / pwr_setup.sh
sdf 'testplc'
rt_ini &
rt_xtt Nodes-testplc-Op

Everything works OK.

If the same'll put in /etc/init.d not start after reboot raspberry.
The administrator has disabled public write access.

Autostart 8 years 9 months ago #7631

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3180
  • Thank you received: 502
  • Karma: 133
Hi Gierula,

$pwra_db has to be defined first:

export pwra_db=/usr/pwrp/adm/db
source $pwra_db/pwr_setup.sh
sdf testplc
rt_ini &

The start of rt_xtt can't be executed in the startup script. It has to be added as a startup application for the user. The startup application should be a similar script with start of rt_xtt

export pwra_db=/usr/pwrp/adm/db
source $pwra_db/pwr_setup.sh
sdf testplc
rt_xtt -q Nodes-testplc-Op


/Claes
Last Edit: 8 years 9 months ago by claes.
The administrator has disabled public write access.

Autostart 8 years 8 months ago #7696

  • eslavko
  • eslavko's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Karma: 0
Autostart still needed...

Usually I do start proview with shortcut like this:
xterm -title "Proview Console" -e 'export pwra_db=/usr/pwrp/adm/db;source $pwra_db/pwr_setup.sh;source $pwra_db/pwra_env.sh set project mesalnica;export PWR_BUS_ID=999;pwr_rtmon'

But I still need to click "Start runtime" button to start proview.

I tried suggested
export pwra_db=/usr/pwrp/adm/db
source $pwra_db/pwr_setup.sh
sdf mesalnica
rt_ini &

But doesn't work. Here is the console output (nothing else is visible)
slavko@podstresnik:~$ export pwra_db=/usr/pwrp/adm/db
slavko@podstresnik:~$ source $pwra_db/pwr_setup.sh
Setting base /usr/pwr52
slavko@podstresnik:~$ sdf mesalnica
Setting base /usr/pwr52
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Welcome to
mesalnica       V5.2    MesalnicaPr

Revision history
2015-01-23	slavko	Project created
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
slavko@podstresnik/mesalnica/-.login> rt_ini &
[1] 28473
slavko@podstresnik/mesalnica/-.login> 
   Proview/R Version V5.2.0 for Linux on x86_64
   Copyright (C) 2005-2014 SSAB AB

   Proview/R is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License.

   This program is distributed in the hope that it will be useful
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.

   Proview Runtime Environment


Any Help?
I'd like at least simulation of clock to "start runtime" button
but if possible even opening operator environment (Nodes-Mesalnica-Op)

Thanks
The administrator has disabled public write access.

Autostart 8 years 8 months ago #7697

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3180
  • Thank you received: 502
  • Karma: 133
Use option '-i' in rt_ini to see error messages on the console

rt_ini -i &

You could insert a reset, 'source pwr_stop.sh' before 'rt_ini &'.

/Claes
The administrator has disabled public write access.
Time to create page: 7.537 seconds