Jump to content

Master prg with condition (if .... then) for macro executing or not


---
 Share

Recommended Posts

Hello all,

I start to execute my CMM part program by some PCM commands in the presetting window.
in the command i execute on excel file with macro to generate 4 para. files (with datas following the part in the family).
in this family, we could have some machining or not following the article n°. i call this machining step "PRV" 5424_6f93829a382719afdb2b85a148416164.jpg
In the presetting i read and run the para file to get the variable "PosPRVPln" by these command :
ParaFolder = "\\Lis-vnxcifs1\machine3d$\programmes\CALYPSO\05-Indutec\RPV_Gen5\FileForZeissMach"
ParaFile1 = "\RpvGen5Datas.Para"
FullPathPara1 = ParaFolder + ParaFile1
Message1="check datas"
Message2="Done"
waitForFile(FullPathPara1,Message1,1,30,Message2,1)
readPCMFile(ParaFolder,ParaFile1)
runPCMFile(FullPathPara1)

This first para file is to get the value of PosPRVPln.
I did one macro file for this "PRV" that i call in the master program.
I've defined one condition to execute or not this macro "PRV" following this : 5424_35be990128be7c7a49f7aff8df5540c1.jpg
My problem is when i have PosPRVPln ==0 calypso execute the PRV macro that i want not.
Anybody has one idea ?
Many thanks in advance
Link to comment
Share on other sites

Crap, for the past year i been working at a place that doesn't have PCM, but i do know how to do this, and you don't even need parafiles. i just cant post code.
Create a miniplan of your partial program run, and another mini plan where you select everything, name them accordingly.
now in the presettings you create a prompt asking the operator to identify what stage the part is in.

Then there is the task of just running the full or partial program depending on the selection.

I do remember the miniplan code was setRunID(*insert mini plan name here*)

The only tricky bit.......... in your start menu, you must click the #3 black dot under "All Characteristics" and Current Selection". it doesn't matter what you select from the dropdown menu, that will change each run when the operator makes their selection, but if dot #3 is not selected the pcm code will not be followed.

man the only thing i hate about this job is i lost my connection with PCM

dgfhjdgfdgfdgfdgf.PNG

Link to comment
Share on other sites

 Share

×
×
  • Create New...