hardware interfacing

 

HOW TO INTERFACE EXTERNAL HARDWARE

Some hardware works out of the box with aeroSystems and some will require programming. If you know how to code then you can use the simple interface to interact with FSUIPC (the link between FSX and aeroSystems) to control external hardware.


FSUIPC documentation can be downloaded here

INTRODUCTION

We use the standard FSUIPC offsets plus dedicated offsets that allow you to read and write data to and from the aeroSystems software. Reading and writing data is a simple process and gives you access to the aeroSystems MCP, EFIS and CDU. You can send button presses, turn switches on and off, as well as send key inputs to the CDU. You can also read the status of counters and LED displays.


The dedicated AeroSystems offsets in FSUIPC start at address 7370 hex and occupy 32 bytes.



SENDING A COMMAND TO AEROSYSTEMS

Sending a command is very simple. A command is sent using the addresses below.


Address   description        length

7370         command        1 byte

7371         value                small integer (2 bytes)


Before you send a command you must first make sure that address 7370 hex has a value of 0. if it is 0 you can write a command to that address, with an optional value to address 7371 hex. When aeroSystems has finished processing the command, aeroSystems will set 7370 hex back to 0, informing you that it’s ready to accept another command.


Here’s an example:


If value at address 7370 hex = 0 then

begin

  FSUIPC begin request

  write a command to address 7370 hex

  write an optional value as a small integer (-32767 to +32767) to address 7371 hex

  FSUIPC send request

end


So remember, if 7370 is not 0 you cannot send a command until aeroSystems resets it back to 0.



WRITE COMMAND LIST

These are the commands you send to aeroSystems.

Command

(decimal)


1

2


10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26



30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61



250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

250

Value

(decimal)


0 to 500

-79 to 60


none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none



none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

none

0 to 9000

none

none

none

0 to 32767



1

2

3

4

5

6

7

8

9

10

11

12

32 to 90

100

101

102

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

Description


MCP

MCP altitude divided by 100. eg. to set MCP to 37500 write 375

Vertical speed divided by 100


flight director toggle (read status from FSX to determine initial state)

AT ARM toggle (read status from FSX to determine initial state)

Push N1

Push SPEED

Push VNAV

Push LVL CHG

Push HDL SEL

Push LNAV

Push VOR/LOC

Push APP

Push ALT HOLD

Push V/S

Push CMD A

Push IAS/MACH change over

Push TOGA takeoff mode 1 - pilot pitches aircraft manually for takeoff

Push TOGA takeoff mode 2 - autopilot pitches nose-up at Vr and takes off by itself (auto takeoff)

Push CMD B


EFIS

Push WXR

Push STA

Push WPT

Push ARPT

Push DATA

Push POS

Push TERR

ADF/VOR Left OFF

ADF/VOR Left ADF

ADF/VOR Left VOR

ADF/VOR Right OFF

ADF/VOR Right ADF

ADF/VOR Right VOR

Map Mode APP

Map Mode VOR

Map Mode MAP

Map Mode PLAN

Map Range 5

Map Range 10

Map Range 20

Map Range 40

Map Range 80

Map Range 160

Map Range 320

Map Range 640

Push STD BARO

Push DH baro reset

DH baro minimum decent altitude

Push TRAFFIC

Push Centre/Expanded Map

toggle SYS hydraulic display

Baro setting to send to aeroAvionics. Multiply your value by 16.


CDU

LSK 1L eg. write 250 as the command and 1 as the value to press the LSK 1 Left key on the CDU

LSK 2L

LSK 3L

LSK 4L

LSK 5L

LSK 6L

LSK 1R

LSK 2R

LSK 3R

LSK 4R

LSK 5R

LSK 6R

ASCII code for the key pressed. eg. 65 is the letter A, 32 is a space etc.

Push +/- key.  Note this key toggles in the CDU between + and - when pressed

Push CLR

Push DEL

Push INIT REF

Push RTE

Push CLB

Push CRZ

Push DES

Push MENU

Push LEGS

Push DEPARR

Push HOLD

Push PROG

Push N1 LIMIT

Push FIX

Push PREV PAGE

Push NEXT PAGE

Push EXEC

READ COMMAND LIST

Reading data from aeroSystems is identical to reading data from any other FSUIPC offset. For aeroSystems software additional data is available for the MCP LED status and MCP altitude.


Simply read these below to get aeroSystems data.

Address

(hex)


7374

7376




















7378

Value



word (2 bytes)

word (2 bytes)




















word (2 bytes)

Description


MCP

MCP altitude divided by 100. eg. 37500 feet is 375

LED status for the MCP is contained in 16-bits with each bit representing a LED on or off. The hex mask values to test each bit are as follow:


mask 0001    FD left

mask 0002    FD right

mask 0004    AT ARM

mask 0008    N1

mask 0010    SPEED

mask 0020    VNAV

mask 0040    LVL CHG

mask 0080    HDG

mask 0100    LNAV

mask 0200    VOR LOC

mask 0400    APP

mask 0800    ALT HOLD

mask 1000    VS

mask 2000    CMD A

mask 4000    VS mode active (use to blank your VS display when set to 0)

mask 8000    C/O 0=IAS mode, 1=MACH mode


mask 0001    CMD B

mask 0002    CDU EXEC LED

mask 0004    CDU MSG LED