Purpose of PGNO??

  • I just need some clarity of the purpose of the PGNO.. like can I use that to call a program and not the program name? Using Directory loader; manual says I can change the old program number to a new program number, but why would you ever need to do that unless you can call it by the number?

  • if using EXT mode sure, why not...


    use SPS to pass the string with program name (instead of PGNO), use CWRITE to select program, and external start to start it...

    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

  • That's awesome, i knew there is always a way. Can you elaborate, using CWRITE I'm weak in this category.


    Would it be something similar to this?


    IF $IN[10]==TRUE THEN ;Start
    CWRITE($CMD,STAT,MODE,"RUN /R1/variable") ; where i can set the program to a variable and define it in the .sps
    ENDIF


    I don't think i know how to make the program into a variable that i an call.


    I also need to turn the program number into a string so i can add to the string so the program names match.

    Edited once, last by TickTack ().

  • You'll have to construct a string for the run command. This is easy enough to do using SWRITE.
    DECL a string variable of sufficient length.
    Clear the string variable.
    SWRITE the string variable with something like SWRITE (StringVariable[], State, Offset, "RUN /R1/%s", ProgramNameString[])
    CWRITE ($CMD, STAT, MODE, StringVariable[])


    You'll want to read up on the SWRITE function in detail, it's a bit involved. Very handy once you grasp it.

Advertising from our partners