1. This Software is no longer supported by us. Please download the new motion control software SimTools.
    Dismiss Notice
  2. 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
  3. 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!
  4. 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
  5. 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

Problems offsetting output values

Discussion in 'Force-Profiler Simulator Control' started by Frakk, Dec 21, 2009.

  1. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    I'm playing around with GTR2 and trying to output some values through the USO. I am using 16bit outputs for all the axis.

    Now, my problem is that I can't offset positive only values properly, such as speed, rpm, gear, fuel level, temperatures.

    In the math setup for speed I have the Output 1:1 with 65535 max and 0 min, so I don't need to rescale the 16bit output later. The Calibration offset I pulled all the way down (-99% asymetric) so the values that are actually going out are the same numbers I am getting from the game.

    With all this, I am still getting values out that are 22 larger than my actual data, 0(input) = 22(output). If my speed in the input section is 56km/h, the USO is outputting 78km/h. If I change it to gear, I get 24 when I'm in Gear 2. I have tried other gauge data as well with the same result. In the USO settings I tried to offset the axis data where value = ( value / x * y ) + (-22), but I get no change, only if I change x and y from 1.

    I suspect If I could set the Calibration offset to -100% 0 would equal to 0, but -99% stops it.

    Can you please give me suggestions how to overcome this? Is there an other way to do this that I don't know about?

    Thanks,

    Adam
  2. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Anyone?
  3. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Thanks for the reply, and Merry Christmas to you!

    As I said, I tried to offset the value in the USO as you suggested but it didn't have any effect.

    Right now from what I understand the output is calculated the following way:
    Maximum value in the G-Force Math plugin will be 65536 output using 16bit from the USO, and minimum(negative maximum) will be 0.
    Now, if I have a positive only value from the game such as Speed, RPM, Fuel Level, etc. the output will range from 32768(0) to 65535(G-Force Math Plugin Maximum). If I have 400 as maximum for speed, I will have to re-scale the output because 400 will be then 65535. If I put 32767 as my maximums(65535 peak to peak), I don't have to re-scale anything because the output will be proportional to the actual values from the game.

    Now I only have to offset this value by -32768 to make 0 game data into 0 USO output. I could easily do this by:
    value = ( value / 1 * 1 ) + (-32768), but as I said it has no effect when I type it in.

    I don't want to use 32bit output because it is a real vaste of resources. I will keep playing around and post what I am finding.

    edit: I just tried 32767 as my G-force plugin maximum (65536 peaktopeak) and have no calibration offset in the math section. I am getting the speed+32767 as the output, but there is a slight %error, about 2%. So if my speed is 200, I get 32971 as the output from the USO. So far the best result I got was with my first try in my original post. G-Force plugin maximum of 65535 with a calibration offset all the way down to -99%. But no matter what, I cannot get rid of that small 22 offset in the USO, no matter what I type in I have no change. I use the latest 2.1.0.6.
  4. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Do you have to set something for a signed integer output? I don't get 2's compliment signed binary numbers, just regular 16bit 0-65535 numbers, no sign. The only signed numbers are in the Profiler calculations.

    Of course I can do whatever scaling, offsetting and calculations with these numbers with the uC, but I would like it to be as flexible as possible and do these calculations in software for each axis. The uC can accept and process a lot of axis and I would have to set specific calculations to specific axis.. this would put limitations on the firmware if you know what I mean.

    Do you have any idea why offsetting in the USO doesn't work for me? Using the latest update.
    value = ( value / 1 * 1 ) + (any number here)
    Multiplying, dividing the number works no problems, but adding/subtracting has no effect.
  5. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    That would make sense! Adding such small numbers in a 32bit won't change anything.

    I would love to try it if my profiler started :( It freezes at the rotating circle. I had the exact same issue with 0.4. and 0.5. but not with the latest 0.6. Until now. Tried clearing registry, reinstall a couple times, but nothing. There are a couple files that remain after uninstall that can't be deleted manually. Profiler.exe, 10bitUSB.dll, AffinityModule.dll to name a few. I haven't done anything special in the last couple hours. How is it possible to fix it?
  6. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    I closed everything, uninstalled completely, deleted everything, reinstalled and I still have the same thing. Profiler is starting up forever.
  7. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Thank you for your help! Profiler works now, subtracting bigger numbers work as well. I have to play around with G-force Maximum values and the offset in the USO because the exact 2^x numbers are not accurate. Right now I have Speed data displaying correct with 32767MAX and -2147400000 offset in the USO.

    edit: After further investigation with Speed and RPM I noticed if I use 32767 as MAX, and subtract 2147483647, I always get 1 less at the output than the actual game data. If I subtract 65535 less, -2147418112, the output is correct! I will try it with other data like temperatures, fuel level and such.

    Great Success!