Skip to main content

No project description provided

Project description

libximc

This is python binding for libximc - cross-platform library for [Standa 8SMC5-USB](Stepper & DC Motor Controller - Motorized Positioners & Controllers - Catalog - Opto-Mechanical Products - Standa) motor controllers.

Libximc manages hardware using interfaces: USB 2.0, RS232 and Ethernet, also uses a common and proven virtual serial port interface, so you can work with motor control modules through this library under almost all operating systems, including Windows, Linux and Mac OS X.

This library also supports virtual devices. So you can make some tests without real hardware.

Installation

pip install libximc

Minimal example

import time
from ctypes import c_int, byref
import libximc as ximc

# Virtual device will be used by default.
# In case you have real hardware set correct device URI here

device_uri = "xi-emu:///virtual_motor_controller.bin"  # Virtual device
# device_uri = "xi-com:\\\\.\\COM111"                  # Seril port
# device_uri = "xi-tcp://172.16.130.155:1820"          # Raw TCP connection
# device_uri = "xi-net://192.168.1.120/abcd"           # XiNet connection

device_id = ximc.lib.open_device(device_uri.encode())
if device_id > 0:
    print("Device with URI {} successfully opened".format(device_uri))
else:
    raise RuntimeError("Failed to open device with URI", device_uri)

print("Launch movement...")
ximc.lib.command_right(device_id)

time.sleep(3)

print("Stop movement")
ximc.lib.command_stop(device_id)

print("Disconnect device")
ximc.lib.close_device(byref(c_int(device_id)))

print("Done")

More information

If you have faced any issues while using the library and you have no idea how to solve them contact technical support via:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libximc-2.14.13.tar.gz (55.9 MB view hashes)

Uploaded Source

Built Distribution

libximc-2.14.13-py3-none-any.whl (18.7 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page