1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Question Kangaroo X2 serial commands missing speed setting

Discussion in 'SimTools DIY Version' started by Milt, Dec 19, 2023.

  1. Milt

    Milt Member

    Joined:
    Mar 17, 2018
    Messages:
    60
    Location:
    USA
    Balance:
    32Coins
    Ratings:
    +28 / 0 / -0
    My Motion Simulator:
    2DOF
    Hello xsim community. I'm trying to figure out an issue that's been a minor annoyance since building my 2dof seat mover a few years ago. This occurs in both Simtools V2 and V3, so it is either a mistake on my end or a bug in the serial interface code.

    For context, I am using a Kangaroo X2 attached to a Sabertooth 2x32 with quadrature encoders on my DC gearmotors. Motion works great and I've been using the setup for years.

    The problem is that when the startup string is sent to my rig, the motors move at full speed from the machine home position to the software home position, ignoring my command to move at a slower speed. This isn't a huge issue, but the movement is a bit violent and stresses my PSU. The following is my copy-and-pasted Startup String:

    1,start<13><10>1,home<13><10>1,units4095=5100<13><10>2,start<13><10>2,home<13><10>2,units4095=5100<13><10>1,p2550s1000<13><10>2,p2550s1000<13><10>

    Broken down with comments this is:

    1,start #Start motor one
    1,home #Set motor one home position at current (resting) position
    1,units4095=5100 # change scaling units for motor one
    2,start #Start motor two
    2,home #Set motor two home position at current (resting) position
    2,units4095=5100 # change scaling units for motor two
    1,p2550s1000 #Move motor one to position 2550 at speed 1000
    2,p2550s1000 #Move motor two to position 2550 at speed 1000

    The last two lines are where the problem occurs. What appears to happen is the motors move to position 2550, as instructed, but do so at full speed rather than at speed 1000. Interestingly, when I issue these same commands through a serial terminal the speed limit is obeyed.

    Any ideas would be appreciated. I wonder if the position/speed commands are getting malformed in the simtools interface... or maybe I'm missing something obvious. Is there debug log that shows exactly the serial commands sent?

    Thanks.
  2. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    I can't really say, as I don't have the hardware to test, but SimTools v3 has parking location built in.
    So when a game starts, the sim will slowly center for the ride, and return to the parking location when the game is shut down. (simply don't use the startup and shutdown strings for output).
    • Informative Informative x 1
  3. Milt

    Milt Member

    Joined:
    Mar 17, 2018
    Messages:
    60
    Location:
    USA
    Balance:
    32Coins
    Ratings:
    +28 / 0 / -0
    My Motion Simulator:
    2DOF
    Thanks for your reply. I didn't realize V3 had built in centering and parking. I will still need to use the startup and shutdown strings to turn the motors on/off and change scaling units, but I'll test out leaving the positional commands off.

    Thank you from a fellow Oregonian!
  4. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    w00t! :cheers