BFF Motion Driver Short User Guide


Previous    Contents     Next

 

5. Platform Drive Data Output Formats

The format of the position demand cue output from the motion driver is set using the Mode= parameter in the .bff configuration file.

In v3 there are a number of basic data output formats available - they are described below.

An option is also available (Mode=NONE) in which the output COM port is not opened and no data is sent – this is useful if you just want to try the program and do not want it to interact with your COM ports.

See the settings section to see how to set these in the configuration file.

In the Mode=BIN and HEX2 output formats each position demand value is output as a value in the range 0 to 255 corresponding to the motion driver working range 0 - 255. See the detailed format below.

In HEX3 format each data item uses 3 hex characters, the position demands are given in near 10bit resolution, so in the range 0 - 1020 corresponding to the motion driver working range 0 - 255

In binary (BIN) mode the data is transmitted in binary 8 bit bytes. In hexadecimal (HEX2) each number is transmitted as two characters giving the 2 character hex value of the number eg FF for Hex 0xFF. For HEX3 it is three characters eg 0FF for HEX 0x0FF. The serial output format is 8 bit, 1 stop bit, no parity to the COM port stated at the baud rate stated in the configuration file.

In the beta 87+ versions a 16bit binary output option BIN2B has been added.

In the beta 89+ versions for use with Thanos Kontogiannis' AMC644USB (+ 6DOF) controller boards use the special BIN2TH 16bit format setting. This starts a data extrapolation process to increase the export rate of the motion cue data - the export rate is controlled using the Delay parameter in the BINTH.ini file. Reducing the processing loop delay (in ms) increases the export rate. Set the Use_Raw parameter =1 to disable the data extrapolation and use the normal motion cue data.

UPDATE Sept '18 - V1.01 of the data extrapolation app now supports user-specified serial data packet ID (qualifer) bytes. This provides compatibility with Thanos' "actuator kick" firmware fix.

Output to Thanos' boards which does not use the higher rate data extrapolation process (ie direct from the motion driver at the sim frame rate) can be obtained using the BINTH mode (for 3.18+ FSX & X-Plane versions).

In Mode=MAEST the actuator positions are exported in Pololu Maestro servo card format. The servo card can then be used to drive RC Servos - useful for small hexapod motion platform models. The amount of data exported means this output mode isn't very fast but it might still be of interest if you are building a model.

In MAEST mode set the baud parameter to a standard baud that the maestro can handle (eg 38400 say). You may need to experiment with the baud rate to get reliable comms, but the faster the better for good refresh rates. The COM port set in the .bbf file should be the "Command" port for the maestro (not the TTL port). The maestro should be set to "USB Chained" and Device Number 12 using the pololu software provided for configuring the card.

Note that the cues are sent to maestro card servo channels 0, 1, 2, 3, 4 & 5 (not 1 - 6). The data is exported in Pololu packetised serial mode, and the full 255 unit actuator travel range definable in the .bff config file (FALim1) is mapped to a servo pulse output of 1500uS +/- 500. Limiting the actuator working range in the .bbf file will reduce the servo working range proportionally.

 

BIN output format is - “AB” byte1 byte2 byte3 byte4 byte5 byte6 byte7 0x0D (CR)

"AB" - start of data identifier for the receiving micro controller

byte1 - reserved

byte2 - 8 bit binary number giving act1 demand in 0-255 scale

byte3 - 8 bit binary number giving act2 demand in 0-255 scale

byte4 - 8 bit binary number giving act3 demand in 0-255 scale

byte5 - 8 bit binary number giving act4 demand in 0-255 scale

byte6 - 8 bit binary number giving act5 demand in 0-255 scale

byte7 - 8 bit binary number giving act6 demand in 0-255 scale

0x0D - single byte Carriage Return data terminator

 

BIN2B output format is - “BC” b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 0x0D (CR)

"BC" - start of data identifier for the receiving micro controller

byte1 - reserved

byte2 - 8 bit binary number giving act1 demand MSB in 0-255 scale

byte3 - 8 bit binary number giving act2 demand MSB in 0-255 scale

byte4 - 8 bit binary number giving act3 demand MSB in 0-255 scale

byte5 - 8 bit binary number giving act4 demand MSB in 0-255 scale

byte6 - 8 bit binary number giving act5 demand MSB in 0-255 scale

byte7 - 8 bit binary number giving act6 demand MSB in 0-255 scale

 

byte8 - 8 bit binary number giving act1 demand LSB in 0-255 scale

byte9 - 8 bit binary number giving act2 demand LSB in 0-255 scale

byte10 - 8 bit binary number giving act3 demand LSB in 0-255 scale

byte11 - 8 bit binary number giving act4 demand LSB in 0-255 scale

byte12 - 8 bit binary number giving act5 demand LSB in 0-255 scale

byte13 - 8 bit binary number giving act6 demand LSB in 0-255 scale

 

0x0D - single byte Carriage Return data terminator

The 16 bit value is read by combining the MSB & LSB for each actuator, eg for Act 1 -

Act1 16bit demand  = (b2 * 256) + b8,   in 0 to 65280 range, with 32640 mid range position


HEX2 output format is - “JK” AA BB CC DD EE FF GG HH II 0x0D (CR)

"JK" - Start of data identifier for the receiving micro controller

AA - 1 byte - 8 bits, each indicates on/off for status indicators - see below

BB - hex value of act1 demand in 0-255 (0x00 to 0xFF) scale

CC - hex value of act2 demand in 0-255 (0x00 to 0xFF) scale

DD - hex value of act3 demand in 0-255 (0x00 to 0xFF) scale

EE - hex value of act4 demand in 0-255 (0x00 to 0xFF) scale

FF - hex value of act5 demand in 0-255 (0x00 to 0xFF) scale

GG - hex value of act6 demand in 0-255 (0x00 to 0xFF) scale

HH - hex value for current forward ground speed in m/s, capped at 255

II - hex value for engine 1 rpm, 0 - 100 percent

0x0D - single byte Carriage Return data terminator

 

The AA bits are -

b7 (msb) flaps

b6 landing gear

b5 brake indicator

b4 spoiler (not currently available in X-Plane version)

b3 overspeed (not currently available in X-Plane version)

b2 stall

b1 on ground

b0 (lsb) not used

Note the BIN output format is the more efficient and uses approximately half the data length of the HEX2 format to carry the same information. This might be significant if you want to use low transmission baud rates.

The driver works at baud rates up to 115200.

 

HEX3 output format is - “JK” AAA BBB CCC DDD EEE FFF GGG HHH III 0x0D (CR)

"JK" - Start of data identifier for the receiving micro controller

AAA - Least significant 8 bits active, each indicates on/off for status indicators - see AA above

BBB - hex value of act1 demand in 0-1020 (0x000 to 0x3FC) scale

CCC - hex value of act2 demand in 0-1020 (0x000 to 0x3FC) scale

DDD - hex value of act3 demand in 0-1020 (0x000 to 0x3FC) scale

EEE - hex value of act4 demand in 0-1020 (0x000 to 0x3FC) scale

FFF - hex value of act5 demand in 0-1020 (0x000 to 0x3FC) scale

GGG - hex value of act6 demand in 0-1020 (0x000 to 0x3FC) scale

HHH - hex value for current forward ground speed in m/s, capped at 255 (0x0FF)

III - hex value for engine 1 rpm, 0 - 100 percent

0x0D - single byte Carriage Return data terminator

 

 

Previous    Contents     Next

FLIGHT SIM HOME
 
Copyright © 2010-15 BFF Design Ltd All Rights Reserved.