Curiously - are you in a M2M setup? I recently had a job where the CPU usage was like that, > 98% and I found this alarming. I started removing bits of code and eventually - it fell down to 18%, and it happened to have been a module. I forget exactly what was happening in the module that made it go up that high (I wrote the module), but it was indeed the cause. While the system was extremely responsive, never hiccuped and worked very well - this 98% CPU was annoying, and made me fear that if something did go wrong what might happen.
Point is - your system's CPU usage might very well be running at 98% and you just don't know it. I'd suggest removing bits and pieces and see if anything changes.
I've had a similar circumstance where my systems would show they were running at 95-98% and would appear to remain "stuck" shortly after a reboot. I managed to narrow it down to a projector module's DEFINE_PROGRAM section. I had something similar to this:
wait 3
{
for()
{
//some button feedback stuff
}
}
For whatever reason (got lazy, testing something, blah blah blah), I threw my button feedback into D_S. To solve the problem, I cut and pasted the code into a timeline. The result translated to an idle usage of roughly 8-9%. The systems ran perfectly fine with a high usage rate, but like jjames, I didn't trust it.
I think it was 6 total lines of code that caused the whole issue. As a rule, I do not use DEFINE_START for anything now. Try pulling modules and include files out one at a time and see what happens. Hopefully this helps you find what may be causing your issue.
BTW has anyone figured out how to get milliseconds from Netlinx? Uisng GET_TIMER gets u tenths of a second. I want milliseconds like Jeff had at begging on post - where did you get that from?
BTW has anyone figured out how to get milliseconds from Netlinx? Uisng GET_TIMER gets u tenths of a second. I want milliseconds like Jeff had at begging on post - where did you get that from?
Now sure, didn't look back, but he probably used a timeline and used timeline.time to get the elapsed time.
I don't know how Jeff does it, but I use a TIMELINE that runs for the max time then use TIMELINE_GET to get the current time. TIMELINE.TIME only works if you are inside a TIMELINE_EVENT.
TL_TIMER_1 = 1;
LONG lReallyLongTime[1] = 4294967295;
LONG lTestResult = 0;
...
TIMELINE_CREATE (TL_TIMER_1, lReallyLongTime, 1, TIMELINE_ABSOLUTE, TIMELINE_ONCE);
...
TIMELINE_PAUSE (TL_TIMER_1); // Pausing first has yielded more consistent results, but why?
lTestResult = TIMELINE_GET (TL_TIMER_1);
TIMELINE_KILL (TL_TIMER_1);
It has been a while since I have worked with this topic, but as I recall, I did use a timeline. Immediately before running the test code, I would start the timeline. Immediately after executing the code, I would pause the timeline. Then, I would grab the timeline.time.
The key to evaluating the code I was testing was the number of iterations. When comparing two different methods, you have to make sure that the only thing that changes is the code you are testing. You also have to execute the code a large number of times to help balance any other operations that may occur during the test that are out of your control. For the tests I was running, I think I was executing the code 50000 times for some routines.
As I understand the ICSP protocol, NetLinx will still send one "packet" per channel event, so I doubt it. However that for loop will certainly eat up processing time which delays all other events. Option #2 every time.
Putting the loop in a timeline event will lessen the frequency of updates vs. putting it under define program. Though I think the amount of data transmitted for feedback is minimal. Opening any webpage uses way more data.
If a channel is already on, a packet will not go out. There is no difference, network wise, between looping through the array or reference the entire array. The same number of packets go out.
I can't look under the hood, so I can't comment on whether or not referencing an entire array gets compiled exactly the same as a for loop - but in terms of network traffic, it's the same.
If a channel is already on, a packet will not go out.
Do you think this is true when there is M2M involved?
I have a system 2,3,4 blasting system 1 with touch panel channel updates and it seems to make system 1 not very happy.
Do you think this is true when there is M2M involved?
I have a system 2,3,4 blasting system 1 with touch panel channel updates and it seems to make system 1 not very happy.
How is the M2M setup? Route mode direct with slaves having url list just to master?
Just because no ones appears to have done it and we found ourselves laughing last week at the AMX Developers Conference about the good old days when (puts on flame suit) this actually mattered... here are the test results on an NX-3200
(07:45:06.506):: *********************************************************
(07:45:06.507):: * TEST 1 REPORT: FOR (nLoop = 1; nLoop <= LENGTH_ARRAY(nInfo); nLoo
(07:45:06.509):: * Most recent 5 runs:
(07:45:06.510):: * 1: 6ms
(07:45:06.511):: * 2: 6ms
(07:45:06.513):: * 3: 7ms
(07:45:06.514):: * 4: 7ms
(07:45:06.516):: * 5: 7ms
(07:45:06.517):: *----------------------------------------------------------
(07:45:06.519):: * Average run time: 6ms - over 5 tests
(07:45:06.520):: *********************************************************
(07:45:06.522):: *********************************************************
(07:45:06.523):: * TEST 2 REPORT: FOR (snLoop = 1; snLoop <= LENGTH_ARRAY(nInfo); sn
(07:45:06.526):: * Most recent 5 runs:
(07:45:06.528):: * 1: 7ms
(07:45:06.530):: * 2: 6ms
(07:45:06.532):: * 3: 6ms
(07:45:06.534):: * 4: 6ms
(07:45:06.536):: * 5: 7ms
(07:45:06.538):: *----------------------------------------------------------
(07:45:06.541):: * Average run time: 6ms - over 5 tests
(07:45:06.542):: *********************************************************
(07:45:06.545):: *********************************************************
(07:45:06.547):: * TEST 3 REPORT: FOR (nLoop = 1; nLoop <= MAX_LENGTH_ARRAY(nInfo);
(07:45:06.550):: * Most recent 5 runs:
(07:45:06.551):: * 1: 6ms
(07:45:06.553):: * 2: 7ms
(07:45:06.555):: * 3: 6ms
(07:45:06.557):: * 4: 7ms
(07:45:06.559):: * 5: 6ms
(07:45:06.562):: *----------------------------------------------------------
(07:45:06.564):: * Average run time: 6ms - over 5 tests
(07:45:06.566):: *********************************************************
(07:45:06.569):: *********************************************************
(07:45:06.571):: * TEST 4 REPORT: FOR (nLoop = 1, nMax = MAX_LENGTH_ARRAY(nInfo); nL
(07:45:06.573):: * Most recent 5 runs:
(07:45:06.575):: * 1: 3ms
(07:45:06.577):: * 2: 2ms
(07:45:06.580):: * 3: 2ms
(07:45:06.582):: * 4: 2ms
(07:45:06.584):: * 5: 3ms
(07:45:06.586):: *----------------------------------------------------------
(07:45:06.589):: * Average run time: 2ms - over 5 tests
(07:45:06.590):: *********************************************************
(07:45:06.593):: *********************************************************
(07:45:06.595):: * TEST 5 REPORT: FOR (nLoop = MAX_LENGTH_ARRAY(nInfo); nLoop > 0; n
(07:45:06.597):: * Most recent 5 runs:
(07:45:06.599):: * 1: 3ms
(07:45:06.603):: * 2: 2ms
(07:45:06.605):: * 3: 2ms
(07:45:06.608):: * 4: 3ms
(07:45:06.610):: * 5: 3ms
(07:45:06.612):: *----------------------------------------------------------
(07:45:06.614):: * Average run time: 2ms - over 5 tests
(07:45:06.617):: *********************************************************
(07:45:06.619):: *********************************************************
(07:45:06.621):: * TEST 6 REPORT: FOR (nLoop = MAX_LENGTH_ARRAY(nInfo); nLoop; nLoop
(07:45:06.623):: * Most recent 5 runs:
(07:45:06.625):: * 1: 2ms
(07:45:06.627):: * 2: 2ms
(07:45:06.630):: * 3: 2ms
(07:45:06.632):: * 4: 2ms
(07:45:06.634):: * 5: 2ms
(07:45:06.637):: *----------------------------------------------------------
(07:45:06.971):: * Average run time: 2ms - over 5 tests
(07:45:06.973):: *********************************************************
(07:45:06.974):: *********************************************************
(07:45:06.976):: * TEST 7 REPORT: FOR (snLoop = MAX_LENGTH_ARRAY(nInfo); snLoop; snL
(07:45:06.978):: * Most recent 5 runs:
(07:45:06.979):: * 1: 2ms
(07:45:06.980):: * 2: 2ms
(07:45:06.981):: * 3: 2ms
(07:45:06.984):: * 4: 3ms
(07:45:06.985):: * 5: 2ms
(07:45:06.986):: *----------------------------------------------------------
(07:45:06.987):: * Average run time: 2ms - over 5 tests
(07:45:06.989):: *********************************************************
(07:45:06.992):: *********************************************************
(07:45:06.994):: * TEST 10 REPORT: ON[nInfo[nLoop]] .. OFF[nInfo[nLoop]]
(07:45:06.996):: * Most recent 5 runs:
(07:45:06.998):: * 1: 3ms
(07:45:07.001):: * 2: 3ms
(07:45:07.003):: * 3: 3ms
(07:45:07.005):: * 4: 3ms
(07:45:07.007):: * 5: 4ms
(07:45:07.009):: *----------------------------------------------------------
(07:45:07.012):: * Average run time: 3ms - over 5 tests
(07:45:07.014):: *********************************************************
(07:45:07.016):: *********************************************************
(07:45:07.018):: * TEST 11 REPORT: nInfo[nLoop]=TRUE .. nInfo[nLoop]=FALSE
(07:45:07.020):: * Most recent 5 runs:
(07:45:07.022):: * 1: 5ms
(07:45:07.024):: * 2: 5ms
(07:45:07.027):: * 3: 5ms
(07:45:07.029):: * 4: 5ms
(07:45:07.031):: * 5: 5ms
(07:45:07.033):: *----------------------------------------------------------
(07:45:07.036):: * Average run time: 5ms - over 5 tests
(07:45:07.038):: *********************************************************
(07:45:07.040):: *********************************************************
(07:45:07.042):: * TEST 12 REPORT: nInfo[nLoop]=TRUE .. nInfo[nLoop]=FALSE
(07:45:07.045):: * Most recent 5 runs:
(07:45:07.047):: * 1: 6ms
(07:45:07.049):: * 2: 6ms
(07:45:07.051):: * 3: 7ms
(07:45:07.053):: * 4: 6ms
(07:45:07.056):: * 5: 7ms
(07:45:07.057):: *----------------------------------------------------------
(07:45:07.060):: * Average run time: 6ms - over 5 tests
(07:45:07.062):: *********************************************************
(07:45:07.064):: *********************************************************
(07:45:07.066):: * TEST 13 REPORT: ON[nInfo[nLoop]] .. OFF[nInfo[nLoop]]
(07:45:07.069):: * Most recent 5 runs:
(07:45:07.071):: * 1: 271ms
(07:45:07.073):: * 2: 273ms
(07:45:07.076):: * 3: 269ms
(07:45:07.078):: * 4: 273ms
(07:45:07.080):: * 5: 299ms
(07:45:07.081):: *----------------------------------------------------------
(07:45:07.084):: * Average run time: 276ms - over 5 tests
(07:45:07.086):: *********************************************************
@HARMAN_icraigie said:
Just because no ones appears to have done it and we found ourselves laughing last week at the AMX Developers Conference about the good old days when (puts on flame suit) this actually mattered... here are the test results on an NX-3200
(07:45:06.506):: *********************************************************
(07:45:06.507):: * TEST 1 REPORT: FOR (nLoop = 1; nLoop <= LENGTH_ARRAY(nInfo); nLoo
(07:45:06.509):: * Most recent 5 runs:
(07:45:06.510):: * 1: 6ms
(07:45:06.511):: * 2: 6ms
(07:45:06.513):: * 3: 7ms
(07:45:06.514):: * 4: 7ms
(07:45:06.516):: * 5: 7ms
(07:45:06.517):: *----------------------------------------------------------
(07:45:06.519):: * Average run time: 6ms - over 5 tests
(07:45:06.520):: *********************************************************
(07:45:06.522):: *********************************************************
(07:45:06.523):: * TEST 2 REPORT: FOR (snLoop = 1; snLoop <= LENGTH_ARRAY(nInfo); sn
(07:45:06.526):: * Most recent 5 runs:
(07:45:06.528):: * 1: 7ms
(07:45:06.530):: * 2: 6ms
(07:45:06.532):: * 3: 6ms
(07:45:06.534):: * 4: 6ms
(07:45:06.536):: * 5: 7ms
(07:45:06.538):: *----------------------------------------------------------
(07:45:06.541):: * Average run time: 6ms - over 5 tests
(07:45:06.542):: *********************************************************
(07:45:06.545):: *********************************************************
(07:45:06.547):: * TEST 3 REPORT: FOR (nLoop = 1; nLoop <= MAX_LENGTH_ARRAY(nInfo);
(07:45:06.550):: * Most recent 5 runs:
(07:45:06.551):: * 1: 6ms
(07:45:06.553):: * 2: 7ms
(07:45:06.555):: * 3: 6ms
(07:45:06.557):: * 4: 7ms
(07:45:06.559):: * 5: 6ms
(07:45:06.562):: *----------------------------------------------------------
(07:45:06.564):: * Average run time: 6ms - over 5 tests
(07:45:06.566):: *********************************************************
(07:45:06.569):: *********************************************************
(07:45:06.571):: * TEST 4 REPORT: FOR (nLoop = 1, nMax = MAX_LENGTH_ARRAY(nInfo); nL
(07:45:06.573):: * Most recent 5 runs:
(07:45:06.575):: * 1: 3ms
(07:45:06.577):: * 2: 2ms
(07:45:06.580):: * 3: 2ms
(07:45:06.582):: * 4: 2ms
(07:45:06.584):: * 5: 3ms
(07:45:06.586):: *----------------------------------------------------------
(07:45:06.589):: * Average run time: 2ms - over 5 tests
(07:45:06.590):: *********************************************************
(07:45:06.593):: *********************************************************
(07:45:06.595):: * TEST 5 REPORT: FOR (nLoop = MAX_LENGTH_ARRAY(nInfo); nLoop > 0; n
(07:45:06.597):: * Most recent 5 runs:
(07:45:06.599):: * 1: 3ms
(07:45:06.603):: * 2: 2ms
(07:45:06.605):: * 3: 2ms
(07:45:06.608):: * 4: 3ms
(07:45:06.610):: * 5: 3ms
(07:45:06.612):: *----------------------------------------------------------
(07:45:06.614):: * Average run time: 2ms - over 5 tests
(07:45:06.617):: *********************************************************
(07:45:06.619):: *********************************************************
(07:45:06.621):: * TEST 6 REPORT: FOR (nLoop = MAX_LENGTH_ARRAY(nInfo); nLoop; nLoop
(07:45:06.623):: * Most recent 5 runs:
(07:45:06.625):: * 1: 2ms
(07:45:06.627):: * 2: 2ms
(07:45:06.630):: * 3: 2ms
(07:45:06.632):: * 4: 2ms
(07:45:06.634):: * 5: 2ms
(07:45:06.637):: *----------------------------------------------------------
(07:45:06.971):: * Average run time: 2ms - over 5 tests
(07:45:06.973):: *********************************************************
(07:45:06.974):: *********************************************************
(07:45:06.976):: * TEST 7 REPORT: FOR (snLoop = MAX_LENGTH_ARRAY(nInfo); snLoop; snL
(07:45:06.978):: * Most recent 5 runs:
(07:45:06.979):: * 1: 2ms
(07:45:06.980):: * 2: 2ms
(07:45:06.981):: * 3: 2ms
(07:45:06.984):: * 4: 3ms
(07:45:06.985):: * 5: 2ms
(07:45:06.986):: *----------------------------------------------------------
(07:45:06.987):: * Average run time: 2ms - over 5 tests
(07:45:06.989):: *********************************************************
(07:45:06.992):: *********************************************************
(07:45:06.994):: * TEST 10 REPORT: ON[nInfo[nLoop]] .. OFF[nInfo[nLoop]]
(07:45:06.996):: * Most recent 5 runs:
(07:45:06.998):: * 1: 3ms
(07:45:07.001):: * 2: 3ms
(07:45:07.003):: * 3: 3ms
(07:45:07.005):: * 4: 3ms
(07:45:07.007):: * 5: 4ms
(07:45:07.009):: *----------------------------------------------------------
(07:45:07.012):: * Average run time: 3ms - over 5 tests
(07:45:07.014):: *********************************************************
(07:45:07.016):: *********************************************************
(07:45:07.018):: * TEST 11 REPORT: nInfo[nLoop]=TRUE .. nInfo[nLoop]=FALSE
(07:45:07.020):: * Most recent 5 runs:
(07:45:07.022):: * 1: 5ms
(07:45:07.024):: * 2: 5ms
(07:45:07.027):: * 3: 5ms
(07:45:07.029):: * 4: 5ms
(07:45:07.031):: * 5: 5ms
(07:45:07.033):: *----------------------------------------------------------
(07:45:07.036):: * Average run time: 5ms - over 5 tests
(07:45:07.038):: *********************************************************
(07:45:07.040):: *********************************************************
(07:45:07.042):: * TEST 12 REPORT: nInfo[nLoop]=TRUE .. nInfo[nLoop]=FALSE
(07:45:07.045):: * Most recent 5 runs:
(07:45:07.047):: * 1: 6ms
(07:45:07.049):: * 2: 6ms
(07:45:07.051):: * 3: 7ms
(07:45:07.053):: * 4: 6ms
(07:45:07.056):: * 5: 7ms
(07:45:07.057):: *----------------------------------------------------------
(07:45:07.060):: * Average run time: 6ms - over 5 tests
(07:45:07.062):: *********************************************************
(07:45:07.064):: *********************************************************
(07:45:07.066):: * TEST 13 REPORT: ON[nInfo[nLoop]] .. OFF[nInfo[nLoop]]
(07:45:07.069):: * Most recent 5 runs:
(07:45:07.071):: * 1: 271ms
(07:45:07.073):: * 2: 273ms
(07:45:07.076):: * 3: 269ms
(07:45:07.078):: * 4: 273ms
(07:45:07.080):: * 5: 299ms
(07:45:07.081):: *----------------------------------------------------------
(07:45:07.084):: * Average run time: 276ms - over 5 tests
(07:45:07.086):: *********************************************************
Is it possible to have the source code of the test ?
And also a feedback from the AMX Developers Conference ?
Comments
Besides, the repeated number is clearly locked up, the trailing 30 second average can't stay the same low number if we're actually at 99 now...
Stranger and stranger.
I've had a similar circumstance where my systems would show they were running at 95-98% and would appear to remain "stuck" shortly after a reboot. I managed to narrow it down to a projector module's DEFINE_PROGRAM section. I had something similar to this:
wait 3
{
for()
{
//some button feedback stuff
}
}
For whatever reason (got lazy, testing something, blah blah blah), I threw my button feedback into D_S. To solve the problem, I cut and pasted the code into a timeline. The result translated to an idle usage of roughly 8-9%. The systems ran perfectly fine with a high usage rate, but like jjames, I didn't trust it.
I think it was 6 total lines of code that caused the whole issue. As a rule, I do not use DEFINE_START for anything now. Try pulling modules and include files out one at a time and see what happens. Hopefully this helps you find what may be causing your issue.
BTW has anyone figured out how to get milliseconds from Netlinx? Uisng GET_TIMER gets u tenths of a second. I want milliseconds like Jeff had at begging on post - where did you get that from?
I don't know how Jeff does it, but I use a TIMELINE that runs for the max time then use TIMELINE_GET to get the current time. TIMELINE.TIME only works if you are inside a TIMELINE_EVENT.
The key to evaluating the code I was testing was the number of iterations. When comparing two different methods, you have to make sure that the only thing that changes is the code you are testing. You also have to execute the code a large number of times to help balance any other operations that may occur during the test that are out of your control. For the tests I was running, I think I was executing the code 50000 times for some routines.
Hope this helps,
Jeff
vs
In practice, I'd need a loop to build the array, so
I can't look under the hood, so I can't comment on whether or not referencing an entire array gets compiled exactly the same as a for loop - but in terms of network traffic, it's the same.
Do you think this is true when there is M2M involved?
I have a system 2,3,4 blasting system 1 with touch panel channel updates and it seems to make system 1 not very happy.
How is the M2M setup? Route mode direct with slaves having url list just to master?
In this instance the problem kind of disappeared on it's own, but I'm still curious in general.
Just because no ones appears to have done it and we found ourselves laughing last week at the AMX Developers Conference about the good old days when (puts on flame suit) this actually mattered... here are the test results on an NX-3200
And for reference, same tests on a DVX @ rev 4.8.331
Is it possible to have the source code of the test ?
And also a feedback from the AMX Developers Conference ?
Thank you.
Code posted here:
https://proforums.harman.com/amx/discussion/comment/56527/#Comment_56527
There's some more testing code posting here https://proforums.harman.com/amx/discussion/comment/56512/#Comment_56512
Yep the good old days! When this s h i t mattered and people cared, I miss those days and that AMX!
I second that, the good old days when we wrote in Basic for AMX (Panja) control systems. these Kids have it easy with this Fancy Netlinx Studio