Home AMX User Forum NetLinx Studio

Proc stuck in reboot loop

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

Comments

  • mpullinmpullin Posts: 949
    Flip the first lever on the dipswitch in back of the master, having that on will disable the program.
  • Found it

    NI-700 sw1 on the DIP

    gary
  • Thanks

    Thanks Matt,

    I read the manual this time :)

    Regards

    gary
  • FYI

    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
  • Here it is

    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
    }
    }
  • avi_daveavi_dave Posts: 62
    and umm why are you sending all these instrauctions to the processor? Just curious, besides your referencing a element from an array, correct? so why do you have it outside of :-
    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
  • Re: Here it is

    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
Sign In or Register to comment.