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
  • 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.
  • 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.
  • 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.


    I would guess it is not a matter of having the "ActiveProgram" focus, but I could be wrong; I have not tried assigning a secondary program to the ActiveProgram property. At least in my experience, only the first open program (whatever was opened while PC-DMIS had no other open programs) gets control of the machine.
  • 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.
  • You can use Bladerunner. It is opening and closing each program but at least it is fully automated so it only takes a couple of seconds between each. You do not need to have Blade active on the port lock to use Bladerunner.
  • You can use Bladerunner. It is opening and closing each program but at least it is fully automated so it only takes a couple of seconds between each. You do not need to have Blade active on the port lock to use Bladerunner.


    +1 We use BLADERUNNER and it works very well. Just set all of your programs you want to run in the op file and let 'er go. We have a timed interval calibration verification program set to run before each part. PC-DMIS reads a text file that is written with a "timestamp" and re-verifies the cal say after 2-3 hours. If the check fails, then it dumps straight into auto cal followed by another check.

    Makes life a whole lot easier....
  • The timed interval cal program is a great idea. I'm definitely going to implement that. I'm thinking that I'll also have it keep a running list of serial numbers that have been checked on the machine since the last calibration and if the cal check fails it will print a warning message telling the operator to locate and quarantine the parts on the list.
  • The timed interval cal program is a great idea. I'm definitely going to implement that. I'm thinking that I'll also have it keep a running list of serial numbers that have been checked on the machine since the last calibration and if the cal check fails it will print a warning message telling the operator to locate and quarnatine the parts on the list.


    Not a bad idea at all... We have traceability through the timestamp on the reports, but an operator message with a serialized list of suspect parts is brilliant.
  • There is code for opening/closing program in a sequence in this forum, I believe.

    Maybe that can give you some starting points, no need to reinvent the wheel again... :P
  • +1 We use BLADERUNNER and it works very well. Just set all of your programs you want to run in the op file and let 'er go. We have a timed interval calibration verification program set to run before each part. PC-DMIS reads a text file that is written with a "timestamp" and re-verifies the cal say after 2-3 hours. If the check fails, then it dumps straight into auto cal followed by another check.

    Makes life a whole lot easier....


    does this check if the calibration passes/fails also?