Command-Line Interface (CLI)
The Command-Line Interface (CLI) is included in the Python package. It provides a convenient way to interact with the actuator directly from the terminal. This is particularly useful for quick communication tests and for scanning devices on the CAN bus.
Verifying the Installation
The CLI is installed alongside the Python package. To confirm that it is working correctly, run the following command:
This should display the help message.You can also check the installed package version:
Using the CLI
The CLI provides several commands to interact with the PULSAR actuator. Here are some common commands:
General notes
- If
--portis omitted, the CLI tries to auto-detect the USB serial port. - When using CAN,
--addressis required. It accepts both hexadecimal and decimal notation, for example0x10or16.
Scan for Devices
This command scans the CAN bus for connected PULSAR devices and lists their addresses. You need a CAN adapter connected and a correctly wired CAN bus. Use the-h flag to see more options.
Get Device Parameters
You can retrieve all parameters of the connected device. Use the-h flag to see more options.
Examples:
Blink Device LED
This command blinks the actuator LED so that you can identify a device on the CAN bus. An address is required for this command.
Set Home Position
This command stores the actuator's current position as the home position (zero reference). The position is stored in the device's non-volatile memory and is retained even after power cycling. Use the -h flag to see more options.