Jump to content
The simFlight Network Forums

reading value of MCP Combo displays?

Recommended Posts

Hi Pete,

hope you have a nice christmas!

With the help of some topics here in the forum I managed to write values in the MCP Combo Display

As example here is the code for J41:

buffer = ipc.readLvar("L:AltSelAlt")/100
com.write(dev, string.format("ALT%03d", buffer), 8)

What I wonder know is, if it is possible to read a value out of the MCP Combo display?

Like in the example above writing to the ALT display, know reading the shown ALT out of the display...

I made several attempts with com.read but you know that I'm no programer, so this was without success...

Is this possible and if yes, how?

thanks very much,


Link to comment
Share on other sites

Hi Günter,

principally it is possible to read from the MCP - but not directly. What you have probably seen is the JS41 Lua I posted which runs entirely without SerialFP and VSPE for virtual ports. That works great apart from the fact that you cannot read out the displays directly. I did not get that to work. I am not sure why that is but so far it only works if SerialFP is connected and you have a (non-free) version of something like VSPE running. VSPE creates virtual COM ports and the lua scripts are principally spying on the communication between SerialFP and MCP. SerialFP is regularly asking for the state of the MCP and that can be used in lua scripts.

So far I have been unable to recreate this without SerialFP and VSPE although I am quite sure that there is a way to be discovered to tell the MCP to release information.

For the time being I use an indirect way. I initialize the MCP at the start of my scripts with values of the aircraft and then update the aircraft values with the values in the display (does not work for all aircraft but most I have experimented with).

If I find a way to do reading from the MCP I will let you know.


Link to comment
Share on other sites

What I wonder know is, if it is possible to read a value out of the MCP Combo display?

VRi devices only send messages to the PC when something changes. I am pretty sure there is no way at all to request it to supply information. You'd have to read everything it sends and match it to what you are looking for.

Use the logging facilities mentioned to log the exchanges between SerialFP2 and the device and you'll see what I mean.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.