![]() |
|
IP address - Printable Version +- LogicMachine 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: IP address (/showthread.php?tid=6312) |
IP address - ALEJANDRO - 17.02.2026 Good afternoon, I have a question regarding creating objects in Logic Machine. I'm finishing a BMS project, and this project includes three Logic Machine 5 instances. The IP addresses used for these instances are 192.168.0.12, 192.168.0.13, and 192.168.0.14. The BMS specifications require the following: • IP Address: Manually entered local variable. • Alarm IP Address: Automatically entered BACNET variable. Indicates that an address is not responding to PING. • Communications Test Frequency: Manually entered local variable. Indicates how often communications monitoring should be triggered. Selectable range: 1-23 hours. • IP Test Enabled: Enables IP address monitoring. • Enable KNX Test: Enables monitoring of all KNX buses. I have no idea how to do this. I don't know if there's a way to create objects that point to IP addresses, or if it requires Lua programming. I can include an image of what I expect to see on the screen with these variables. Thank you very much. RE: IP address - Daniel - 17.02.2026 LM can ping a IP or KNX physical device but some of the other points makes no sense or not clear. https://forum.logicmachine.net/showthread.php?tid=2189&pid=16696#pid16696 https://forum.logicmachine.net/showthread.php?tid=3510&pid=22677#pid22677 RE: IP address - ALEJANDRO - 04.03.2026 THANK YOU VERY MUCH, I've been able to verify that if we create a script with the function from the first link on an object: function ping(ip) local res = os.execute('ping -c 2 -W 5 ' .. ip) return res == 0 end res = ping('192.168.0.11') grp.checkwrite('32/6/113', res) And the IP address is incorrect or there's no communication, the script returns 0. I have a question: I have a series of IP addresses that need to appear on the screen like this, but I can't get it to work. RE: IP address - Daniel - 04.03.2026 Use 250 byte string object. RE: IP address - admin - 04.03.2026 You should use new Visu ![]() What task exactly do you have? Do you need IP list to be configurable or do you simply want to display the status for each IP? If the list is fixed you can make a resident script that pings each address and updates the status. You can add as many IP/group address pairs to the ips table. Code: ips = {RE: IP address - ALEJANDRO - 04.03.2026 As far as I know, I've programmed two logic machines to control a building and its garage, with IP addresses 192.168.0.11 and 192.168.0.12. The building's logic machine also has three gateways to obtain data from residential electricity meters with IP addresses 192.168.0.111, 192.168.0.112, and 192.168.0.113. What I'm being asked to do is create variables for each IP address. I understand these to be Boolean values indicating whether or not a ping is detected. A variable that enables or disables pinging to IP addresses (boolean type), the address I use for this is '32/6/118', and another variable that sets how often the monitoring is done in hours '32/6/117', this has values from 1 to 23 hours RE: IP address - Daniel - 04.03.2026 This is way too complicated, just create a Scheduler script with fixed frequency and display results on the screen. You can alos use another script to enable/diable this scriopt if you want. RE: IP address - admin - 04.03.2026 If meters are using Modbus then you don't need to use ping at all because you can use status object in Modbus mapper. RE: IP address - ALEJANDRO - 04.03.2026 Yes, the counters use Modbus RTU; I imagine you mean using their mapping. But what I'm monitoring are the gateways I have connected to the logic machine, not the counters connected to them. RE: IP address - Daniel - 04.03.2026 This RE: IP address - ALEJANDRO - 05.03.2026 So, if I've created a virtual object, called, counter_state 32/2/66, for example, and I associate this with the status object in the Modbus section, if communication with the counter is lost, the value of address 32/2/66 will change state, is that right? RE: IP address - Daniel - 05.03.2026 yes RE: IP address - ALEJANDRO - 05.03.2026 So what you're telling me is that the operating logic should be the following: -NO COMM.------------------------------------>32/2/66 == 0 -COMM.------------------------------------------>32/2/66 == 1 (05.03.2026, 14:42)ALEJANDRO Wrote: So what you're telling me is that the operating logic should be the following: Sorry for being so insistent, but I want to be sure that the object's value is changed automatically. RE: IP address - Daniel - 05.03.2026 yes it does, this is the whole point of it. 1 online, 0 offline, RE: IP address - ALEJANDRO - 05.03.2026 Something's wrong, I can't get it to work, that's strange. RE: IP address - Daniel - 05.03.2026 Is your device working and LM can read values from the meter? RE: IP address - ALEJANDRO - 05.03.2026 Yes, it is RE: IP address - Daniel - 05.03.2026 How do you test? RE: IP address - ALEJANDRO - 09.03.2026 I didn't understand your question RE: IP address - Daniel - 11.03.2026 You say that something doesn't work. To claim such state you must have done some test to check if it works or not. What did you do to validate the functionality? |