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.

Date / Time Object
#9
(16.01.2023, 09:14)Daniel Wrote: Please explain the steps how do you perform the write.
now = os.date('*t')


wday = now.wday == 1 and 7 or now.wday - 1

time = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}

date = {
day = now.day,
month = now.month,
year = now.year,
}

grp.write('1/0/6', time, dt.time) -- time value
grp.write('1/0/7', date, dt.date) -- date value
log(time)
grp.write('0/4/11', false)
------------

This is a standard script. It works on other logic machines. The problem is only on the current one.

The last line is the address to check that there is a connection and the values are being sent (the values are being sent).

I tried deleting objects in the logic engine and recreating them from ets. Tried to create objects completely manually - nothing helps.

(16.01.2023, 09:19)spoty2008 Wrote:
(16.01.2023, 09:14)Daniel Wrote: Please explain the steps how do you perform the write.
now = os.date('*t')
wday = now.wday == 1 and 7 or now.wday - 1
time = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}
date = {
day = now.day,
month = now.month,
year = now.year,
}
grp.write('1/0/6', time, dt.time) -- time value
grp.write('1/0/7', date, dt.date) -- date value
log(time)
grp.write('0/4/11', false)
------------
This is a standard script. It works on other logic machines. The problem is only on the current one.
The last line is the address to check that there is a connection and the values are being sent (the values are being sent).
I tried deleting objects in the logic engine and recreating them from ets. Tried to create objects completely manually - nothing helps.

The values of the object in the logic machine change, but nothing is written to the bus. I watch group monitoring from ets.

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Date / Time Object - by tom77 - 10.01.2023, 19:46
RE: Date / Time Object - by Daniel - 11.01.2023, 08:31
RE: Date / Time Object - by tom77 - 11.01.2023, 12:17
RE: Date / Time Object - by Daniel - 11.01.2023, 12:24
RE: Date / Time Object - by admin - 11.01.2023, 12:26
RE: Date / Time Object - by tom77 - 11.01.2023, 12:56
RE: Date / Time Object - by spoty2008 - 16.01.2023, 09:07
RE: Date / Time Object - by Daniel - 16.01.2023, 09:14
RE: Date / Time Object - by spoty2008 - 16.01.2023, 09:19
RE: Date / Time Object - by admin - 16.01.2023, 09:32
RE: Date / Time Object - by spoty2008 - 16.01.2023, 09:35
RE: Date / Time Object - by Daniel - 16.01.2023, 09:57
RE: Date / Time Object - by spoty2008 - 16.01.2023, 10:08
RE: Date / Time Object - by Daniel - 16.01.2023, 10:41
RE: Date / Time Object - by spoty2008 - 16.01.2023, 10:58
RE: Date / Time Object - by Daniel - 16.01.2023, 12:28
RE: Date / Time Object - by spoty2008 - 16.01.2023, 14:41
RE: Date / Time Object - by Daniel - 16.01.2023, 14:54
RE: Date / Time Object - by spoty2008 - 19.01.2023, 10:58

Forum Jump: