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

Need negative (signed) values as serial output

Discussion in 'New users start here - FAQ' started by Bleedin, Jul 12, 2014.

  1. Bleedin

    Bleedin New Member

    Joined:
    May 17, 2014
    Messages:
    4
    Balance:
    397Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Hello simmers!

    Got hold of a Darim 3DOF motion base.
    The problem is that it expects axis values between -13311 and 13311.
    Can SimTools handle negative numbers (signed values)?
    If so - how do I set up this?

    Best regards
    /Bleedin
  2. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    No it doesn't send negative numbers in Serial Interface , another solution would be to create a custom companion app that takes the output and then sends the right values for your sim to work correctly, like what I have designed to run the K8055 interface with SimTools.
    So with a little bit of coding we could support the base , Im sure it can be done.
    • Informative Informative x 1
  3. Bleedin

    Bleedin New Member

    Joined:
    May 17, 2014
    Messages:
    4
    Balance:
    397Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Thank you for this information.
    Would a virtual com port and some custom code be the way to go? Or is there another better approach?
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    Hi, While you can use a virtual com port, a better approach would be to use a socket to communicate between SimTools and your program. Then you can send the modified data out from your custom code on a standard serial port.
    • Informative Informative x 1
  5. Bleedin

    Bleedin New Member

    Joined:
    May 17, 2014
    Messages:
    4
    Balance:
    397Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    That makes sense. I guess I have some coding to do. :)
    Thank you!
  6. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Example of what I could supply for you.
    Example of interface.png

    This utilizes the UDP fuction and remaps the variable to the needed range.
    Depending on how you need the serial port setup, this could be nearly ready.
    • Like Like x 1
  7. Bleedin

    Bleedin New Member

    Joined:
    May 17, 2014
    Messages:
    4
    Balance:
    397Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    That looks great!:thumbs
    I'll get back to you with details.

    Thank you!
    • Like Like x 1
  8. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    This simple program should do the job! If you would be willing to post the source code for this @eaorobbie , other members with a little programming experience (and possibly even some without) can make their own modifications to the code for their needs without the need to ask and wait on you to do it for them! They maybe could learn something in the process too! I could post the source code I use to do the same thing but it is in VB6. But members would have to install its run time files to use it and have VB6 too where your program uses the .net framework that is already installed on their computer (because SimTools needs it to run too) and uses the freely available MS Visual Studio 2010 Express also. VB6 has COM and Winsock controls built in so extra coding is not required to access serial and UDP ports like .net does. However, by supplying your source code, the harder part of the code will already be complete and functional and the only part the user would need to modify is the conversion of Simtools output to a form they require which should be fairly simple for most to do themselves!
    • Agree Agree x 1
  9. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok Good news I manage to complete an app that now controls the Darim 3DOF rig with SimTools.
    A bit more Beta testing with games etc to follow then I will openly release the app so anyone with a Darim 3dof can use SimTools.
    Darim 3dof beta interface.png

    GUI needs a big clean up and simplifying but its all there working for manual testing and running in SimTools.
    Big thanks to @Bleedin we would have this without you asking for it.
    http://darimsys.en.ec21.com/3DOF_Motion_Base--393218_393219.html

    3DOF_Motion_Base.jpg
    • Like Like x 2
    • Winner Winner x 1
  10. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    What took you so long? :grin Oh well, better late than never. Lol. Thanks! When you openly release this app, I assume “openly” means you will release it with open source code so other members can make the app to their liking, instead of yours! They can also then modify it to work in other ways or situations too without waiting for days and you to do something for them. After all, other than the code to set up the serial and UDP ports, the rest of it is as basic as it gets. Perfect for someone attempting a little programming even for the first time. And you’re all about sharing right? I suspect even you copied the coding for the ports from elsewhere. I would post it myself, but I still have no need to learn a new method of doing something that VB6 can already handle with ease! So my request is not for me, but for other members so they can have fun with it if they wish since they can get free access to MS Visual Basic 2010 Express.
    • Agree Agree x 1
  11. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    No sorry will only be released as a working app, the time taken is because this has been developed without the support of the manufacture, without @Bleedin help ie finding the codes to make it run via a serial monitor this would not be a reality.
  12. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    Yea, that’s the response I expected so you didn’t disappoint! But also as expected, I did an Internet search and within 10 minutes I found open source code for vb.net for coding the serial class and a winsock control. So when I get some time, I will make an open source app for the folks here to have some fun with myself.

    Edit:I had a take it out on everyone day today and continued it here so I decided to delete part of this post.
    Last edited: Jul 19, 2014
  13. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,160
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,150Coins
    Ratings:
    +5,036 / 16 / -0
    The only problem with vb6 is there is no multithreading.
    Multithreading in .NET is dead simple and can speed up an app a ton if used correctly.
    But IMHO, vb6 had much better capabilities to make better gui's without the need to use WFP or something else.
    Everything was skiable in vb6, and the button control even handled all the pic's for the state of the button, etc...
    I wish they would have made a 'vb7' that was like vb6, but that dream is pretty dead now lol
    anyway, take care everyone!
    yobuddy
    • Like Like x 1
  14. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    I agree it would have been nice had MS developed a vb6 type environment that included multithreading since vb6 was developed before multi-core cpu’s were in use. But with the push to make a one size fits all platforms environment, .net, the ease of use concept was thrown out the window! That’s ironic because I always thought the goal of visual basic was to make things easier than it used to be before having a windows based basic when you had to program every little thing yourself.

    With a program like simtools, I can understand the importance of multi-threading. But for most applications and for making simtools apps, vb6 is usually sufficient. While wfp looks quite powerful in what it can accomplish, it too also appears to be a pita to program with. And I’m not taking about bread either!

    But, like you, at some point I will have to take the plunge and learn .net to continue on into the future! But with the enormous amount of vb6 programs still in use, hopefully, MS will still continue to include support for it in their operating systems for some time to come!
  15. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    rats....I was looking forward to a good rant ;)
  16. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    I doubt they will , phased out support for XP and now even Windows 7 is on the phase out list for support, everything going to Windows 8, where VB.Net is a must for Windows 8 as app must meet a requirement for the MS Store crap.