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

Help with Serial, Kangaroo, sabertooth and encoder Output settings

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by PaulB, Apr 28, 2019.

  1. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    Hi: Thinking about redoing my rig for the 4th time : ) using 3 axis now, but would like to go to 6 axis.

    what I would like to know is if I can set simtools to shutdown and lower my seat to near the limit switches, now the chair will stop where it is. If I can do this my rig would start near the ground and it would be like getting into a rig at ground level. Then when the Sim starts, it would find the 6 limit switches center normally. Then when I finish racing (shutdown), the seat will go back near the floor so I can step out instead of jumping down. : )

    These are my working settings for: 3axis, sabertooth, kangaroo2x and encoders,

    Startup and Interface are probably Ok, I just don't know how modify the Shutdown settings.

    INT 1 Com 3 ch 1 ch 2

    STARTUP: 1,start<13><10>1,home<13><10>1,units4095=5206<13><10>2,start<13><10>2,home<13><10>2,units4095=5383<13><10>
    INTERFACE: 1,p<Axis1a><13><10>2,p<Axis2a><13><10>
    SHUTDOWN: 1,powerdown<13><10>2,powerdown<13><10>

    INT 2 Com 5 ch 3

    STARTUP: 2,start<13><10>2,home<13><10>2,units4095=3815<13><10>
    INTERFACE: 2,p<Axis3a><13><10>
    SHUTDOWN: 2,powerdown<13><10>

    1 more thing. I can't find anything about these programming codes. nube. Is there a a manual ?

    Thanks in advance pb
  2. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    Try reading the Kangaroo manual.
  3. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    Sorry I don't know anything about code!
    Found the manual. Still not sure what the "<13><10>"and"units 4095"signifies.
    "<Axis1a>" is aligning my chair the game. Yes?
    I'm assuming If I ad a line "1,p2603" that would put the chair at 50% of 5206?
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    "Note: \r\n is not visible in a terminal program, but must be included when using a function."

    \r in ASCII is 13 and \n is 10. Units 4095 signifies hall pot output is 12 bits.
  5. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    ?! \r\n terminal program, acsII ? : ) I'm in trouble.
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    No need to trouble yourself about the codes. Just know that after every command listed in the kangaroo manual you need to use <13><10> also in Simtools in order to execute it.
    • Informative Informative x 1
  7. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +61 / 0 / -0
    My Motion Simulator:
    DC motor
    Hey @PaulB,
    how did you manage to drive to motors to the center?
    And were you able to control the motors with the code shown above?

    In "game enging"->"Output testing" the motor goes to home position, but isn't movable with the sliders. Also when I add a position command in "startup" I just get a "beep" and nothing happens:(

    thanks:thumbs
  8. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    I think it's like this,
    Startup:
    1,start: Starts the motor
    1,home: Finds 1 of the limit switches
    1,units4095=5206: Tells the motor to go to 50% after it finds the limit switches.
    interface:
    is the feed from the game
    shutdown:
    just powers down the motors where ever they are when you exit the game.

    Not 100% sure about all of this but it has always worked for me.

    I'd like to add the 1,units4095=5206 code so the rig puts me back at 50%. Just haven't tested it yet.
    I also need to know what I would change to get it back to sat 80 or 90% at shutdown.

    And yes, that is all the code I use to run the game.

    Hope this helps Pb
    Last edited: Jun 30, 2019
  9. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +61 / 0 / -0
    My Motion Simulator:
    DC motor
    Thank you for your answer, @PaulB !
    I thought I need to enter a position command, that the motor drives the actuator to the center?!

    When I use the code you have, the startup routine works until the home command is done. I use mechanical stops atm, since the inductive proximity sensor isn’t wired yet.
    So the actuator drives to the end and then stops there. I think I have an error in the units command, so will try it tonight after I figured which values to enter^^

    Here another question: You are using 12 bit, 0..4095, where did you enter that you output 12 bit? In SimTools->GameEnginge->Interface Settings->Output-Bit Range???

    After using Auto Tune in kangaroo I get e.g 30.000 lines, so if I have selected Output-Bit Range 16 bit I need to enter the command:

    …1,units63535=30000<13><10>…

    Is this correct? And SimTools sends automatically a command to center the actuator? No need to enter

    1,p15000<13><10>
    ?!

    Do you use a time for “HW Start”? As SimTools doesn’t wait for the answer that the actuator has reached its limit, can’t it be that SimTools starts sending commands before the actuator is ready?

    Thank you again :)
    Last edited: Jul 1, 2019
  10. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    Are you tuning with DEScribe?
    This is my setup
    Capture 1.PNG
  11. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +61 / 0 / -0
    My Motion Simulator:
    DC motor
    Thank you for the photo. At home I will adjust some things, hopefully it will work then.
    Last time I tuned with DEScribe, Why?
  12. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    You wrote "After using Auto Tune in kangaroo" Just kind of confused me : )
  13. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +61 / 0 / -0
    My Motion Simulator:
    DC motor
    I used both;) I don't know how I tuned it the last time. After Auto Tune in kangaroo I also can access the data via DEScribe, don't I?!o_O

    Is there a reason, why you chose 12 bit?
  14. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    Probably received advice from another member on setup. I'm still learning this stuff!
    I'm thinking of going to use FlyPT. Looks like great control for a 6dof similar to the video above.
    have you looked at it?
  15. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +61 / 0 / -0
    My Motion Simulator:
    DC motor
    Now it works:D

    Had a stupid error: the output type was binary, not decimal…
    Now i can control the motors with SimTools.

    I changed the resolution of the encoder from 2048 to 256 and the actuators are now sofast, that the sabertooth shuts down:/ already added 200W resistors to the voltage clamp… Will have to dig deeper.

    But finally I can control the motorshug:
    • Winner Winner x 1
  16. PaulB

    PaulB Titanium2dof

    Joined:
    Apr 15, 2017
    Messages:
    121
    Location:
    Canada
    Balance:
    723Coins
    Ratings:
    +55 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    What are your encoders p/r? I was using 600 p/r and they went over the 80,000 limit for the two encoders because I have them on the motors. Switched to 100 p/r encoders and the problem went away.
  17. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +61 / 0 / -0
    My Motion Simulator:
    DC motor
    I have the CUI AMT102 encoders, so I can choose between 16 different resolutions. From 48 to 2048.
    Now they work with 200 ppr. The problem with the shutdown seems really to be the regenarative current. Although I used resistors to get rid of it, it didn't help. What helped was a bridge rectifier. Now the actuators go like crazy without shutting down:D
    • Like Like x 1