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 Simtools Decimal Output constant length?

Discussion in 'SimTools DIY Version' started by domse, Mar 26, 2022.

  1. domse

    domse New Member

    Joined:
    Nov 18, 2017
    Messages:
    12
    Location:
    Lithuania
    Balance:
    72Coins
    Ratings:
    +15 / 0 / -0
    Hello,

    i am having a problem where an off-shelf simulator does not understand commands if the value is not 3 digits long. For example:

    OC(01,255) - move motor 1 to the end
    OC(01,000)- mover motor 1 to the start

    Simtools axis output:

    OC(01,<Axis1a>)

    Everything works with values 100-255, but values under 100 get ignored, because they are 2 or 1 digits long.

    Simtools output: OC(01,99) - not understood by the simulator. Correct value should be OC(01,099).

    Any idea how to fix this?

    Thank you
  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
    What interface are you using buddy?
    Binary output automatically pads, as binary output is usually being sent to a micro-controller.
    But if you can't use binary output, then i can customize an interface for you.
    • Informative Informative x 1
  3. domse

    domse New Member

    Joined:
    Nov 18, 2017
    Messages:
    12
    Location:
    Lithuania
    Balance:
    72Coins
    Ratings:
    +15 / 0 / -0
    I'm using serial interface. I can't use binary because the simulator uses a proprietary controller and only accepts decimal values that are 3 digits long.

    Your help would be appreciated!
  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
    Please close SimTools.
    Then use the plugin installer to install this plugin.
    Then relaunch SimTools and give it another go!
    Chat soon!

    Attached Files:

    • Like Like x 1