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 Download Package Now!
  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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.
yobuddy

Motion Simulation Software SimTools V2.4

SimTools Release Version

  1. Psionic001

    Psionic001 Active Member Gold Contributor

    Joined:
    Mar 5, 2017
    Messages:
    111
    Location:
    Sydney
    Balance:
    783Coins
    Ratings:
    +47 / 0 / -0
    My Motion Simulator:
    Motion platform, 6DOF
    Good idea!! I’ll check that when I get home.
    I think AVG has a quarantine area.

  2. Jaysonchou111

    Jaysonchou111 New Member

    Joined:
    Jul 24, 2018
    Messages:
    14
    Balance:
    161Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    2DOF
    How many times can a valid License key be used?
  3. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -0
    One license is meant for one setup of SimTools.
    But re-registering on the same PC does not count again activations.
    If you have any problems, you can always buzz us here:
    https://simtools.us/contact-us/
    Take care,
    yobuddy
    • Informative Informative x 1
  4. Phaze11111

    Phaze11111 Member Gold Contributor

    Joined:
    Oct 20, 2016
    Messages:
    11
    Location:
    Central Indiana - USA
    Balance:
    - 43Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    3DOF, SCN5, Arduino
    Is there a way to uninstall and reinstall if/when I build a new PC?
  5. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -0
    Yes, Uninstall from the Old PC first, Then install on the new PC.
    If you have any problems, please send us a note here.
    https://simtools.us/contact-us/

    Take care,
    yobuddy
  6. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    891
    Location:
    Portugal
    Balance:
    6,895Coins
    Ratings:
    +933 / 12 / -0
    My Motion Simulator:
    6DOF
    Searched, but didn't find anything.
    So, I was trying to get a binary output from a memory mapped file.
    I don't know if it's my code, but it seems that any byte above 127 is converted to 63.
    Usually that's an encoding problem.
    From what I tested, the string in the output is not formatted in the correct encoding.
    Maybe it's on my side, but I thought it should come out right.
    I'm unable to read the bytes and convert them to a correct value (was trying with 16 bit, since I'm already reading 2 bytes).

    Maybe I'm getting the info the wrong way. Or can it be a bug?

    Also, what is the order of the bytes? 1st high and second low or reversed?
    Fist high would be better to make a readInt16. But from the manual, I think it's reversed.
    Last edited: Dec 6, 2018
  7. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -0
    @pmvcda,
    Please try this buddy,
    system local.jpg

    Take care,
    yobuddy
  8. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    891
    Location:
    Portugal
    Balance:
    6,895Coins
    Ratings:
    +933 / 12 / -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...
  9. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -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
  10. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    891
    Location:
    Portugal
    Balance:
    6,895Coins
    Ratings:
    +933 / 12 / -0
    My Motion Simulator:
    6DOF
    Yes I reboot.
    Thank's for taking a look.

    Good sleep :cool:
  11. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    891
    Location:
    Portugal
    Balance:
    6,895Coins
    Ratings:
    +933 / 12 / -0
    My Motion Simulator:
    6DOF
  12. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -0
    @pmvcda,
    Sorry for the delay, not feeling to hot over the weekend.
    But I will have an answer tomorrow buddy.
  13. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -0
    @pmvcda,
    Please drop this into the SimTools Plugin Updater and give it a try.
    Let me know how it goes buddy!

    Attached Files:

  14. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    891
    Location:
    Portugal
    Balance:
    6,895Coins
    Ratings:
    +933 / 12 / -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
  15. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    891
    Location:
    Portugal
    Balance:
    6,895Coins
    Ratings:
    +933 / 12 / -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:

  16. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -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
  17. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    891
    Location:
    Portugal
    Balance:
    6,895Coins
    Ratings:
    +933 / 12 / -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.
  18. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -0
  19. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -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
  20. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    3,654
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    29,843Coins
    Ratings:
    +3,692 / 10 / -0