News:

Precision Simulator update 10.173 (24 February 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

USB Controls

Started by dhmm, Sun, 22 Jun 2014 03:25

dhmm

Hi Hardy,

I am just trying to come up with a list of USB Controls that can work directly with PSX in an attempt to estimate the effort and work I have to go through upgrading from PS1.3 to PSX.

Using USB Joysticks with 8 Axis, could they be configured to interface to PSX 4 Throttle controls, and Speed brakes, tiller and steering without programming?

Can I use the buttons on the USB control / joystick to control the flaps/speedbrakes with absolute positions instead of relative positions? I am using microswitches, connected to the USB Joystick controller, so can I configure Microswitch 4 to be position 4 on the flaps ? (or maybe I can use a keyboard encoder / controller to send flaps positions directly to PSX)

Would there be a limit on the number of Axis and buttons the controller can take to control PSX ? Or is it O/S dependent?

Lastly, I assume that all those controls have to be connected to the PSX Master / Server in a multi network configuration and not to a PSX client that could send the axis position to the PSX Server. Correct?
 
Most of my controllers are programmed to work with PS1.3 through the broker, using IPC commands. So I am trying to figure out my new setup and configuration rehired to run PSX.

Thanks,

dhmm

Jeroen Hoppenbrouwers

#1
Quote from: dhmmLastly, I assume that all those controls have to be connected to the PSX Master / Server in a multi network configuration and not to a PSX client that could send the axis position to the PSX Server.
No, clients and servers are fully equivalent. The Server is only unique in running the master machine, the central controller. Where the hardware is connected does not matter.

This also holds for audio, for example.


Hoppie

dhmm

Thanks Jeroen,

Thats cool. So this means that I can connect more than one USB Controls / Joysticks to more than one client computer, and they should be all talking to the Server.

I guess my question now, is how many controls in PSX are able to be configured from the joysticks or USB Controls? (Which could be connected to different PSX Clients).

Regards,

dhmm,

Hardy Heinlin

Hi dhmm,

on Instructor > Preferences > USB, each combo box (pop-up menu) on the right-hand side of the page includes these selectable functions for USB axes:

                         "Elevator",
                         "Aileron",
                         "Throttle 1",
                         "Throttle 2",
                         "Throttle 3",
                         "Throttle 4",
                         "Throttles all",
                         "Reverser 1",
                         "Reverser 2",
                         "Reverser 3",
                         "Reverser 4",
                         "Reversers all",
                         "Speed brake",
                         "Toe brake left",
                         "Toe brake right",
                         "Toe brakes both",
                         "Rudder",
                         "Tiller",
                         "Aileron and tiller"



And these selectable functions for USB buttons:

                         "Stab trim nose DN Capt",
                         "Stab trim nose UP Capt",
                         "Stab trim nose DN F/O",
                         "Stab trim nose UP F/O",
                         "Comm PTT Capt",
                         "Comm PTT F/O",
                         "A/P disconnect",
                         "A/T disconnect",
                         "TO/GA",
                         "Throttles all +",
                         "Throttles all -",
                         "Thrust reverser cycle",
                         "Speed brake RET",
                         "Speed brake EXT",
                         "Flaps UP",
                         "Flaps DN",
                         "Gear cycle",
                         "Tiller nose left",
                         "Tiller nose right",
                         "Rudder trim left",
                         "Rudder trim right",
                         "Toe brake left",
                         "Toe brake right",
                         "Toe brakes both",
                         "Chrono Capt",
                         "Chrono F/O",
                         "Warning reset switches",
                         "Layout cycle +",
                         "Layout cycle -",
                         "Layout 1",
                         "Layout 2",
                         "Layout 3",
                         "Layout 4",
                         "Layout 5",
                         "Layout 6",
                         "Layout 7",
                         "Layout 8",
                         "Layout 9",
                         "Checklist: Rewind to top",
                         "Checklist: Next item"



So, by USB, you cannot set the flap lever directly to a certain position. But you could set the lever directly if you would use the TCP/IP network.

To all computer-literate guys out there, I'd like to recommend: free yourself from all those old hacks and compromises of the past, forget all those complicated, indirect tricks by using zillions of special programs. Write a Java program yourself, or write it in your preferred language if you are already a developer. PSX add-on sample code is available for free. For example, to set the flap lever to flaps 20, you just need to change one line of code in that sample. It's just a simple "Q..." message. That's all.

When you are able to receive and send Q messages in the PSX network, you have access to a hole new world of possibilities. This is very exciting. And much less complicated than those old hacked methods -- and educational too. Learning makes fun when things make sense :-)


Cheers,

|-|ardy

Phil Bunch

Would it be an improvement if a real airliner were based on networked controls and components in the same or a similar way?  An awful lot of wiring and weight could thereby be saved.

Perhaps the newest planes, such as the 787 or A380 are mostly or partly networked?  

Even my Volvo S60 car uses mostly networked controls - it has two internal TCP/IP networks (one low-speed, one higher speed) for this purpose, so that when I press the door lock button it sends a signal to a central computer which in turn sends a signal over the internal network to the door lock mechanism.  It's weird to push down on the door lock button if the car has no power - nothing happens, of course, and the door lock button solenoid that makes it feel like a traditional mechanical door lock button is inactive...
Best wishes,

Phil Bunch

Jeroen Hoppenbrouwers

It's called fly by wire.

dhmm

Thanks Hardy,

dhmm,

John H Watson

QuotePerhaps the newest planes, such as the 787 or A380 are mostly or partly networked?


They are indeed. To some folks it is an improvement... to others, it's a good time to retire from the industry  :mrgreen:

Alt-Ctrl-Delete is only a good solution when you're on the ground (or you have an ejector seat as backup).

Phil Bunch

Quote from: John H Watson
QuotePerhaps the newest planes, such as the 787 or A380 are mostly or partly networked?


They are indeed. To some folks it is an improvement... to others, it's a good time to retire from the industry  :mrgreen:

Alt-Ctrl-Delete is only a good solution when you're on the ground (or you have an ejector seat as backup).

Thanks for your and Jeroen H's replies.

It's not obvious from my post, but I was actually wondering if the whole 7X7 systems architecture(s) could be controlled by a "version" of PSX, if one started from scratch with completely new designs.  Yet that type of massive and comprehensive redesign makes my head hurt if I think about it, even ignoring regulatory issues.  Would in fact it be better than current Fly-By-Wire
systems or is this even answerable qualitatively without thousands of person-hours of study?  

Would PSX be suitable for flying a real aircraft,  in addition to supporting a novel simulator?  

Regardless, if I were Boeing's CEO, I'd offer Hardy a zillion dollars/euros to work for them, and make a similar offer to Jeroen H and the others who helped create PSX.   I'm sure that many hundreds of people are involved in creating the software for both their simulators and their airliners.  While many of these people are probably doing regulatory work, testing, etc, I have suspected for some time that choosing the right people for a small team is much more efficient and cost-effective than using a typical large team.  

I believe Fred Brooks, a high-level manager at IBM, wrote a book "The Mythical Man-Month" some years ago about this general phenomenon and its impact on IBM's early mainframe operating systems.  Perhaps this book explains in part the high productivity of the PSX effort?  Hard work, passion, and exceptional abilities are also key, of course.

Can't wait to begin going up the PSX learning curves.

If we're getting this much forum traffic before it is released, what will forum traffic be like after it's been out a while?!?!

Just some musings and thoughts as a (retired) staff scientist for a large multi-national company.
Best wishes,

Phil Bunch

Blake H

#9
Does this include reverse in the throttle axis 1,2,3,4 or separate ?

No Flap Axis?



       "Elevator",
   "Aileron",
   "Throttle 1",
   "Throttle 2",
   "Throttle 3",
   "Throttle 4",
   "Throttles all",
   "Reverser 1",
   "Reverser 2",
   "Reverser 3",
   "Reverser 4",
   "Reversers all",
   "Speed brake",
   "Toe brake left",
   "Toe brake right",
   "Toe brakes both",
   "Rudder",
   "Tiller",
   "Aileron and tiller"

Hardy Heinlin

"Throttle" means forward thrust lever.
"Reverser" means reverse thrust lever.

Flap lever can be assigned to 2 USB buttons (up, down), not to a pot.

(The flap lever can be set directly into one of the seven notches only by the TCP/IP network.)


|-|ardy

GodAtum

Quote from: Hardy Heinlin"Throttle" means forward thrust lever.
"Reverser" means reverse thrust lever.

Flap lever can be assigned to 2 USB buttons (up, down), not to a pot.

(The flap lever can be set directly into one of the seven notches only by the TCP/IP network.)


|-|ardy

So an FDS throttle pedestal will have to be somehow connected to a network? I think they are USB?

Hardy Heinlin

FDS supports PSX via TCP/IP.

GodAtum

Quote from: Hardy HeinlinFDS supports PSX via TCP/IP.


is that via one of their control boards?

jb747

The physical boards used by FDS use USB as the interface to your PC.  However, the interface programs connect directly to PSX via TCP/IP.  They do not use the USB interface into PSX.

I hope that clarified things.

Cheers,

Jon

GodAtum

#15
I think I get it. The board connects to via USB a "controls" PC > this connects via TCP/IP to the PSX PC. Or can I use the same PC for the USB inputs and PSX?

For testing I will probably use my Saitek yoke and pedals. I guess I cannot use the throttle lever to set flap degrees?

jb747

Two issues here...

One, your Saitek yoke and pedals will interface directly to PSX using the direct USB interface that Hardy described earlier.  They are not in any way connected to any FDS addon.

Two,  The FDS programs can reside on the same or different PC's and interface to PSX for the power quadrant (Throttles), the FDS-SYS cards, the CDU's, the MCP/EFIS/DSP, etc.

I have a full cockpit... and use one SYS-3 card, two- SYS-2 Cards, one SYS1X card, and one SYS-2X card.  Use the full motorized throttle setup, the rudder trim panel, three multi-channel radios, a transponder, and three CDU's.  That's a lot of USB inputs and they are distributed across multiple PC's, then interfaced to PSX via TCP/IP.


It all works.

Cheers,

Jon

Blake H

#17
Ok.

Seems like the throttle and reverse are 2 separate inputs for USB devices. My solution will be dual pot throttle/reverse lever input on the USB device or below.



For the flaps, I will put through my non-USB device.

e.g opencockpit, phidgets, audrino analogue input. Then write a little program assigning the pot angle to equal a certain flap value.

I might do the same with the throttle/reverse lever, the pot value equals.... and so on.