![]() ![]() String splitRows = descriptionName.Split( new char, StringSplitOptions.RemoveEmptyEntries).ToList() Thread MyThread = new Thread( new ThreadStart(M圜allbackFunction)) This.Invoke( new EventHandler(ResetChangeBtnColor)) Check for the same btn text Name,if it is true change the colour for ( int i = 0 i s = 0)) If (isPolling) // check if polling was enabled Thread.Sleep( /* milliseconds to wait */ 250) // Check every 250ms. Array.Clear(errorIndexOne, 0, errorIndexOne.Length) Īrray.Clear(errorIndexTwo, 0, errorIndexTwo.Length) Īrray.Clear(errorIndexZero, 0, errorIndexZero.Length) MainWindow frmParent = (MainWindow) this.MdiParent į = mb.modbusStatus MyPollThread = new Thread( new ThreadStart(MyPollcallback)) The button back color changing event is not uniform so how to make that happen uniformly.Ĭopy Code #region Start and Stop Procedures Is this because of entering data to database. Sir i have removed all the timers i had used & i am using only threads running it continuously but still the issue exists in the changing the button back color event. The flashing timer depends on the polling timer for performing its task. The problem what i am facing is i have started a timer for polling each device & also if the data contains 1's based on the index of 1 present in the data i am changing the backcolor of that particular button continuously appear as if its flashing for this also a timer is used. Once the received data has zero do nothing & if data has 1's in it, do something without causing any delay or work independently of the polling process. ![]() ![]() In such a condition i am polling each device every 800ms for sending query & receiving answer from slave. Since communication protocol followed is RS485 i will be polling upto 247 devices. Can anybody tell me during polling process of multiple devices if the data that i receive from the slaves if it contains data i.e., 1,1,1,1 which is considered to be the fault condition of some device & if its 0,0,0,0 it is considered to be healthy condition of that particular device. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |