• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

new variable values available in the next frame the soonest?

Messages
19
Country
poland
Hello,

Am I correct in saying that if at some point I request some data on an object the soonest I can obtain the response from simconnect is during processing the next frame ?

Let's imagine a scenario in which I request some data periodically. Now on rare occasions when I receive a particular value for that requested data I may need to check the value of some other var. I will not be able to do that during this frame, correct?

Of course, I could request to receive values of every imaginable var every frame but to me it seems like it would unnecessarily overburden simconnect with transmitting data I will hardly ever have the need to use.

I'm talking about a .dll module if it's of any importance.
 
Am I correct in saying that if at some point I request some data on an object the soonest I can obtain the response from simconnect is during processing the next frame ?

You are correct. And you can choose to receive your data on the next rendered (visual) frame (SIMCONNECT_PERIOD_VISUAL_FRAME) or on the next simulated frame (SIMCONNECT_PERIOD_SIM_FRAME)

Tom
 
Hi,

Can somebody explain the difference between VISUAL FRAME and SIM FRAME ?

Regards.
Patrick.
 
You are correct. And you can choose to receive your data on the next rendered (visual) frame (SIMCONNECT_PERIOD_VISUAL_FRAME) or on the next simulated frame (SIMCONNECT_PERIOD_SIM_FRAME)

Tom

Thanks,

In my example I was using SIMCONNECT_PERIOD_ONCE but still the data wouldn't arrive sooner than in the next frame.
 
Can somebody explain the difference between VISUAL FRAME and SIM FRAME ?

Visual frame is your current refresh rate, and unless that's locked and never drops, it's likely to be inconsistent.

Sim Frame is nominally 18Hz. This is the rate at which FS performs all it's calculations, gauge updates, etc.

Typically, there's no need to get or set data faster than the Sim Frame, unless what you're doing is specifically related to visual effects, like animations.

Si
 
If you need higher frequency updates you can refer to that wiki entry on timers that i posted.
 
In my example I was using SIMCONNECT_PERIOD_ONCE but still the data wouldn't arrive sooner than in the next frame.

This is the way SimConnect works - it is asynchronous. You send a request for data, and at some future point in time - usually the next frame, SimConnect will provide it to you.
Keep in mind that if you are working within an FS Module, you can declare a MODULE_VAR and get information immediately - assuming the particular information you are looking for is available through the regular FS variables.

Doug
 
Thanks for the info.

What are the limitations of FS Module? Can I only use it from a panel ? Or can it be used from normal .dll modules ?
 
Provided you include the gauges.h you can use module vars or execute_calculator_code()(this one is the best) anywhere anytime in a module or a gauge.
 
Back
Top