Jump to content
The simFlight Network Forums

FSUIPC Freq, Increase


Recommended Posts

Pete,

Just started working with the latest FSUIPC4.

I'm using rotary encoders and occasionally get a slight delay with FSX updates. After doing some reading it would seem that FSUIPC4 is event driven, updating only when there is new data or a change in data state. Thus updates are dependent upon the simulation or FSX frame rates. Higher the frame rate the better I/O response.

Is there any other control, tweaks we can adjust to increase read / write frequency?

Thanks!

Christian

Link to comment
Share on other sites

I'm using rotary encoders and occasionally get a slight delay with FSX updates.

You'll need to say a little more than that I'm afraid. Rotary encoders are simply knobs which are turned to create signals, which then have to be interpreted by some software to create appropriate actions such as increments or decrements. How you do that will determine whether there's any noticeable "delay". And how are you measuring this delay? Do you mean you turn a knob and some seconds later something in FSX changes? What is the data, what is the route, where are you seeing it?

After doing some reading it would seem that FSUIPC4 is event driven, updating only when there is new data or a change in data state.

But that's all about reading data FROM FS, not writing to it, which is what you must be doing with an encoder, surely? And of course it doesn't update values in the offsets when they don't change -- that would be a silly waste of time.

Thus updates are dependent upon the simulation or FSX frame rates. Higher the frame rate the better I/O response.

Naturally. The higher the frame rate the more smooth the flying too. I'm not sure of the relevance of that.

Is there any other control, tweaks we can adjust to increase read / write frequency?

Apart from possibly increased frame rates as you already suggest? Reading and writing of what, exactly? You give me nothing to go on here. Sorry.

Pete

Link to comment
Share on other sites

Hi Pete,

Rotary encoders are simply knobs which are turned to create signals, which then have to be interpreted by some software to create appropriate actions such as increments or decrements.

I'm using Windows which reads the encoder hardware (think joystick button inputs). The encoder is wired in manner to produce simple ON / OFF button pulses which increment/decrement FSX data. The speed at which the joystick data is read on my end is controlled by Windows.

And how are you measuring this delay?

The delay is being measured with my eye. The encoder ratio for increment/decrement is 1:1. One click of encoder equals one pulse which should increase/decrease FSX variables. Occasionally FSX and or FSUIPC is missing a pulse or the pulse is read and takes a moment to register the change in FSX.

But that's all about reading data FROM FS, not writing to it, which is what you must be doing with an encoder, surely?

I am not reading FSX think of this as a simple Windows joystick interface. (open-loop)

Naturally. The higher the frame rate the more smooth the flying too. I'm not sure of the relevance of that.

I only mention this as I am unsure about how your DLL is being called or reading I/O. Your software provides a layer between FSX, SimConnect and the outside World. Maybe you run this layer as a multi-threaded app. that is polling at frequencies related to frame rate? Maybe its strictly event based similar to a hardware interrupt?

Apart from possibly increased frame rates as you already suggest? Reading and writing of what, exactly? You give me nothing to go on here. Sorry.

Think of my interface as joystick buttons. The buttons sends ON / OFF pulse which are read by Windows. I have assigned a number of controls to each of these button presses using FSUIPC.

Can I increase the rate at which FSUIPC reads joystick data and send that to FSX?

Love the software and thanks for your help...

Christian

Link to comment
Share on other sites

I'm using Windows which reads the encoder hardware (think joystick button inputs). The encoder is wired in manner to produce simple ON / OFF button pulses which increment/decrement FSX data. The speed at which the joystick data is read on my end is controlled by Windows.

Ah. So you are really talking about normal joystick buttons. Windows doesn't control polling rates -- that's up to the application.

The delay is being measured with my eye. The encoder ratio for increment/decrement is 1:1. One click of encoder equals one pulse which should increase/decrease FSX variables.

This is assigned in FSX or in FSUIPC's buttons tab? To which controls?

Occasionally FSX and or FSUIPC is missing a pulse or the pulse is read and takes a moment to register the change in FSX.

So you are using FSUIPC. Have you left FSUIPC's button poll rate at its default (the PollInterval parameter)? If you assign in FSUIPC you actually get a default 40 polls per second -- more than the nominal FSX rate of 6 per second. Have you compared assignment in FS with that in FSUIPC to see?

I am not reading FSX

No? So what was this all about:

"it would seem that FSUIPC4 is event driven, updating only when there is new data or a change in data state."

That is most certainly only about reading data from FSX. Writing data to FSX is certainly completely unrelated to FSX data change rates.

However, this:

"Thus updates are dependent upon the simulation or FSX frame rates."

is true for FS gauges on screen. Obviously they cannot be updated more frequently than the graphics can be changed.

I only mention this as I am unsure about how your DLL is being called or reading I/O.

The polling (which is "I" only, not "I/O") is not at all dependent on frame rates. It is specifically set and adjustable, as documented (such parameters are covered in the Advanced User's guide). However, it is a lot more frequent than FSX's polling rate, without adjustment.

Can I increase the rate at which FSUIPC reads joystick data and send that to FSX?

Yes, but I don't think that will influence the gauge update rate in FS, if this is what you are observing. And it sounds like it is.

One thought. most rotary encoders pulse "on" for one click and "off" the next. So to have an increment per click you need to program the same control on both "press" and "release". Have you done that?

Another thought: FSUIPC does throttle repeats to a certain extent if they build up a big queue for processing in FSX. It does this deliberately so that when you stop turning the knob, (or pressing a button with Repeat enabled) FS doesn't carry on doing the increments that have piled up. I don't provide any option to remove that, and I don't think I should else you'd get overshoots quite a lot when FS gets busy.

The ability for FS to process updates is dependent upon its workload -- certainly frame rate is one indicator of that, so a faster frame rate will get more increments done quicker. What sort of performance are you seeing?

There are also slow gauges and fast gauges -- well written ones, and badly written ones, smooth ones and jittery ones. You might need to make choices.

Regards

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.