Jump to content
The simFlight Network Forums

EPICINFO - Scaling engine data


Recommended Posts

Hi Pete,

First of all, thanks for putting together such a robust product and your continued support!!!

I'm using FSUIPC with EPICUSB and FS2004. While reading your EPICINFO.DOC file, I wanted to know if you could clarify the scaling ability from EPICINFO.DLL? In your EPICINFO user guide, you list the following example:

SCALING TO A RANGE (for gauges)

ENGINE1_RPM = Scale 256, 0, 3000

DefinePH(100, Eng1rpm, 0,0,0,0)

var(Eng1)

:Eng1rpm { #expand GetPH8(Eng1, 0x0264) }

My question: is the above sample code for the EPICINFO.CFG file, or is it intended for my EPL code? It doesn't really say where this code is supposed to go. Also, can I assume that the newly scaled engine RPM will be in PH8....?

Thanks in advance! - Ron

Link to comment
Share on other sites

My question: is the above sample code for the EPICINFO.CFG file, or is it intended for my EPL code? It doesn't really say where this code is supposed to go.

Well it has been many years since I used EPL, but surely the part you (deliberately?) missed out of your quotation explains it:

This reduces the RPM value to a number from 0 to 255. It is sent in place of the original value in the appropriate Pigeon Hole (PH 100). Note that, by reducing it to a byte value (i.e. less than 256) it can fit into an 8-bit EPL variable, so the following routine can be used to collect it:

Doesn't that very strongly imply that the code following is EPL? What you'd have the CFG file do with the value I've no idea -- it isn't much use to it, is it? Surely the whole point of EPICINFO is to get data from FS into your EPIC? Or are you wanting to use it for something else?

Also, can I assume that the newly scaled engine RPM will be in PH8....?

No, how would you assume that? Why don't you refer to the list of PH's further on in the same document? Isn't that what the list is for? The one headed "Pigeon Hole values"?

Just glancing at that section it explains early on that "getPH8" gets a 8-bit value, and the first parameter is the PH number. You will surely note that the latter is 100, not 8! Again, looking up 100 in the PH list and you find the Engine 1 RPM?

Please do use the document -- I really don't remember much of this, not having used EPIC for many years, but I can look this up just as you could.

Regards

Pete

Link to comment
Share on other sites

No Peter, I did not deliberately exclude the text. The code example listed in the EPICINFO.DOC, as it is written, doesn't do anything except generate syntax errors when compiling. I'm just trying to understand if this data scaling thing works. Please forgive me, I've only been at this a few months.

ENGINE1_RPM = Scale 256, 0, 3000 <-- This goes in the main body EPL?

DefinePH(100, Eng1rpm, 0,0,0,0) <-- This goes in the main body EPL or in the macro HPL file?

var(Eng1) <-- I assume this goes in the EPL, but without the ().

:Eng1rpm { #expand GetPH8(Eng1, 0x0264) }

I understand that PH100 is the pigeon hole for JetN1, however I'm not understanding the GetPH8... is that something in the Macro.EPL file? Something I need to do there to make the scaling work? Thanks!

Link to comment
Share on other sites

I'm not understanding the GetPH8... is that something in the Macro.EPL file?

Sorry, you've got me there. It may well be a macro of some kind. I don't remember how to tell EPIC to read a PH. I don't have any EPL references to hand I'm afraid. Also, EPICINFO mostly applied to the old ISA EPIC card. Things may have changed a lot since the USB version came out and R&R produced a new compiler system.

Something I need to do there to make the scaling work?

No, no. The scaling operates on the value before it gets sent to the PH. Scaling is done in the PC, by EPICINFO. You get the result in your EPL by whatever means is provided by EPL to get any PH.

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.