Sanchez Posted October 2, 2008 Share Posted October 2, 2008 Hi Azeotech Guru: I am using modbus RTU to read about 700 registers from 3 PLCs. Here is the sample code of how I am doing it: Private.Data_Integer1 = 0 while(1) try Private.Data_Integer1 = Device.ModbusRTU.ReadHoldingRegistersSSI(1,1,125) catch("D") endcatch CTSU_DIFF_START.AddValue(Private.Data_Integer1) CTSU_DIFF_STOP.AddValue(Private.Data_Integer1) CTSU_DIFF_100.AddValue(Private.Data_Integer1) CTSU_DIFF_NORMAL.AddValue(Private.Data_Integer1) CTSU_INTERVAL.AddValue(Private.Data_Integer1) //More Channels here endwhile I am showing only 5 channels, but I do the same for the aprox 700 channels that I have. The problem is that this is slow, and the values on my screens don't update quickly, sometimes it takes 4 seconds or more to update. Is there a way to make it more efficient? I have paused the alarms before reading. I have set the Thread Priority to 0, otherwise the computer becomes too slow. I have put a switch statement to execute only the AddValues of the channels displayed on the screen that is active. Thanks. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.