Parameter Functions
Use parameters to customize the behavior of the Automation1 controller. You can configure parameters in Machine Setup or in Configure workspace. Configured parameters are loaded to the controller during controller reset.
You can modify some behaviors of the controller while the controller is running by getting and setting live parameters through the .NET API or the AeroScript Parameter API.
The three main categories of parameters include:
- Axis Parameters: configures the behavior of axes and motion.
- Task parameters: configures the behavior of task and program execution.
- System parameters: configures global behaviors of the controller.
Most parameters are numeric and can be specified with real or integer values. A small set of parameters use string values to specify non-numeric information.
The AeroScript Parameter API includes a set of functions that lets you get and modify runtime parameters of the controller. These functions get and set the live configuration of the controller and do not modify the stored configuration. Parameter changes made using this API will not stay after a controller reset.
Getting Parameters
You can get the value of a parameter from the controller when using an AeroScript program. The AeroScript Parameter API lets you get the value of a parameter from the controller from within an AeroScript program. The value that you get for the parameter is the live value that the controller currently uses.
Use the functions that follow to get the live parameter values from the controller.
function ParameterGetAxisValue($axis as axis, $parameter as AxisParameter) as real
Gets the specified parameter value from the specified axis.
Arguments
$axis The axis from which to retrieve the parameter value.
$parameter The parameter to retrieve.
Returns
The value of the specified axis parameter.
function ParameterGetAxisStringValue($axis as axis, $parameter as AxisParameter) as string
Gets the specified string parameter value from the specified axis.
Arguments
$axis The axis from which to retrieve the string parameter value.
$parameter The string parameter to retrieve.
Returns
The value of the specified axis string parameter.
function ParameterGetTaskValue($taskIndex as integer, $parameter as TaskParameter) as real
Gets the specified parameter value from the specified task.
Arguments
$taskIndex The task from which to retrieve the parameter value.
$parameter The parameter to retrieve.
Returns
The value of the specified task parameter.
function ParameterGetTaskStringValue($taskIndex as integer, $parameter as TaskParameter) as string
Gets the specified string parameter value from the specified task.
Arguments
$taskIndex The task from which to retrieve the string parameter value.
$parameter The string parameter to retrieve.
Returns
The value of the specified task string parameter.
function ParameterGetSystemValue($parameter as SystemParameter) as real
Gets the specified system parameter value.
Arguments
$parameter The parameter to retrieve.
Returns
The value of the specified system parameter.
function ParameterGetSystemStringValue($parameter as SystemParameter) as string
Gets the specified system string parameter value.
Arguments
$parameter The string parameter to retrieve.
Returns
The value of the specified system string parameter.
Modifying Parameters
The AeroScript Parameter API lets you modify the value of a parameter on the controller from an AeroScript program. These functions update the live value of the parameter. The new value of the parameter will stay until you reset the controller or until you change the value with of the same parameter.
You cannot change some parameters while the controller is running. If you try to change one of these parameters, it will not have an effect on the controller, and you will get a task warning that shows that the parameter change did not have an effect.
The functions that follow let you change live parameter values on the controller.
function ParameterSetAxisValue($axis as axis, $parameter as AxisParameter, $value as real)
Sets the specified parameter value for the specified axis.
Arguments
$axis The axis on which to set the parameter value.
$parameter The parameter to set.
$value The value to set to the axis parameter.
function ParameterSetAxisStringValue($axis as axis, $parameter as AxisParameter, $value as string)
Sets the specified string parameter value for the specified axis.
Arguments
$axis The axis on which to set the string parameter value.
$parameter The parameter to set.
$value The value to set to the axis string parameter.
function ParameterSetTaskValue($taskIndex as integer, $parameter as TaskParameter, $value as real)
Sets the specified parameter value for the specified task.
Arguments
$taskIndex The task on which to set the parameter value.
$parameter The parameter to set.
$value The value to set to the task parameter.
function ParameterSetTaskStringValue($taskIndex as integer, $parameter as TaskParameter, $value as string)
Sets the specified string parameter value for the specified task.
Arguments
$taskIndex The task on which to set the string parameter value.
$parameter The parameter to set.
$value The value to set to the task string parameter.
function ParameterSetSystemValue($parameter as SystemParameter, $value as real)
Sets the specified system parameter value.
Arguments
$parameter The parameter to set.
$value The value to set to the system parameter.
function ParameterSetSystemStringValue($parameter as SystemParameter, $value as string)
Sets the specified system string parameter value.
Arguments
$parameter The parameter to set.
$value The value to set to the system string parameter.