citect function not working when no user is logged in

K

Thread Starter

kk

i have created one function in cicode that check time hour to change shift value. my code is like that<pre>
function Shift_check()
current_hour = Timehour(timecurrent());
if current_hour = 15 then
shift = 2
end
end</pre>
current_hour and shift are variable tags defined in disk I/O and i am calling this function every hour for which event is created in citect project editor.

the problem with this function is that when no user is logged in this function do not run but it is working fine when privilege level 3 and above user is logged in.

please help what may be the solution of this problem.
 
> i have created one function in cicode that check time hour to change shift value. my code is like that<pre>
> function Shift_check()
> current_hour = Timehour(timecurrent());
> if current_hour = 15 then
> shift = 2
> end
> end</pre>
---- snipped by moderator -----

i have used tracemsg function to check, whether my function is called or not, interesting thing function is called but when cicode execute line:

> current_hour = Timehour(timecurrent());

it gives error msg which is like that
"Hardware error 514 'view only: no user logged in'
errpage: '_Timesub'

one more thing when i logged in with level 1 user who do not have any privilege to operate any operation, still my cicode runs perfectly. but do not run when i logged out.

please help, its urgent
 
> i have created one function in cicode that check time hour to change shift value. my code is like that<pre>
> function Shift_check()
> current_hour = Timehour(timecurrent());
> if current_hour = 15 then
> shift = 2
> end
> end</pre>
anybody have solution of this problem. please reply
 
set [LAN]SecureLogin = 0

in your ini file.

>> i have created one function in cicode that check time hour to change shift value. my code is like that

>> function Shift_check()
>> current_hour = Timehour(timecurrent());
>> if current_hour = 15 then
>> shift = 2
>> end
>> end

> anybody have solution of this problem. please reply
 
Top