API Reference v9.2.0
Ge1xGripperclass
Module: ZaberMotionProduct
Class representing a gripper in the GE1x series.
The following example illustrates how you can obtain an instance of this type:
import ZaberMotionProduct
let ge1xGripper = try await Ge1xGripper.openConnection(portName: "COM3")Related Guides:
Index
cConstants
pProperties
mMethods
Constants
c
Properties
Methods
m
try await ge1xGripper.activatePreset(presetNumber, waitUntilIdle = true)Activates a preset, causing the gripper to move to the preset position using the preset force and speed.
Arguments
| Name | Type | Description |
|---|---|---|
| presetNumber | Int | The preset number to activate, from 1 to 4. |
| waitUntilIdle | Bool | Wait until the move has completed before returning. |
m
m
m
try await ge1xGripper.getError()Gets the current error of the gripper.
Return Value
Ge1xGripperError The current error of the gripper.m
m
m
try await ge1xGripper.getState()Gets the current state of the gripper.
Return Value
Ge1xGripperState The current state of the gripper.m
m
m
try await ge1xGripper.move(position, waitUntilIdle = true)Moves the gripper to a specified position.
Arguments
| Name | Type | Description |
|---|---|---|
| position | Double | The target position for the gripper as a percentage, where 0 is closed and 100 is open. |
| waitUntilIdle | Bool | Wait until the move has completed before returning. |
m
m
s
try await Ge1xGripper.openConnection(portName, deviceAddress = Ge1xGripper.defaultDeviceAddress, timeout = 500)Opens a serial connection to a gripper.
Arguments
| Name | Type | Description |
|---|---|---|
| portName | String | The name of the serial port to connect to. |
| deviceAddress | Int | The address of the gripper to connect to. |
| timeout | Int | The timeout in milliseconds for any request sent using this connection. |
Return Value
Ge1xGripper A Ge1xGripper instance representing the connection to the gripper.m
m
try await ge1xGripper.setAutoHome(enabled, saveToFlash = true)Enables or disables automatic homing on power up.
Arguments
| Name | Type | Description |
|---|---|---|
| enabled | Bool | True to enable automatic homing on power up, false to disable. |
| saveToFlash | Bool | Save the auto home setting to flash memory so it is retained on power cycle. |
m
m
try await ge1xGripper.setHomeDirection(direction, saveToFlash = true)Sets the home direction for the gripper.
Arguments
| Name | Type | Description |
|---|---|---|
| direction | Ge1xGripperDirection | The home direction to set. |
| saveToFlash | Bool | Save the home direction setting to flash memory so it is retained on power cycle. |
m
try await ge1xGripper.setIoEnabled(enabled, saveToFlash = true)Enables or disables IO control for the gripper. When enabled, the gripper will not move to a preset position until the IO input changes.
Arguments
| Name | Type | Description |
|---|---|---|
| enabled | Bool | True to enable IO control, false to disable. |
| saveToFlash | Bool | Save the IO enabled setting to flash memory so it is retained on power cycle. |
m
try await ge1xGripper.setIoInputFilter(duration, saveToFlash = true)Sets the debounce filter time for the gripper IO input to suppress noise.
Arguments
| Name | Type | Description |
|---|---|---|
| duration | Int | The IO input filter time in milliseconds. |
| saveToFlash | Bool | Save the IO input filter setting to flash memory so it is retained on power cycle. |
m
try await ge1xGripper.setPreset(presetNumber, position, force = 100, speed = 100, saveToFlash = true)Saves a position, force, and speed as a preset that can be enabled using I/O or the activatePreset() method. Note that presets are only activated by I/O when the I/O input changes to that preset number.
Arguments
| Name | Type | Description |
|---|---|---|
| presetNumber | Int | The preset number to save the preset to, from 1 to 4. |
| position | Double | The target position for the preset as a percentage, where 0 is closed and 100 is open. |
| force | Int | The gripping force for the preset as a percentage from 20 to 100. |
| speed | Int | The maximum speed for the preset as a percentage from 1 to 100. |
| saveToFlash | Bool | Save the preset to flash memory so it is retained on power cycle. |
m
m
m