Hello all,
I searched the help and searched this forum but can't find an answer to my question. I'm taking over a project from an employee who moved on and am trying to simplify a lot of the code but am stuck and hope someone here can help.
Setup:
I have an integer array that tracks users actions called UserEvents and it is large enough to accommodate up to 20 users. User0's button presses modify UserEvents[0], User1's button presses modify UserEvents[1], etc. The value that the UserEvents[X] is set to is based on which button on the interface is being pressed. For example: If User0 presses the RUN button UserEvents[[0] is set to 1 ("UserEvents[0]=1").
Whenever UserEvents[X] changes currently, a scheduler sees this change and calls an appropriate script but that means that there are 20 lines in the scheduler to support 20 users and in order to accommodate more users I have to add more lines to the scheduler.
Questions:
1: Can a script be called on the change of an array or only on the change of a member of the array? The same procedures get run whether User1 or User19 activates it, they just need to be tracked separately. This would allow my scheduler to change from 20+ lines to just 1 line that sees a change in the array as a whole.
2: Does Indusoft have a way of tracking which member of an array changed (i.e. UserEvents[].changed = 1 if UserEvents[1] just changed from 1 to 0)
Thanks for your help