hexagon logo

2 different parts in the same program

Been requested to merge two separate programs into one. Been searching around the forums this morning and haven't been able to find anything about this.
I have 2 programs I wrote a few months ago for separate parts and have been asked if I'd be able to merge those programs together so our operators can start the program and walk away for both parts to be checked in one shot.
The only idea I currently have is to add both cad models and essentially write 2 programs in 1. Not sure if I can run an If/Then for it or not (I haven't had to use any If/Then commands in the past)

I have just over a year of experience of programming CMMs and have taken CMM 101 and 201.
Running PC-DMIS 2022.1
Parents
  • Since you've already got the two separate programs working fine, you can make each program a Subroutine, then create a "master" program that calls those two programs as sub. Basically, open each program and insert->flow control-> subroutine at the top of the program and End Routine at the end. In your master program, Callsub both programs. As always, make backups before you start experimenting!

    I don't use subs because the data in the sub are not viewable after execution which makes troubleshooting impossible via the master program.

    The other way is as you thought. Import both cad setup and copy both programs into a single program. It's literally two programs written in one file.
  • good idea, open main program, call part 1 sub, print report, call part 2 sub, print report, done.
Reply Children
No Data