Should $MOVE_ENABLE be assigned to an input other than $IN[1025]?

  • CELL.src:

    Code
    LOOP
        P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 )

    Then, P00:

    Here, P00 waits until $IN[33] is cleared. But then it immediately runs through the rest of the code, and ends up with K=0 and PGNO_ERROR=0. It returns these values back to CELL.src


    Then back in CELL.src:

    The DEFAULT case is selected, which is the #PGNO_FAULT in P00:

    This generates the "Incorrect program number" (i.e. "ProgramNumberWrong").


    I can clear the message and it keeps popping up until after I resend PGNO bits, and PGNO>=1. Then it disappears. The motion program runs. Then, "Wait for not Input 33" shows up. Then, the bits are cleared, then "Incorrect program number" pops up. Then, I resend PGNO bits, and so on.


    It's not a showstopper, but I would like to get rid of the "Incorrect program number" popup because it's a bit silly why it pops up, now that I understand the code.


    I was wondering if I can fix this by assigning an input which I turn on from PLC after resending PGNO bits. Then, in P00 I can add a WAIT FOR this input to turn on:

    This way, the code doesn't process K until new bits are available. Would this work?

  • did you consider alternatives? i see no benefit of doing this. this is already bottom solution with no validation of any kind - no parity, no PGNO_Valid, no mirroring... add to that modifying standard files and hiding messages, i would say it just makes it even less appealing.


    about your last question "would this work?" - why not ask the robot? robot is the ultimate authority on what will work or not.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Well, that was just one idea. I'm sure there are other alternatives.


    Regardless of PGNO_TYPE, CELL loop is always running, and P00 is always looking for a PGNO input. There is no spot in the code to "do nothing until" - except if I choose to use the "Wait for not Input 33" for this purpose. So if I want to run my motion program just once, and let the robot idle for a while before I decide I want to move it again, I'd have to make some modification if I don't want to see those messages. It's not really "hiding messages", it's just creating a wait so that the code doesn't misunderstand in a hurry and throw this message.


    Or, I guess I could make changes in SPS so that CELL itself is run just once until called again.

  • Folks, I'm happy to report that I have this working now :)


    The "finishing touch" needed was a wait in P00.

    So now, after completion of the motion program, control goes back to CELL, and I see a message "Wait for Input 200". It stays in this idle state until I start my PLC sequence for sending it a PGNO. No more pesky "Incorrect program number" messages, because it knows to wait until it has received a new PGNO. It's silly to begin with, that they haven't written the code to handle idle state. Seems like an improvement item.


    I'm glad to find that the code is customizable to my specific needs.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now