Ah yes, I see what's happening.
My mistake, it appears that setting these local variables is only triggering the animation.
Not to worry though, we can use a mouse macro instead. Have you ever recorded one of these in FSUIPC?
If you are not familiar with FSUIPC mouse macros then please read the Macro Controls / Mouse Macros section in the AdvancedUsers.PDF for FSUIPC. It explains it better than I ever could.
I brought up the appropriate NGX 2D panel using the [shift]7 key and recorded the following mouse macro by...
Right Clicking IRSL
Left Clicking IRSL
Right Clicking IRSR
Left Clicking IRSR
Each action requires a name to identify it.
File Name: PMDG_IRS
Right Clicking IRSL Name: irsl_cw
Left Clicking IRSL Name: irsl_acw
Right Clicking IRSR Name: irsr_cw
Left Clicking IRSR Name: irsr_acw
This was the contents of result file. "PMDG_IRS.MCRO"
[Macros] Module="PMDG_737NGX.DLL" 1=irsl_cw=RX273e0*X8bcc,31 2=irsl_acw=RX273e0*X8bcc 3=irsr_cw=RX27400*X8bcc,31 4=irsr_acw=RX27400*X8bcc
As before, these entries will then be available to select in FSUIPC - Buttons+Switches Tab. (No parameters will be required.) eg: PMDG IRSL: IRSL CW etc.
If you are using a momentary switch (push button) this will work fine, To go from Off to NAV, just press the button twice.
However, if you use toggle switches as I do, ( that is: the switch is either On or Off,) then you can edit the macro file as so...
[Macros] Module="PMDG_737NGX.DLL" 1=irsl_cw 1.1=RX273e0*X8bcc,31 1.2=RX273e0*X8bcc,31 2=irsl_acw 2.1=RX273e0*X8bcc 2.2=RX273e0*X8bcc 3=irsr_cw 3.1=RX27400*X8bcc,31 3.2=RX27400*X8bcc,31 4=irsr_acw 4.1=RX27400*X8bcc 4.2=RX27400*X8bcc
This allows you to have more that one function to to a Macro action. In this case it just repeats the click action to simulate clicking twice.
I have not tried recording a Mouse Macro on one machine and copying it to another. If it works, it works, fine. If not, you'll have to record you're own macro on you're computer and make any necessary edits.
I'm sure you be ok with this.