How VAL3 Associates Tools and Frames with Motion
VAL3 does not expose a single current-tool or current-frame value for this use case. Each motion command, including movel and movej, receives its tool when the movement is issued. The frame comes from the frame to which the commanded point belongs.
| Item | Source during motion | Display implication |
|---|---|---|
| Tool | Tool specified in the motion command | Track the selected tool in application data |
| Frame | Frame associated with the commanded point | Track the point's frame in application data |
Why a Current Tool or Frame Variable Is Unavailable
The tool and frame are inputs to a particular movement rather than persistent global selections. Consequently, the interface cannot obtain the requested information from a built-in current-tool or current-frame variable. No controller model, VAL3 version, or interface type was supplied, so confirm this behavior on the target system before relying on it as a cross-version rule.
Track the Selection in the Application
Maintain arrays of tools and frames plus application-owned indices identifying the entries used for each commanded move. Select the tool as tTool[nIndexOfArray]. When a point must be expressed relative to another frame, use link() to move or relink the point from one frame to another.
- Store the available tools and frames in application arrays.
- Set the tracking indices before issuing each motion command.
- Pass the indexed tool to
movel,movej, or the applicable movement command. - Use
link()when the commanded point must belong to a different frame. - Display the application-owned indices or their associated labels in the interface.
Verify the Displayed State
For each movement, compare the displayed tool index with the tool argument passed to the command. Also confirm that the displayed frame matches the frame associated with the commanded point after any link() operation. Update the tracking values in the same application path that selects the motion arguments so the interface does not report a stale selection.
FAQ
What is the VAL3 variable for the current tool?
No current-tool variable is identified for this behavior. Track the selected array index and pass the corresponding entry, such as tTool[nIndexOfArray], to the motion command.
How do I find the current frame during a VAL3 trajectory?
Determine it from the frame to which the commanded point belongs. If the interface must display it, maintain the selected frame or frame index in application data.
What does link() do when tracking VAL3 frames?
Use link() to move or relink a point from one frame to another. After calling it, update the application-managed frame state used by the interface.