Jump to content
The simFlight Network Forums

Sa_wxr and hardware.


Recommended Posts

Hi Pete,

I bought sa_wxr and I use it with the full PM Boeing gauges.

I tried to use the offset 6D00 (from the sa_wxr manual)to hook up a button so that I can access sa_wxr functions by buttons via fsbus.

But no luck yet.

Is there a possibility to do this or what I'm doing wrong?

There seems to be also a possibility to access sa_wxr via the TCAS page of the CDU, do you know this?

Kind regards

Jan Geurtsen

Link to comment
Share on other sites

  • 3 weeks later...

I bought sa_wxr and I use it with the full PM Boeing gauges.

I tried to use the offset 6D00 (from the sa_wxr manual)to hook up a button so that I can access sa_wxr functions by buttons via fsbus.

But no luck yet.

Is there a possibility to do this or what I'm doing wrong?

There seems to be also a possibility to access sa_wxr via the TCAS page of the CDU, do you know this?

Sorry, I really don't know anything about SA_WXR. Have you asked the author? I can help with questions about FSUIPC programming, but not applications.

Regards,

Pete

Link to comment
Share on other sites

Hi Pete,

I ask several ktimes the author of the product for support but he can´t or wouldn´t help.

Can you tellk me how to program this in FSUIPC?

This is from the manual:

Control-Word at (Write) 0x6D00 as long as Bit 7 = 1 which means switch

mode

If Bit7 is set to 1, then following Control bits are used, they are all

switched/steady.

Bit7 Toggle/Switchselect(1)

bit 3 OFP ON

bit 2 GCS ON

bit 1 Mode 1

bit 0 Mode 0

Bit15 Tilt7

bit 14 Tilt6 etc.

Mode0, Mode1 00 = OFF

01 = WX

10 = WX+T

GCS ON 0 = GCS OFF, 1 = GCS ON

OFP ON 0 = OFP OFF, 1 = OFP ON

Range: Range = (Bit4+2*Bit5+4*Bit6)

Range = 1,2,3,4,5,6 equals 10,20,40,80,160,320 NM

Tilt0 – Tilt7 (signed byte) in 0.25° steps (so to get the tilt angle multiply the signed

byte value with 0.25)

If you write –40 then the tilt would be –40*0.25= -10°

Status Byte at (Read) 0x6D02

Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0

Window

active

Range2 Range1 Range0 OFP ON GCS

ON

Mode 1 Mode 0

Status:

Mode0, Mode1 00 = OFF

01 = WX

10 = WX+T

My question is how can I set X6D00 write to 1 in fsuipc and after that set the bits.And how to handle with the bits >8?

Hope you can help

Kind regards

Jan Geurtsen.

Link to comment
Share on other sites

My question is how can I set X6D00 write to 1 in fsuipc and after that set the bits.And how to handle with the bits >8?

How are you programming? If you want to program a button or keypress, just use the Offset controls in the FSUIPC drop-down lists in either the Buttons dialogue or Keys dialogue.

Your spec says 6D00 is a "long" which really means a 32-bit DWORD. You can set a complete value there with Offset dword set, or change bits with Offset dword setbits, Offset dword clrbits or Offset dword togglebits.

As for bits > 8, a DWORD has 32 bits, so the numbering goes from 0 (for the 1 bit) right up to 31 (for the top bit, or 2^31, or x80000000 in hex).

If you are writing a program then you just use FSUIPC_Write of length 4 and the values you want to set.

The Offset controls provided in FSUIPC are documented -- a brief mention in the User Guide, and the parameter formats in the Advanced guide. They are very simple.

Regards,

Pete

Link to comment
Share on other sites

Hi Pete,

I have just seen the above post - I too have just purchased SA_WXR and having problems programming the buttons. Can you just point me in the right direction please and tell me if my assumptions are correct as I think I am missing something here :

From the SA_WXR FSUIPIC programmimg section :

Control-Word at (Write) 0x6D00 as long as Bit 7 = 1 which means switch

mode

If Bit7 is set to 1, then following Control bits are used, they are all

switched/steady.

Bit7 Toggle/Switchselect(1)

bit 3 OFP ON

bit 2 GCS ON

bit 1 Mode 1

bit 0 Mode 0

Bit15 Tilt7

bit 14 Tilt6 etc.

As I understand it, the Control word 0x6D00 is 32 bit so we would see something like this fora button in the INI file:

52=P0,10,Cx01006D00

Looking at an example above the manual says that switch mode is activated by setting bit 7 to 1, then we can turn OFP on using bit 3 (set to 1), so if I am understanding this then it should look something like this :

52=P0,10,Cx01006D07,1

53=P0,10,Cx01006D03,1

Or have I completely misunderstood _ I get the feeling I am not understanding how the "bit" portion works or how it is written.

Your advice appreciated as always

Link to comment
Share on other sites

As I understand it, the Control word 0x6D00 is 32 bit so we would see something like this fora button in the INI file:

52=P0,10,Cx01006D00

Well, you can program these in the dialogue in FS which saves working them out, but in the example above you are using the Offset Byte Set control, which will only handle the lower 8 bits, not the whole 32 bit Dword.

Also, the line is incomplete. The value to be written needs to follow, after a comma.

If you used the dialogue the format would be sorted out for you.

Looking at an example above the manual says that switch mode is activated by setting bit 7 to 1, then we can turn OFP on using bit 3 (set to 1), so if I am understanding this then it should look something like this :

52=P0,10,Cx01006D07,1

53=P0,10,Cx01006D03,1

Or have I completely misunderstood

Yes, you seem to have completely misunderstood. You've suddenly changed from addressing offset 6D00 to offsets 6D07 (7 bytes or 7 x 8 = 56 bits later), and 6D03, which is effectively the top 8 bits of the 32-bit (4 byte) Dword at 6D00.

I'm not sure why you are doing that, nor do I understand why you want to write the value "1" to those bytes. What do you think it achieves?

Please keep to the offsets you have documented.

Remember 1 byte = 8 bits, 1 word = 16 bits, 1 Dword = 32 bits. Addressing is by byte, so each offset addresses a separate byte as base.

Regards

Pete

Link to comment
Share on other sites

Pete,

Thanks for the reply, I'll go back to using the FSUIPC dialogue if it's easier but I'm still struggling so I wonder if you can help me with this simple example and tell me what goes where :

Say I want to turn on OFP using bit 3 (setting it to 1) at offset 6D00.

1) Which offset control do you suggest I use to handle the whole D-Word,

Offset byte setbits ?

2) Once I have selected the right control from the drop-down list, I presume I modify the entry in the offset box to read x6D00 - correct ?

3) Lastly, I presume that the instruction to set bit 3 to 1 goes in the parameter box but I have no idea what it should look like.

If you can fill in the blanks for me on this one then I will be able to work the rest out for myself I think

Many thanks again for your help

David

Link to comment
Share on other sites

Say I want to turn on OFP using bit 3 (setting it to 1) at offset 6D00.

The offset is 6D00, the value is 8 (bit 3 = 2^3 = 2x 2 x 2 = 8).

Bits are numbered low to high.

Bit 0 = value 1

Bit 1 = value 2

Bit 2 = value 4

etc.

This is how the binary system of numbers works -- each successive higher bit is worth twice the previous one, much like each higher decimal place is worth 10 times the previous one. Hence the names "binary" for 2, "decimal" for 10.

1) Which offset control do you suggest I use to handle the whole D-Word,

Offset byte setbits ?

No, of course not. The whole Dword is handled by the Dword control. That's why it has the word "dword" in it! The byte controls handle bytes, that's why they have the word "byte" in them. There is some logic to the names of the controls, you know!!

2) Once I have selected the right control from the drop-down list, I presume I modify the entry in the offset box to read x6D00 - correct ?

Yes. Because that is the offset, so it goes into the offset box.

3) Lastly, I presume that the instruction to set bit 3 to 1 goes in the parameter box but I have no idea what it should look like.

Oh dear. The instruction to set any bits (without changing any others) is "Offset Dword Setbits" as I thought you understood. There's no "instruction" to go into the parameter, just the PARAMETER -- the value containing the bits to be set!

If you wanted to set ALL bits to 1 it would be xFFFFFFFF. For only Bit 3 it is x00000008 or, if you like, simply 8 which happens to be the same in decimal and hex (because it is less than 10).

Pete

Link to comment
Share on other sites

Pete,

Ahhhh !............. the light finally dawns ...............

I've just programmed my first button for SA_WXR following your advice and it works !!!.

Please bear with me, up until a few weeks ago I had never attempted to program anything and the world of Hex, binary etc. is s completely new one to me.

Anyway, many thanks for all your help - hopefully I can finish the task without any more input

Thanks once again

David

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.