What is 5.0 DP?
It seems we don’t have this release. Is there any typo?
Or please share the result of the following command on your board.
5.0 DP was displayed on SDK Manager while installing the OS. The result of the command is below:
tris@jetson513:~$ cat /etc/nv_tegra_release
# R35 (release), REVISION: 5.0, GCID: 35550185, BOARD: t186ref, EABI: aarch64, DATE: Tue Feb 20 04:46:31 UTC 2024
The block diagram is below.
The dmesg log:
dmesg_log.txt (65.8 KB)
The DSO image of Rx and Tx lines of HL340 converter when used with Windows 10:
The DSO image of Rx and Tx lines of HL340 converter when used with Jetson:
The code for interfacing with Maxon on Windows:
import serial
import time
from ctypes import *
# EPOS Command Library path
path=r".\EposCmd64.dll"
# Load library
cdll.LoadLibrary(path)
epos = CDLL(path)
# Defining return variables from Library Functions
ret = 0
pErrorCode = c_uint()
pDeviceErrorCode = c_uint()
# Defining a variable NodeID and configuring connection
nodeID = 2
baudrate = 115200
timeout = 500
# Configure desired motion profile
acceleration = 30000 # rpm/s, up to 1e7 would be possible
deceleration = 30000 # rpm/s
# Query motor position
def GetPositionIs():
pPositionIs=c_long()
pErrorCode=c_uint()
ret=epos.VCS_GetPositionIs(keyHandle, nodeID, byref(pPositionIs), byref(pErrorCode))
return pPositionIs.value # motor steps
# Move to position at speed
def MoveToPositionSpeed(target_position,target_speed):
while True:
if target_speed != 0:
epos.VCS_SetPositionProfile(keyHandle, nodeID, target_speed, acceleration, deceleration, byref(pErrorCode)) # set profile parameters
epos.VCS_MoveToPosition(keyHandle, nodeID, target_position, True, True, byref(pErrorCode)) # move to position
elif target_speed == 0:
epos.VCS_HaltPositionMovement(keyHandle, nodeID, byref(pErrorCode)) # halt motor
true_position = GetPositionIs()
if true_position == target_position:
break
if __name__ == "__main__":
# Initiating connection and setting motion profile
keyHandle = epos.VCS_OpenDevice(b'EPOS4', b'MAXON SERIAL V2', b'RS232', b'COM9', byref(pErrorCode)) # specify EPOS version and interface
print("Connected: ", keyHandle, pErrorCode)
val = epos.VCS_SetProtocolStackSettings(keyHandle, baudrate, timeout, byref(pErrorCode)) # set baudrate
print("Set protocol: ", val, pErrorCode)
epos.VCS_ClearFault(keyHandle, nodeID, byref(pErrorCode)) # clear all faults
print("clear fault: ", val, pErrorCode)
epos.VCS_ActivateProfilePositionMode(keyHandle, nodeID, byref(pErrorCode)) # activate profile position mode
print("activate profile pos: ", val, pErrorCode)
epos.VCS_SetEnableState(keyHandle, nodeID, byref(pErrorCode)) # enable device
print("Set enable state: ", val, pErrorCode)
MoveToPositionSpeed(20000,5000) # move to position 20,000 steps at 5000 rpm/s
print('Motor position: %s' % (GetPositionIs()))
time.sleep(1)
MoveToPositionSpeed(0,2000) # move to position 0 steps at 2000 rpm/s
print('Motor position: %s' % (GetPositionIs()))
time.sleep(1)
epos.VCS_SetDisableState(keyHandle, nodeID, byref(pErrorCode)) # disable device
epos.VCS_CloseDevice(keyHandle, byref(pErrorCode)) # close device
Changes on Jetson:
path="/home/tris//libEposCmd.so.6.7.1.0"
keyHandle = epos.VCS_OpenDevice(b'EPOS4', b'MAXON SERIAL V2', b'RS232', b'/dev/ttyUSB0', byref(pErrorCode)) # specify EPOS version and interface
Thanks.