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
yobuddy

Motion Simulation Software SimTools SimTools v2.6.1

SimTools Release Version

  1. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
    It doesn't solve the 127 limit in the output.
    My settings for output are:
    settings.jpg

    And with a simple c# code to retrieve the bytes from the string:
    If value at maximum (sway):
    max.jpg

    Medium:
    med.jpg

    Minimum:
    min.jpg

    When simtools writes the binary output to a string, it's using basic ASCII, only 7 bits, so we only get values up to 127.
    We need extended ASCII.

    I might be completely wrong...
  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
    Did you reboot after the change?
    This usually shows up only when a coma is used as a decimal point.
    I can take a look when I get up tomorrow.
    Take care,
    yobuddy
  3. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
    Yes I reboot.
    Thank's for taking a look.

    Good sleep :cool:
  4. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
  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
    @pmvcda,
    Sorry for the delay, not feeling to hot over the weekend.
    But I will have an answer tomorrow buddy.
  6. 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
    @pmvcda,
    Please drop this into the SimTools Plugin Updater and give it a try.
    Let me know how it goes buddy!

    Attached Files:

  7. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
    I tried, but now with 16 bit and binary, I get from 2 to 4 bytes for the value.
    83 and 126 are the start of info.
    58 and 127 separators.
    You can see bellow, that we get up to 4 bytes:

    2.jpg

    3.jpg

    4.jpg
  8. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
    OK,

    @yobuddy, I solved the problem.
    I didn't noticed that this was a plugin. :oops:

    Sem nome.jpg

    So I modified the code to send UShort values and now it's working, but only for binary and 16 bits:
    The changed code for the plugin:
    Code:
        'My Output data Structure
        Private MyMMFData As New MMFData
        Private Structure MMFData
            Public _Axis1a As UShort
            Public _Axis2a As UShort
            Public _Axis3a As UShort
            Public _Axis4a As UShort
            Public _Axis5a As UShort
            Public _Axis6a As UShort
            Public _Axis1b As UShort
            Public _Axis2b As UShort
            Public _Axis3b As UShort
            Public _Axis4b As UShort
            Public _Axis5b As UShort
            Public _Axis6b As UShort
        End Structure
    
        'write MMF to memory
        Private Sub SendMMF(MyData As MMFData)
            Dim accessor As System.IO.MemoryMappedFiles.MemoryMappedViewAccessor = Interface_MMF.CreateViewAccessor()
            accessor.Write(0, MyMMFData._Axis1a)
            accessor.Write(2, MyMMFData._Axis2a)
            accessor.Write(4, MyMMFData._Axis3a)
            accessor.Write(6, MyMMFData._Axis4a)
            accessor.Write(8, MyMMFData._Axis5a)
            accessor.Write(10, MyMMFData._Axis6a)
            accessor.Write(12, MyMMFData._Axis1b)
            accessor.Write(14, MyMMFData._Axis2b)
            accessor.Write(16, MyMMFData._Axis3b)
            accessor.Write(18, MyMMFData._Axis4b)
            accessor.Write(20, MyMMFData._Axis5b)
            accessor.Write(22, MyMMFData._Axis6b)
            accessor.Dispose()
        End Sub
    
        'Returns the final output scaled to BitsNeeded and with Type
        Private Function GetOutPut(ByVal InputPercent As Double, ByVal BitsNeeded As String, ByVal Type As String) As UShort
            Dim OutPut As UShort = 0
            'ONLY FOR 16 BITS AND BINARY
            If InputPercent >= 0 Then
                OutPut = CUShort((InputPercent * 32768) + 32767)
            Else
                OutPut = CUShort(32767 - (InputPercent * -32767))
            End If
            Return OutPut
        End Function
    
    And the dll to test for download

    Attached Files:

  9. 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
    You can't simply parse the string by commas as binary also puts out a comma.
    But with binary you can grab the values by location in the string as it does not change.
    So there was not anything to fix is all I'm saying.
    Take care,
    yobuddy
  10. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
    In the plugin you are using ASCII encoding.
    From Microsoft @ https://docs.microsoft.com/en-us/dotnet/api/system.text.asciiencoding?view=netframework-4.7.2

    With the serial interface and binary output, I have no problems.
    The sample code for memory mapped file:
    Code:
        Private Sub SendMMF(MyData As MMFData)
            Dim Buffer As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(MyMMFData._Axis1a & "," & MyMMFData._Axis2a & "," & MyMMFData._Axis3a & "," & MyMMFData._Axis4a & "," & MyMMFData._Axis5a & "," & MyMMFData._Axis6a & "," & MyMMFData._Axis1b & "," & MyMMFData._Axis2b & "," & MyMMFData._Axis3b & "," & MyMMFData._Axis4b & "," & MyMMFData._Axis5b & "," & MyMMFData._Axis6b & ",")
            Dim accessor As System.IO.MemoryMappedFiles.MemoryMappedViewAccessor = Interface_MMF.CreateViewAccessor()
            accessor.Write(0, CUShort(Buffer.Length))
            accessor.WriteArray(0, Buffer, 0, Buffer.Length)
            accessor.Dispose()
        End Sub
    
    Replaced with:
    Code:
        Private Sub SendMMF(MyData As MMFData)
            Dim accessor As System.IO.MemoryMappedFiles.MemoryMappedViewAccessor = Interface_MMF.CreateViewAccessor()
            Dim x As String = MyMMFData._Axis1a & "," & MyMMFData._Axis2a & "," & MyMMFData._Axis3a & "," & MyMMFData._Axis4a & "," & MyMMFData._Axis5a & "," & MyMMFData._Axis6a & "," & MyMMFData._Axis1b & "," & MyMMFData._Axis2b & "," & MyMMFData._Axis3b & "," & MyMMFData._Axis4b & "," & MyMMFData._Axis5b & "," & MyMMFData._Axis6b & ","
            For n As Int32 = 0 To x.Length - 1
                accessor.Write(n, CByte(Asc(x(n))))
            Next
            accessor.Dispose()
        End Sub
    works.
  11. 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
  12. 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 see now that you may have the old source code for the plugin.
    I think that is where the confusion is coming from buddy.
    And reminds me I'll need to update the source on the plugin as there is other fixes in the plugin I did a wile back.

    Also, it looks like having configurable output may be the way to go here.
    (Much like the serial or net Interface - Output line.)
    Then you can pattern the output to look exactly as one would like.
    • Like Like x 3
  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
  14. Damien

    Damien Member

    Joined:
    Apr 7, 2018
    Messages:
    93
    Occupation:
    watchmaker
    Location:
    Royan
    Balance:
    724Coins
    Ratings:
    +24 / 0 / -0
    My Motion Simulator:
    2DOF, SCN6
    I had this problem of internet connection yesterday with registration because I changed my SSD that I cloned, I had version 2.3 and I had to re-register my license. I downloaded version 2.3.1 and it worked perfectly.
    Thank you for your work.

    Ps: a pity for me, because before that I tried to reinstall simtools and I lost all my settings ...
  15. 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
    Just
    Just for future reference say No to overwrite existing settings. Or here is an alternative approach: https://www.xsimulator.net/community/faq/how-to-keep-my-settings-in-case-of-a-plugin-update.11/
  16. Damien

    Damien Member

    Joined:
    Apr 7, 2018
    Messages:
    93
    Occupation:
    watchmaker
    Location:
    Royan
    Balance:
    724Coins
    Ratings:
    +24 / 0 / -0
    My Motion Simulator:
    2DOF, SCN6

    of course, that's what I did at first but as nothing worked because I reinstalled the version 2.3, I finally uninstall everything and delete all the files related to simtools and then I reinstalled everything again and there , always nothing.
    that's when I decided to search the internet and found that version 2.3.1 fixed this problem.
    it's not a big deal, today I should finish putting all my settings right. ;-)
    • Informative Informative x 1
  17. Adrianstealth

    Adrianstealth Active Member

    Joined:
    Nov 18, 2010
    Messages:
    158
    Occupation:
    director
    Location:
    england
    Balance:
    328Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    SCN6, 4DOF
    going to update, just a few questions


    will it automatically see that i already have a licence key installed ?
    -if not where do i find it to write it down?

    after deleting all old settings do i have to set up again from scratch ?

    i have to re-do the game plug in ?


    big thanks in advance
  18. 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
    If you are just updating SimTools 2 to the latest version then say No to overwrite existing settings. Just to be safe here is how to first make a backup: https://www.xsimulator.net/community/faq/how-to-keep-my-settings-in-case-of-a-plugin-update.11/

    If you are updating from SimTools 1.3 to SimTools 2 then you will need to redo your settings.
    • Agree Agree x 1
    Last edited: Jan 17, 2019
  19. 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
    Yes

    Not if you install over the top of the old version.
    (in most cases anyway) To update a SCN sim from SimTools v2.2 and before, simply remove your interfaces first.
    Install the update and re-setup your interfaces.

    Not if you install over the top of the old version.

    Take care,
    yobuddy
    • Like Like x 1
  20. Adrianstealth

    Adrianstealth Active Member

    Joined:
    Nov 18, 2010
    Messages:
    158
    Occupation:
    director
    Location:
    england
    Balance:
    328Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    SCN6, 4DOF
    My Simtools was installed a couple of years ago so it must be an old version

    I’ll try re-fresh my memory & re-do from scratch

    Big thanks for the help all