Jump to content
The simFlight Network Forums

[fsx]FSUIPC + PMDG747-400X EFIS-Controls Macro problem


Recommended Posts

I tried a lot times to do the macro to EFIS-Control. I connected it to buttons(joystick) and he doesn't want to act.

My macro:

[Macros]
Module="PMDG_747400_Main.DLL"
1=VOR-L-ON=RX7590*X8bcc
2=VOR-L-OFF=RX7590*X8bcc,31
3=ADF-L-ON=RX7590*X8bcc,31
4=ADF-L-OFF=RX7590*X8bcc
5=RADIO=RX72c0*X8bcc
6=BARO=RX72c0*X8bcc
7=FPV=RX7340*X8bcc
8=MTRS=RX7380*X8bcc
9=BARO-IN=RX7510*X8bcc
10=BARO-HPA=RX7510*X8bcc
11=ADF-R-ON=RX77a0*X8bcc,31
12=ADF-R-OFF=RX77a0*X8bcc
13=VAR-R-ON=RX77a0*X8bcc
14=VOR-R-OFF=RX77a0*X8bcc,31
15=CTR-r=RX7640*X8bcc,31
16=CTR-l=RX7640*X8bcc
17=MINS-RST=RX7300*X8bcc
18=BARO-STD=RX7550*X8bcc
19=WXR=RX7850*X8bcc
20=STA=RX7890*X8bcc
21=WPT=RX78d0*X8bcc
22=ARPT=RX7910*X8bcc
23=DATA=RX7950*X8bcc
24=POS=RX7990*X8bcc
25=TFC=RX7760*X8bcc

Link to comment
Share on other sites

I tried a lot times to do the macro to EFIS-Control. I connected it to buttons(joystick) and he doesn't want to act.

My macro:

You are not telling me much, are you? What is this file extract you showed part of? Where is it saved? Where are the assignments? What exactly does "he doesn't want to act" mean? I really cannot diagnose problems with no information, sorry.

Best explain a bit more, please, and also show me the [JoyNames], [buttons] and [MacroFiles] sections of your FSUIPC4.INI file, which all play their part too.

And what VERSION number of FSUIPC are you using? If not the latest, try that first (4.525 is available in the Updates announcement).

Regards

Pete

Link to comment
Share on other sites

FSUIPC version 4.525

FSUIPC4.ini

[JoyNames]
AutoAssignLetters=No
1=Saitek Aviator Stick
0=MJ16

[MacroFiles]
1=747 OHD
2=APchart
3=747-myMacro
4=747-forPete-EFIS

[ClientNames]
1=PROGRAMATOR

[Buttons]
ButtonRepeat=20,10
1=P0,3,CM2:8,0
2=P0,11,CM6:13,0
3=U0,11,CM6:14,0
4=P0,1,CM2:6,0
5=P0,0,CM2:5,0
6=P0,2,CM2:7,0
7=P0,6,CM2:4,0
8=P0,8,CM2:9,0
9=U0,8,CM2:10,0
10=P0,13,CM11:3,0
12=R0,14,CM11:1,0
13=U0,14,CM11:4,0
14=U0,13,CM11:4,0
15=P0,12,CM11:12,0
16=P0,9,CM11:15,0

I created new macro special for this forum

747-forPete-EFIS.MCRO (all include)

[Macros]
Module="PMDG_747400_Main.DLL"
1=ADF-L-ON=RX7590*X8bcc,31
2=ADF-L-OFF=RX7590*X8bcc
3=VOR-L-ON=RX7590*X8bcc
4=VOR-L-OFF=RX7590*X8bcc,31
5=TFC-DOWN=RX76f0*X8bcc
6=TFC-UP=RX76f0*X8bcc,31
7=TFC-SET=RX7760*X8bcc
8=CTR-LEFT=RX7640*X8bcc
9=CTR-RIGHT=RX7640*X8bcc,31
10=CTR-SET=RX76b0*X8bcc
11=FPV=RX7340*X8bcc
12=MTRS=RX7380*X8bcc
13=BARO-HPA=RX7510*X8bcc
14=BARO-IN=RX7510*X8bcc
15=WXR=RX7850*X8bcc
16=STD=RX7550*X8bcc

All macro files saved in Modules in fsx path.

Sorry for my English.

post-35203-128689690445_thumb.jpg

post-35203-128689690452_thumb.jpg

Link to comment
Share on other sites

1=747 OHD

2=APchart

3=747-myMacro

4=747-forPete-EFIS

Okay. You have 4 macro files listed. Reference numbers are 1, 2, 3 and 4.

Now look at the Button assignments:

[buttons]

ButtonRepeat=20,10

1=P0,3,CM2:8,0

2=P0,11,CM6:13,0

3=U0,11,CM6:14,0

4=P0,1,CM2:6,0

5=P0,0,CM2:5,0

6=P0,2,CM2:7,0

7=P0,6,CM2:4,0

8=P0,8,CM2:9,0

9=U0,8,CM2:10,0

10=P0,13,CM11:3,0

12=R0,14,CM11:1,0

13=U0,14,CM11:4,0

14=U0,13,CM11:4,0

15=P0,12,CM11:12,0

16=P0,9,CM11:15,0

You have assignments to Macro files referenced as 2, 6 and 11. There aren't any macro files 6 or 11 anyway, so where did those assignments come from? Have you been editing the file, or copying stuff over from a different installation?

You certainly have no assignments to number 4, "747-forPete-EFIS", so how do you know they don't work? you do know you have to actually assign buttons to the macro functions you want them to operate, don't you?

If you remember, i did ask you to explain what you meant by "he doesn't want to act", but you never replied. But if you mean that buttons you haven't assigned to EFIS functions don't work, then looking at the file it isn't surprising, is it?

I created new macro special for this forum

Why? What is the point? You should surely try to communicate your problems, or misunderstandings. not create something artificial for display?

Regards

Pete

Link to comment
Share on other sites

I cleaned all macros leave only standards and specialy...

now fsuipc look like this

[MacroFiles]
1=747 OHD
2=747-forPete-EFIS
3=APchart

[Buttons]
ButtonRepeat=20,10
1=P0,13,CM2:3,0
2=U0,13,CM2:4,0
3=P0,14,CM2:1,0
4=U0,14,CM2:2,0

Buttons look good for me but not working

I programed only 2 buttons with action press and releaseVOR L ON, VOR L OFF and ADF-L-ON, ADF-L-OFF

Link to comment
Share on other sites

I cleaned all macros leave only standards and specialy...

How did it get into the mess you showed before?

1=P0,13,CM2:3,0

2=U0,13,CM2:4,0

3=P0,14,CM2:1,0

4=U0,14,CM2:2,0

Are these buttons or switches? If buttons, you don't want them doing actions when released as well as pressed, unless you intend holding them down.

Buttons look good for me but not working

When you made those macros, did you follow the correct procedure and test them each time, using the TAB facility?

I programed only 2 buttons with action press and releaseVOR L ON, VOR L OFF and ADF-L-ON, ADF-L-OFF

Note that those pairs are the same as each other, but reversed:

1=ADF-L-ON=RX7590*X8bcc,31 ====> same as 4=VOR-L-OFF=RX7590*X8bcc,31

2=ADF-L-OFF=RX7590*X8bcc ====> same as 3=VOR-L-ON=RX7590*X8bcc

I think you are missing the central switch position in any case.

I'm afraid I cannot work out these macros for you. I do know that all of the 737 overhead buttons and switches are mouse programmable, and I think , from other reports from users, that most if not all of the others are too. Maybe you should re-check the way you created the macros. Multiple position switches will probably need more attention -- there are notes about editing the mouse action value if needed, in the documentation. And if the TAB test doesn't work, when you make the macro, then it is highly unlikely the macro will work.

Anyway, I have the 747X installed on another Pc. I'm powering it up now to check.

Regards

Pete

Link to comment
Share on other sites

Anyway, I have the 747X installed on another Pc. I'm powering it up now to check.

Okay. Two points:

1. For those functions, ADF/VOR switches, the TAB test doesn't work. I suspect the whole EFIS unit, maybe the whole main panel, is programmed differently. FSUIPC mouse macros can only work when the gauge is written using the standard FS gauge toolkit methods. This doesn't apply to more and more gauges now, especially those written in XML. This is why you always need to test first.

2. Not that it is relevant now, but i notice that there are NOT separate mouse operations for ADF ON/OFf, VOR ON/OFF. It is one three position switch, with the left mouse button pressing it up and the right pressing it down, so even if it had worked, the best you could achieve would be "VOR/ADF1 DN" and "VOR/ADF1 UP". Ie. two button assignments, not 4.

Anyway, there might be an answer. It looks like the EFIS uses "Lvars" for its settings, so you might be able to implement everything using Lvar macros instead. If you have the Lua examples installed, try assigning a keypress to "Lua Log Lvrs". It will initially log and display ALL of the Lvars currently known. Then operate the EFIS switches and you'll see the relevant Lvars change. I just did that for the Left and Right VOR/ADF switches and got this:

1635532 LUA: L:EFIS_L_NAVL_Switch_var=20

1639625 LUA: L:EFIS_L_NAVL_Switch_var=0

1641641 LUA: L:EFIS_L_NAVL_Switch_var=10

1645750 LUA: L:EFIS_L_NAVR_Switch_var=20

1648094 LUA: L:EFIS_L_NAVR_Switch_var=0

1650172 LUA: L:EFIS_L_NAVR_Switch_var=10

The switch values 20, 0 and 10 appear to relate to ADF, OFF and VOR, respectively.

Regards

Pete

Link to comment
Share on other sites

In fact I used 2 button as toggle switch (on-off-on). In pos on1 (on uper set signal press btn13 when toogle back to middle signal release)...

I dont understand how write in lua (mean lua-plugin).

If possible give little example for one button (one section of toggle). TNX

Sebastian.

Sorry for my poor English & I hope undestanding what I mean.

Link to comment
Share on other sites

I dont understand how write in lua (mean lua-plugin).

Why do you want to write a Lua plug in? Are you misreading what I suggested? There's certainly no need at all for you to learn Lua at all! I have already written the Lua plug in which monitors Lvars. I gave you its name! I simply suggested you run it (i.e. assign it to a keypress so you can start it). This is only so you can ascertain the names and values of the Lvars you need to address.

Then instead of Mouse Macros you construct Lvar macros, editing them in a Macro file of your own making.

For information on all this, please refer to the Advanced User's document. It has a complete chapter on "Macros", and within that a section entitled:

Gauge local variable access (L:vars), by macro

Regards

Pete

Link to comment
Share on other sites

I tryed many version but no effect

[Macros]
Module="PMDG_747400_Main.DLL"
1=L:EFIS_L_NAVR_Switch_var=10=toggle
2=L:EFIS_L_NAVR_Switch_var=0=toggle
3=L:EFIS_L_NAVR_Switch_var=20=toggle

and like this

[Macros]
Module="PMDG_747400_Main.DLL"
1=L:EFIS_L_NAVR_Switch_var,10=toggle
2=L:EFIS_L_NAVR_Switch_var,0=toggle
3=L:EFIS_L_NAVR_Switch_var,20=toggle

and this

[Macros]
Module="PMDG_747400_Main.DLL"
1=L:EFIS_L_NAVR_Switch_var=10=toggle
2=L:EFIS_L_NAVR_Switch_var=0=toggle
3=L:EFIS_L_NAVR_Switch_var=20=toggle

...

Could you send me some sample how this script should looks like? It can give me some idea how to start and witch direction is beather. I have spend all day and try to sort it out , but not succesfull. Thanks for your advice.Seeb

Link to comment
Share on other sites

I tryed many version but no effect

First this: Module="PMDG_747400_Main.DLL" is only relevant to Mouse macros. You don't need it or want it in an ordinary macro file. Why is it there?

Second:

1=L:EFIS_L_NAVR_Switch_var=10=toggle

2=L:EFIS_L_NAVR_Switch_var=0=toggle

3=L:EFIS_L_NAVR_Switch_var=20=toggle

Where did you get the format "Name=value=action" like this from? Please please please READ what is written! There's nothing listed like that at all, with the value of the variable stuck in the middle like that!

And "toggle" is obviously NOT the action you want. Look what it says:

"changes the value to zero if it is non-zero, or 1 if it is zero."

You want values 10, 0 or 20 set, respectively. This is what the listing showing what happens to those variables is telling you! 10 for VOR, 0 for Off, 20 for ADF. I already told you this!!

So, theoretically you'd need something more like:

1=L:EFIS_L_NAVR_Switch_var=set,10

2=L:EFIS_L_NAVR_Switch_var=set,0

3=L:EFIS_L_NAVR_Switch_var=set,20

See?

Unfortunately, all three of those would have the same name so you wouldn't be able to assign to them very easily. So the thing to do is delete two lines and just have one:

1=L:EFIS_L_NAVR_Switch_var=set

Then you assign your switch to that control in the drop-down, and use the parameter field to set 10, 0 or 20. This takes advantage of the main feature of the "set" action, i.e. "copies the parameter in the Macro invocation to the identified Lvar. ".

If you'd actually run that Lua Lvar logging program as i suggested, and operated the switches and seen the values change, perhaps you would have understood all this a lot better. You are going to have to do this for the other switches you want in any case. Please do try it.

Regards

Pete

Link to comment
Share on other sites

I have try to left just one listing but not succesfull. I have been back to option with 3 listing and the buttons are working. they not changed position but values is displayed and no reaction "turn on VOR or ADF"

1.MCRO

[Macros]
1=L:EFIS_L_NAVR_Switch_var=set,10
2=L:EFIS_L_NAVR_Switch_var=set,0
3=L:EFIS_L_NAVR_Switch_var=set,20

FSUPC

[MacroFiles]
1=747 OHD
2=747-forPete-EFIS
3=APchart
4=test
5=1
--cut--
[Buttons]
ButtonRepeat=20,10
1=P0,13,CM5:1,0
2=U0,13,CM5:2,0
3=P0,14,CM5:3,0
4=U0,14,CM5:2,0

post-35203-128689690923_thumb.jpg

Link to comment
Share on other sites

I have try to left just one listing but not succesfull.

Why are you "back to the option with 3 entries"? Far better to supply the parameter with the assignment. Please read this part of my last message again:

Unfortunately, all three of those would have the same name so you wouldn't be able to assign to them very easily. So the thing to do is delete two lines and just have one:

1=L:EFIS_L_NAVR_Switch_var=set

Then you assign your switch to that control in the drop-down, and use the parameter field to set 10, 0 or 20. This takes advantage of the main feature of the "set" action, i.e. "copies the parameter in the Macro invocation to the identified Lvar. ".

Anyway, even if you get it right, it may not work. It really completely depends on how PMDG have coded these functions. If it doesn't work at all this way or the mouse macro way, then it isn't possible with FSUIPC alone. You've need something like Luciano Napolitano's "Key2Mouse" program, to convert keystrokes to mouse actions. Then you use FSUIPC to assign those keystrokes to your buttons or switches.

If I get time today I will try to do this myself. I do have the 747X set up one one of my old PCs.

Incidentally, you'll be able to read that Lua display on screen if you undock it. Right-clcik and undock, like any other FS window.

Regards

Pete

Link to comment
Share on other sites

If I get time today I will try to do this myself. I do have the 747X set up one one of my old PCs.

Okay, tried it.

And the answer is: no! I'm afraid it isn't possible with the LVars either. You can read the LVars to ascertain the state of the switches (assuming you've not written to the variables), but evidently their code doesn't act upon those values, at least not directly.

PMDG aircraft have never been amenable to use with external hardware, and it looks like the 747X is much less so even than their FS9 737NG. Unless you can manage to persuade PMDG to sell you their software development kit (which I think they were originally proposing -- at quite a high price, for hardware developers) I think your only way would be via the Key2Mouse program.

Regards

Pete

Link to comment
Share on other sites

Really I already read it and how I think that I understood (English isn't my strong point).

[Macros]
1=L:EFIS_L_NAVR_Switch_var=set

[Buttons]
ButtonRepeat=20,10
1=P0,13,CM5:1,10
2=U0,13,CM5:1,0
3=P0,14,CM5:1,20
4=U0,14,CM5:1,0

it doesn't work

Why are you "back to the option with 3 entries"?

Because plug-in "could see" change on buttons(show right values on LUA Display).

In (prev post) the graphical attachment I enclosed the EFIS view and LUA Display where one can see the reaction to changes of putting the switch but a reaction is lacking the simulator.

Attach 1: FSIUPC setup but not working

Attach 2: 3 enteries in macro with vaules -almost he is acting display values but not reaction. See last position on LUA display value=20 but ADF not shown feq in display

post-35203-128689690927_thumb.jpg

post-35203-128689690934_thumb.jpg

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.