View Full Version : PMDG Offsets
Daveanne
01-08-2009, 01:12 PM
Hi guys,
I have asked a few questions on here before about offsets for PMDG, however through experimentation I have discovered at least one, for which I am delighted about, because it was the one I was looking for....
I am installing a Phidgets interface to motorise my TQ and Spoiler leaver, the throttle part is fine just using the hookup in FS2Phidgets and the throttles move as the ones in PMDG do, a little jerky, but hey it works.
What I wanted to do was use the A/T (Autothrottle) switch on the MCP through the Phidgets 0/0/4 to connect/dis-connect the servo's when the A/T is on/off
Using FSInterrogate (in the FSUIPC SDK), I managed to identify that the offset of: 621C is the one for the A/T engage/dis-engage.
Does anyone know of any others at all, I am particulary interested in the AP Comd A switch offset to complete the project.....????
By the way I am not using Project Magenta, just good old FS9 & PMDG
Best wishes
Daveanne:-D
brynjames
01-08-2009, 01:32 PM
Well done Daveanne! This could be a very useful thread, especially if it results in a long list of useful offsets.
--
Bryn
Efe Cem Elci
01-08-2009, 07:31 PM
This could prove useful...
http://members.chello.at/spatat/pmdg.htm
Daveanne
01-08-2009, 07:54 PM
Had even more success this evening, managed to find out the offset for the AP too:
The offset for the AP (CMD A) is 6226 (0= off 512 = on)
By the way the A/T offset of 621C (0 = off 1 = on)
I have now been able to try it out on my pit, was just trying it out on a Desktop PC before, the pit has a CPFlight MCP (old model, not USB), coupled in along with EFIS, Radios too.
I was a bit worried that even though it all worked on the desktop, as soon as I coupled it up to the MCP it would all go wrong, however I am pleased to say that it works a treat......Yipee!! well done FS2Phidgets and Phidgets of course, at last, something that does what it says on the tin..!!
So now I have phidgets servo's operating both throttles (737NG) and one smaller one operating the "spoiler" as we land, automatically...!! deep joy
Plus I have also configured the Phidgets 0/0/4 relay interface to switch over when the A/T and A/P (COMD A) are selected, thus I can set the throttles for take off maunally, I have made a small loop in the connections so that both the A/T and the A/P need to be on before the Servo's work, therefore only when I have the A/T and the A/P selected, together do the throttles move on their own......Rock-on Tommy..!!!
As you can tell I am very pleased with myself....Yahooooooo!!
I have taken jpeg screen shots of the FS2Phidgets screenshots and congfigurations if anyone is interested, but not quiet sure how to get them on this web site...???
Anyway, must go and complete another circuit of EGCC just to make sure it all works properly, by the way the mock up I have built to test the system hasn't been installed in my present TQ yet, maybe I will have to completely rebuild it from scratch, I hope not, that will take some serious time........again.
Steeverson...? hows your new throttle doing?
Daveanne
Daveanne
01-08-2009, 08:00 PM
Hey guys, the first two I found on my own using FSInterrogate, however I just found another guy also did the same before me....!
Have a look at: http://members.chello.at/spatat/pmdg.htm
Lots and lots of offsets....Well done that man..errrrr or Woman?
Daveanne
ian@737ng.co.uk
01-09-2009, 03:28 AM
ah, the search for the holy grail continues......
i know from experiments that the PMDG 737 uses the block of offsets from &H6200 thru &H62FF. unfortunately i've not had the need to go digging in there, so i can't be more specific i'm afraid. this was something i was looking at during one stage of development.
i did get as far as finding out that as dave asked the A/T writes to &H62BD (as does the Flight Director). seems like a value is written for the F/D and and another for the A/T and a third when both are on.
so, interrogate this block of offsets and see what you can find out.
hope that helps you guys out......
have a great day chaps.... regards from wales ... ian
aluver
01-09-2009, 04:07 AM
Found this :
62C0 spd INTERV Autopilot 23 = SPD intv., 21 = BLANK
0BCC speedbrake ?
0BD0 speedbrake ?
049C Below GS/ ?
02D4 ADF2 ?
02D6 ADF2 ?
MINS / FPV $6202 => 0100
MINS / MTRS $6204 => 0001
BARO /IN $6202
BARO HPA $6202
VOR1 $6204 => 0100
ADF1 $6204 => 0200
SW1 : APP $6206 => 0000
VOR $6206 => 0100
MAP $6206 => 0200
PLN $6206 => 0300
SW2 : 5 $6208 => 0000
10 $6208 => 0100
20 $6208 => 0200
40 $6208 => 0300
80 $6208 => 0400
160 $6208 => 0500
320 $6208 => 0600
640 $6208 => 0700
TERR $620A = B0
POS $620A = B1
DATA $620A = B2
ARPT $620A = B3
WPT $620A = B4
STA $620A = B5
WXR $620A = B6
VOR2 $6206 => 0001
ADF2 $6206 => 0002
was able to manage all functions of MCP 737 (sioc - opencockpit ) but nothing for systems / overhead, bybe bye PMDG....
Peter Dowson
01-09-2009, 06:05 AM
Found this
0BCC speedbrake ?
0BD0 speedbrake ?
02D4 ADF2 ?
02D6 ADF2 ?
I don't understand why you question these. For offsets provided and supported by FSUIPC, why not simply look them up in the extensive lists supplied in the FSUIPC SDK? I can't publish details of offsets in the application areas, used by third parties, because that is their affair, but I have always published as much information as I have for all the data provided and supported by FSUIPC itself!
Pete
Daveanne
01-09-2009, 07:36 AM
Peter, forgive me I am definately not an expert on any of this, rather the reverse actually, just a novice trying to get his TQ motorised......
Are you saying that the offsets that i have mentioned in this thread are the FSUIPC offsets for the A/T and A/P switches on the MCP.....?
If so, where exactly are they listed in the SDK, which I have downloaded.
Many thanks
Daveanne
aluver
01-09-2009, 08:12 AM
I don't understand why you question these. For offsets provided and supported by FSUIPC, why not simply look them up in the extensive lists supplied in the FSUIPC SDK? I can't publish details of offsets in the application areas, used by third parties, because that is their affair, but I have always published as much information as I have for all the data provided and supported by FSUIPC itself!
Pete
Hello Pete and sorry, I wrote too fast... yes of course 0BCC & 0BD0 are standard offsets for speedbrake, the "?" were just here in my file as a personnal memo for me, because I hadn't really test them with PMDG 737 (just remember that speedbrake logic in PMDG is different than standard FS aircrafts. No "speedbrake arm" by keyboard...).
My post had to be only about specific offsets 6200..... in PMDG. :)
For Daveanne : For the MCP, don't forget the possibility of simply using key emulation card for all controls. ( in relation with PMDG -> GENERAL ->KEYBOARD COMMANDS in FS menu )
Peter Dowson
01-09-2009, 08:49 AM
Are you saying that the offsets that i have mentioned in this thread are the FSUIPC offsets for the A/T and A/P switches on the MCP.....?
Not those in the 6xxx range. The lower numbered offsets, all the way up to 3FFF, are all standard FSUIPC offsets, with the exception of a small block at 04E0-0560 which are Project Magenta, and date back to FS2000 days when most were actual parts of FS itself.
Project Magenta is the only exception in that area because it was developed in those times when the range of values was so restricted. We found that area was unused in FS2000 so used it for PM.
This current thread has some lists, or references to lists elsewhere, which include long-standing known FS / FSUIPC offsets published with full details in the SDK, yet annotated as if they are newly discovered and / or questioned. I was just trying to save folks work in understanding those.
Maybe what is actually meant in these lists is that they may or may not be applicable to the PMDG aircraft, which of course does its own thing in many areas (like the MCP) and so doesn't use FS values in those areas.
Regards
Pete
AchillesP
01-09-2009, 08:55 AM
Hi,
Why someone does not produce an FSUIPC scanner program?:roll:
Peter Dowson
01-09-2009, 10:56 AM
Why someone does not produce an FSUIPC scanner program?:roll:
And what would that do?
Perhaps you've not looked at FSInterrogate?
Regards
Pete
Hi guys,
What a struggle for just a few offsets ..., it's a pity that PMDG does not listen to the needs of cockpit builders.
How different is the situation for the Level-D 767 with its SDK. Look how that translates to FSUIPC offsets:
http://www.lekseecon.nl/downloads/lekyoucon%20User%20Manual.pdf
;-)
regards,
Nico Kaan
Trevor Hale
01-09-2009, 02:20 PM
Guys, if we were to assume that PMDG wanted to listen to Builders... Perhaps they would raise the price of their software in line to that of project magenta.. then where would we all be?
You may be able to get so far with the PMDG aircraft and no Project Magenta, however I am afraid eventually your going to hit the roadblock that is the end of the road for the PMDG aircraft.
It's just a fact. But please don't let that discourage any of you from trying. Perhaps many just want to add a little bit more realism to their simulator which is PMDG. But for those that are hoping to uncover the Holey Grail, I am sorry, please prepare to be disappointed.
Just my thoughts,
Trev
Guys, if we were to assume that PMDG wanted to listen to Builders... Perhaps they would raise the price of their software in line to that of project magenta..
Might be that PMDG will do that, but Flight1 did not... The Level-D 767 costs $54,95, SDK included (!) (and my software tools lekseecon and lekyoucon are free).
But for those that are hoping to uncover the Holey Grail, I am sorry, please prepare to be disappointed.
Indeed, just like my thoughts.
Nico
Trevor Hale
01-09-2009, 05:25 PM
"Toucher" Nico, you are correct, although you can't network the Level D though.. But true enough, they were kind enough to allow such access, and with your software thats a big help to the flight sim community.
So why don't you create a program that will convert FSUIPC Offsets to PMDG language?
ROFL.. Just kidding..
Thanks for your post.
Trev
... although you can't network the Level D though..
There is no need to. The panel.cfg of Level-D is very flexible (you can create a full Capt and FO flightdeck with it) and with todays cpu's you can run all the Level-D gauges (EHSI, EADI, EICAS, and so on) at one pc, no problem.
Daveanne
01-10-2009, 08:55 PM
Sorry folks, but this original thread was all about Motorising TQ's and offsets, now everyone is talking about 767D's and SDK's, give me a break guys, just wanted to share what I had found out...!!
Speaking of such, have now configured the Spoiler/Speedbrakes to automatically work, through another servo on the TQ, getting even better by the day.
I do have one problem, which appears to be a common one with motorised TQ's; the levers are "realy twitchy", but I have noticed that they follow the throttle settings in PMDG exactly, therefore they are twitching too.....! (if you dont believe me whatch the throttle position indicators on the Engine panel or open the TQ graphic in PMDG, the little buggers twitch all over the place).
Had a chat with a 737 pilot, who assures me that the real ones don't do that at all, so does anyone know how to "dampen down" the erratic movements of the throttle leavers in PMDG (737-800), which will, in turn smooth out the servo actions, which quiet rightly mimic the throttle positions in PMDG.
Anyone any ideas?
Daveanne
Peter Dowson
01-11-2009, 08:38 AM
Had a chat with a 737 pilot, who assures me that the real ones don't do that at all, so does anyone know how to "dampen down" the erratic movements of the throttle leavers in PMDG (737-800), which will, in turn smooth out the servo actions, which quiet rightly mimic the throttle positions in PMDG.
If your interface to the motors is reading from an offset in FSUIPC, you could write a Lua plug-in, saved as "fsready.lua" so it loads automatically when FS is ready, which reads the original offset, manipulates it mathematically in any way you like to smooth it out (some sort of averaging over several past values I should think), and makes it available in a different offset for your interface to read. (For the latter there are offsets available for users from 66C0 to 66FF).
Regards
Pete
Daveanne
01-11-2009, 08:11 PM
Not quiet sure what your talking about Peter, but thanks anyway.
Daveanne
Peter Dowson
01-11-2009, 08:49 PM
Not quiet sure what your talking about Peter, but thanks anyway.
Didn't you just ask a question:
"does anyone know how to "dampen down" the erratic movements of the throttle leavers in PMDG (737-800)"?
I was suggesting a way to solve your problem without much difficulty. Have you never read any of the information about facilities in FSUIPC? The Lua plug-in facility allows you to do all sorts of things that previously you'd have had to write complex programs to do, and they run INSIDE FS so are much more efficient.
However, if you are really not interested, or aren't interested in paying for FSUIPC registration, I'll certainly not press the subject.
Pete
Daveanne
01-12-2009, 06:23 PM
Please don't mis-understand me, I have been a payed up member of FSUIPC ever since I first purchased my PMDG 800 programme, which must be about 2.5 years by now......?
However like most we just use it for the things we can do in it and associate with FS/PMDG etc, I read a thread from Ian (nearly Wales), once about the new side of the programme you mention, however have not been anywere near it at present.
When I said I didn't understand what you had decribed, I meant just that, it all sounded gobble-de-gook to me, is there an easy to understand tutorial within FSUIPC that describes how to use it as you describe?
Many thanks
Daveanne
ian@737ng.co.uk
01-13-2009, 03:31 AM
hi dave....
have a look at pete's forum page here
http://forums.simflight.com/viewtopic.php?f=54&t=73176&sid=df6aac5426f690611080f35a1c9267c7
gives a basic rundown of what the program does and a few examples.
don't worry, you're not on your own......i've been looking at this trying to learn how it works, but it all takes time and it's my hobby not my job :o))
have a great week.... ian
Daveanne
01-18-2009, 06:14 PM
Ian, thanks for the link, but looking at it I still haven't got a clue......
Do I need to learn another language or something?
All seems like gobble-de-gook to me?
Daveanne
Peter Dowson
01-18-2009, 09:45 PM
When I said I didn't understand what you had decribed, I meant just that, it all sounded gobble-de-gook to me, is there an easy to understand tutorial within FSUIPC that describes how to use it as you describe?
No, there is no room inside FSUIPC for tutorials, and I cannot write tutorials to save my life. But I didn't design Lua in any case. It's a public-domain easy language which has been adopted by lots of applications, especially games, to allow them to be customised, or even simply for their parameter files.
If you can understand how to put together small logical sequences for programs such as SIOC (is it SIOC, or maybe Phidgets? I don't know) and, certainly, pmSystems, then it would be easy.
But even if not, the Lua folks publish idiot's guides, reference materials, etc. All in real paperback books if you want to buy them (as I did), but otherwise readable on-line.
The Announcements section on my Support forum includes an entry for Lua and that includes links to the places you can go for more information. The Lua stuff I provide includes only the list of FSUIPC functions I've added (for stuff like reading and writing offsets, buttons, keypresses, and displaying stuff), plus a number of examples you can run, tinker with, modify, and so on. That's about as far as I can go towards "tutorials", really.
But if it is all gobble-de-gook to you (why aren't aircraft manuals also gobble-de-gook, by the way? They are easily as complicated), please don't bother. What you never had you won't miss, I suppose. I was only trying to suggest a solution to your gobble-de-gooky (to some) axis problems.
Pete
Daveanne
01-19-2009, 04:42 PM
Peter, thanks for the pointer in the right direction.
Your comment about aircraft manuals, well I have a Private Pilots license and have also been instructing in Gliders for about 20 years now, so with over a thousand hours flying under my belt, I feel 'slightly' qualified to speak on the subject.
Many thanks for your help anyway.
Daveanne
Peter Dowson
01-19-2009, 09:41 PM
I feel 'slightly' qualified to speak on the subject.
Which is exactly why I wouldn't think you'd find it too taxing on the little grey cells to take a look at the simplified way you can use Lua to "program" things in FSUIPC to do odd little jobs, like smoothing your throttle values. Just writing it (and my answers, effectively) off as "gobble-de-gook" just seems wrong for an obviously intelligent man. I'd expect rather more, to be honest.
It really smacks of lack of interest, which i can understand, but that would indicate that you really weren't too serious in an answer to your problem in the first place. Could that be so?
I don't write off aircraft manuals or ever those boring JAR regulations as gobble-de-gook, even though I am less interested in them since I was not even allowed to get a medical certificate for flying because of my Retinitis Pigmentosa condition, and I would hope that after all the efforts I've been putting ino FSUIPC to make it easily possible to solve little problems like yours that they would also not be so casually and insultingly discarded.
Just say you aren't interested, or haven't the time, rather than use phrases like "gobble-de-gook", please.
Regards
Pete
Daveanne
01-20-2009, 02:01 PM
Peter,
Please do not miss-understand me at all, or my comments, you appear to have taken my comment "gobbledygook" as an insult, which it was most definately not, therefore please except my sincere apologies.
The fact that gobbledygook is described as "Pompous, unintelligible jargon" according to the Oxford English Dictionary, and means exactly what I referred to namely: to ME the SIOC ? or whatever programming process was just exactly that, not Pompous, but definately unintelligible jargon to me.
I have never come across it and or used it at all, so everything you referred to was just a complete mystery to me, maybe and incorrect use of the word I grant you, but no malice was intended.
I am very aware of all the very excellent and hard work you have put into the Flight Simming world and its operating systems, indeed every one is deeply indebted to your most excellent programming skills.
However, not everyone is as capable of grasping new concepts and or skills as you are, for myself when teaching people to fly, which by the way is not a technical matter, just a technique, then mostly I have to reduce my teachings to the lowest common denominator, i.e. start at the basics.
Therefore my comment about your original suggestion was a truthfull one "I didn't understand what you were talking about", having never seen or used any programming language at all in my life (well maybe I had a dabble with "Basic" on an old Vic20 years ago, wow! that brings memories back).
So to summarise, my understanding is that I need to learne SIOC to use the programme, is this correct?
If so, where would you suggest I start ? could you recommend suitable reading material?
Once again many thanks for your help
Daveanne
Peter Dowson
01-20-2009, 09:40 PM
So to summarise, my understanding is that I need to learne SIOC to use the programme, is this correct?
No. No. No. SIOC is someone else's thing related to specific hardware. I know precious little about it except that it is rather more obtuse, to me at least, than Lua.
All the references I gave you and that Ian also gave you were to the Lua announcement on my Forum, where there's a link to the Lua site.
If so, where would you suggest I start ? could you recommend suitable reading material?The Lua site, as already suggested a few messages back. You seem to have missed out on reading some. For example, I said this three or four messages back (?)
The Announcements section on my Support forum includes an entry for Lua and that includes links to the places you can go for more information. The Lua stuff I provide includes only the list of FSUIPC functions I've added (for stuff like reading and writing offsets, buttons, keypresses, and displaying stuff), plus a number of examples you can run, tinker with, modify, and so on. That's about as far as I can go towards "tutorials", really.
Before rushing off and looking directly at Lua stuff, though, I would have thought the easiest thing to do, not involving anything more complicated than copying some files from a ZIP and assigning some buttons or key presses to new controls in FSUIPC that these files would add, would be to try out the examples I provided, whilst perusing the few text lines contained in each file. This would quickly give you some small idea of what it was all about.
As with almost anything, until you've actually bothered to look, you are unlikely to see anything. Right? Why jump in the deep end when you can play first and see if it looks enticing enough? If not, nothing lost except a few minutes.
Regards
Pete
Daveanne
01-21-2009, 11:21 AM
Many thanks Peter, I will start my journey as you decribed.
Daveanne
MrRoper
02-06-2009, 10:31 AM
Daveanne,
I dont really want to get involved in this discussion, suffice to say that I am a developer by trade, so the SW side of things for me, is easy (its the HW side that gets me in a knot!)
So if you need anyhelp in what Peter was advising, please let me know..as it would be good practice for me, on my impending sim build! :)
Thanks
Chris
MrRoper
02-06-2009, 04:10 PM
I have just had a quick play for the first time with LUA
here is a smoothing script that will use a 5point average smoothing on throttle input, only outputs to a window at the moment but you could easily change it to write to the offset of your choice :)
thr1Array = {0,0,0,0,0}
thr2Array = {0,0,0,0,0}
thr1Smooth = 1
thr2Smooth = 1
loop = 1
-- Loop forever: to stop this you'll have to use the LuaKill control on it.
while 1 do
thr1 = ipc.readSW(0x088C)
thr2 = ipc.readSW(0x0924)
if loop<5 then
thr1Array[loop] = thr1
thr2Array[loop] = thr2
loop = loop + 1
thr1Smooth = thr1Array[1]
thr2Smooth = thr1Array[1]
else
thr1Smooth = (thr1Array[1] + thr1Array[2] + thr1Array[3] +thr1Array[4] +thr1Array[5]) / 5
thr2Smooth = (thr2Array[1] + thr2Array[2] + thr2Array[3] +thr2Array[4] +thr2Array[5]) / 5
--shift the array
thr1Array[1] = thr1Array[2]
thr1Array[2] = thr1Array[3]
thr1Array[3] = thr1Array[4]
thr1Array[4] = thr1Array[5]
thr1Array[5] = thr1
thr2Array[1] = thr2Array[2]
thr2Array[2] = thr2Array[3]
thr2Array[3] = thr2Array[4]
thr2Array[4] = thr2Array[5]
thr2Array[5] = thr2
end
ipc.display("thr1="..thr1.."\nthr1Smooth="..thr1Smooth.."\nthr2="..thr2.."\nthr2Smooth="..thr2Smooth)
ipc.sleep(50)
end
if you change the sleep to a larger number the output wont be as "quick" which might help a little, also you might want to put in a buffer so that it doesnt bounce arround the same values, i.e. store the last update, and if its not much bigger, dont bother with the sevo move
Trevor Hale
02-06-2009, 04:43 PM
My Gosh, you picked up on that fast... Great stuff.. :)
I may need to dig into this a bit and see how it works out.
Thanks for this...
Daveanne
02-06-2009, 05:01 PM
I have just had a quick play for the first time with LUA
here is a smoothing script that will use a 5point average smoothing on throttle input, only outputs to a window at the moment but you could easily change it to write to the offset of your choice :)
thr1Array = {0,0,0,0,0}
thr2Array = {0,0,0,0,0}
thr1Smooth = 1
thr2Smooth = 1
loop = 1
-- Loop forever: to stop this you'll have to use the LuaKill control on it.
while 1 do
thr1 = ipc.readSW(0x088C)
thr2 = ipc.readSW(0x0924)
if loop<5 then
thr1Array[loop] = thr1
thr2Array[loop] = thr2
loop = loop + 1
thr1Smooth = thr1Array[1]
thr2Smooth = thr1Array[1]
else
thr1Smooth = (thr1Array[1] + thr1Array[2] + thr1Array[3] +thr1Array[4] +thr1Array[5]) / 5
thr2Smooth = (thr2Array[1] + thr2Array[2] + thr2Array[3] +thr2Array[4] +thr2Array[5]) / 5
--shift the array
thr1Array[1] = thr1Array[2]
thr1Array[2] = thr1Array[3]
thr1Array[3] = thr1Array[4]
thr1Array[4] = thr1Array[5]
thr1Array[5] = thr1
thr2Array[1] = thr2Array[2]
thr2Array[2] = thr2Array[3]
thr2Array[3] = thr2Array[4]
thr2Array[4] = thr2Array[5]
thr2Array[5] = thr2
end
ipc.display("thr1="..thr1.."\nthr1Smooth="..thr1Smooth.."\nthr2="..thr2.."\nthr2Smooth="..thr2Smooth)
ipc.sleep(50)
end
if you change the sleep to a larger number the output wont be as "quick" which might help a little, also you might want to put in a buffer so that it doesnt bounce arround the same values, i.e. store the last update, and if its not much bigger, dont bother with the sevo move
Many thanks for this above, but as yet I am still rather "thick" when it comes to programming as above, try as I may to understand the LUA system, I can't seam to get to grips with it.
I started the thread off about how to take the "erratic jerking" that the PMDG 737NG 800 sends out when I integrate it with a set of Phidgets servo's, which I have now fitted into my TQ, using the FS2Phigets software.
This works very well, but if I could only get the jerky movements out of it, then it would be fine?
So how do I integrate the above programme into my system?
Any help would be very much appreciated, please bear in mind I am pretty dumb when it comes to this side of the simpit building.
Daveanne
MrRoper
02-06-2009, 05:36 PM
ok. its difficult for me to test this as I dont have a motorised TQ,
but essentially what the code is doing is taking the last 5 throttle positions and averaging them out,
now after a bit pf playing with the pmdg 737 in autothrottle mode, the values jump about loads, but this does moake the jumps less "jumpy"
so just to see if it is working, create a file called throttlesmooth.LUA in your modules folder
and dump the code I wrote into it, then go into fsuipc and select a button or keypress, tick "select for FS control" and scroll down until you see "LUASet throttleSmooth"
now, when you press this button/key a window should appear showing the raw throttle value, and its "smoothed" value.
LEts see if that works for now :)
MrRoper
02-06-2009, 05:40 PM
sorry
Dont use LUA set, just "LUA ThrottleSmooth"
Daveanne
02-07-2009, 12:39 PM
Sorry for being so thick, but....
I have created the file "throttlesmooth.lua" in the Modules folder and have highlighted the script you sent on the web site, then copied and tried to paste it into the file.
However nothing is "paste-able"?
How do I "dump" the contents of your script in the file I have created?
Daveanne
MrRoper
02-07-2009, 12:48 PM
hello mate,
create a txt file (open up notepad) paste my code into it, select file >> save as
change saveas type to all files, then in the name type throttlesmooth.lua then click save
that should save a txt file called throttlesmooth.lua with the code in it :)
Daveanne
02-07-2009, 02:44 PM
Arr.... the mud becomes clearer.
Will do that and let you know what happens.
Daveanne
Daveanne
02-07-2009, 04:30 PM
Mr R, have tried out the programme you sent me and its realy difficult to see if the smoothing works successfully or not, because the results numbers are changing all the time its difficult to observe if they are "dampening" down the movement.
If possible could you download the FS2Phidgets programme from the "download" section of this site and also install the Phidgets software from their site.
Once installed the FS2Phidgets interface has an emulation section which immitates and graphically shows a servo, assign it to the throttle and then you will be able to see if the smoothing has a marked effect or not?
If you don't feel like doing that, then please let me know how I interface the "smoothing" results into the FS2Phidgets interface and I will trial the emulated servo myself?
Hope you can help?
Daveanne
MrRoper
02-07-2009, 04:52 PM
Hi,
I will have a play with the software and see if i can get something working, it is likely that, because the throttle output is moving constantly, we will need to add some dampening code, that will not move the servo until a large enough change occurs,
dont worry we will sort it, I dont let software beat me :)
MrRoper
02-07-2009, 05:42 PM
well thats a fun little app, didnt realise there was a servo emulator :)
ok so here is the new code
-- "Display Vals" example LUA plug-in, by Pete Dowson, September 2008
thr1Array = {0,0,0,0,0}
thr2Array = {0,0,0,0,0}
thr1Smooth = 1
thr2Smooth = 1
thr1LastPos = 1
thr2LastPos = 1
loop = 1
-- Loop forever: to stop this you'll have to use the LuaKill control on it.
while 1 do
thr1 = ipc.readSW(0x088C)
thr2 = ipc.readSW(0x0924)
if loop<5 then
thr1Array[loop] = thr1
thr2Array[loop] = thr2
loop = loop + 1
thr1Smooth = thr1Array[1]
thr2Smooth = thr1Array[1]
else
thr1Smooth = (thr1Array[1] + thr1Array[2] + thr1Array[3] +thr1Array[4] +thr1Array[5]) / 5
thr2Smooth = (thr2Array[1] + thr2Array[2] + thr2Array[3] +thr2Array[4] +thr2Array[5]) / 5
--shift the array
thr1Array[1] = thr1Array[2]
thr1Array[2] = thr1Array[3]
thr1Array[3] = thr1Array[4]
thr1Array[4] = thr1Array[5]
thr1Array[5] = thr1
thr2Array[1] = thr2Array[2]
thr2Array[2] = thr2Array[3]
thr2Array[3] = thr2Array[4]
thr2Array[4] = thr2Array[5]
thr2Array[5] = thr2
end
--write to the offset
if thr1Smooth > thr1LastPos + 600 or thr1Smooth < thr1LastPos - 600 then
ipc.writeSW(0x66C0, thr1Smooth)
thr1LastPos = thr1Smooth
end
if thr2Smooth > thr2LastPos + 600 or thr2Smooth < thr2LastPos - 600 then
ipc.writeSW(0x66C2, thr2Smooth)
thr2LastPos = thr2Smooth
end
ipc.display("thr1="..thr1.."\nthr1Smooth="..thr1Smooth.."\nthr2="..thr2.."\nthr2Smooth="..thr2Smooth.."\nthr1LastPos
="..thr1LastPos)
ipc.sleep(300)
end
this is the clever bit
if thr1Smooth > thr1LastPos + 600 or thr1Smooth < thr1LastPos - 600 then
ipc.writeSW(0x66C0, thr1Smooth)
thr1LastPos = thr1Smooth
end
if thr2Smooth > thr2LastPos + 600 or thr2Smooth < thr2LastPos - 600 then
ipc.writeSW(0x66C2, thr2Smooth)
thr2LastPos = thr2Smooth
end
what we are saying here... If the throttle hasnt moved by at least 600 units then dont update, we then write the value to two FSUIPC offsets
66c0 and 66c2
you will need to create a variable in fs2phidgets that points to these offsets and then map the servo to this variable to see the change :)
if this works you can then just tweak the range we ignore to increase the 'null' zone
hope this makes sense!
Daveanne
02-07-2009, 08:08 PM
OK, have done all that as directed, have assigned the emulated servo to 66C0 and gave it a name of ENGINE_T1_LEVER.
However when mapping the servo in FS2P the servo now doesn't move at all, even the FS numbers in the table do not increase/decrease.
?
Daveanne
Daveanne
02-07-2009, 08:09 PM
P.S. Also the display has gone away and is no loger visible.
Daveanne
MrRoper
02-07-2009, 08:13 PM
i think its a formatting error when you have pasted it into notepad, the display should still appear
the line that reads ipc.display should all be one line and include the ="..thr1LastPos) part.. will paste it in without the code tags
-- "Display Vals" example LUA plug-in, by Pete Dowson, September 2008
thr1Array = {0,0,0,0,0}
thr2Array = {0,0,0,0,0}
thr1Smooth = 1
thr2Smooth = 1
thr1LastPos = 1
thr2LastPos = 1
loop = 1
-- Loop forever: to stop this you'll have to use the LuaKill control on it.
while 1 do
thr1 = ipc.readSW(0x088C)
thr2 = ipc.readSW(0x0924)
if loop<5 then
thr1Array[loop] = thr1
thr2Array[loop] = thr2
loop = loop + 1
thr1Smooth = thr1Array[1]
thr2Smooth = thr1Array[1]
else
thr1Smooth = (thr1Array[1] + thr1Array[2] + thr1Array[3] +thr1Array[4] +thr1Array[5]) / 5
thr2Smooth = (thr2Array[1] + thr2Array[2] + thr2Array[3] +thr2Array[4] +thr2Array[5]) / 5
--shift the array
thr1Array[1] = thr1Array[2]
thr1Array[2] = thr1Array[3]
thr1Array[3] = thr1Array[4]
thr1Array[4] = thr1Array[5]
thr1Array[5] = thr1
thr2Array[1] = thr2Array[2]
thr2Array[2] = thr2Array[3]
thr2Array[3] = thr2Array[4]
thr2Array[4] = thr2Array[5]
thr2Array[5] = thr2
end
--write to the offset
if thr1Smooth > thr1LastPos + 600 or thr1Smooth < thr1LastPos - 600 then
ipc.writeSW(0x66C0, thr1Smooth)
thr1LastPos = thr1Smooth
end
if thr2Smooth > thr2LastPos + 600 or thr2Smooth < thr2LastPos - 600 then
ipc.writeSW(0x66C2, thr2Smooth)
thr2LastPos = thr2Smooth
end
ipc.display("thr1="..thr1.."\nthr1Smooth="..thr1Smooth.."\nthr2="..thr2.."\nthr2Smooth="..thr2Smooth.."\nthr1LastPos="..thr1LastPos)
ipc.sleep(300)
end
Peter Dowson
02-07-2009, 09:55 PM
i think its a formatting error when you have pasted it into notepad, the display should still appear
Why not just make the file and attach it? I've done it ... see attached.
Regards
Pete
Daveanne
02-07-2009, 10:00 PM
Well done sir, running very nicely indeed, graphic shows what the "smoother" is doing and the emulated servo shows the, "lack of" jerky movement too..!!
Just need to try it on the real ones now, mind you I don't think I will have any problems with it.
I have tried a few tweeks with the time intervals and I am sure that I can get it down to a fine level that will give smooth lever movements and a realistic setting for the engine N1's ect.
I have set the programme (LUA throttlesmoothing) to start with a key stroke, how do I start that automatically each time I start FS?
Presumeably if I do not want the graphic to pop up I delete that last part of the script?
Once again, many thanks for very excellent help, its nice to know that there someone that is willing to help someone like me, who can build a sim pit, very handy with woodwork, modelling etc, but rather (not now) dumb with programming.
Yet again, many thanks for your very welcome help.
Daveanne
P.S. hope you don't mind if I call on you again if I get more problems with this?
Peter Dowson
02-07-2009, 10:30 PM
I have set the programme (LUA throttlesmoothing) to start with a key stroke, how do I start that automatically each time I start FS?
Rename it to "IPCready.lua", as described in the FSUIPC Lua plug-in documentation. You can add anything in that file you want to run all the time. It starts when FS is ready to fly. There's an "IPCinit" facility too, starting earlier, but that doesn't suit anything involving aircraft control as it starts before the aircraft is loaded!
Pete
Daveanne
02-08-2009, 11:28 AM
Peter, thanks for that, I had read in your interim manual about having the programme starting automatically when FS is ready to fly, but didn't quite understand that was achieved just by re-naming the file, so thanks for clearing that up.
Now I can see a programme working and where to place it, the whole subject is much clearer to see and indeed its prctical uses also.
The original "fog" in my mind was how to put a programme together, but firstly once I had put one together where to put it within the programme (FS).
Well just need to install all this into my pit now and report back as to how its gone.
Many thanks for both of your help's
Daveanne
Daveanne
02-09-2009, 05:52 PM
Many thanks to both of you for your help in getting my servo driven Autothrottle to work as I wanted it to.
I adjusted the movement restiction to 400, which gave me the necessary leaway to steady the movements down and not to much lag to follow the real throttle movements.
I have added a couple of photo's to show the servo's and how I attached them, the phot's show the centre section of the TQ, prior to installing it back in the casing.
If anyone wants more information on how it works and the settings then please don't hesitate.
Daveanne
Trevor Hale
02-09-2009, 05:57 PM
I personally would like to thank you all for working to fix this together. this is one thread that will be visited many times I presume.
Thanks to all parties involved.
Best regards,
Trev
firstinflight
02-12-2009, 10:26 PM
Many thanks to both of you for your help in getting my servo driven Autothrottle to work as I wanted it to.
I adjusted the movement restiction to 400, which gave me the necessary leaway to steady the movements down and not to much lag to follow the real throttle movements.
I have added a couple of photo's to show the servo's and how I attached them, the phot's show the centre section of the TQ, prior to installing it back in the casing.
If anyone wants more information on how it works and the settings then please don't hesitate.
Daveanne
Can you post a few more pictures that show the other side of the same sub-unit? What is that bigger black piece of hardware on it? Is that a bigger servo?
CPJ
Daveanne
03-19-2009, 08:10 PM
Yes they are the servo's, the ones supplied by Phidgets in their kits arn't powerfull enough to move the throttle handles, so I bought some bigger ones form a local hobby shop.
daveanne
Hi Daveanne,
Could you post the jpeg screen shots of the FS2Phidgets configurations for the relay setup. Thanks.
Kalz
mauriceb
03-20-2009, 07:43 AM
Yes they are the servo's, the ones supplied by Phidgets in their kits arn't powerfull enough to move the throttle handles, so I bought some bigger ones form a local hobby shop.
daveanne
Actually, these are still available at Trossen Robotics (they used to be known as PhidgetsUSA.com)
http://www.trossenrobotics.com/store/p/3294-Hitec-HS-815BB-sail-arm-servo.aspx
Maurice
Perik
03-20-2009, 07:48 AM
Hi Daveanne
Great thread and I'm impressed what you have achieved.
Over at the B767 yahoo (Level-D) group we are discussing throttle and how to run the Automatic part of it - using Servos or DC-motor.
I have just two simple question for you:
1. What size of servo did you end up with (e.g. 10Kg/cm or more)?
2. Is the servo easy to turn while unpowered?
Daveanne
03-20-2009, 12:47 PM
I bought mine form this place:
http://www.modelshopleeds.co.uk/catalog/product_info.php?products_id=865&osCsid=9d6d6fcee600f77ddf4938ea0d75aa86
Daveanne
Daveanne
03-20-2009, 03:03 PM
Hi Daveanne,
Could you post the jpeg screen shots of the FS2Phidgets configurations for the relay setup. Thanks.
Kalz
Here are the two screen shots of my setup, don't worry that one of the variables mentiones PM, (I don't use PM), I used it to connect with the MCP for switching the A/T and A/P on and off.
Someone else in this thread mentioned that a real A/T & A/P doesn't work like that, yes I know that, but its the way I have mine setup at present.
Daveanne
Daveanne
03-20-2009, 03:10 PM
Actually, these are still available at Trossen Robotics (they used to be known as PhidgetsUSA.com)
http://www.trossenrobotics.com/store/p/3294-Hitec-HS-815BB-sail-arm-servo.aspx
Maurice
Thanks for that, on the Phidgets web site they offer the full kit, which is much cheaper than purchasing it from the Dutch shop, but the kit only come with 4 small servo's that arn't strong enough to do the job, however I used one of them to drive my Spoiler lever! however the ones above offered at $44.99 ='s £29.99, which is the exact price of the English outlets one, and no import tax to pay.
But thanks for the link anyway
Daveanne
Goldmember
03-21-2009, 06:30 PM
What I wanted to do was use the A/T (Autothrottle) switch on the MCP through the Phidgets 0/0/4 to connect/dis-connect the servo's when the A/T is on/off
Could you point me in the direction what switch you would use for that? So a switch that flips back when you set a control signal on it?
Daveanne
04-08-2009, 12:34 PM
Sorry haven't replied to your question, have been on holiday.
the switch I refer to is a physical switch on the MCP (CPC type).
Daveanne
Goldmember
04-08-2009, 02:30 PM
Ok no problem. I thought you had such a switch but reading your post over, I realise you meant something else.
Goldmember
06-17-2009, 05:37 PM
Because PMDG uses their own offsets for many things. The autobrake for instance doesn't work if you use $2F80. Also there are functions in PMDG which aren't available in FS9 anyway. AFDS, sixpack, things like that.
Goldmember
06-17-2009, 05:42 PM
And what would that do?
Perhaps you've not looked at FSInterrogate?
Regards
Pete
Is there a function in FSInterrogate that monitors a range of addresses? For instance, if you take $6200 - $62FF (PMDG range or PM?) and just fiddle with some controls, that you would see what happens in that address range.
barkay
06-20-2009, 01:27 AM
Hi guys,
I don't know if this has been posted before but here is the EFIS offsets for PMDG
Offset 6207
value 0 EFIS APP mode
value 1 EFIS VOR mode
value 2 EFIS MAP mode
value 3 EFIS PLN mode
To change these with SIOC you need to use CHANGEBIT command
offset 6208
Value 0 EFIS RANGE 5
Value 256 EFIS RANGE 10
Value 512 EFIS RANGE 20
Value 768 EFIS RANGE 40
Value 1024 EFIS RANGE 80
Value 1280 EFIS RANGE 160
Value 1536 EFIS RANGE 320
Value 1792 EFIS RANGE 640
offset 620b
AGAIN YOU HAVE TO USE CHANGEBIT
Bit 0 =1 EFIS TERR
Bit 1 =1 EFIS POS
Bit 2 =1 EFIS DATA
Bit 3 =1 EFIS ARPT
Bit 4 =1 EFIS WPT
Bit 5 =1 EFIS STA
Bit 6 =1 EFIS WXR
offset 6202
Bit11=1 EFIS MTRS button
Bit10=1 EFIS FPV button
offset 6201
Bit0 =1 BARO HP
Value=0 BARO inch
I hope it helps
Regards,
barkay
Jake 747 400
09-27-2009, 06:20 PM
Can you get any of this for the PMDG 747?
Jake
barkay
09-28-2009, 04:53 AM
Technically yes. Since I really never used the airplane I can not work on it. But what you need to do is to download the FSUIPC SDK. Use the FSInterrogate program and try to extrcat these from there. It is a hard work but once you figure out you end up with golden opportunities for the home cockpit programming.
Regards,
barkay
markusr
10-14-2009, 01:19 AM
Hi,
iam trying to find out the offsets for the PMDG 737 Overhead light status.
I managed the Engine Antiice, Generator, etc. with the documented FSUIPC Offsets.
But i haven't succeeded from the Fuel switch lights, APU lights, etc.
How can i find them to enable and disable leds via SIOC and the correct offsets.
I hope someone can help me or give some hints on this.
Thanks alot.
Mark
mdeponeo
10-14-2009, 07:26 PM
Hi,
iam trying to find out the offsets for the PMDG 737 Overhead light status.
I managed the Engine Antiice, Generator, etc. with the documented FSUIPC Offsets.
But i haven't succeeded from the Fuel switch lights, APU lights, etc.
How can i find them to enable and disable leds via SIOC and the correct offsets.
I hope someone can help me or give some hints on this.
Thanks alot.
Mark
Hi mark,
Dont wast your time looking for offsets for the PMDG Overhead.
there are none!
Ian at www.737ng.co.uk and a few other people have already trod this avenue.
I've been working on a solution to this problem and you can get the latest news on Ian Sissons news page at the above.
It is possible to get everything working on the PMDG Overhead
Including Power display EGT/APU gauge , fuel temp gauge , cabin air presure
+ the big diff presure gauge and of course all the anunciator lights
I'm taking a demo to FS weekend this November
have a look and let me know what you think
here is a little movie on youtube I made a while ago things have moved on
since this and I've got a lot more working.
http://www.youtube.com/watch?v=AhfICtgdErE
Regards
Mark Deponeo
steveeverson
10-15-2009, 03:50 AM
Hi Mark- count me in for one of your boards when you start making them
Steve:D
Jake 747 400
10-26-2009, 01:21 PM
Do PMDG have a reason for not publishing their offsets or is it something else?
Also I keep trying the FS intterogate on pmdg and I have also tried it on the default a/c but nothing comes up, could someone give me a heads up on where to start.
Thanks,
Jake.
dvincent
10-26-2009, 07:34 PM
Difficult to trace with FsInterrogate because lots of settings are bitwise.
mdeponeo
10-26-2009, 07:56 PM
Do PMDG have a reason for not publishing their offsets or is it something else?
Also I keep trying the FS intterogate on pmdg and I have also tried it on the default a/c but nothing comes up, could someone give me a heads up on where to start.
Thanks,
Jake.
I dont think you will get very far . As far as I can gather there are no offsets on the PMDG overhead. they used FS offset info only. so if you want the overhead gauges and anunciators to work its a bit tricky.
Ive been working on a logic controler that looks at 5 FS offsets and produces its own offsets to drive the overhead. http://www.youtube.com/watch?v=AhfICtgdErE&feature=player_embedded
shows my overhead in action. is this what you are looking to do?
mark
Matt Olieman
10-26-2009, 08:10 PM
Found this interesting and reasonable explanation for PMDG not providing offsets for their planes. This was posted on a other thread:
Found this also,
"It is not due to lack of interest that we won't open up our offsets values to hardware builders. The reason is simple: It took us a very long time to develop our systems at a professional grade. For example: The autopilot flight director system is very generic and can be used everywhere, so we consider it a trade secret and will only work with specific hardware vendors to develop drivers for their hardware.
Please don't consider this business decision as contrary to "a single attempt to help us cockpitbuilders" - if Phidgets would be done in a way that could protect our proprietary data, we'd be supporting that too."
That was a reply to angry customers who were posting about thier anger at PMDG for not having an open interface.
Jake.
__________________
Boeing 744ever jakes747sim.webs.com
Thank you Jake :)
Matt Olieman
mdeponeo
10-26-2009, 08:18 PM
Had even more success this evening, managed to find out the offset for the AP too:
The offset for the AP (CMD A) is 6226 (0= off 512 = on)
By the way the A/T offset of 621C (0 = off 1 = on)
I have now been able to try it out on my pit, was just trying it out on a Desktop PC before, the pit has a CPFlight MCP (old model, not USB), coupled in along with EFIS, Radios too.
I was a bit worried that even though it all worked on the desktop, as soon as I coupled it up to the MCP it would all go wrong, however I am pleased to say that it works a treat......Yipee!! well done FS2Phidgets and Phidgets of course, at last, something that does what it says on the tin..!!
So now I have phidgets servo's operating both throttles (737NG) and one smaller one operating the "spoiler" as we land, automatically...!! deep joy
Plus I have also configured the Phidgets 0/0/4 relay interface to switch over when the A/T and A/P (COMD A) are selected, thus I can set the throttles for take off maunally, I have made a small loop in the connections so that both the A/T and the A/P need to be on before the Servo's work, therefore only when I have the A/T and the A/P selected, together do the throttles move on their own......Rock-on Tommy..!!!
As you can tell I am very pleased with myself....Yahooooooo!!
I have taken jpeg screen shots of the FS2Phidgets screenshots and congfigurations if anyone is interested, but not quiet sure how to get them on this web site...???
Anyway, must go and complete another circuit of EGCC just to make sure it all works properly, by the way the mock up I have built to test the system hasn't been installed in my present TQ yet, maybe I will have to completely rebuild it from scratch, I hope not, that will take some serious time........again.
Steeverson...? hows your new throttle doing?
Daveanne
Dave! stop playing with Offsets and get that box painted for the show:lol:
looking forward to seeing your handy work
see you tomorw night dont forget the booze
Mark
Peter Dowson
10-26-2009, 08:29 PM
Do PMDG have a reason for not publishing their offsets or is it something else?
Early on, they had planned to make an SDK and sell that, but then changed their minds. Well, partially -- they did do deals with some hardware manufacturers, so that those other companies could make their equipment (eg MCP) work with the PMDG aircraft, but I think the pricing was fairly prohibitive and not everyone took it up. It certainly wasn't a route the normal hobbyist could take.
When I talked to one of the main men in PMDG (now not with them), and tried to persuade them to make it open, their arguments against doing so appeared to be that they didn't want others to make money off their hard work ... I couldn't convince them otherwise, and I did try, several times.
Regards
Pete
Jake 747 400
10-27-2009, 01:06 PM
I dont think you will get very far . As far as I can gather there are no offsets on the PMDG overhead. they used FS offset info only. so if you want the overhead gauges and anunciators to work its a bit tricky.
Ive been working on a logic controler that looks at 5 FS offsets and produces its own offsets to drive the overhead. http://www.youtube.com/watch?v=AhfICtgdErE&feature=player_embedded
shows my overhead in action. is this what you are looking to do?
mark
Well for the moment just a few basic functions such as the auto throttle arm, F/D on/off a few basic MCP functions, these are for the PMDG 744 fs9 version.
I dont have an overhead "yet" haha.
Btw your video was fantastic, the sim really looks great.
Thanks,
Jake.