Proc stuck in reboot loop
slip cougan
Posts: 34
How do I kill the program in the processor?
Just made some changes to the startup routine in my program & now the processor is constatly rebooting.
I can't connect IP or comm.
Thanks
gary
Just made some changes to the startup routine in my program & now the processor is constatly rebooting.
I can't connect IP or comm.
Thanks
gary
0
Comments
NI-700 sw1 on the DIP
gary
Thanks Matt,
I read the manual this time
Regards
gary
Here is the offending bit of code that was causing the reboot loop, can anyone spot the mistake?
DEFINE_FUNCTION pageTitleText()
{
SWITCH(panelOptions[panelIndex][7]=1)
{
case 1: {SEND_COMMAND devPanels[panelIndex],"'^TXT-', ITOA(Title),'.', ITOA(Title),',0,', zoneUkTemplate[panelDevice[panelIndex]][7]"}
case 2: {SEND_COMMAND devPanels[panelIndex],"'^TXT-', ITOA(Title),'.', ITOA(Title),',0,', zoneFrenchTemplate[panelDevice[panelIndex]][7]"}
case 3: {SEND_COMMAND devPanels[panelIndex],"'^UNI-', ITOA(Title),'.', ITOA(Title),',0,', zoneGermanTemplate[panelDevice[panelIndex]][7]"}
case 4: {SEND_COMMAND devPanels[panelIndex],"'^UNI-', ITOA(Title),'.', ITOA(Title),',0,', zoneRussianTemplate[panelDevice[panelIndex]][7]"}
case 5: {} // Spare language slot
case 6: {} // Spare language slot
}
}
The compiler does not pick it up!
Regards
gary
DEFINE_FUNCTION pageTitleText()
{
SWITCH(panelOptions[panelIndex][7]) <======= Here is the offending line. I had left the '=1' while copy/pasting
{
case 1: {SEND_COMMAND devPanels[panelIndex],"'^TXT-', ITOA(Title),'.', ITOA(Title),',0,', zoneUkTemplate[panelDevice[panelIndex]][7]"}
case 2: {SEND_COMMAND devPanels[panelIndex],"'^TXT-', ITOA(Title),'.', ITOA(Title),',0,', zoneFrenchTemplate[panelDevice[panelIndex]][7]"}
case 3: {SEND_COMMAND devPanels[panelIndex],"'^UNI-', ITOA(Title),'.', ITOA(Title),',0,', zoneGermanTemplate[panelDevice[panelIndex]][7]"}
case 4: {SEND_COMMAND devPanels[panelIndex],"'^UNI-', ITOA(Title),'.', ITOA(Title),',0,', zoneRussianTemplate[panelDevice[panelIndex]][7]"}
case 5: {} // Spare language slot
case 6: {} // Spare language slot
}
}
SWITCH(panelOptions[panelIndex][7]) &&
zoneUkTemplate[panelDevice[panelIndex]][7]
try something like :
local_var integer x
switch (x)
or local_var integer x
x = get_last (panelindex)
switch (x)
untested because I really dont understand what your trying to do :P
Hi avi-dave,
They are not going to the processor. 0 in this instance is all states.
The function checks the value in index 7 of panelOptions for panelIndex.
If it's 1 Then send the text from zoneUkTemplate[panelDevice[panelIndex]][7] (English text)
If it's 4 then send the text from the same index but from the Russian language array.
The code works as it should, and has worked reliably from the start, just I was tweaking & broke every thing with the copy/paste error by including the = 1 in the switch.
As the old saying goes, if it ain't broke...
regards
gary