PDA

View Full Version : Need help with OC USB servo card



Trashlar
10-27-2012, 03:12 PM
Hello,

for a few months I`ve started planning to build a home cockpit. Some mechanical gauges I wanted to make on my own. For example the VSI and the airspeed gauge. These gauges might be quite simple to cunstruct, because you just need some wood, plastic gears a servo motor and a control unit like the OC servo card. So some days I purchased the USB servo card from OC and no Iīm trying desperatly to work correctly.
At the beginning I tested the card with the SOIC monitor file and later with the iocards_USB test file. Everything was fine. The servo were moving.
But then I tried to interface the card with FSX. I copied a SOIC script for the VSI just for a small test.

script: // *****************************************************************************
// * Config_SIOC ver 4.01 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : test_servo1.txt
// * Date : 15/03/2012
Var 0001, name servo, Link USB_SERVOS, Device 0, Output 1, PosL 190, PosC 512, PosR 1023
Var 0002, name vs_value, Link FSUIPC_INOUT, Offset $02C8, Length 4, Type 1
{
L0 = &vs_value * 0.7895
L1 = L0 * 0.2555 // 1022 positions / 4000 fpm
L2 = 511 - L1 // CENTER OF GAUGE
IF L2 > 1022 // UPPER LIMIT
{
L2 = 1022
}
IF L2 < 1 // LOWER LIMIT
{
L2 = 1
}
&servo = L2
}
// End of file

this script is from the OC Manual. Then I opened the config SOIC an opend the txt file and it automatically was compiled by the program. After that I saved this file together with the other SOIC files. I corrected the SOIC.ini file with the correct IDX and device number of the servo card. And then I launched the FSX. But sadly the Servo didnīt moved. No matter what I tried. I downloaded and opened the IOCservo file. But nothing happens.
At the point I can just say:
The card works correctly. But I donīt know how to run the script correctly ( I expect this to be the reason) if I try to click on groug \ run in the config window where I compiled the script the program tells me "file not found" but the compiled file is in the installation directory.
By the way: the pins were connected the right way an I have a registered version of FSUIPC. My system is windows vista 64 bit.
Thank you for reading an sorry for my english.

greetings