Local Variables are variables that are used only within its particular job. These are useful for temporary operations as they cannot be read or changed from other jobs, whereas User Variables can be read or changed. Some of its usage are for: loop counters, temporary calculations, and input signals storage. This section describes additional functions that are available relating to Local Variables.
Allocation
Local Variables need to be configured first to be used.
- Select {Job List} under {MENU}.
- Select the particular job from the list of job.
- Press the {Additional Settings} expansion icon at the bottom of the Job Details panel. This will pull up a new panel for Additional Settings.
4. Under the {Local Variable Allocation}, enter a number between 0 and 255 for the amount of variable to allocate, next to the desired variable type.
- Example: the figure below shows allocating 10 Local Byte (LB) variables. Thus, LB000 to LB009 will be usable inside the job.
Entering Local Variables
After Local Variables have been allocated for a particular job, they can be used by changing variable type to Local Variable in the Detail Edit panel. Only available Local Variables types will be shown (i.e. types that have been allocated for a particular job).
Example: the Position Level parameter can be set as B, I, or D User Variable type. However, only LB and LI Local Variables types are shown because no LD variables have been allocated for this job.
If no Local Variables that can be used with particular parameters are allocated, the following message will be displayed.
Press the {CURRENT JOB SETTINGS} button to show a subpanel where the Local Variables can be allocated.
Because Local Variables only exist in its job they must be defined before being used. For example, to set the Position Level as an LB variable, this could first be initialized using the Set command:
Usage of Local Variables
Some useful way sto use Local Variable are shown below.
1. User can guarantee to not accidentally modify a value that is used in a different job by using Local Variables.
- Example: Using a Local Variable for a For loop index. If I004 was used instead of LI004, the job would change the value of a Global Variable which could be used in another job.
2. Temporary mathematic operations.
- Example: Set the JointMove speed to “B010*2” without overwriting any Global Variables.
Comments
0 comments
Please sign in to leave a comment.