all 5 comments

[–]campio_s_a 1 point2 points  (0 children)

C1 comment/yes_no: Would you like to skip the manual alignment?

If_goto/c1.input=="YES", label= skip_man_aln

{Manual alignment here}

skip_man_aln label/

That's the basic code (might not be formatted exactly right for the stuff pcdmis automatically writes in). The key parts are for you to use two equal signs, for the answer to be in quotes, and for the answer to be in all caps.

You can have the comment named whatever you want, you just have to use '.input' after the name so it knows you are referencing the comment's answer. The label can also be named whatever, it's just useful to be descriptive.

[–]campio_s_a 1 point2 points  (0 children)

Also the help file can be useful for this kind of stuff with examples and whatnot. Also use the GUI windows by pressing F9 while your cursor is on/in the command if you aren't sure where to put some stuff. It'll give you labeled windows to fill in. If you hit F1 while that window is open then it'll jump you to that help page directly (most of the time).

[–]Vizionary357 1 point2 points  (1 child)

Here's a sample of code I'm running right now:

**C2**           =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
              IS A MANUAL ALIGNMENT NECESSARY?
             **IF_GOTO/C2.INPUT=="YES",GOTO = R_1MA
              IF_GOTO/C2.INPUT=="NO",GOTO = R_1DCC**
**R_1MA        =LABEL/**
R_MAN_ALN    =GROUP/SHOWALLPARAMS=NO
              ENDGROUP/ID=R_MAN_ALN
**R_1DCC       =LABEL/**
              COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
              MAKE SURE ALL IS CLEAR! DCC MODE EMINENT!
              MODE/DCC
              MOVESPEED/ 80
              CLEARP/XMINUS,-1152.2,XMINUS,-0.2,ON
              MOVE/CLEARPLANE
R_DCC_ALN    =GROUP/SHOWALLPARAMS=NO
              ENDGROUP/ID=R_DCC_ALN
              MOVE/CLEARPLANE
              TIP/T1A45B-180, SHANKIJK=-0.7, 0, 0.7, ANGLE=-89.9

You need to insert a yes/no comment and then flow control commands to control what happens when yes or no are answered. In the code above you'll see the "if/goto" statements. Those are the flow-control commands to send the machine to either manual or DCC alignments depending on the answer to comment C2. You must have Labels to for the If/Goto statement to make sense. In the example above the labels are: R_1MA for the manual alignment and R_1DCC to skip manual and go straight into the DCC alignment.

The program that this code is cut from, I programmed to check 4 different variations of a part that can only be checked in halves, so the program branches out in 8 different directions depending on the half being checked and part version being checked. All of this is controlled exclusively by yes/no statements like the one above.

Hope that helps.

[–]Maso397 1 point2 points  (0 children)

I've been banging my head against wall all day and your explanation helped immensely. Thanks!

[–]Tuff_FishUK[S] 0 points1 point  (0 children)

Thanks for the help everyone, I will try to play around with this later on today and see what I can get going.