Results 1 to 4 of 4
  1. #1
    25+ Posting Member
    Join Date
    Nov 2007
    Location
    Mobile, AL
    Posts
    51
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Question USBSERVOS Card testing

    I have completed a USBSERVOS card and want to test the servo movement before working on other things. The IOCServos.exe program reports that the card is operational and connected. After I verify that the card is operational I will work on the connectivity to FSX using FSUIPC. A couple of questions.
    1. Where does the IOCServos.ini file go?
    I put it in ... ProgramFiles/IOCARDS/SIOC.

    2. I wrote this script to move the servo. Servo is operational because I tested it using Phidgets hardware/software.

    // USB SERVO TEST 6 USING LOGICAL VARS (C0, C1, OR C2)9:49 PM 12/16/2008
    // USBSERVOS port 0 corresponds to 0-5 = 1-6 servos
    VAR 0077 , VALUE 25 // SET VALUE OF V0077
    {
    C0 = V0077 > 20 // SET CONDITIONAL VARIABLE
    IF C0 // TEST CONDITIONAL
    {
    V0078 = 400 // SET VALUE OF V78 TO GO TO SERVO - MOVE SERVO
    // ALTERNATIVE VALUE SET WITH DELAY
    // V0078 = DELAY 700 100 // DELAY 10 SECONDS THEN SEND A VALUE
    }
    }
    VAR 0078, LINK USB_SERVOS, OUTPUT 1 , POSL 1, POSC 512, POSR 1023

    (Sorry for all the comments, I am a retired Computer Science Professor and commenting is in my blood!)

    3. In the sioc.ini file, I disabled IOCPClient #0 and #1 because I have no connected networked computers at this time. Is this correct? acceptable?

    Thanks for any help.
    Tripacer

  2. #2
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi,
    Just some feedback to help you writing more readable SIOC scripts, so you do not need that many comments...
    Note that in SIOC upper or lower case does not matter, comma's and leading zeroes are redundant, and that you can give a variable a logical name.

    Your program could also been written as:

    Var 77 name SetValue Value 25
    {
    IF &Setvalue > 20
    {
    &Servo = 400
    }
    }

    Var 78 name Servo Link USB_SERVOS Output 1 PosL 1 PosC 512 PosR 1023

    It is now more easier to understand (at least to me) what it does, so it will be easier to comment upon.
    My Comment: the code of Var 77 (between curly braces) will be excuted only once (at start up), you'll need other SIOC code as well to give SetValue new value's.

    best regards,
    Nico

  3. #3
    25+ Posting Member
    Join Date
    Nov 2007
    Location
    Mobile, AL
    Posts
    51
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Thanks Nico, I will make my code more readable if and when I actually get it to do something with the hardware. So far, the servo has not moved at all.

    William

  4. #4
    25+ Posting Member
    Join Date
    Nov 2007
    Location
    Mobile, AL
    Posts
    51
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    This problem SOLVED, Thanks All.

    I finally figured out the USB Servos problem. The pinouts on the servo were incompatible with the pinouts on the USB Servos card. When I re-wired the servo all worked fine. Only one complaint, most servos made use a ground, positive 5v, signal pinout sequence. If the USB Servos card follwed that convention, instead of signal in the middle, servos would be plug compatible. Straight up estension wiring would then be in effect.
    Thanks for all of the help. Probably more problems soon. I am busy interfacing the flight controls.
    Tripacer

Similar Threads

  1. Testing Opencockpits DCMotors Card & Weird problem
    By Boeing 747 Flyer in forum OpenCockpits General Discussion
    Replies: 4
    Last Post: 03-13-2011, 08:00 AM
  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, 09:58 AM
  3. USBServos Software not working?
    By Boeing 747 Flyer in forum OpenCockpits General Discussion
    Replies: 100
    Last Post: 07-09-2010, 08:14 PM
  4. IO Cards Problem setting up Display Card on Master Card
    By Barrykensett in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 05-02-2009, 02:30 PM
  5. USBServos Card Testing
    By Tripacer in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 12-07-2008, 12:37 AM