Documente Academic
Documente Profesional
Documente Cultură
** This will bring up the Program file in a standard text editor. Your text file should look something like the following image: **
** First off, we need to address the Number of Monitors option. We want to account for 0, 1, or 2 monitors. To do this, we can use a couple of If / Then statements to accomplish this. In simple English, our logic will look something like this
IF (CUSTOMER DOESNT WANT A MONITOR ) THEN SKIP ALL MONITOR ASSEMBLY OPERATIONS IF (CUSTOMER WANTS ONLY 1 MONITOR)
Page 14
AUTOMATIC ASSEMBLY CONFIGURATION (AU2_WILDFIRE3) THEN SKIP SECOND MONITOR ASSEMBLY IF (CUSTOMER WANTS 2 MONITORS) THEN ASSEMBLE 2 MONITORS
To account for the 0 monitor situation, we can assume that NUMBER_OF_MONITORS would be = 0. To do this, add the following statement to the text file before the ADD PART ZAPFEN operation:
IF NUMBER_OF_MONITORS>0
Then scroll to the last component assembled from the second monitor group of components. This would be after this code:
ADD PART MONITOR_2 INTERNAL COMPONENT ID 2197 PARENTS = 36(#14) END ADD
After the END ADD statement, place an END IF statement. Basically, you are telling Pro/ENGINEER that if the number of monitors is zero, skip the assembly of both monitors. Your text file should look like the following image: **
Page 15
** Now, we need to account for the scenarios where the customer wants either one or two monitors. In this case, we can use a nested IF statement. A nested statement allows us to make conditional decisions within another conditional statement. Our next IF statement should take the form:
IF NUMBER_OF_MONITORS >1
This will allow us to assemble the second group of components only if the parameter is set to 2. Go ahead and add this statement before the assembly of the second group of monitor components. Once completed, your text file should look like the following image: **
Page 16
** IMPORTANT Make sure you include another END IF statement to close up your nested IF statement. **
** Our next step is to program the type of monitor the customer wants to use. Once again, we can nest some IF statements to assemble the proper monitor type. For this example, we will use the following statement:
Page 17