Workpiece list

Since BESgrav version 3.08, variables are available in the workpiece list.

1. Variable / calculate

1.1 Structure of a variable name
A variable consists followed of a letter from further letters or numbers. Up to 30 indications are possible as variable names. As the first indication can also underlined stand (_). this is however for the future in connection with subroutine technology and local variables reserved.
Small and capital letters are not differentiated. I.e. it unimportant whether you write variable names in small or capital letters.
Examples of valid variables:
ABC
A3344
LongName

Command or function names cannot be used however as variable names! So OFFSET or SIN is not permissible as variable names.
 

1.2 Range of values
In a variable floating-point numbers with the range of validity are stored from  8.43E-37 to 3.37E+38.

1.3 Creation of a variable
With the first use of a name on the left side of an expression (a compute statement) put on a new variable automatically. A separate agreement is not necessary. That means it however that you may not use up yourselves with the variable names on the left side. Because with differently reading name a new variable is put on immediately.

1.4 Calculating with variables
As calculation methods the basic operations of arithmetic including clips, built-in functions are available like the trigonometric functions, and special functions. Per line an assignment may stand. On the left of the goal variable followed of an equals sign and on the right of the expression.
E.g.:
A3344 = ABC + 33
Valid operators for the basic operations of arithmetic are
+ for addition
- for subtraction
* for multiplication
/ for division

The computation within an expression takes place with priority for multiplication and division. If you want to break through this priority, you must use brackets.
Example:
A3344 = (ABC + 3.3) * 5

Still another important note: They must enter as decimal point one point and no comma. The comma is reserved for separating the parameters with function calls.

 

1.5 Functions

1.5.1 Built-in functions
Built-in functions like it also in the DPL are defined
Trigonometric functions SIN, COS, TAN, ARCSIN, ARCCOS, ARCTAN
as well as ATAN2 for forming an angle from x and y-component.

ABS    absolute value of a number (sign one takes away
SQRT   root from a number
EXP    natural exponential function
LN     natural algorithm
SQR    squaring a number
SIGN   sign of a number (from positive numbers will +1, from negative becomes -1)
TRUNC  integral portion of a number
ROUND  number rounded on whole number

1.5.2 Special functions of the workpiece list:
Selections the workpiece point of reference:
ReadPRPX
ReadPRPY
ReadPRPZ
ReadPRPA
ReadPRPB
ReadPRPC
ReadPRPU
ReadPRPV

In each case the workpiece point of reference including offset from  the manual control is read
z. B.
XBezug = ReadPRPX
YBezug = ReadPRPZ

Likewise the palpation functions belong to the special functions
SENZV
SENZABSV
SENZV3
SENZABSV3
Explanation for this under 2.2

Selections of the X/Y position of the highest  point from the surface dialogue:
ReadSurfaceHX
ReadSurfaceHY
Use: Material surface regulation of a scanned free forming surface.
 

Parameters of a function must be written in round parentheses. Several parameters are separated by comma.
z. B.
S = SIN(30)
Distance = SQRT(SQR(XTeil) + SQR(YTeil)  )
 
 

2.0 Instructions for scanning special points on the machine

2.1 Scanning and immediate correcting of the workpiece point of reference
So far already the instructions SENZ and SENZABS contained in the workpiece list remain unchanged. They are described in the operating instructions and/or in the on-line assistance.
 

2.2 Scanning by function, no immediate correcting of the workpiece point of reference
2.2.1 keys relative to the workpiece point of reference
For this the function calls SENZV and SENZV3  are available. With both functions the point of scanning will hand over as parameter related to the workpiece point of reference.  With the function SENZV3 the starting point for scanning is added.
The result is assigned to a variable.
With the line
ZWert = SENZV(100, 30.5)
at position X=100 Y=30.5 a scan will be done. The two values refer to the workpiece point of reference. The result is put down in the variable ZWert. Here the difference stands to the workpiece point of reference in Z this value can with the offset instruction be used.
You find an example of the use of the instruction SENZV in the file Tasten_Offset.WSL.

With the line
ZWert = SENZV3(100, 30,5, 80)
the same position for scanning is implemented. However the tracer will proceed independently of the dialogue attitude for starting point in Z to the value 80 mm (related to machine zero).

2.2.2 Scans related to machine zero point
For scanning related to the machine zero point the function calls stand SENZABSV and SENZABSV3 for order. For these two functions you indicate the point of palpation in X/Y related to the machine zero point. With the function SENZABSV3 the starting point is added into Z for groping.
The result of the scanning procedure is assigned to a variable.
With the line
ZWert  =  SENZABSV(200.3,  85.8)
at position 200,3 in X and 85,8 in Y related to the machine zero point one gropes. The result is assigned to the variable  ZWert. The palpation result refers likewise again on the machine zero point.
You find an example of the use of the instruction SENZV in the file Tasten_Absolut.WSL.

2.2.3 Drive the tracer in and out
With the first call of the SENZxxx functions the tracer is driven out. Opposite the SENZ and SE Z starting from self-service Z remains driven out the tracer after groping. If you do not program the instruction SENZIN,  the tracer is again brought in automatically with the first Engrave instruction.

2.2.4 Instruction for bringing the tracer in
For this the instruction SENZIN is available. No parameters.

 

3.0 Other instructions

3.1 Representation of variables
The DEBUG instruction may be used to see some interim results. The use of this instruction is meaningful also after groping material surfaces. So you can examine the palpation values for plausibility, before the milling procedure is started.

The values and texts are represented in a Windows Message box. The workpiece list is only then continued to process if you confirm the Messagebox. An abort of the workpiece list is likewise possible in this condition.

As parameter first a number comes. This number serves logging to file for future extensions within the range. They should here always use the number of 0. Subsequently, a number of texts comes into "" and/or variables. The number is only limited over the maximally permissible line length by 1000 indications.
Example:
Debug 0  "ZWert1 =", ZWert1, "  ZWert2 =", ZWert2
Here the two variables ZWert1 and ZWert2 are represented once as text and once as number into a Messagebox.

If you would like to have the representation in the Messagebox of several lines, then you can insert in the text \n. For above example would look in such a way:
Debug 0  "ZWert1 =", ZWert1, "\nZWert2 =", ZWert2
 
 

3.2 Scale  Inch / mm
In the workpiece list the scale from the dialogue window option/pre-setting applies to the length specifications. Independently of it you can switch to another scale.

3.2.1 Setting to inch
After call of SET INCH you must enter all following parameters in inch. That applies to length values. Angles and factors are not concerned.

3.2.2 Setting to millimeter
After call of SETMM you must enter all following parameters in millimeters. That applies to length values. Angles and factors are not concerned.
 

(Described functions available since BESgrav version 3.08)