The text of a manual · part 15 of 34
MCL-Designer for Phaser Series User's Guide: Chapter 4 Designing Programs, pages 107 to 116
Pages 107 to 116 of 288, from MCL-Designer for Phaser Series User's Guide
The original document is the PDF (3.0 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Symbol P360 and Symbol P460
Page 107
Designing Programs
Key & Branch In the Insert A Process dialog box, click on Grou Branch and then click on Comman Key & Branch. Click on to open the Key & Branch dialog box. This dialog box enables you to assign another function to several keys.
Figure 4-31. Key & Branch Dialog Box Time Out Second
Assigns a time-out interval. If there is no activity after the time-out period, then the action or screen selected in the Goto list box takes effect.
Goto
Selects the action to perform or the screen to goto if the time-out occurs.
Other Keys
Assigns another function to keys on the scanner.
Key/Goto
Assigns another function to the Function keys on the scanner.
to accept the default setting
!
Click or
!
Enter the appropriate information to change the values and click changes.
!
Click to close the dialog box without saving the changes.
to apply the
4-41
Page 108
MCL-Designer for Phaser Series User’s Guide
Test & Branch In the Insert A Process dialog box, click on Group Branch and then click on Comman Test & Branch. Click on to open the Test & Branch dialog box. This dialog box enables you to set up a test and, depending on the test result, branch to a specified screen
Figure 4-32. Test & Branch Dialog Box If Value 1
Sets variable for test.
Test Type
Determines the operation to be performed. = equal to > greater than or equal to > greater than <= less than or equal to < less than <> not equal to
Value 2
Sets variable to test against Value 1 variable.
Force Character Comparison
Forces the comparison between Value 1 variable and Value 2 variable.
Then Goto
Sets the action to perform or the screen to go to if the test result is true.
Else Goto
Sets the action to perform or the screen to go to if the test result is false.
!
Click or
!
Enter the appropriate information to change the values and click changes.
!
Click to close the dialog box without saving the changes.
4-42 to accept the default setting to apply the
Page 109
Designing Programs
To test a variable and branch upon a condition: 1. Click on the If Value 1 list box to select the variable to compare (e.g., V_PRICE). 2. Click on Test Type radio button. Available choices are: equal to (=), less than (<), and greater than (>). 3. Click on the Value 2 list box to select the variable to compare (e.g., 120). 4. Click on the Then Goto list box to select a screen/action to go to if the comparison is true. 5. Click on the Else Goto list box to select a screen/action to go to if the comparison i false.
Case & Branch In the Insert A Process dialog box, click on Group Branch and then click on Command Case & Branch. Click on to open the Case & Branch dialog box. This dialog box enables you to compare the value of a variable input with other variables or values.
Figure 4-33. Case & Branch Window
4-43
Page 110
MCL-Designer for Phaser Series User’s Guide
Case Value
Sets variable for testing against the five Equal variables.
Equal
Sets the variables or value to compare to Case Value. Up to five variables or values can be compared to Case Value variable.
Goto
Sets the action to perform or screen to go to if the test result are true.
Otherwise Goto
Sets the action to perform or screen to go to if the test results is false.
!
Click or to accept the default setting
!
Enter the appropriate information to change the values and click changes.
!
Click to close the dialog box without saving the changes.
to apply the
The value of variable Case Value is compared with the Equal variables or values. When the value of the Case Value equals one of these set Equal values, the action or screen in the Goto list box is performed. If the comparison is false, the action or screen in the Otherwise Goto list box is performed.
Control & Branch In the Insert A Process dialog box, click on Grou Branch and then click on Command to open the Control & Branch dialog box. This dialog box Control & Branch. Click on enables you to compare a character pattern of a variable.
Figure 4-34. Control & Branch Window
4-44
Page 111
Designing Programs
If Value
Selects the variable for testing.
Follows Pattern
Sets the pattern to compare to th If Value. This pattern can exist out of: • Letters A to Z to specify a specific letter. • Numbers 0 to 9 to specify a specific number • $ to specify numeric characters. • “ to specify text. • ? to specify any character • * to specify all other characters.
Then go to
Sets the action to perform or the screen to go to if the test result is true.
Else Goto
Sets the action to perform or the screen to go to if the test result is false.
to accept the default setting
!
Click or
!
Enter the appropriate information to change the values and click changes.
!
Click to close the dialog box without saving the changes.
to apply the
For example: B$$”?4* matches with B21C14ABC123. If the comparison is true, the process follows the screen or action in theThen Goto list box. If the comparison is false, the process follows the screen or action in the Else Goto list box.
4-45
Page 112
MCL-Designer for Phaser Series User’s Guide
Set Label In the Insert A Process dialog box, click on Grou Branch and then click on Command Set Label. Click on to open the Label dialog box. This dialog box enables you to set a label. A label is a reference that can be set to go directly to a certain position, like a specific line in a process. Enter a label name, and it always refers to that position.
Figure 4-35. Label Dialog Box Label
Sets the label name.
Note: The label name must be unique for the program and must begin with an alphabetic character (A to Z). !
Click or
!
Enter the appropriate information to change the values and click changes.
!
Click to close the dialog box without saving the changes.
4-46 to accept the default setting to apply the
Page 113
Designing Programs
Figure 4-36 illustrates the use of a label in a process. Process 1 Process 2 Process 3 process in
LABEL Process 4 Process 5
SCREEN
Goto LABEL process out
Figure 4-36. Label Process
Gosub Window In the Insert A Process dialog box, click on Grou Branch and then click on Command on to open the Gosub. Click Gosub dialog box. This dialog box enables you to go to a subroutine and then return.
Figure 4-37. Gosub Dialog Box Program
Sets the program to go to.
Gosub
Selects the screen of the program to go to.
4-47
Page 114
MCL-Designer for Phaser Series User’s Guide
Figure 4-38 illustrates the use of a Gosub in a process. LINE 1 LINE 2 LINE 3
GOSUB 20
LINE 4 LINE 5
EXIT
LINE 20
Figure 4-38. Gosub Process 1. Start from line 3. Enter Gosub S20-Screen 20. 2. MCL-Designer goes to process line 20 to undertake a certain action. 3. When the action is finished, the exit enables the process to turn back to line 4. Note: The Gosub can go to a label, a screen or another program. Always use Gosub with an exit. Refer to Got on page 4-40.
4-48
Page 115
Designing Programs
Files Group Files store the data input on a permanent basis in the scanner. Due to the interaction between the files and programs through processes, MCL-Designer enables you to read, write and delete the data in a file. Refer toFiles Windo on page 4-87 for more information on working with files.
Write a Record In the Insert A Process dialog box, click on Group Files and then click on Command Write a on to open File the Write dialog box. This dialog box enables you to write Record. Click the input of variables into the fields of a file.
Figure 4-39. Write File Dialog Box File Name
Selects the file to write the fields to.
If Write Error Goto
Selects the action to perform or screen to go to if a write error occurs. A write error can occur when there is not enough memory to write a record or when a problem is detected on the file itself.
4-49
Page 116
MCL-Designer for Phaser Series User’s Guide
Fields To Write Field Name
Shows the fields in the selected file. A file can contain up to 16 fields.
Length
Shows the length of the fields in the selected file.
Value
Sets the variable or value to the field.Click on the list box to select the variable or enter a value in the box.
!
Click or to accept the default setting
!
Enter the appropriate information to change the values and click changes.
!
Click to close the dialog box without saving the changes.
to apply the
To write variables into the fields of a file: 1. Click on the Name list box to select the file to write to (e.g., <A>FILE). The dialog box displays the fields with their lengths. Refer to Files Window on page 4-87. 2. Click on the Value list box to select the variable or value required to write the value or content (of the variable) to the selected field: (e.g., V_PROD to field 1, V_QUAN to field 2, V_BARC to field 3.) Note: Click to go to the Data File Window. For more information, refer to Working With Files on page 4-87
4-50