General description
Communication protocol documentation for device IOFireBug with Firmware ver.:
Ver. 1.x
Communication protocol is binary (no text) with 8 data bits, 1 stop bit, without parity.
Communication is based on request – response principle. Master device (PC for example) sends a command and the slave device (IOFireBug Engine) will send a response. If the slave device didn’t understand the command or the command is invalid, there will not be any response.
USB interface communication:
IOFireBug Engine can communicate with a PC by USB interface. Engine is equipped with an FTDI USB to Serial converter. After connection with a PC there will be FTDI driver installed and a new COM port will be created.
If operating system didn’t install the driver automatically, you can download it at: http://www.ftdichip.com/Drivers/VCP.htm
RS485 / 422 interface communication:
IOFireBug Engine is equipped by galvanically isolated RS485 or RS422 bus (mode of bus can be configured by a jumper). In case of use RS485 you have to avoid periodic or on-change data sending by the Engine unit. In RS485 mode is the bus only HALF-DUPLEX. If possible, we recommend to use RS-422 always, which is FULL-DUPLEX.
IOFireBug Engine units can be interconnected by the serial bus. First unit can be connected to a PC by USB port and next units are interconnected by RS-485 / RS-422 interface. Each unit must have unique identification by the address set on DIP switch on the board.
General format of communication message:
Byte | Name | Meaning | Value |
0 | PRE | Starting characters | 0x2A |
1 | PRE | ||
2 | LEN_HI | Message length 2B | 0x0007 to 0xFFFF |
3 | LEN_LO | ||
4 | ADDR | Unit address | 0x01 to 0x0E |
5 | SIG | Message number | 0x00 to 0xFF |
6 | INSTR | Code of instruction | See code list |
7 | ACK | Confirmation | See code list |
8 | DATAn | Message data | |
8+n | CRC_HI | CRC16 – 2B | 0x0000 to 0xFFFF |
9+n | CRC_LO | ||
10+n | CR | Ending character | 0x0D |
LEN – message length from ADDR (including) until the end of message.
ADDR – unit address length is 4bits, which corresponds the range from 0x01 to 0x0E. Address 0x0F is reserved for broadcast. When devices have broadcast address you can send a command to all of them by one message. Address 0x00 is invalid, so if device has this address, will not respond on any incoming message.
SIG – this byte is used for message numbering. Master device set any value to this byte and slave will respond with the same number of message. Two following messages should have different message number (SIG).
INSTR – code of instruction, see the following table for details.
Value | Name | Meaning |
Command for device identification | ||
0xF0 | INSTR_GET_DEV_NAME | Request for device name |
0xF1 | INSTR_GET_FW_VER | Request for FW version |
0xF2 | INSTR_GET_DEV_ID | Request for ID of device |
0xF3 | INSTR_GET_SERIAL | Request for serial number of device |
Binary inputs commands | ||
0xA0 | INSTR_GET_INPUTS | Request for state of binary inputs |
0xA1 | INSTR_GET_INPUTS_CNT | Request for state of binary inputs counters |
0xA2 | INSTR_GET_INPUTS_CNT_RM | Request for state of binary inputs counters including reset |
0xA3 | INSTR_SET_INPUTS_FNC | Set function for binary inputs |
0xA4 | INSTR_GET_ROTARY_CNT | Request for state of rotary encoders counters |
0xA5 | INSTR_GET_ROTARY_CNT_RM | Request for state of rotary encoders counters including reset |
Binary outputs commands | ||
0xB0 | INSTR_SET_OUTPUTS | Binary outputs setting |
0xB1 | INSTR_SET_OUTPUTS_PWM | Binary outputs PWM setting |
0xB2 | INSTR_GET_OUTPUTS | Request for state of binary outputs |
0xB3 | INSTR_GET_OUTPUTS_PWM | Request for state of PWM outputs |
Analog inputs commands | ||
0xC0 | INSTR_GET_ANALOG | Dotaz na stav analogových vstupů |
0xC1 | INSTR_SET_ANALOG_FNC | Nastavení funkce analogových vstupů |
Configuration commands | ||
0xE0 | INSTR_STORE_CFG | Stores current configuration to a EEPROM |
0xE1 | INSTR_SET_CFG_ADC | AD Converters configuration |
0xE2 | INSTR_SET_CFG_PWM1234 | PWM outputs configuration for 1,2,3,4 |
0xE3 | INSTR_SET_CFG_PWM56 | PWM outputs configuration for 5,6 |
0xE4 | INSTR_SET_CFG_PWM78 | PWM outputs configuration for 7,8 |
0xE5 | INSTR_SET_CFG_INPUTS | Process binary inputs configuration |
0xE6 | INSTR_SET_CFG_FTDI | Set baudrate for FTDI-USB converter |
0xE7 | INSTR_SET_CFG_RS4XX | Set baudrate for RS485/422 interface |
0xE8 | INSTR_SET_CFG_EXP | Expansion modules setting |
0xE9 | INSTR_SET_ADC_OFFSETS | Starts offset calibration of analog inputs. This process only needs to be performed once during device recovery and the calibration values are stored using instruction 0xE0 (INSTR_STORE_CFG). During calibration, the analog inputs must be disconnected! |
0xEA | INSTR_SET_OUTPUTS_DEFAULT | Sets current digital output state as the default after unit starts |
0xEE | INSTR_RESET | Invokes a restart of device, reading the last saved configuration from EEPROM |
0xEF | INSTR_CLEAR_EEPROM | Clears the configuration memory (EEPROM) |
Configuration states | ||
0xD1 | INSTR_GET_CFG_ADC | AD converters configuration request |
0xD2 | INSTR_GET_CFG_PWM1234 | PWM outputs 1,2,3,4 configuration request |
0xD3 | INSTR_GET_CFG_PWM56 | PWM outputs 5,6 configuration request |
0xD4 | INSTR_GET_CFG_PWM78 | PWM outputs 7,8 configuration request |
0xD5 | INSTR_GET_CFG_INPUTS | Request to get a configuration of binary inputs process |
0xD6 | INSTR_GET_CFG_FTDI | Request to get a FTDI – USB baudrate |
0xD7 | INSTR_GET_CFG_RS4XX | Request to get a RS485/422 baudrate |
0xD8 | INSTR_GET_CFG_EXP | Request to get expanding modules configuration |
ACK – acknowledge byte
Value | Name | Meaning |
0x00 | ACK_OK | Everything OK |
0x01 | ACK_ERR | Another error |
0x02 | ACK_BAD_INSTR | Unknown instruction |
0x03 | ACK_NODATA | No data requested |
0x04 | ACK_DEV_ERR | Device failure |
CRC –CRC16 is calculated from all message bytes excluding the last byte CR. As an initial value is 0xFFFF used.
Request messages
Request messages are messages without data. These messages can be used by PC to get configuration parameters or device states (inputs etc.). IOFireBug Engine responses to these messages with according data values (as described below). These messages are identified by INSTR_GET_xxxxxx in the documentation.
Byte | Name | Meaning | Value |
0 | PRE | Starting characters | 0x2A |
1 | PRE | ||
2 | LEN_HI | Message length 2B | 0x00 |
3 | LEN_LO | 0x07 | |
4 | ADDR | Device address | 0x01 to 0x0E |
5 | SIG | Message number | 0x00 to 0xFF |
6 | INSTR | Code of instruction | See code list |
7 | ACK | 0x00 | |
8 | CRC_HI | CRC16 – 2B | 0x0000 to 0xFFFF |
9 | CRC_LO | ||
10 | CR | Ending character | 0x0D |
Command messages
By these messages you can send some commands like save/delete internal EEPROM, unit reset etc. Unit will respond by acknowledgement to these messages.
Byte | Name | Meaning | Value |
0 | PRE | Starting characters | 0x2A |
1 | PRE | ||
2 | LEN_HI | Message length 2B | 0x00 |
3 | LEN_LO | 0x07 | |
4 | ADDR | Device address | 0x01 to 0x0E |
5 | SIG | Message number | 0x00 to 0xFF |
6 | INSTR | Code of instruction | See code list |
7 | ACK | 0x00 | |
8 | CRC_HI | CRC16 – 2B | 0x0000 to 0xFFFF |
9 | CRC_LO | ||
10 | CR | Ending character | 0x0D |
Setting messages
By setting messages you can set configuration parameters, output states etc. These messages are identified by INSTR_SET_xxxxxx in the documentation. Response to these messages is an acknowledge message, which doesn’t contain any data.
Byte | Name | Meaning | Value |
0 | PRE | Starting characters | 0x2A |
1 | PRE | ||
2 | LEN_HI | Message length 2B | Count of message bytes: 7 + count of data bytes |
3 | LEN_LO | ||
4 | ADDR | Device address | 0x01 to 0x0E |
5 | SIG | Message number | 0x00 to 0xFF |
6 | INSTR | Code of instruction | See code list |
7 | ACK | 0x00 | |
8 | DATAn | CRC16 – 2B | 0xXX (see detail description of each message) |
8+n | CRC_HI | 0x0000 to 0xFFFF | |
9+n | CRC_LO | Ending character | |
10+n | CR | 0x0D |
Confirmation messages
Byte | Name | Meaning | Value |
0 | PRE | Starting characters | 0x2A |
1 | PRE | ||
2 | LEN_HI | Message length 2B | 0x00 |
3 | LEN_LO | 0x07 | |
4 | ADDR | Device address | Same as in setting or command message. |
5 | SIG | Message number | Same as in setting or command message. |
6 | INSTR | Code of instruction | Same as in setting or command message. |
7 | ACK | See code list | |
8 | CRC_HI | CRC16 – 2B | 0x0000 to 0xFFFF |
9 | CRC_LO | ||
10 | CR | Ending character | 0x0D |
Device identification messages
0xf0 – Reading of device name– response data structure
Byte of data | Name | Meaning |
0 | DEVICE_NAME | Text in ASCII format, length of text depends on message length |
N |
Note.:
Device IOFireBug Engine returns the name: „IOFB-ENGINE“
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][07][01][01][F0][00][52][E8][0D] instr: [0xF0]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][12][01][01][F0][00][49][4F][46][42][2D][45][4E][47][49][4E][45][2C][6D][0D] instr: [0xF0]
[Debug] – IOFB Engine[COM20][0x01]: Read device name: IOFB-ENGINE
0xf1 – Reading of device FW version – response data structure
Byte of data | Name | Meaning |
0 | FW_MAJOR | uint8 number |
1 | FW_MINOR | uint8 number |
Note.:
Device IOFireBug Engine returns FW version in the following format: FW_MAJOR.FW_MINOR, for example: 1.0
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][07][01][02][F1][00][C2][19][0D] instr: [0xF1]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][09][01][02][F1][00][02][01][61][A5][0D] instr: [0xF1]
[Debug] – IOFB Engine[COM20][0x01]: Read device FW version: 2.1
0xf2 – Reading of device ID – response data structure
Byte of data | Name | Meaning |
0 | DEVICE_ID | Unique identifier of device – uint16 number |
1 |
Note.:
Device IOFireBug Engine returns id 0x120C (year 18 = 0x12, month 12 = 0x0C)
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][07][01][03][F2][00][F2][48][0D] instr: [0xF2]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][09][01][03][F2][00][12][0C][E0][54][0D] instr: [0xF2]
[Debug] – IOFB Engine[COM20][0x01]: Read device ID: 0x120C
0xf3 – Reading of device serial number – response data structure
Byte of data | Name | Meaning |
0 | DEVICE_SERIAL | Unique serial number of device (11 bytes) |
.. | ||
10 |
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][07][01][04][F3][00][A3][F8][0D] instr: [0xF3]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][12][01][04][F3][00][36][59][33][32][30][33][18][07][00][0B][00][2D][F2][0D] instr: [0xF3]
[Debug] – IOFB Engine[COM20][0x01]: Read device SERIAL number: [36][59][33][32][30][33][18][07][00][0B][00]
Binary inputs messages
0xa0 – Reading of binary inputs states– response data structure
Byte of data | Name | Meaning |
0 | INPUTS | uint8 number, MSB is input 8, LSB is input 1. Log1 means input active |
1 | EXP_BIN_INPUTS_1 | uint16 number, MSB is input 16, LSB is input 1. Log1 means input active. |
2 | ||
3 | EXP_BIN_INPUTS_2 | uint16 number, MSB is input 16, LSB is input 1. Log1 means input active. |
4 | ||
n |
Note:
Number of binary inputs depends on usage of extension modules Wagon. If IOFireBug is used independently then one byte is returned (eight binary inputs). If we for example use one Wagon 16I, the messages will contain 3 Bytes of data.
Message example – IOFireBug Engine:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][07][01][13][A0][00][57][74][0D] instr: [0xA0]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][08][01][13][A0][00][00][D8][57][0D] instr: [0xA0]
[Debug] – IOFB Engine[COM20][0x01]: Read device binary inputs: [00]
Message example – IOFireBug Engine + one wagon 16I:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][07][01][13][A0][00][57][74][0D] instr: [0xA0]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][0A][01][13][A0][00][00][00][00][B3][BF][0D] instr: [0xA0]
[Debug] – IOFB Engine[COM20][0x01]: Read device binary inputs: [00][00][00]
0xa1 – Reading of binary inputs counters – response data structure
Byte of data | Name | Meaning |
0 | INPUT_CNT0 | State of counter number 1, uint16 number
|
1 | ||
2 | INPUT_CNT1 | State of counter number 2, uint16 number
|
3 | ||
14 | INPUT_CNT7 | State of counter number 8, uint16 number
|
15 | ||
16 | EXP_INPUT_CNT8-31 | Format of each counter uint16 |
… | ||
47 | ||
… |
0xa2 – Reading of binary inputs counters + resetting– response data structure is same as command 0xa1.
Note:
Number of binary inputs counters depends on usage of extension modules Wagon. If IOFireBug is used independently then 16 bytes is returned (eight binary inputs). If we for example use one Wagon 16I, the messages will contain 48 Bytes of data.
0xa3 – Functions of binary inputs – structure of message data
Byte of data | Name | Meaning |
0 | INPUTS_FNC | 0x00 – default value, no function
0xff – automatic sending of input state (message 0xa1) on input change 0x01 – 0xfe – periodical sending of input state (message 0xa0) in miliseconds [ms] (1ms to 254ms) |
1 | INPUT_COUNTERS_FNC | 0x00 – default value, no function
0xff – automatic sending of input counters state (message 0xa1) on counter change 0x01 – 0xfe – periodical sending of counter state (message 0xa1) in miliseconds [ms] (1ms to 254ms) |
2 | ROTARY_COUNTERS_FNC | 0x00 – default value, no function
0xff – automatic sending of rotary encoder counters state (message 0xa1) on counter change 0x01 – 0xfe – periodical sending of rotary encoder counter state (message 0xa1) in miliseconds [ms] (1ms to 254ms) |
Note:
Do not use the automatic data sending function if you are using the RS485 (half-duplex) communication interface. The function is intended for USB or RS422 (full-duplex) communication interface.
0xa4 – reading of rotary encoders counters state– structure of message data
Byte of data | Name | Meaning |
0 | ROT_CNT0 | State of rotary encoder counter number 1, uint16 number |
1 | ||
2 | ROT_CNT1 | State of rotary encoder counter number 2, uint16 number |
3 | ||
… | ||
6 | ROT_CNT3 | State of rotary encoder counter number 3, uint16 number |
7 | ||
8 | EXP_ROT_CNT4-11 | Format of each counter uint16 |
… | ||
23 | ||
… |
Note:
Each rotary encoder uses two binary inputs. Rotary counter has two-byte size (16bit). Amount of data in the message depends on usage of extension modules Wagon. If IOFireBug Engine is used independently then 8 bytes is returned (4x encoder * 2 bytes). If we for example use one Wagon 16I, the messages will contain 24 Bytes of data (8bytes by Engine and 16 by Wagon).
0xa5 – reading of rotary encoders counters state + reset – structure of message data is same as command 0xa4.
Note:
Amount of data in the message depends on usage of extension modules Wagon. If IOFireBug Engine is used independently then 8 bytes is returned (4x encoder * 2 bytes, each encoder needs two inputs). If we for example use one Wagon 16I, the messages will contain 24 Bytes of data (8bytes by Engine and 16 by Wagon).
Binary output/PWM messages
0xb0 – Setting of binary outputs – structure of message data
Byte of data | Name | Meaning |
0 | OUTPUTS | uint8 number, MSB is output 8, LSB is output 1. Log1 means active output (closed contact). |
1 | EXP_OUTPUTS_1 | uint8 number, MSB is output 8, LSB is output 1. Log1 means active output (closed contact). |
2 | EXP_OUTPUTS_2 | uint8 number, MSB is output 8, LSB is output 1. Log1 means active output (closed contact). |
… |
Note:
Number of binary outputs depends on usage of extension modules Wagon. If IOFireBug is used independently then 1 byte is returned (eight binary outputs). If we for example use one Wagon 8O, the messages will contain 2 Bytes of data.
Message example – IOFireBug Engine:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][08][01][14][B0][00][01][A9][96][0D] instr: [0xB0]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][07][01][14][B0][00][56][C8][0D] instr: [0xB0]
[Debug] – IOFB Engine[COM20][0x01]: Device set binary outputs [01].
Message example – IOFireBug Engine + one wagon 8O:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][09][01][47][B0][00][01][02][63][3C][0D] instr: [0xB0]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][07][01][47][B0][00][47][38][0D] instr: [0xB0]
[Debug] – IOFB Engine[COM20][0x01]: Device set binary outputs [01][02].
0xb1 – Setting of PWM output generator – structure of message data
Byte of data | Name | Meaning |
0 | OUTPUT_PWM0 | PWM value of output 1 – uint8 number. 0 – output disabled, 255 – output enabled. |
1 | OUTPUT_PWM1 | PWM value of output 2 |
… | ||
7 | OUTPUT_PWM7 | PWM value of output 8 |
Note:
It’s necessary to turn on PWM functionality to activate PWM generators. It can be done by PWM configuration messages.
PWM generator output is available only on IOFireBug engine outputs.
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][0F][01][7F][B1][00][90][00][00][00][00][00][00][00][37][A7][0D] instr: [0xB1]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][07][01][7F][B1][00][1A][B8][0D] instr: [0xB1]
[Debug] – IOFB Engine[COM20][0x01]: Device set PWM outputs [90][00][00][00][00][00][00][00].
0xb2 – Reading of digital output state – structure of message data
Byte of data | Name | Meaning |
0 | OUTPUTS | uint8 number, MSB is output 8, LSB is output 1. Log1 means active output (closed contact). |
1 | EXP_OUTPUTS_1 | uint8 number, MSB is output 8, LSB is output 1. Log1 means active output (closed contact). |
2 | EXP_OUTPUTS_2 | uint8 number, MSB is output 8, LSB is output 1. Log1 means active output (closed contact). |
… |
0xb3 – Reading of PWM output generator state – structure of message data
Byte of data | Name | Meaning |
0 | OUTPUT_PWM0 | PWM value of output 1 – uint8 number. 0 – output disabled, 255 – output enabled |
1 | OUTPUT_PWM1 | PWM value of output 2 |
… | ||
7 | OUTPUT_PWM7 | PWM value of output 8 |
Analog input messages
0xc0 – Reading of analog inputs – structure of message data
Byte of data | Name | Meaning |
0 | INPUT_ADC0 | Value of analog input 1, uint16 number |
1 | ||
2 | INPUT_ADC1 | Value of analog input 2, uint16 number |
3 | ||
… | ||
14 | INPUT_ADC7 | Value of analog input 8, uint16 number |
15 |
Note:
The ADC value is in milli-volts if ADC_MULTIPLIER is set to the default value of 2.774.
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][07][01][F0][C0][00][A1][AD][0D] instr: [0xC0]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][17][01][F0][C0][00][00][00][00][00][00][00][00][02][00][00][00][00][00][00][00][02][A5][57][0D] instr: [0xC0]
[Debug] – IOFB Engine[COM20][0x01]: Read device analog inputs: [00][00][00][00][00][00][00][02][00][00][00][00][00][00][00][02]
0xc1 – Analog input functions– structure of message data
Byte of data | Name | Meaning |
0 | ADC_FNC | 0x00 – default value, no function
0x01 – 0xff – periodical sending of analog inputs state (message 0xa1) in miliseconds [ms] (1ms to 255ms) |
Note:
Do not use the automatic data sending function if you are using the RS485 (half-duplex) communication interface. The function is intended for USB or RS422 (full-duplex) communication interface.
Configuration messages
0xe1 – Analog input and ADC configuration – structure of message data
Byte of data | Name | Meaning |
0 | ADC_ENABLE | 0x00 – ADC Disabled
0x01 – ADC Enabled |
1 | ADC_RESOLUTION | 0x08 – 8bit ADC resolution
0x0c – 12bit ADC resolution |
2 | ADC_INPUT_FROM | Index of first sampled analog input – 0 to 7 |
3 | ADC_INPUT_TO | Index of last sampled analog input – 0 to 7 |
4 | ADZ_HZ | AD converter frequency [Hz], uint32 number |
5 | ||
6 | ||
7 | ||
8 | ADC_AVERAGES | Averaging of samples setting
0 – invalid value 1 – no averaging 2,4,8,16,32 – allowed values for averaging |
9 | ADC_RIGHT_ZEROS | Count of right zero bits (ignores less significant bits) setting
0, 1, 2, 3, 4 – allowed values |
10 | ADC_MULTIPLIER | Multiple of AD converter measured value, Float value (4B), Minimum 1.0, Maximum 10.0, Default value 2.774 (0x40318E8A) – The first byte is the lowest byte (LSbyte) |
11 | ||
12 | ||
13 |
Note:
Parameters ADC_INPUT_FROM / TO allows only to use requested analog inputs
ADC configuration take effect after device restart. It can be done by reset command or by power supply of the device.
0xe2 – PWM generator configuration for digital outputs 1 to 4 – structure of message data
Byte of data | Name | Meaning |
0 | PWM_ENABLE | 0x00 – generator disabled
0x01 – generator enabled |
1 | PWM_HZ | PWM generator frequency [Hz], uint16 number |
2 |
Note:
If PWM generator is active on selected outputs, then digital output function is ignored for these outputs. This configuration takes effect after device restart. It can be done by reset command or by power supply of the device.
0xe3 – PWM generator configuration for digital outputs 5 to 6 – structure of message data
Byte of data | Name | Meaning |
0 | PWM_ENABLE | 0x00 – generator disabled
0x01 – generator enabled |
1 | PWM_HZ | PWM generator frequency [Hz], uint16 number |
2 |
Note:
If PWM generator is active on selected outputs, then digital output function is ignored for these outputs. This configuration takes effect after device restart. It can be done by reset command or by power supply of the device.
0xe4 – PWM generator configuration for digital outputs 7 to 8 – structure of message data
Byte of data | Name | Meaning |
0 | PWM_ENABLE | 0x00 – generator disabled
0x01 – generator enabled |
1 | PWM_HZ | PWM generator frequency [Hz], uint16 number |
2 |
Note:
If PWM generator is active on selected outputs, then digital output function is ignored for these outputs. This configuration takes effect after device restart. It can be done by reset command or by power supply of the device.
0xe5 – Binary input configuration– structure of message data
Byte of data | Name | Meaning |
0 | SAMPLE_PERIOD | Setting of sample rate ratio for binary inputs. Base step is 1 ms. Value 1 to 65535 (from 1ms to 65535ms). |
1 | ||
2 | FILTER_LENGTH | Binary input filter length setting. This value defines how much samples of same log. value must be taken to evaluate as log. value.
Value can be set from 0 to 15 (1 to 16 samples). |
Note:
This configuration takes effect immediately, no need to restart the device.
0xe6 – Configuration of FTDI – USB baundrate – structure of message data
Byte of data | Name | Meaning |
0 | FTDI_BAUDRATE | uint32 number |
1 | ||
2 | ||
3 |
Available baudrates [bps]:
9600, 19200, 57600, 115200, 250000, 500000, 1000000
Note:
This configuration takes effect after device restart. It can be done by reset command or by power supply of the device.
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][0B][01][16][E6][00][00][03][D0][90][2A][09][0D] instr: [0xE6]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][07][01][16][E6][00][36][56][0D] instr: [0xE6]
[Debug] – IOFB Engine[COM20][0x01]: Device set FTDI config [00][03][D0][90] (250000bps).
0xe7 – Configuration of RS4XX baundrate – structure of message data
Byte of data | Name | Meaning |
0 | RS4XX_BAUDRATE | uint32 number |
1 | ||
2 | ||
3 |
Available baudrates [bps]:
9600, 19200, 57600, 115200, 250000, 500000, 1000000
Note:
This configuration takes effect after device restart. It can be done by reset command or by power supply of the device.
Message example:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][0B][01][17][E7][00][00][01][C2][00][37][B5][0D] instr: [0xE7]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][07][01][17][E7][00][66][06][0D] instr: [0xE7]
[Debug] – IOFB Engine[COM20][0x01]: Device set RS4XX config [00][01][C2][00] (115200bps).
0xe8 – Configuration of extension modules (Wagons) – structure of message data
Byte of data | Name | Meaning |
0 | EXP_TYPE | Type of 1. extension module |
1 | EXP_TYPE | Type of 2. extension module |
2 | EXP_TYPE | Type of 3. extension module |
3 | EXP_TYPE | Type of 4. extension module |
4 | EXP_TYPE | Type of 5. extension module |
5 | EXP_TYPE | Type of 6. extension module |
6 | EXP_TYPE | Type of 7. extension module |
7 | EXP_TYPE | Type of 8. extension module |
Expansion modules types:
EXP_TYPE | Popis | |
0x00 | WAGON_NONE | Not used |
0x01 | WAGON_16 | Wagon 16I (16xInput) |
0x02 | WAGON_8O | Wagon 8O (8xOutput) |
0x03 | WAGON_8RELAY | Wagon 8Op+ (8xRelay) |
0x04 | WAGON_16IO | Wagon TTL 16IO (16xInput/Output) |
Note:
Expansion modules (Wagons) must be connected in the same order as configured. The last expansion module must have jumper END closed for SPI bus termination. Number of expansion modules is limited to eight. Connection is made by a flat cable delivered with each expansion module.
Message example – IOFirebug Engine + Wagon 16I + Wagon 8O:
[Debug] – IOFB Engine[COM20][0x01]: Write packet: [2A][2A][00][0F][01][F8][E8][00][01][02][00][00][00][00][00][00][8F][2C][0D] instr: [0xE8]
[Debug] – IOFB Engine[COM20][0x01]: Read packet: [2A][2A][00][07][01][F8][E8][00][63][32][0D] instr: [0xE8]
[Debug] – IOFB Engine[COM20][0x01]: Device set EXPANDERS config [01][02][00][00][00][00][00][00].