Andreschrosa Posted November 6, 2008 Share Posted November 6, 2008 I'm implementing a modbus network scan for equipments, this network consists of several IPs, on each IP there are serveral modbus equipments connected. What I want to do is scan the IP adresses from modbus ID 1 to 255, using function 17 to find then, then display the equipment's model name and serial number on a tree list, grouped by their IP adress locations. I'm stuck in the class definitions to group equipments together under their respective IP adresses. I'm creating a class for the equipements thenselves, and another for each group. I want each group to store an array of equipments that are found on that IP. So my doubt is how to create such array of equipments? Also when I create the function add_equipment, is there any way to do it work short of creating a chained list? Is there a chained list structure already in DAQFactory? class Equipment local model local manufacturer local serialnum local modbusadress function get_adress() return modbusadress endfunction endclass class Group local name local equipment equiplist local nequips local ip function add_equip(Equipment equip) nequips++ equiplist = endclass Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.