diff --git a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/CMakeLists.txt b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/CMakeLists.txt index bcea790..c58978b 100644 --- a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/CMakeLists.txt +++ b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/CMakeLists.txt @@ -222,7 +222,12 @@ set(msg_files Wind.msg YawEstimatorStatus.msg SimulinkCustomMessage.msg - PlcHoldingRegisters.msg + PlcDiscreteInputs.msg + PlcInputRegisters.msg + PlcCoilsRead.msg + PlcCoilsWrite.msg + PlcHoldingRegistersRead.msg + PlcHoldingRegistersWrite.msg ) list(SORT msg_files) diff --git a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcCoilsRead.msg b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcCoilsRead.msg new file mode 100644 index 0000000..482c638 --- /dev/null +++ b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcCoilsRead.msg @@ -0,0 +1,5 @@ +uint64 timestamp # time since system start (microseconds) + +uint16 num_coils = 128 # How many coils can be stored in coil_array + +bool[128] coil_array_read # Array of bools that are read from the PLC \ No newline at end of file diff --git a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcCoilsWrite.msg b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcCoilsWrite.msg new file mode 100644 index 0000000..93b4bb9 --- /dev/null +++ b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcCoilsWrite.msg @@ -0,0 +1,7 @@ +uint64 timestamp # time since system start (microseconds) + +uint16 num_coils = 128 # How many coils can be stored in coil_array + +bool[128] coil_array_write # Array of bools that are used for writing to the PLC + +bool written # Has the coil_array_write been written yet to the PLC \ No newline at end of file diff --git a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcDiscreteInputs.msg b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcDiscreteInputs.msg new file mode 100644 index 0000000..88e6aa8 --- /dev/null +++ b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcDiscreteInputs.msg @@ -0,0 +1,5 @@ +uint64 timestamp # time since system start (microseconds) + +uint16 num_inputs = 128 # How many inputs can be stored in input_array + +bool[128] input_array # Array of bools diff --git a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcHoldingRegistersRead.msg b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcHoldingRegistersRead.msg new file mode 100644 index 0000000..6c978a1 --- /dev/null +++ b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcHoldingRegistersRead.msg @@ -0,0 +1,5 @@ +uint64 timestamp # time since system start (microseconds) + +uint16 num_registers = 128 # How many registers can be stored in register_array_read + +uint16[128] register_array_read # Array of unsigned, 16 bit registers that are read from the PLC \ No newline at end of file diff --git a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcHoldingRegistersWrite.msg b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcHoldingRegistersWrite.msg new file mode 100644 index 0000000..1427d1a --- /dev/null +++ b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcHoldingRegistersWrite.msg @@ -0,0 +1,7 @@ +uint64 timestamp # time since system start (microseconds) + +uint16 num_registers = 128 # How many registers can be stored in register_array_write + +uint16[128] register_array_write # Array of unsigned, 16 bit registers that are used for writing to the PLC + +bool written # Has the register_array_write been written yet to the PLC \ No newline at end of file diff --git a/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcInputRegisters.msg b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcInputRegisters.msg new file mode 100644 index 0000000..4d74488 --- /dev/null +++ b/MATLAB/MODBUS_TCP_TESTING/PX4-Autopilot/msg/PlcInputRegisters.msg @@ -0,0 +1,5 @@ +uint64 timestamp # time since system start (microseconds) + +uint16 num_registers = 128 # How many registers can be stored in register_array + +uint16[128] register_array # Array of unsigned, 16 bit registers