Skip to content

Commit

Permalink
Python fdm: Add Hostmot2 driver support
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <[email protected]>
  • Loading branch information
the-snowwhite committed May 31, 2019
1 parent d222c3d commit 02b47e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/python/fdm/config/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ def setup_motion(kinematics='trivkins', tp='tp', num_aio=50, num_dio=21):
rt.loadrt(kinematics)
rt.loadrt(tp)


# hostmot2 setup get names and config from ini file
hostmot2 = bool(c.find('HOSTMOT2', 'DRIVER'))
if hostmot2:
rt.loadrt('hostmot2')
rt.newinst(c.find('HOSTMOT2', 'DRIVER'),
c.find('HOSTMOT2', 'DEVNAME'),
"-- ",
c.find('HOSTMOT2', 'CONFIG'))


# motion controller, get name and thread periods from ini file
rt.loadrt(c.find('EMCMOT', 'EMCMOT'),
servo_period_nsec=c.find('EMCMOT', 'SERVO_PERIOD'),
Expand Down

0 comments on commit 02b47e7

Please sign in to comment.