Page 3 of 11 FirstFirst 1234567 ... LastLast
Results 21 to 30 of 101
  1. #21
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    Quote Originally Posted by fordgt40 View Post
    Jack

    What was the reason why the servo did not work?

    "I take it this is where I implement the limiting factors into my SIOC scripts" - yes, 737NUT gave you a snippet of SIOC code to achieve this in the previous thread

    David
    I am aware of the fact that he gave me the limiting factors. I asked what would happen if I exceeded 375Knots.

    The Servo did not work because of dodgy contacts, everything else was okay. This was the reason the fault bypassed th multimeter test (because the Servo contacts are okay with that, just dodgy with the card). I made an entire new servo to USBServos adapter and all is okay.

    Anyway, back on track, how would I get the Servo to "pick up" at 103Knots (ie only detect an output at that speed)?

  2. #22
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    Jack

    "I am aware of the fact that he gave me the limiting factors. I asked what would happen if I exceeded 375Knots" - nothing, the gauge will stop at the limiting value you have given!!!!!!!!

    Use the sioc code to test the asi starter value ie 103knots and only move if it is greater.

    David

  3. #23
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    This is my script at the moment:

    Code:
    var 9000, name Servo4, Link USB_SERVOS, Output 1, PosL 250, PosC 475, PosR 700, Type 2 // Servo Motor
    Var 9003, name IAS, Link FSUIPC_INOUT, Offset $02BC, Length 4 // Indicated Air Speed * 128
    {
    L0 = &IAS / 1.5
    &Servo4 = L0 + 213
    }
    As you can see, it is without limiting factor commands. I tried adding one, but the script didn't compile.

    Apart from limiting commands, is there anything OTHER than them I need to add?

  4. #24
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    Jack

    What was your code that would not compile?

    Yes, there is more code ammendment required - for example you will need to establish whether the multiplier 1.5 or indeed the + value of 213 is correct

    David

  5. #25
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    This was the script:

    Code:
    V0000
    $servo4=320
    var 9000, name Servo4, Link USB_SERVOS, Output 1, PosL 250, PosC 475, PosR 700, Type 2 // Servo Motor
    Var 9003, name IAS, Link FSUIPC_INOUT, Offset $02BC, Length 4 // Indicated Air Speed * 128
    {
    L0 = &IAS / 1.5
    &Servo4 = L0 + 213
    }
    Furthermore, how would I know if the 1.5 Multiplier or the 213 value is correct? What would I have to amend (almost there now, surely!).

  6. #26
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    Jack

    Have you bothered to really comprehend the manuals or follow the examples on Nico`s site, I think not. You have a variable V0000 that is generally only used for setting initial start up values, but it has no curly brackets to contain code. There is also a line "&servo4 = 320" that is not attached to anything! Even if it was syntactically correct it still would not achieve what you want. To have a limiting function, you need to insert some code to check the value of L0 and reset it to the max allowable before sending it to the gauge. Logically, if A is greater than 1000 then a = 1000 (not sioc syntax but this is the logic you need to code) Also you may need to set a lower limit to be on the safe side

    Re your second question after you have inserted limiting code, check out the gauge movement by trial and error to see how the gauge resonds to varying asi speeds and adjust the multiplying factor (1.5) and start position addition (213) as necessary. Previous posts have given you the logic behind this

    Sorry Jack, but given your level of understanding there is a long way to go yet and I do not propose to join you on the journey

    This forum has provided a lot of help, but not apparently matched by your willingness to get to grips with SIOC. As they say in The "Dragons Den" - sorry but I`m out!

    David

  7. #27
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    I understood why the script was incorrect before I posted it. I only posted it because you asked to see it, and I was wondering why you wanted to see a script that was so clearly wrong

    I struggle with SIOC. So What? What happened to the little bit of ol' encouragement. I enjoy learning new things, and post my questions in a simple-as-possible format in the hope for a nice simple answer. I have thanked you for your help so far, and you can if you wish help me further or not.

    but not apparently matched by your willingness to get to grips with SIOC
    Wow! I really am surprised to hear that, after I constantly try to come across as enthusiastic to learn this complex language. I thought I had proven to everyone that I really wanted to learn SIOC, sadly not eh?

    ANYWAY

    You second paragraph in that post was fantsatic, it answered my question quickly. If I cut the last bit out of your post I have a perfect answer, which is exactly what I look for. I asked how would I do this, you answered Trial and Error. Perfect, simple answer!

    NOW

    I do not want this thread to be filled with moans, groans and criticisms! I created this thread to gain help, and I have clearly received help in some cases (paragraph 2 on your post for example), which I cannot thank people enough for.

    I will try the Trial and Error method, an rectify my mistake (which I knew about remember!. I may not suceed, but I can at least understand why it doesn't compile.

    Thank you,

    Jack

  8. #28
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    Jack

    You misunderstand
    The reason I asked to see your coding was twofold:-

    1) If it was close then I was happy to correct it for you
    2) It would show me what progress you had made in learning SIOC

    David

  9. #29
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    Okay, fair enough.

    Before you made your psot asking to see the code, I tried curly brackets (I know these are required), and it didn't compile. So I thought I may aswell give you that one, as they both didn't compile.

  10. #30
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: USBServos Software not working?

    Hi Jack,
    This forum is one which encourages learning.Dont get David wrong,he like most of us will help when ever possible.Sioc is a form of programming language
    that assumes a certain level of basic programming.A lot of people have played around with the basic language and hence have some basic logic skills.Whic they can apply to SIOC proframming.What alot of us have done is to take for example your master card and connected some switches and pots and used other peoples examples to get results.Then they modify it bit by bit till they get it to work for them.Its is trial and error but much is learnt this way. If the basics are learnt then its amazing what satisfaction is gained.Others wont get frustrated trying to teach you what can easily do yourself.
    Ive had basic programming experience but found SIOC quite daunting as there are quite a few differences but the logic skills aquired allowed me to do the basic maths before requiring asistance.
    SIOC has certain rules like using the Curly Brackets that must be learnt an dthe best way is by looking at heaps of examples, Nico's site is excellent for this.
    Time is what you need to spend to familarise yourself with Sioc.
    Hope this helps and please dont be discouraged we all have gone thru this pain.
    Hope this helps and good luck with the learning process.
    Regards
    Les

Page 3 of 11 FirstFirst 1234567 ... LastLast

Similar Threads

  1. Replies: 11
    Last Post: 02-28-2011, 04:09 PM
  2. Real-World Aircraft Instruments interfaced to FSX via SIOC & USBServos
    By Boeing 747 Flyer in forum My Cockpit Update
    Replies: 1
    Last Post: 08-07-2010, 08:58 AM
  3. USBSERVOS Card testing
    By Tripacer in forum OpenCockpits General Discussion
    Replies: 3
    Last Post: 01-14-2009, 12:25 AM
  4. USBServos Card Testing
    By Tripacer in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 12-07-2008, 12:37 AM
  5. What are you working on?
    By Bob Reed in forum My Cockpit Update
    Replies: 21
    Last Post: 12-22-2006, 12:22 PM