when My program starts I loop though and add all tags to a ONCHANGE event, at the same time I call a function the calls the http request to my IIS, but it seem to filling the queue as the calls in the loop are to fast. How can I put a statement in before my call to the IIS to wait or pause so not to fill the queue.
I have about 360 Tags.
code:
n% = GETSYS PRG, “NBTAGS” // Get all of tags as an int
DIM tagInfo$( n%, 50) // create an array with enough indexes to fit all tags
// Print "Number of Tags: " + Str$(n%)
FOR i% = 0 TO (n% - 1)
SETSYS TAG, “load”, -i% // -i% for index correction
t$ = GETSYS TAG, “name” // Load tagName (includes Room:Tag)
i$ = GETSYS TAG, “id” // Load Tag Index
// save tag and index for updating polled values from db
TagInfo$((i%+1), 1 TO 46 ) = t$ // tag name
TagInfo$((i%+1), 47 TO 50 ) = i$ // tag index
// Print "Full Tag name: " + t$ + " - Tag Index: " + i$
//
ONCHANGE t$, “@updateServer(’ " + t$ + " ', ’ " + i$ + " ’ )”
// Init Load new values after startup
@updateServer( t$ , i$)
LOGEVENT “add tag to onchange event” + t$ + i$, 120
NEXT i%
— logs