Skip to content

Library for working with MAXON EPOS4 (through UART) without using libEposCmd

License

Notifications You must be signed in to change notification settings

Korzhak/EPOS4_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EPOS4 Python

Python library for working with Maxon EPOS4 through UART without using libEposCmd library.

The library is incomplete yet!

At the moment you can use library with Profile Position Mode (PPM) only.

Available connection thorough UART only.

How to use

Folder epos4 contains code of the library.

Explanation of example_1.py.

  1. Making object of EPOS4. Setting COM for communication with Maxon EPOS4 through UART.
from epos4 import Epos4
from epos4 import definitions as df

e = Epos4('COM_NUM')
  1. Checking current Operation mode. Set to PPM if it isn't.
om = e.get_operation_mode().get()
if om != df.OM_PPM:
    e.set_operation_mode(df.OM_PPM)
  1. Checking Enabled state and set it
if not e.get_enable_state():
    e.set_enable_state()
  1. Checking Fault state. Moving to position if it isn't
if not e.get_fault_state():
    e.move_to_position(0xFFF)

Clear Fault state if it happened

e.clear_fault_state()

After clearing Fault state you have to check Enable state again

if not e.get_enable_state():
    e.set_enable_state()
  1. Don't forget to close connection in the end
e.close()

OTHER EXAMPLES

About

Library for working with MAXON EPOS4 (through UART) without using libEposCmd

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages