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

Tutorial How to write an Interface Plugin for SimTools 2.0 - API documentation

Discussion in 'Tutorials and Tips by the Developer' started by yobuddy, Jul 16, 2016.

  1. Simal

    Simal Member

    Joined:
    Oct 19, 2013
    Messages:
    19
    Location:
    Solar System, Earth, Ukraine, Kirovograd
    Balance:
    - 144Coins
    Ratings:
    +38 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor
    @yobuddy, hi.
    As far as I understand, "Network" interface type in the SimTools is UDP? Can I download the Plugin Interface example somewhere? I want to rewrite the plugin for TCP support.
  2. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    @Simal
    All of the Interface examples will be posted with the release of SimTools 2.2.
    It should not be to long buddy.
    yobuddy
    • Like Like x 2
    • Informative Informative x 2
  3. SvenRS2

    SvenRS2 New Member Gold Contributor

    Joined:
    Jan 28, 2017
    Messages:
    3
    Location:
    Cologne, Germany
    Balance:
    - 235Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    AC motor, SCN5, SCN6, Arduino, Motion platform, 4DOF
    Hey guys! I'm searching for the interface plugin examples, but I can't find them. Where do I have to look? Or are they not available yet?
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,461
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You may need to let @yobuddy take a slight breather before finishing these, as SimTools 2.2 has only been released for a couple of days.
  5. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    @SvenRS2,
    I will get them posted soon guy's.
    I have been working on GameVibe so long, I was eager to try a few new ideas out.
    I feel the core of SimTools is plenty solid enough for me to start actually playing with the apps I have been building for so long.
    And seeing what all I can make them do.

    The one idea I am playing with now, well lol, I got so excited by how the project is working i got a bit sidetracked.
    I really was not expecting such results. (for 2 or 3 days worth of work anyway)
    I got a feeling that a lot of you guys are going to be pretty excited with this "Secret Project". ;)
    yobuddy
    • Like Like x 4
    • Useful Useful x 1
  6. SvenRS2

    SvenRS2 New Member Gold Contributor

    Joined:
    Jan 28, 2017
    Messages:
    3
    Location:
    Cologne, Germany
    Balance:
    - 235Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    AC motor, SCN5, SCN6, Arduino, Motion platform, 4DOF
    Hi @yobuddy! Thanks for your reply! It really wasn't my intention to speed things up. I just wanted to make sure that I didn't miss something. So, when the time has come, do I have to look here in the thread for the interface plugin examples, or somewhere else?
  7. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    It will be posted right here buddy!
    Take Care,
    yobuddy
  8. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,461
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  9. lioxacydak1

    lioxacydak1 Member

    Joined:
    Feb 28, 2015
    Messages:
    52
    Occupation:
    rescuer
    Balance:
    - 249Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform, 4DOF, 6DOF
    And how can I download it Example Plugin? The link is not active.
  10. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    Example Interface Plugins Posted! :thumbs
    yobuddy
    • Like Like x 2
  11. lioxacydak1

    lioxacydak1 Member

    Joined:
    Feb 28, 2015
    Messages:
    52
    Occupation:
    rescuer
    Balance:
    - 249Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform, 4DOF, 6DOF
    Thank you very much
    • Like Like x 1
  12. Frank1999

    Frank1999 New Member Gold Contributor

    Joined:
    May 16, 2020
    Messages:
    15
    Balance:
    33Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    4DOF
    Hi, @yobuddy , I am going to build a 4 axis simulator with 4 BLDC motor actuators. The actuator driver(controller) has RS485 interface and can communicate with PC using modbus-rtu protocol to control the actuator action. I don't know how to custom this interface plugin for sim engine. Is it possible to enclose a modbus-rtu protocol support? Could give me some helps? Thank you!
  13. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    @Frank1999,
    If you can make a small vb.net app that can:
    1) allow you to select a com port and then open a connection.
    2) move the axis around by setting a target location.
    3) shut the connection down

    With a small app like this I could roll it into a interface plugin for you.
    Let me know what you think.
    Take care,
    yobuddy
    • Friendly Friendly x 1
  14. Frank1999

    Frank1999 New Member Gold Contributor

    Joined:
    May 16, 2020
    Messages:
    15
    Balance:
    33Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    4DOF
    @yobuddy ,
    Thanks for your reply.
    I will try to do this after built my rig.

    Take care,

    Frank
  15. Alessio Galliazzo

    Alessio Galliazzo New Member

    Joined:
    Jan 8, 2021
    Messages:
    2
    Balance:
    5Coins
    Ratings:
    +0 / 0 / -0
    Hi guys,
    I'm a developer working on a custom interface. I actually cannot make any "build" interface works properly. PluginValiator tell me that the plugin is a valid plugin but once loaded in game engine it fail to load the plugin telling me that it is invalid and that it cannot find a file. Firstly I was supposing that was due to my developed plugin (I use C#) but the same happen also with the 3 examples in the first post.

    You can see in the attachment the 4 errors:
    - Error 1: My developed plugin in C# - first message error
    - Error 2: My developed plugin in C# - It's saying that it cannot find a dependence or a file
    - Error 3 and 4: Same as before but compiling the NetworkInterface plugin downloaded from here (changing only author and plugin name)

    Anyone can help in some way?

    Running Win10, VS2019 and compiling using .NET Framework 4.0 (as the example)

    Best
    Alessio
    error_1.png error_2.png error_3.png error4.png
  16. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    I can help.
    It's probably just a naming convention problem.
    If you change the plugin name, then you need to change the compiled name.

    I may be wrong, but try taking a look at the bottom of my post where it says
    https://www.xsimulator.net/communit...ugin-for-simtools-2-0-api-documentation.8813/

    I think it may be the problem.
    (btw, this naming step has been removed from v3)
    Chat soon,
    yobuddy
    • Informative Informative x 1
  17. Alessio Galliazzo

    Alessio Galliazzo New Member

    Joined:
    Jan 8, 2021
    Messages:
    2
    Balance:
    5Coins
    Ratings:
    +0 / 0 / -0
    Of course, that solved the problem... I miss that part... I'm sorry!
    Best
    Alessio
  18. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    No problem at all buddy.
    I just recognized the problem is all.
    C# is just fine to write the plugin in btw, I think there is even a couple of examples somewhere around here.
    Anyway, take care! :thumbs
    yobuddy
  19. Frank1999

    Frank1999 New Member Gold Contributor

    Joined:
    May 16, 2020
    Messages:
    15
    Balance:
    33Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    4DOF
    Hello @yobuddy,
    I have previously re-written a RS485 serial interface plugin using "Serial - Example Interface Plugin" and it works fine. But recently I tried to upgrade my interface hardware to a CANBUS device, I encountered a problem: the rewrite plugin can be installed normally and the new hardware can be started normally, but when I test, simtool will automatically detect the serial port,since the new hardware (CANBUS) is not transmitted through the serial port, the new plugin cannot work .
    upload_2022-3-2_16-44-0.png
    It seems that there is no way to fix this inside the plugin, could you please help me with this problem? Or can you provide a new "Example Interface Plugin" for reference, similar to the JRK plugin.
  20. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    I don't understand buddy.
    How does it detect a port if it does not use serial?
    Feel free to PM me and we can discuss a fix to the problem.