hexagon logo

Study hard (want to write scrip of loop measure)

I want to know how to perform a feature by VBS. For example, a separate-execution "PNT1".such as the "CTRL+E",how to achieve this script.
seeking the core code or key function
Parents
  • thanks Josh
    in fact , I want to write scrip of loop measure , but it can not be achieved by use “PCDLRN.PartProgram.AsyncExecute”.so , I want to try to other method!!


    One of the things I will demonstrating in my thread 'Automating PCDMIS with Visual C#' is a way of performing loops with Automation code.

    In our shop we have inspection process where the individual parts are set next to each other on the table surface against an 'L' bracket. The length and width of the part varies, because of this fact the number of parts which fit on the table varies. It is also possible that 1 to maximum number of possible parts may be measured in one setting. It also possible that if 9 possible parts can be arrayed 3X3. The operator may choose to have only 3 parts placed in one column or the same three might be arrayed in the top row.

    In one example the Dotnet application is configured by the operator with the selected parts in the selected arrangement and the measurement is begun. The first part parameters are written to a subroutine file via the PCDLRN, then the measurement program is started by using a call to the AsyncExecute method of the PCDLRN. The measurement program calls the subroutine which was updated previously. The DotNet application is listening via an event delegate for the end of the pcdmis program. When it is notified that the current measurement program has ended, the Dotnet application queues up the next part and the process is repeated.

    Because the PCDMIS program is executed asynchronously, the DotNet application is still active and can be used to view the measurement report of completed parts while the measurement process is still continuing with the remaining parts.

    Because of all the possibilities it's hard to answer your question specifically without having a better description of your particular scenario.

    The library I provide in my thread is already capable of doing the above. By the way if you're fairly experienced with VB the library should work with Visual VB as long as you are using MS Framework 3.5.
Reply
  • thanks Josh
    in fact , I want to write scrip of loop measure , but it can not be achieved by use “PCDLRN.PartProgram.AsyncExecute”.so , I want to try to other method!!


    One of the things I will demonstrating in my thread 'Automating PCDMIS with Visual C#' is a way of performing loops with Automation code.

    In our shop we have inspection process where the individual parts are set next to each other on the table surface against an 'L' bracket. The length and width of the part varies, because of this fact the number of parts which fit on the table varies. It is also possible that 1 to maximum number of possible parts may be measured in one setting. It also possible that if 9 possible parts can be arrayed 3X3. The operator may choose to have only 3 parts placed in one column or the same three might be arrayed in the top row.

    In one example the Dotnet application is configured by the operator with the selected parts in the selected arrangement and the measurement is begun. The first part parameters are written to a subroutine file via the PCDLRN, then the measurement program is started by using a call to the AsyncExecute method of the PCDLRN. The measurement program calls the subroutine which was updated previously. The DotNet application is listening via an event delegate for the end of the pcdmis program. When it is notified that the current measurement program has ended, the Dotnet application queues up the next part and the process is repeated.

    Because the PCDMIS program is executed asynchronously, the DotNet application is still active and can be used to view the measurement report of completed parts while the measurement process is still continuing with the remaining parts.

    Because of all the possibilities it's hard to answer your question specifically without having a better description of your particular scenario.

    The library I provide in my thread is already capable of doing the above. By the way if you're fairly experienced with VB the library should work with Visual VB as long as you are using MS Framework 3.5.
Children
No Data