Print Statement
Outputs data to the current display window, including the Run window, Operator window, Command window, and Macro window.
Syntax
Print expression [ ,expression... ] [ , ]
Print Statement
Parameters
- expression
- Optional. A number or string expression.
- , (comma)
- Optional. If a comma is provided at the end of the statement, then a CRLF will not be added.
Return Values
Variable data or the specified character string.
Description
Print displays variable data or the character string on the display device.
An end of line CRLF (carriage return and line feed) is automatically appended to each output unless a comma is used at the end of the statement.
Note
This command can handle up to 256 bytes.
Make Sure Print is used with Wait or a motion within a loop
The Controller may freeze up if only Print is used in loop (loops with no Wait or no motion).
Be sure to use Print with Wait command or a motion command within a loop.
Bad example
Do Print "1234" Loop
Good example
Do Print "1234" Wait 0.1 Loop
See Also
Print Statement #
Print Statement Example
The following example extracts the U Axis coordinate value from a Point P100 and puts the coordinate value in the variable uvar. The value is then printed to the current display window.
Function test
Real uvar
uvar = CU(P100)
Print "The U Axis Coordinate of " + Chr$(34) + "P100" + Chr$(34) + " is ", uvar
Fend