1. 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!
  2. 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
  3. 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

Tutorial SPS - Sabertooth Packet Serial PID motor driver sketch w/SoftStart

Discussion in 'SimTools compatible interfaces' started by BlazinH, Nov 10, 2016.

  1. TSHracing

    TSHracing New Member

    Joined:
    Dec 14, 2017
    Messages:
    26
    Location:
    Canada
    Balance:
    280Coins
    Ratings:
    +5 / 0 / -0
    Yes I even ran a simple test sketch that does simple math and montiored that on the serial monitor to see if comunicating with the borad is good.
    I have one question about the UDP port setting in the ini file, where can find that (if it needs to be changes?)
  2. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,026
    Location:
    Switzerland
    Balance:
    29,788Coins
    Ratings:
    +3,035 / 30 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    AFAIK you do not need to change the UDP port. Try another USB port, do not use usb hubs, unplug all other not needed usb devices, set all parameters in the device manager correctly, it should work without changing any parameters of SMC.
  3. thecures

    thecures New Member

    Joined:
    Oct 22, 2013
    Messages:
    24
    Balance:
    127Coins
    Ratings:
    +3 / 1 / -0
    My Motion Simulator:
    3DOF
    hello .... the syren 50 is not mentioned .... how should i set the dip-switch?...tks
  4. FredBasset

    FredBasset New Member Gold Contributor

    Joined:
    Dec 17, 2013
    Messages:
    28
    Balance:
    441Coins
    Ratings:
    +12 / 0 / -0
    Ignore below, worked it out. :)

    Can I ask a simple question, before I get into this too much. I have everything wired up on the bench and I think its working. However my target position is always the centre of the graph, if I manually move the motor it will recenter and stop. I'm probably being dense but I can't see how to change the target, the three buttons to the right of the graph don't do anything.

    As I say, probably being dense, what am I missing.

    Regards
    Fred
    Last edited: Jul 2, 2020
  5. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,026
    Location:
    Switzerland
    Balance:
    29,788Coins
    Ratings:
    +3,035 / 30 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    to use this function out mode must be manual
  6. FredBasset

    FredBasset New Member Gold Contributor

    Joined:
    Dec 17, 2013
    Messages:
    28
    Balance:
    441Coins
    Ratings:
    +12 / 0 / -0
    Thanks, yeah I worked it out.

    I've got my motor nicely dialled in now, however although values are being written from the SMC3Utils program to the arduino for kp, kd and deadzone for example and being retained when its powered down, this isn't the case for PWM Max, this value is never retained, should it be?

    Thanks
    Fred
  7. MarkusB

    MarkusB Active Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    454
    Location:
    Germany
    Balance:
    3,373Coins
    Ratings:
    +444 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Exactly this topic already has its own thread:
    https://www.xsimulator.net/community/threads/smc3-saving-settings.14963/
    • Informative Informative x 1
  8. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,026
    Location:
    Switzerland
    Balance:
    29,788Coins
    Ratings:
    +3,035 / 30 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    yes it should, obviously a new bug of Windowsneverendingstory...I had never ever any issues.
  9. FredBasset

    FredBasset New Member Gold Contributor

    Joined:
    Dec 17, 2013
    Messages:
    28
    Balance:
    441Coins
    Ratings:
    +12 / 0 / -0
    lol, weird its not affecting all values.

    Can I modify the arduino code to use the value I've worked out and not read from the eprom?
  10. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,131
    Location:
    Oklahoma City, USA
    Balance:
    15,743Coins
    Ratings:
    +1,803 / 32 / -1
    With additional feedback received from many people vs only one I now know where the issue resides and I'm looking into a fix for it.
    • Like Like x 1
  11. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,131
    Location:
    Oklahoma City, USA
    Balance:
    15,743Coins
    Ratings:
    +1,803 / 32 / -1
    Untested fix but have high confidence :). Let me know!

    Attached Files:

    • Like Like x 2
  12. FredBasset

    FredBasset New Member Gold Contributor

    Joined:
    Dec 17, 2013
    Messages:
    28
    Balance:
    441Coins
    Ratings:
    +12 / 0 / -0
    Thanks BlazinH, only time for a quick test this morning but it solved my problem with PWM Max not being retained.

    Thanks so much.
    Fred
    • Winner Winner x 1
  13. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,131
    Location:
    Oklahoma City, USA
    Balance:
    15,743Coins
    Ratings:
    +1,803 / 32 / -1
    Great. Can someone else confirm the fix works for them also so I can move the sketch to the first post?