Trend history transfer - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2) +--- Thread: Trend history transfer (/showthread.php?tid=2333) |
Trend history transfer - XSPA2474KW - 09.11.2019 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 RE: Trend history transfer - Erwin van der Zwart - 09.11.2019 Hi, Trend data is part of the backup, so make a backup from controller 1 and restore it in controller 2. BR, Erwin RE: Trend history transfer - XSPA2474KW - 10.11.2019 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 RE: Trend history transfer - admin - 10.11.2019 Second device should have the same or newer firmware version RE: Trend history transfer - XSPA2474KW - 13.11.2019 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() mbetslave(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 RE: Trend history transfer - admin - 13.11.2019 Why not use a profile for this? See here: https://forum.logicmachine.net/showthread.php?tid=839&pid=4877#pid4877 RE: Trend history transfer - XSPA2474KW - 13.11.2019 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? RE: Trend history transfer - Daniel - 13.11.2019 Add device and set the mapping. Make sure you disabled your script RE: Trend history transfer - XSPA2474KW - 13.11.2019 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 RE: Trend history transfer - Daniel - 13.11.2019 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. RE: Trend history transfer - XSPA2474KW - 13.11.2019 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 RE: Trend history transfer - Daniel - 13.11.2019 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. RE: Trend history transfer - XSPA2474KW - 13.11.2019 I have always this in the picture. Why? RE: Trend history transfer - Daniel - 13.11.2019 (13.11.2019, 13:29)XSPA2474KW Wrote: I have always this in the picture.What do you have? RE: Trend history transfer - XSPA2474KW - 13.11.2019 (13.11.2019, 13:32)Daniel. Wrote:What do you mean?(13.11.2019, 13:29)XSPA2474KW Wrote: I have always this in the picture.What do you have? RE: Trend history transfer - Daniel - 13.11.2019 (13.11.2019, 13:33)XSPA2474KW Wrote:''I have always this in the picture.'' what picture(13.11.2019, 13:32)Daniel. Wrote:What do you mean?(13.11.2019, 13:29)XSPA2474KW Wrote: I have always this in the picture.What do you have? RE: Trend history transfer - XSPA2474KW - 13.11.2019 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 RE: Trend history transfer - Daniel - 13.11.2019 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. RE: Trend history transfer - XSPA2474KW - 13.11.2019 Ok, I will check it. Thanks. When send the value to the object? Every 1 minute or what? BR RE: Trend history transfer - Daniel - 13.11.2019 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. |