This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script restart after powerloss: ERWIN
#1
Hello.
I have a project where vi run some scripts on a LM.
The problem is that when we experience a power loss or do a reboot on the LM the scrips do not start up automatically. Is there a need for a boot script, and is there an example on how to make this available?

Regard Snorre Malvik, Oslo
Reply
#2
Hi
It depend of type of the script, event will run only if new telegram is received. Resident and Scheduled will run as setup while device will boot up. If you need to run something on boot up then use init script.
BR
Daniel
------------------------------
Ctrl+F5
Reply
#3
Hello Daniel
Let me ask you in a different way.
How should I write this script to work after recovering the voltage ?

require('custom.fbeditor20.Comparator')

Input_1 = event.getvalue()
Input_2 = 5000
out, out_not = fbe_less(Input_1, Input_2, 'fb__Bad___lys_over_speil_blokering_kanal_1__fbe_less__id')
if out_not ~= nil then
grp.write('5/1/1', out_not)
end

Best Regards adigornik
Reply
#4
Hi,

You make things more complex then needed..

On the (event) object settings you can enable “Read during startup”

Make sure the read flag is enabled in the ETS for this object.

When the controller reboots it will send a read request and the object will get the correct value from the installation and the event script will be executed and the output result should be as wanted.

BR,

Erwin
Reply
#5
(14.10.2018, 17:37)Erwin van der Zwart Wrote: Hi,

You make things more complex then needed..

On the (event) object settings you can enable “Read during startup”

Make sure the read flag is enabled in the ETS for this object.

When the controller reboots it will send a read request and the object will get the correct value from the installation and the event script will be executed and the output result should be as wanted.

BR,

Erwin

Hi Erwin 

You mean *Execute on group read:* ?
Because I did not find anything that is called “Read during startup”

How can I do it less complicated ?

BR Adam
Reply
#6
He means this
Read during start-up

Attached Files Thumbnail(s)
   
------------------------------
Ctrl+F5
Reply


Forum Jump: