Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Electronics : Modbus Writes.
Author | Message | ||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Any thoughts on how I write one of the Holding Registers in my Eastron meters? I want to change a config setting that's not accessible via the device menus. If I read it I can see it's currently Mode2, I want it in Mode1. This is the requests & responses I get. [Code]This is the read & response. [RTU]>Tx > 06:45:26:297 - 01 03 F9 20 00 02 F5 5D [RTU]>Rx > 06:45:26:329 - 01 03 04 00 02 00 00 5B F3 And the Write Attempt. [RTU]>Tx > 06:45:36:359 - 01 10 F9 20 00 02 04 00 02 00 00 3E 23 [RTU]>Rx > 06:45:36:391 - 01 90 01 8D C0 Sys > 06:45:36:391 - Error : Illegal function[/code] I was suspecting it's password protected, as the setup menu is. No mention in the Modbus protocol document though. Phil. |
||||
Madness Guru Joined: 08/10/2011 Location: AustraliaPosts: 2498 |
Hi Phil, I have no idea but there is a detailed video on youtube have you found that? There are only 10 types of people in the world: those who understand binary, and those who don't. |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Hi Mad, Don't think I have. Found a few hints in the SDM630 3 phase manual though. And also the parameters that I think allow it to operate as a 3 channel single phase meter. They mention it requires a password, but I'd expect a lot of the other parameters would too. Makes sense if the device's setup mode is P/W protected, so too should all the registers that related to configuration. They then mention these two commands, but don't say what the data type is on the P/W that allows writes. Have also had a look at the code in the Arduino Library for these meters, but I can't see anywhere that's using any of the password related registers. Have 3 meters running now, just need to decide what to do with the data. Phil |
||||
yahoo2 Guru Joined: 05/04/2011 Location: AustraliaPosts: 1166 |
illegal function means you were trying to send a function 16 (write) and you were not in set mode. either you didnt hold the button down for 3 seconds then ping the controller or the software you are using is not compatible with function 10 and function 16. Gary posted the link to the video when I was away and set it so you miss the crud at the start. Eastron SDM120 single phase modbus energy meter the bit you are interested in now is at 12-13 minutes. I am not great with reading hex values, I would have to look it up to work out if there is an error. I am very time poor at the moment and out of mobile data range most of the time. sorry I'm confused, no wait... maybe I'm not... |
||||
yahoo2 Guru Joined: 05/04/2011 Location: AustraliaPosts: 1166 |
Are you definitely writing to a single register? not a conscutive pair like in float. Nup I am out of ideas, I had the impression that password protection was not switched on by the manufacturer. I'm confused, no wait... maybe I'm not... |
||||
Madness Guru Joined: 08/10/2011 Location: AustraliaPosts: 2498 |
You need to enter a password if changing settings via the buttons on the meter, is it the same password for changing it via Modbus? There are only 10 types of people in the world: those who understand binary, and those who don't. |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Presume I would be the same password. Still can't set it though. It's supposed to be a 2 byte register, I can read it but can't write it. Tried putting he meter in setup mode; Hold a button & enter the password... Still get's an error. The video of he SDM120 just shows putting it in setup mode, but there's not password required. The SDM 630 Modbus manual is the only pace I've see mention of sending a password in Modbus. Think it also mentions that the thin logs off after 1 minute idle. Phil. |
||||
Madness Guru Joined: 08/10/2011 Location: AustraliaPosts: 2498 |
Have you tried emailing Eastron? There are only 10 types of people in the world: those who understand binary, and those who don't. |
||||
Print this page |