This article focuses on the Calypso PCM command - confirm. There are times when constructing a program that as programmers we need the operator to follow specific instructions or confirm that something is a certain way before executing the program
Example: A confirmation ("confirm") in PCM
We have written a calibration routine program but we need the operator to confirm that MasterBall shaft at the '0' position before the operator executes this calibration program. This will avoid the stylus system from striking the MasterBall base during the calibration. If it is not at the '0' position I want to end the program.
Here is one way this is done. NOTE: this example uses PCM, a optional module on Calypso.
Write the program as you normally would. When this is complete right click to access the parameter function.
Choose Parameter and this will open the Pre and Post Parameter settings dialog box
In the presetting box and type the above commands. Now there is another method to select the code above and we will cover that in a future article.
When you run the program this box will appear
VarC is a variable statement. This could be named anything. I used VarC to represent Variable Confirm.
If the answer is Yes or
if VarC equals True then continue on
If the answer is No or
if VarC equals False then
endinspection (close out the inspection run)
This can be used for a variety of situations where confirmation is required. Just change the question is the confirm statement making sure it is between quotes.
If you do not have the PCM module you may want to consider purchasing it. PCM adds a flexibility to Calypso that benefits both the programmer and operator.