general_purpose
provides functions to access General Purpose Variables (gp)¶
General Purpose Variable Access
- Please see the user manual for details on GP
- Please ensure SL3 firmware version 8.26 or newer
-
general_purpose.
gp_find_index
(label)¶ Tells you the index of the general purpose with said label Returns zero if no such label is found
Parameters: label (string) – the customer set label for the gp Returns: gp index if a match is found. zero if no match is found Return type: int
-
general_purpose.
gp_index_valid
(gp_index)¶ returns True if the provided general purpose variable index is valid
-
general_purpose.
gp_read_label
(gp_index)¶ Returns the customer set Label of the general purpose variable.
Parameters: gp_index (int) – A number between 1 and gp_count Returns: the Label of the specified gp Return type: str
-
general_purpose.
gp_read_value
(label_or_index)¶ Returns the Value associated with the index or Label of the general purpose variable.
Parameters: label_or_index (int or str) – either a gp index or the user set Label of the general purpose variable Returns: the Value of the general purpose variable Return type: float
-
general_purpose.
gp_read_value_by_index
(gp_index)¶ Returns the customer set Value of the general purpose variable.
Parameters: gp_index (int) – A number between 1 and gp_count Returns: the Value of the specified p Return type: float
-
general_purpose.
gp_read_value_by_label
(label)¶ Returns the Value associated with the Label of the general purpose variable.
Parameters: label (str) – the user set Label of the general purpose variable Returns: the Value of the general purpose variable Return type: float
-
general_purpose.
gp_test
()¶
-
general_purpose.
gp_write_label
(gp_index, label)¶ Writes the Label of the specified gp
Parameters:
-
general_purpose.
gp_write_set
(gp_index, label, value)¶ Writes both the Label and the Value of the specified gp
Parameters:
-
general_purpose.
gp_write_value
(label_or_index, value)¶ Writes a new Value to the general purpose variable
Parameters:
-
general_purpose.
gp_write_value_by_index
(gp_index, value)¶ Writes the Value of the specified gp
Parameters: