Welcome to Cockpitbuilders.com. Please login or sign up.

April 27, 2024, 09:43:23 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
436 Guests, 0 Users
Members
  • Total Members: 4,154
  • Latest: xyligo
Stats
  • Total Posts: 59,641
  • Total Topics: 7,853
  • Online today: 514
  • Online ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 436
Total: 436

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

Anyone good at SIOC?

Started by matta757, December 23, 2010, 02:08:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

matta757

David,

I guess my worry is that I am comfortable with calibrating within FSUIPC and I really don't know or yet understand how the calibration works through SIOC...

Matt

fordgt40

Matt

Then stay with Bodnar/FSUIPC joystick axis. Though you will then need to recode the SIOC examples as you will be reading the throttle position from an offset and not the OC analogue ports. Six of one and half a dozen of the other :)

In reality you are going to need to understand coding in SIOC whichever way you go :(

David

matta757

David,

See that leaves my head spinning a bit again. I didn't think you could chose FSUIPC calibration of the joysticks attached to the Bodnar card if you select the axis as an FSUIPC offset for SIOC to read? That's where my confusion stems from. In FSUIPC, once you identify the joystick axis, you have to pick one of 3 options: 1) send to FS as normal axis 2) send to FSUIPIC calibration or 3) set as FSUIPC offset.

Do you mean that SIOC will be reading the throttle positions from a DIFFERENT FSUIPIC offset? I know there are throttle position offsets in the FSUIPC offset list, is this what you are referring to when you say "you will be reading the throttle positon from an offset and noth the OC analogue ports"?

Also, what do you mean "six of one and half a dozen of the other"?

If what you're saying is that I need to write a whole new code (compared to the example Hessel posted) I am actually not to worried about that. I have been doing a lot of reading on SIOC and I actually feel like I have an alright understanding thus far of how programming the motors through SIOC works. What I am confused about now is calibrating the joysticks AND having them give the proper inputs to SIOC.

Sorry if my questions are redundant or stupid! Thanks for all your help.

Matt


fordgt40

#28
Matt

I advised in an earlier thread that my build had not yet progressed to coding the throttles, so what I am about to say may not be 100%  :)

If you choose FSUIPC Axis Calibration then the only way SIOC can know where the throttles are is by using one of FSUIPC`s built in offets from the list - assuming there is one. In which case you will need to recode the SIOC example to suit

Else, you choose FSUIPC Axis Offset and alter your SIOC code also, which will include defining the start and finish positions within SIOC coding ie calibration

Hence whichever route you go you will need to code in SIOC -  ie 6 of one or half a dozen of the other - you cannot avoid some SIOC coding :(

My best advice is to play around with trying to control the throttles thru SIOC - learn, adapt and perfect  :) you will need a dark room to escape to on occasions

David

Edit You do not need to write a whole new SIOC code - just read, understand how Hessel`s one worked and then amend to suit your needs, thats how nearly all of us do it - build on someones earlier work

matta757

Question: is the Phidgets DC motor card easier to work with than the OC DC motors card?

fordgt40

#30
Matt

It may be only you who can answer this, as it depends on your abilities and grasp of computer languages. Whichever route you go, it is unlikely that you will find an earlier piece of programming that will run your throttles without some modification. I suggest that you carefully analyse the logic flow that is needed to achieve what you want. Then read both the SIOC and Phidgets manuals/examples to check if they have all the commands you will need. Then assess which one you think suits your skills best and/or is best supported

Alternatively, there may be someone on here who has sound experience of both and can advise from a position of knowledge

David

matta757

#31
Alright, this is probably a REALLY stupid question with an obvious answer, but I still can't manage to find the answer anywhere in the Opencockpits Manuals... how do I know if I need extra power to run my motors? I have 2, 12V motors, but again, I cannot find in the manual where it says whether or not I need to connect extra power and if I do, how do I do that?

Also, do I need to be running FS while running SIOC while editing the code in order for it to work? Also, does SIOC need to be open whenever I play flight sim for the motors to work?

And one more question: I have decided to do the Offset through FSUIPC thing and then have the throttles set though SIOC. I understand now that I will still get the same calibration, just though SIOC code instead of in FSUIPC. But that raises another question: what part of the code that Hessel posted gets changed to reflect the fact that the throttle positions are not coming from the analog OC connections but are instead coming from the FSUIPC offset? Does that make sense?

I have now been playing around with this (hooked up the motors and card tonight) for the last few hours and have gotten nowhere. It doesn't help that all the OC manuals seem to have been run though an online translator and make very little sense!

Regards,
Matt

iwik

Hi Matt,
no expert on O/C,ad alook at the USBmotors Manual.Page 3 says J2 is for dc volts to motors.In your case 12v must be connected here.The manual shows a connection diagram for the board and P/S connections for Motors are shown. Has to be a seperate supply to enable high Voltage motors to be run.
Current would be to high to be powered from USB port if they were 5v.Also you will Have a file in your SIOC directory named sioc.ini.In here you have to tell it what number your USBmotors card is and how many cards you have.It says about this in the manual.I dont have the motors card but have the stepper and this is similar.
Hope this helps.
Les

matta757

alright, so next question is where can i find a DC 12V power source? i am not at all familiar with the hookups on this board for the power supply. Is this something that will plug into the wall? Or does it attach to the computer?

Emesis

Matt,

If you have an old computer PSU laying around that's a good source for 12vdc and 5vdc.

Cheers,
Rand

fordgt40

#35
Matt

"what part of the code that Hessel posted gets changed to reflect the fact that the throttle positions are not coming from the analog OC connections but are instead coming from the FSUIPC offset"

From reading the SIOC manual and studying the code, you can see that the read analogue port function gives a range of the throttle`s minimum, centre and end positions - that determines how far the throttle can move  according to the code. You now need to establish  the FSUIPC offset that is holding the Bodnar A/D converter value (instead of the analogue function) give it a variable name and then find out by moving the throttles what the values are at the extremes of movement. Then you introduce some code to limit movement within the physical constraints of the throttle housing.
Suppose that when the throttle is at its end stop and the Bodnar card (through the FSUIPC Offset) is returning a value of say 16,000 - then you introduce some code that says

if commanded  throttle movement value > 16000 then throttle movement value = 16000

Always make sure that power is only applied to the motors when your SIOC proggramme is running, unless you have a physical clutch installed that will stop the motor burning out if it reaches the end stops and your coding is incorrect :(

Some advice :)

Your only way to succeed with SIOC is to dive in , read the manual thoroughly - I mean thoroughly! and start coding by using simple examples from Nico Kaans site. Building on that practical understanding you can progress to amending the motor control coding. There is no simple short cut. To be fair to your forum colleagues, you need to demonstrate a basic/good degree of understanding SIOC concepts before asking questions on advanced coding.

Sorry if this is blunt, but I hope you appreciate that it is offered in the spirit of helping you achieve what you want

David

matta757

Thanks guys for the advice. I'm gonna see if I can find an old PSU.

David,

While I appreciate, and understand to a degree, your bluntness about needing to understand SIOC, in my own defense, I will state that I spent nearly 4 hours last night combing through the manuals and looking at Nico's site. The manuals provided by Opencockpits, I think you will agree, are very difficult to understand because of the translation. Not only that, things like the power supply are not really covered. Given that, it seems to me there are large holes of information that are very hard to find.

Nico's site is an amazing wealthy of information and clarified some things for me, but many of his examples really are the basics for writing 1 code (like the parking brake). I am trying to write much, much more advanced code that involves several variables working together. I spent all evening last night looking at and trying to comprehend Hessel's code. I understand a lot of it, but I also am confused by some of it. Considering that I do not need a trim wheel motor and I am not running any special software, like PM, I wonder if I would just be better off trying to write a code from scratch that I would actually understand lol.

fordgt40

Matt

I am not doubting that you have read the manual, but the best way to learn is to try some simple examples first. Code for controlling dc motors and the associated interfacing with FSUIPC is advanced stuff for a beginner.

What SIOC manuals are you reading - I ask because I have a number of different ones which may be able to make some things clearer to you

David

Joe Lavery

Matt, I don't want to go over old ground here but have you looked at the dedicated program written by Diego Viso on My Cockpit. It's called DVATX and controls both the throttles, speed brake and trim wheels. It's also designed to use the Phidgets DC motor cards and Pot sliders.
If you haven't spent any money yet it is worth investigating, everything is controlled and calibrated from a single screen. No coding to do at all. The only down side is the cost of all the Phidget controllers etc. which are considerably more than the OC cards.

Just a thought, I hope I haven't made things worse for you.  :idiot:

Cheers
Joe.
Life isn't about waiting for the storm to pass, it's about learning to dance in the rain

Journalist - writer for  PC Pilot Magazine

Hessel Oosten

#39
Matt,

As David said, it's wise to study more. That's much more than 4 hours. That's weeks, for all of us.
Several members are writing here, but sometimes due to the fact that you did not enough (till now :-) study/homework.
Even with helpers around the world, the last thing you have to do yourself in most circumstances!
On the Opencockpits site are LOTS of English documents, even  VERY nice powerpoint's etc.
Manuals of the cards are in English too there (but some search is necessary). Agree that the site is not well organized.
In the fora HUNDREDS of code examples of all kind (and all in SIOC linguage).
You are confused by the trimwheel, BUT in the second code I provided in this thread there is not even a trimwheel included ! So please re-read.
Furthermore it simply works if attached to a small DC motor and SIOC and is dedicated to your (!) plane.

So, accept that this a not an "hours" project. Read, re-read and try small steps (!) with patience.

Hessel

matta757

Hessel,

Yes, I reread your second post and it did make sense to me. My one question about that second code is will it work with 2 motors? I know the realistic motorized throttles only use 1 motor, but my setup requires 2 motors, one for each lever. I assume that the second code you posted can be adapted to 2 motors?

One more question, for anyone, not regarding SIOC but in regards to a power source for the DC motors card... I have 2 12V motors attached to the card, does that mean I need a 24V power source? Or will a 12V source work to power both motors? I ask because when I wired my LED's on my overhead, using the 5V on the 836X card, I needed to split those 5V among 3 LED lights, so I was curious if it's the same thing with the motors.

In the meantime, I will try to stop asking so many questions and rebury myself in the SIOC stuff for a while. I see frustration on the horizon lol. Hopefully followed by success.

Thanks guys,
Matt

Hessel Oosten

Quote from: matta757 on January 23, 2011, 08:19:43 AM

I assume that the second code you posted can be adapted to 2 motors?

I have 2 12V motors attached to the card, does that mean I need a 24V power source? Or will a 12V source work to power both motors?

Matt,

The second code can be adapted for 2 motors. All commands for motor 1 can be copied to a motor 2. In fact, it's "about the same" as the first code but to make it more simple for study ..:-),  this is for 1 motor.

(That stays complete aside from the "more realistic one motor drives all" discusssion which has several problems with the software systems, NOT doing that.)

If you have 12 V motors you can (hmm in theory) drive 1000 motors on a 12 V power supply.
The limitation is the power of the powersupply is in Watt's. Watt = Volt x Ampere.
So e.g. if you motor takes 1 ampere at 12 Volts the power supply needs to be 12  x 1 = 12 Watt AND about 50 % more to be sure. You can calculate this for 2 motors ...:-). Let's not start discussions here about these educational sentenses...:-).

Asking this last question proves that you also need to study more basic electricity. Really !
Not doing this makes your motors and power supply AND your expensive electronic cards ready for a big smoke !

So in conclusion. People are willing to help. But people are getting reluctant if the questions have a toooooo wide range e.g. "my motor does not work, please help".
Better is a far more specific question in which is also stated what you already have done to solve the problem.

Don't start to be the "king of questions" ...:-).

Hessel (seriously trying to help).

matta757

Hessel,

Thanks for the advice. You wouldn't happen to have your 1-motor code in a TXT file, would you? I guess I could just copy it into notepad too, but last time I tried that and imported it, it didn't work. I have made significant progress today in the sense that I now have SIOC seeing my pots and seeing the difference they need to move the levers.

Don't worry, I am done asking questions. I'll just muscle though it. You guys have been a big help though. I have a friend who is really good with electrical stuff, so I should be able to figure out how to properly wire the power source.

Matt

Hessel Oosten

Yes, you can copy it in simply in Notepad.

Maybe that, due to the layout of this forum, there are some hidden characters added ?
So copy it in Notepad as experiment with "save as" and the different "types" e.g. txt and not ANSI.

H.

matta757

Ok, i did save it as a TXT file before and it still didn't read it properly when imported into SIOC, but I will try it again and see what happens!

Hessel Oosten

Matt,
See attachment.
(same as in this thread; nothing new).
H.

matta757


Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate