hexagon logo

Main and Sub programs

Is it possible to wright Main and Sub programs in PcDmis as done on the CNC machines? Looking for more possibilities in the lights out area, checking multiple fixtured parts.

In Fanuc NC code,
Main program 1234 >> G65PXXXXXX calls a sub program to run independent (set of instructions).
at the end of sub, M99 returns control to main program.
Main program 1234 >> G65PYYYYYY calls a sub program to run independent (set of instructions).
at the end of sub, M99 returns control to main program.
Main program 1234 >> G65PZZZZZZ calls a sub program to run independent (set of instructions).
at the end of sub, M99 returns control to main program.
Main program 1234 >> end M30​​
Parents
  • Hello,

    Yes, that is possible but with restrictions!

    All features cannot be accessed directly.
    This means you can neither report the features in the main program nor use them for further constructions.

    but various measurement data can be transmitted via variables, but this procedure is 'painful' at best.

    You can however report the data in the subprogram.
    additionally, If you make variables "Global" visible, then the subprogram can read the Variables.


    I would actually advise against it because the effort involved in setting it up is usually higher than the benefit

    @ ​ tried that recently in this thread ( https://www.pcdmisforum.com/forum/pc...48-subroutines)​,
    and can certainly tell you more about exactly what is difficult to set up and why it is not recommended
Reply
  • Hello,

    Yes, that is possible but with restrictions!

    All features cannot be accessed directly.
    This means you can neither report the features in the main program nor use them for further constructions.

    but various measurement data can be transmitted via variables, but this procedure is 'painful' at best.

    You can however report the data in the subprogram.
    additionally, If you make variables "Global" visible, then the subprogram can read the Variables.


    I would actually advise against it because the effort involved in setting it up is usually higher than the benefit

    @ ​ tried that recently in this thread ( https://www.pcdmisforum.com/forum/pc...48-subroutines)​,
    and can certainly tell you more about exactly what is difficult to set up and why it is not recommended
Children
No Data