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 whether you accept or reject these cookies being set.

Trend history transfer
#1
Hello,

I would like to ask if I can transfer my trend history from one LM to another.

I meed to have the data in the new LM.  

Thanks
Reply
#2
Hi,

Trend data is part of the backup, so make a backup from controller 1 and restore it in controller 2.

BR,

Erwin
Reply
#3
Hi Erwin,

I get the error "Backup file is invalid", when I try to restore to controller 2.

It is any issues with compatible versions?

BR
Reply
#4
Second device should have the same or newer firmware version
Reply
#5
Hello Erwin,

everything ok, except energy metering. I have a script for energy metering which is executed every 30 min. I have checked in logs and the script is executed every 30 mins. Also the AMEM3155 is operated well and measures values.

But the object doesn't be updated. The script is below. In the previous Homelynk I didn't have any problem. Can you help?

if not mb then
require('luamodbus')
mb = luamodbus.rtu()
end


-- 19200 baud rate, even parity, 8 data bits, 1 stop bit, half duplex
mb:open('/dev/RS485', 19200, 'E', 8, 1, 'H')
mb:connect()

mbConfusedetslave(1)

-- Total active energy import
total1, total2, total3, total4 = mb:readregisters(3203,4)
if total1 then
total5=bit.lshift(total1,48)+bit.lshift(total2,32)+bit.lshift(total3,16)+total4
total5=total5/1000
log('act pwr 10/0/1',total5)
grp.write('10/0/1',total5)
end

-- Partial active energy import
partial1, partial2, partial3, partial4 = mb:readregisters(3255,4)
if partial1 then
partial5=bit.lshift(partial1,48)+bit.lshift(partial2,32)+bit.lshift(partial3,16)+partial4
partial5=partial5/1000
log('act pwr 10/0/2',partial5)
grp.write('10/0/2',partial5)
end

-- Phase1 active energy import
phase1, phase2, phase3, phase4 = mb:readregisters(3517,4)
if phase1 then
phase5=bit.lshift(phase1,48)+bit.lshift(phase2,32)+bit.lshift(phase3,16)+phase4
phase5=phase5/1000
log('act pwr 10/0/3',phase5)
grp.write('10/0/3',phase5)
end

-- Tarrif Day active energy import
day1, day2, day3, day4 = mb:readregisters(4195,4)
if day1 then
day5=bit.lshift(day1,48)+bit.lshift(day2,32)+bit.lshift(day3,16)+day4
day5=day5/1000
log('act pwr 10/0/4',day5)
grp.write('10/0/4',day5)
end

-- Tarrif Night active energy import
night1, night2, night3, night4 = mb:readregisters(4199,4)
if night1 then
night5=bit.lshift(night1,48)+bit.lshift(night2,32)+bit.lshift(night3,16)+night4
night5=night5/1000
log('act pwr 10/0/5',night5)
grp.write('10/0/5',night5)
end

-- Multi Tarrif active energy rate
tarrif1 = mb:readregisters(4190)
--if tarrif1 then
--tarrif2=bit.lshift(tarrif1,16)
--tarrif2=tarrif2/1000
log('act pwr 10/0/6',tarrif1)
grp.write('10/0/6',tarrif1)
--end





I
Reply
#6
Why not use a profile for this? See here: https://forum.logicmachine.net/showthrea...77#pid4877
Reply
#7
Ok I have downloaded.

What should I do then?

BR

I have also added the A9MEM3155 profile and I have enabled RTU1 and changed the baud rate to 19.200

Then?
Reply
#8
Add device and set the mapping. Make sure you disabled your script
Reply
#9
Please see the pictures. I can't connect to the objects.

And also how can I add registers in the mapping, for example 4195 or 4199?

BR


Attached Files Image(s)
       
Reply
#10
This value is 8byte signed integer. Change dpt of your object, this is defined in the profile.
If there is no register then you must add it to the profile. You can download the profile in Profiles window.
Reply
#11
I have downloaded profile A9MEM3155 json file. But how can more registers to A9MEM3155? This is the question.

Also I don't see any results even I have changed the objects.

BR


Attached Files Image(s)
       
Reply
#12
There should be some errors in the error log under modbus. You may just have cabling issue here or somebody else is using rs485.
When you open profile you will have something like this
{
"bus_datatype": 14,
"address": 3001,
"value_nan": [65472,
0],
"type": "register",
"units": "A",
"name": "Current B",
"datatype": "float32"
},
This is definition of one register, Copy paste it and change what necessary. All info is here https://openrb.com/docs/modbus.htm The easiest is to find same type register copy it and then just change address and name.
Reply
#13
I have always this in the picture.

Why?
Reply
#14
(13.11.2019, 13:29)XSPA2474KW Wrote: I have always this in the picture.

Why?
What do you have?
Reply
#15
(13.11.2019, 13:32)Daniel. Wrote:
(13.11.2019, 13:29)XSPA2474KW Wrote: I have always this in the picture.

Why?
What do you have?
What do you mean?
Reply
#16
(13.11.2019, 13:33)XSPA2474KW Wrote:
(13.11.2019, 13:32)Daniel. Wrote:
(13.11.2019, 13:29)XSPA2474KW Wrote: I have always this in the picture.

Why?
What do you have?
What do you mean?
''I have always this in the picture.'' what picture Smile
Reply
#17
Look I am deleting the device and then I add a new device A9MEM3155.

When I am trying to connect register 3517 to 32/1/24 which is 8 byte signed integer I get an error.

When I am trying to connect register 3517 to 32/1/24 which is 4 byte float I don't get an error.

Please see the picture


Attached Files Image(s)
   
Reply
#18
This is old profile. By default they have all profiles in but if you used old project then old were there. Use this

Delete device, then delete profile and then upload profile and add device.


Attached Files
.json   iEM-iEM3155.json (Size: 5.41 KB / Downloads: 1)
Reply
#19
Ok, I will check it.

Thanks. When send the value to the object? Every 1 minute or what?

BR
Reply
#20
Writing to registry is instant, reading based on the pool interval. To write to registry you have to define it in the profile. If not it is read only.
Reply


Forum Jump: