hexagon logo

Change the active machine for a part program.

Hey all,

here's what i'm trying to do. Many of our machines are dedicated to one part/one operation. In our UI, we would like to open all of the part programs that will run for a selected operation, when the operation is selected for the first time of the day. When the operator hits "Measure", the program will loop through all of the open programs, and measure the part. The problem i'm running into is that when you open more than one part program, every program except for the first one is set to "OFFLINE". Is there any way to change the active machine of an open Part Program or is some sort of safety feature built into PC-DMIS. Here's another thought, if i can't get around changing the ActiveMachine, would it be possible to use the "SpawnNewInstance" command and have multiple instances of PC-DMIS running, and loop through the instances of PC-DMIS?

Thanks in advance,

-Cappy
Parents
  • Thanks for the input guys,
    Only the first active program in the first active instance of PC-DMIS will run online with the machine. I think you could do what you want by:

    1. Using subroutines inside of PC-DMIS, with one master program and subroutine references pointing to the other programs;

    2. External application that iterates through a list of programs; opening, executing, and then closing each one within one instance of PC-DMIS.


    as for the first part, for what we are doing, that unfortunately isn't an option.
    as for number 2, we are trying to avoid the opening, executing, and closing. this can take a lot of time.

    1. Don't know about this one, it might be possible to "set" a program as the active partprogram - never tried. All your opened partprograms are available through the Application.PartPrograms collection.

    2. No, only one instance of PC-DMIS can be open at the time.


    i'll try the active part program option, see how that works.

    and yeah, i tried opening a second one with SpawnNewApplication(), but that only works for an offline seat, can't connect to the controller on a second online seat.
Reply
  • Thanks for the input guys,
    Only the first active program in the first active instance of PC-DMIS will run online with the machine. I think you could do what you want by:

    1. Using subroutines inside of PC-DMIS, with one master program and subroutine references pointing to the other programs;

    2. External application that iterates through a list of programs; opening, executing, and then closing each one within one instance of PC-DMIS.


    as for the first part, for what we are doing, that unfortunately isn't an option.
    as for number 2, we are trying to avoid the opening, executing, and closing. this can take a lot of time.

    1. Don't know about this one, it might be possible to "set" a program as the active partprogram - never tried. All your opened partprograms are available through the Application.PartPrograms collection.

    2. No, only one instance of PC-DMIS can be open at the time.


    i'll try the active part program option, see how that works.

    and yeah, i tried opening a second one with SpawnNewApplication(), but that only works for an offline seat, can't connect to the controller on a second online seat.
Children
No Data