Parameter Functions
Use parameters to customize the behavior of the Automation1 controller. You can configure parameters in Machine Setup or in the Configure workspace. Configured parameters are loaded to the controller during a controller reset.
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.
Active Parameters
While the controller is running, you can modify some of its behaviors by getting and setting active parameters through the .NET, C, LabVIEW, and Python APIs or the AeroScript Parameter
functions.
The changes that you make to active controller parameters have an effect immediately, but they are not permanent. This occurs because the values that you specify for these parameters are erased after you reset the controller. To permanently save your changes to the controller parameters, use the AeroScript ConfiguredParameter
functions.
The AeroScript Parameter
functions include a set of functions that lets you get and modify runtime parameters of the controller. These functions get and set the runtime value of the parameters on the controller and do not modify the stored configuration. If you use these functions to make parameter changes, they are erased after you reset the controller.
Configured Parameters
The AeroScript ConfiguredParameter
functions include a set of functions that lets you retrieve the configured value of a parameter as it exists in the Machine Configuration Definition (MCD) file. You cannot use these functions to change the configured value of a parameter.
You can get and set configured parameters through the .NET, C, and Python APIs and you can get configured parameters through the AeroScript ConfiguredParameter
functions.
Getting Active 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 active value of the specified parameter on 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 active string value of the specified parameter on 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 active value of the specified parameter on 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 active string value of the specified parameter on 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 active value of the specified system parameter.
Arguments
$parameter The parameter to retrieve.
Returns
The value of the specified system parameter.
function ParameterGetSystemStringValue($parameter as SystemParameter) as string
Gets the active string value of the specified system parameter.
Arguments
$parameter The string parameter to retrieve.
Returns
The value of the specified system string parameter.
Modifying Active 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 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 active value of the specified parameter on 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 active string value of the specified parameter on 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 active value of the specified parameter on 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 active string value of the specified parameter on 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 active value of the specified system parameter.
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 active string value of the specified system parameter.
Arguments
$parameter The parameter to set.
$value The value to set to the system string parameter.
Getting the Configured Value of a Parameter
The AeroScript ConfiguredParameter
API lets you retrieve the configured value of a parameter from an AeroScript program. You can use these functions with the corresponding ParameterSet*()
function to reset a parameter to its configured value.
The functions that follow let you retrieve the configured value of a parameter.
function ConfiguredParameterGetAxisValue($axis as axis, $parameter as AxisParameter) as real
Gets the configured value of the specified axis parameter from the controller.
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 ConfiguredParameterGetAxisStringValue($axis as axis, $parameter as AxisParameter) as string
Gets the configured string value of the specified axis parameter from the controller.
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 ConfiguredParameterGetTaskValue($taskIndex as integer, $parameter as TaskParameter) as real
Gets the configured value of the specified task parameter from the controller.
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 ConfiguredParameterGetTaskStringValue($taskIndex as integer, $parameter as TaskParameter) as string
Gets the configured string value of the specified task parameter from the controller.
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 ConfiguredParameterGetSystemValue($parameter as SystemParameter) as real
Gets the configured value of the specified system parameter from the controller.
Arguments
$parameter The parameter to retrieve.
Returns
The value of the specified system parameter.
function ConfiguredParameterGetSystemStringValue($parameter as SystemParameter) as string
Gets the configured string value of the specified system parameter from the controller.
Arguments
$parameter The string parameter to retrieve.
Returns
The value of the specified system string parameter.