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

Older Motion Simulator Upgrades

Discussion in 'DIY Motion Simulator Projects' started by CrazyNuf, Jan 22, 2020.

  1. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    If you can do it with PA for absolute position, that’s what you want to use. Speed may only need to be set once or just occasionally to whatever value is most appropriate.

    Maybe use an Arduino to receive the commands from SimTools, grab the values for your two axes, and output them formatted properly for your controllers. Might start with SMC3 Arduino code since that works already for receiving from SimTools, and then take those values and write custom code for the output.

    Might also need hardware level shifting depending on your controller voltages. RS-232 is typically +/-15V. Older hardware may use that but no guarantees. Could be anything if it’s proprietary, though. Most Arduinos swing 0-5V. Watch for ground loops and unintended voltage differentials too if you haven’t already sorted all that.
    • Informative Informative x 1
  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
    @CrazyNuf ,
    This one is hard because only we cant do any testing to see what works, so writing a plugin would be pretty hit and miss.
    So what about trying to make a small vb app with has 2 sliders on the form. (One for Pitch and one for Roll)
    If you can get that working, then I could build a plugin fairly easily.

    @Zed is correct, we will want absolute position mode (with setting the speed one time at start)

    Let me know what you think.
    Chat soon,
    tobuddy
    • Informative Informative x 1
  3. CrazyNuf

    CrazyNuf Road & open-wheelers

    Joined:
    Jan 22, 2020
    Messages:
    23
    Occupation:
    NDE
    Location:
    Charlotte NC
    Balance:
    - 57Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Motion platform
    Thanks for all the input guys, I’ve been away for work but just now getting back to it.

    I will give the VB form a try; I also have a coworker with some coding skill who has been helpful. I need to try and see what I can figure out and I’ll get back with what I find!
  4. CrazyNuf

    CrazyNuf Road & open-wheelers

    Joined:
    Jan 22, 2020
    Messages:
    23
    Occupation:
    NDE
    Location:
    Charlotte NC
    Balance:
    - 57Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Motion platform
    I know that many of you are familiar with SimTools and Live For Speed, but I wanted to present where I am at so it is easier to understand where I am in this process.


    I have SimTools open with tuning center open and the game manager on as well. All three have the green icon in the top right, which I believe means they are all communicating with one another.

    I tried running the SimTools program while operating the demo game, liveforspeed. I used it to see if it would generate any feedback I could see, and this becomes present in both the Tuning Center (TC), as well as in the Output Testing window of Game Engine (GE).

    In TC, it shows up with a ton of real-time values that are all over the place, with roll/pitch/heave/yaw/sway/surge/extra1 (which is set to Traction Loss) generate constantly variable values as you do certain things while driving. In GE, under the Virtual Axis tab of the Output Testing, the slider goes back and forth (essentially positive and negative, which I would assume is translated into values both +/- of the absolute position), so this would then be the values sent to the Axis1a and Axis1b bracketed arguments made in the Interface - Output function.

    The issue there is that I can't see what these exact values being sent are, as once you are in-game, it locks you out of the interface and axis settings pages. I would assume the values are somewhere but I can't find them. While live, these numbers are visible in the Game Data - Input table, but it looks like everything except Yaw is working from -20 to +20. The best I was able to do in a screenshot was this:

    upload_2020-3-9_20-8-48.png

    Here you can see the upper and lower limits of each value as I played the game. I think the reason the surge max is so low is because it never reached 100% (couldn't accelerate fast enough); however, I did hit a wall, which allowed it to reach near max on the min.


    I found this: https://www.xsimulator.net/community/faq/steps-to-create-a-motion-profile.228/; however, I am not going to add any more axes until I figure out how to get it to communicate properly. For now, surge and sway will help me isolate if the axis1a and axis1b are operating as my individual motors, and that's fine. When/if we can get it working, then I will fiddle with additional motion.

    Focusing for now on sway and surge, as sway goes from 0-100% it basically splits the value in half and gives each motor 50% of the duty: positive to one, negative to the other, exactly as expected the way I have it set up, where surge is both motors + pr - together:

    upload_2020-3-9_20-8-48.png

    When I have full acceleration, surge basically maxes out, which is shown here, having split between the axis1a and axis2a:

    upload_2020-3-9_20-8-48.png

    As you can see, I have the sway function with an inverted axis 2a, so I get this as the split between the full value (let's say this is close to 15)

    upload_2020-3-9_20-8-48.png

    The way I see it, if you have the values from TC showing +/-20, and the sliders are showing it cut in half and shared between the two axes, then at max these values would be 10, and either positive or negative depending on how they are setup.

    I hope this clears up the feedback from the game to SimTools; now it comes down to expressing these values into a path for galil to understand.

    I’m taking a look at the “how to write an interface plugin- API” page. It says I can generate my own plug-in, but this seems like a lot of code and this is where I hit a roadblock. I’ve since installed visual studio 2019 and am installing the Galil communication library, gclib. I don’t know if any of this helps me or if I’ll get anywhere with it, but I am trying to figure it out.
    I have installed Visual basic and am looking at the various steps it takes to get this to communicate, but I'm not very well versed in this. I would like to think that having VB as a code recognized by both SimTools and using the gclib commands, there would be a way to get these to talk. Hopefully you see something here, and maybe there's a way to get directly to input of these motion values where the controller understands it.

    I don't know if it helps, but I also was messing with the Terminal in GalilTools and know that you can create the simple argument:

    JG x,y (where x and y are values of jog speed, such as 500, which is approx. 1Hz)
    AM (this sets the jog I think to be set after the motion command is given)
    PA x,y (let's say you want it to move forward; since x is the right motor, a negative value here makes the motor move in the clockwise direction, which makes the tie rod go UP; since y is the left motor, positive makes the motor move in the counterclockwise direction, which makes its tie rod also go UP; this presses the back of the frame UP which causes the frame to pitch FORWARD. If you use the values -500,500 this creates an equidistant motion from both motors to that position, where 500 counts is about 5-7 degrees of travel)
    BG (begins motion to given position at given speed)

    Once the jogging speed is set, it doesn't need reset unless it needs to go faster. I don't know if this is something that the telemetry does or if this would need to be based on startup, but it's worth noting. Basically, I see where the telemetry is firing out a value +/- and the axis1a or 1b shares a percentage of that value for how you set it (sway 50% inverted, for instance). So I feel like there is some way to translate this, most likely using VB, which both SimTools and Galil recognize, using gclib arguments that make this absolute position command to the controller. This is where I am stuck.

    Any and all help would be greatly appreciated! I already have the simulator hot'n'ready for action: direct drive, new wheel/button panel with paddles on the way, pedals and button box, h-shifter, tach, triple monitors, sound system, buttkicker, and myself ready to go!

    Thanks everyone!
  5. CrazyNuf

    CrazyNuf Road & open-wheelers

    Joined:
    Jan 22, 2020
    Messages:
    23
    Occupation:
    NDE
    Location:
    Charlotte NC
    Balance:
    - 57Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Motion platform
    @yobuddy ; I don't know if it helps, and I'm not incredibly familiar with how to build a VB slider, but I have figured out the exact code argument that will send the appropriate information to the controller to get it to move a specific speed to a specific position:

    Code:
    JG<x>,<y>
    AM
    PA<Axis1a>,<Axis1b>
    BG
    
    Where <x> and <y> are variable speed of the motors in Hz (~500cts/s=1Hz), and <Axis1a> and <Axis1b> are the values given by output to absolute position of the encoders by the telemetry in-game.

    This is where I'm a little confused on how to either create a multiplier or use a relative bit-rate that gives an appropriate value to work with my system. I have back and front limits of -4800 and 4800 counts, respectively, so I would want the output value for either axis to generate within these boundaries. Any help would be appreciated on this.

    Is this enough information to provide you with what is needed for a plugin?
    Thanks in advance!


  6. CrazyNuf

    CrazyNuf Road & open-wheelers

    Joined:
    Jan 22, 2020
    Messages:
    23
    Occupation:
    NDE
    Location:
    Charlotte NC
    Balance:
    - 57Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Motion platform
    Ok! I got everything working within SimTools and was able to test it out using the demo of Live For Speed. After a lot of troubleshooting, mixing up the axes, messing with counts, and fighting with software conflicts, I finally have the motion corresponding to actions on screen!

    From the beginning, I felt like there was something I just couldn’t see that was messing me up and it mostly turned out to be the function at the end of the commands, \r\n. Can you tell me what this is and why it was an issue? The IP, 2-char commands and even the Bitrate being translated into decimal values for output all make sense, but that suffix doesn’t.


    Here is what solved it:


    Interface settings - Output

    IP 192.168.1.50 Port 23; Type Decimal

    The command I put into Interface Output is the only thing I am doing right now with SimTools; the rest I am still using a combo of InMotion (manual commands and initial variables) and Galil (changing variables to fit the 13-bit values)


    JG3000,3000;AM;PA<Axis1a><Axis1b>;BG


    This ensures the jog speed stays the same (doesn’t need it but if I mess with it in InMotion I don’t want to slow the system down on accident); then this makes the values output by the telemetry interact with the x and y motors appropriately.


    10ms seems to be a good number, so I’m hoping that is a good place to stay, the response is fast enough you don’t notice it by reaction.


    As for in-game, I learned that my 13-bit points (0 to 8192) are enough to nearly reach the maximum limits of the system, which is plenty.


    So, with all that said, I got the g-force and Orientation controls to feel pretty good! If there was anything else I could be missing I sure can’t tell.

    As it stands, I now have the motion platform working, buttkicker registering through SimVibe (tried using Simxperience but there was some sort of conflict; oh well), shifter, button box, accuforce dd wheel, sound and monitors all doing what they should! Now to install some game plugins and check out what this thing can do!
    • Winner Winner x 2