Results 1 to 4 of 4
Thread: USBSERVOS Card testing
-
12-17-2008, 12:30 AM #1
- Join Date
- Nov 2007
- Location
- Mobile, AL
- Posts
- 48
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
-
12-17-2008, 09:08 AM #2
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
-
12-17-2008, 07:26 PM #3
- Join Date
- Nov 2007
- Location
- Mobile, AL
- Posts
- 48
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
-
01-14-2009, 12:25 AM #4
- Join Date
- Nov 2007
- Location
- Mobile, AL
- Posts
- 48
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
-
Testing Opencockpits DCMotors Card & Weird problem
By Boeing 747 Flyer in forum OpenCockpits General DiscussionReplies: 4Last Post: 03-13-2011, 07:00 AM -
Real-World Aircraft Instruments interfaced to FSX via SIOC & USBServos
By Boeing 747 Flyer in forum My Cockpit UpdateReplies: 1Last Post: 08-07-2010, 08:58 AM -
USBServos Software not working?
By Boeing 747 Flyer in forum OpenCockpits General DiscussionReplies: 100Last Post: 07-09-2010, 07:14 PM -
IO Cards Problem setting up Display Card on Master Card
By Barrykensett in forum OpenCockpits General DiscussionReplies: 1Last Post: 05-02-2009, 01:30 PM -
USBServos Card Testing
By Tripacer in forum OpenCockpits General DiscussionReplies: 1Last Post: 12-07-2008, 12:37 AM