Previous | Next | LK
Topic: High Level
Conf: LK, Msg: 1898
From: Terry Prather (tprather@dexteraxle.com)
Date: 5/23/2000 10:39 PM

John:
My Wincmes is almost non-existent so bear with me. It looks like you want to create a program to measure only the functions you tell it by using a prompt. First you need to declare your variables. Use Program, Insert instead of Program, Teach as some of the buttons are grayed out in teach and learn mode. From insert select High Level. This is where the majority of your work will be done.

Select DECL. In the box that is labeled Name enter the ID you want to give this variable. I am going to use CHOICE. In the Type pull down menu scroll to the top and select CHAR. Press the OK button. This should give you this:
DECL/LOCAL,CHAR,512,CHOICE

Now step over the line of code you just created to add it to the variable list.

Select the button PROMPT. The variable box should have your id in it. If not select it from the pull down menu. Type in your question in the text box just below the variable. I always put a few spaces at the end of my question so the screen it creates doesn't put the command buttons on top of my text. Select the max check box and type 2 in the box. This is not needed, but it cleans up the screen. Press OK. This should give you:
CHOICE=PROMPT/'Which operation do you want to execute? ',2

Now select the IF button. Type your id then put a period then EQ and another period and apostrophe (') A and another apostrophe. This is not easy to write but it will make sense in a second. Make certain you do not put any spaces between the text. What you get should look like:
IF/(CHOICE.EQ.'A')

Now select the JUMPTO. Type operation one with no spaces. You will get:
JUMPTO/(Operation1)

Now you need to end this part of the IF/THEN statement. Select ENDIF. You will get:
ENDIF

Repeat the above until you have all of the choices defined. Basically create more if's and update the A to B, C, then E. Then create the other jumpto's updating them from Operation1 to 2, 3 then Exit.

After you have entered all of the if statements you need put two endif's. You will get:
ENDIF
ENDIF

Now create a label by pressing the LABEL button. Make the labels respective of what you put into the jumpto commands (Operation1, Operation2, etc.) These will give you:
(Operation1)

Behind all of these labels put the commands for the operations you want to perform. When it is all said and done you will have something representative of this:

DECL/LOCAL,CHAR,512,CHOICE
CHOICE=PROMPT/'WHICH OPERATION DO YOU WANT TO EXECUTE? ',2
IF/(CHOICE.EQ.'A')
JUMPTO/(OPERATION1)
ENDIF
IF/(CHOICE.EQ.'B')
JUMPTO/(OPERATION2)
ENDIF
IF/(CHOICE.EQ.'C')
JUMPTO/(OPERATION3)
ENDIF
IF/(CHOICE.EQ.'E')
JUMPTO/(EXIT)
ENDIF
ENDIF
(OPERATION1)
PUT THE COMMANDS FOR OPERATION #1 HERE
(OPERATION2)
PUT THE COMMANDS FOR OPERATION #2 HERE
(OPERATION3)
PUT THE COMMANDS FOR OPERATION #3 HERE
(EXIT)
ENDFIL

Hopefully I haven't left anything out nor misunderstood your question. If there is anything else I can help you with reply or email me directly. Best of luck!

Best Regards,

Terry W. Prather
Metrologist


BOSCH
AIRFLOW SYSTEMS GROUP
1613 Progress Dr.
Albion, IN 46701
Phone: (219)636-4299
Fax: (219)636-1106
E-Mail: mailto:terry.prather@us.bosch.com