ID : 2283
ConvertPosBase
Function
Convert a given position type data on the currently selected base definition into the one on the different base definition.
This command is available in Ver.1.11.* or higher.
Syntax
ConvertPosBase( Position type data, Base definition before the conversion, Base definition after the conversion)
Guaranteed Entry
- Position type data
- Specify the position you want to convert the coordinate with position type data.
- Base definition before the conversion
- Specify each element (X, Y, Z, RX, RY, and RX) of a base definition that is before the coordinate conversion by Position type data or specify a base definition number by Integer type data.
For the entry by Position type data, Fig is ignored.
To specify the base definition number, 0 or 1 is available.
0: Base definition has not been not specified (P(0,0,0,0,0,0,))
1: Base definition has been specified (Specified by [Base setting] window) - Base definition after the conversion
- Specify each element (X, Y, Z, RX, RY, and RX) of a base definition that is after the coordinate conversion by Position type data or specify a base definition number by Integer type data.
For the entry by Position type data, Fig is ignored.
To specify the base definition number, 0 or 1 is available. - 0: Base definition has not been not specified (P(0,0,0,0,0,0,))
1: Base definition has been specified (Specified by [Base setting] window)
Return Value
Return the converted position data with position type data.
Description
Convert a given position type data on the currently selected base definition into the one on the different base definition and then return the result.
FIG value of the return value is inherited from the argument FIG value.
Related Terms
Tool Coordinates(6-axis, 4-axis), ChangeTool, ChangeWork, Tool, Work, Base, CurTool, CurWork, ToolPos, WorkPos,
Attention
-
Example
- In the following example, specify the base definition after the teaching, and then change the teaching point.
'Starting from 0 to 99, convert P type variables
'Convert all P type variables from the base definition P(0, 0, 0, 0, 0, 0) _ into P(0, -400, 0, 0, 0, 0).
For li = 0 To 99
P[li] = ConvertPosBase( P[li], P( 0, 0, 0, 0, 0, 0 ), _
P( 0, -400, 0, 0, 0, 0 ) )
Next
- In the following example, specify the base definition after the exclusive area setting, and then change the exclusive area.
' Set the current value of the exclusive area 1 to a P type variable and a V type variable
P[1] = P( 400, 250, 100, 0, 0, 0 )
V[1] = V( 100, 100, 100 )
'Change the value of the coordinate
P[1] = ConvertPosBase( P[1], 0, 1 )
'Change the exclusive area setting
ExclusiveArea 1, P[1], V[1]
ID : 2283