Modbus over RS232 or USB? - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: Modbus over RS232 or USB? (/showthread.php?tid=1342) |
Modbus over RS232 or USB? - sx3 - 18.04.2018 Hi, I'm looking into integrating an APC UPS with my Homelynk. The APC by Schneider supports according to the snippet. I would prefer RS485 or TCP, can anyone recomend a converter to either RS485 or TCP that doesn't cost an arm or a leg? I already running a Modbus map on RS485, would it be possible to run a TCP map side by side or must I choose? RE: Modbus over RS232 or USB? - Erwin van der Zwart - 18.04.2018 uHi, You can run RTU and TCP from the mapper at same time. BR, Erwin RE: Modbus over RS232 or USB? - admin - 18.04.2018 You can also use both RS-485 and RS-232 ports. RE: Modbus over RS232 or USB? - sx3 - 18.04.2018 Great! Can I use the RS232 port as RS485? Or do you mean I can runt Modbus on RS232 on the HL? In the mapper I can only choose RTU(RS485)/TCP, no choice for RS232. RE: Modbus over RS232 or USB? - mlaudren - 18.04.2018 (18.04.2018, 18:55)sx3 Wrote: Great! Hi, You can run both RS485 and TCP at the same time. For a simple usage, you can create the modbus profile of your UPS, import it and then use it in the modbus tab, then just choose TCP, give the IP, and perform the mapping. the homelynk will handle everything else. The other possibility is to create a script and use modbus TCP connection. but this is more complicated and I would recommend to go with the profile. Modbus is either RS-485 or TCP, but no RS-232. As far as I know, you cannot connect a modbus RS-485 device on a RS-232 port. Can you give the reference of you UPS or a technical document? RE: Modbus over RS232 or USB? - admin - 19.04.2018 I'm not saying that RS-232 can be used as RS-485. What I'm saying is that RTU can be used over RS-232 but you will be limited to 1 slave. RE: Modbus over RS232 or USB? - sx3 - 28.04.2018 Thanks! I'm trying to understand the modbus registers of this APC UPS, the PDF doesn't define it with Coil/discreteinput/inputregister. It refers to Modicon standard. Could someone plase help me with a couple of JSON mapper examples so that I understand how it should be set up? The registers are in this PDF: http://www.apc.com/salestools/LFLG-A32FWS/LFLG-A32FWS_R1_EN.pdf Regards! Hmm.. am I correct that 4000 is Holding register? And 40001, is Holding register adress 1 (0). Within this adress, there are 16 bits with values? Would this be correct for bit 6 in 40003? Then I just repeat the whole row for each bit I want to read out? { "name": "Boost trim reley fault", "bus_datatype": "bool", "type": "register", "address": 2, "writable": 0, "value_bitmask": 0x40 }, bit 0 = 0x1 bit 1 = 0x2 bit 2 = 0x4 bit 3 = 0x8 bit 4 = 0x10 bit 5 = 0x20 bit 6 = 0x40 bit 7 = 0x80 bit 8 = 0x100 bit 9 = 0x200 bit A = 0x400 bit B = 0x800 bit C = 0x1000 bit D = 0x2000 bit E = 0x4000 bit F = 0x8000 RE: Modbus over RS232 or USB? - Daniel - 30.04.2018 Hi Yes looks good to me, you can delete the "writable": 0, as not needed when only readable. It is good practice to try first via the RTU Read test tool. BR |