Diploma thesis is describing implementation of sensors and actuators that communicate through asynchronous serial communication on Speedgoat Baseline S machine. Software is written in Simulink and Matlab that already have serial drivers for communicating with input-output module at higher baud rates. Thesis contains description of parsing the messages that we receive into FIFO buffer in one time step, checking the integrity of the messages on all the control points implemented into the communication protocol and interpretation of the messages. Each device has its own Device state and sends Device status messages automatically when it changes state. Based on Device statuses we implemented State machine, which checks for device statuses at the beginning of the execution and if needed, initializes the devices. Application is constantly monitoring Device statuses and adjusting the messages that is sending (e.g. initialization of device, sending PVT commands to the motors). Application contains all possible messages for efficient operation, which can have constant values (e.g. status request message) or they have dynamic values which we calculate based on Device status which we pack into the right frame (e.g. motor control commands).
All data messages also contain control information so we can detect the error in the message. When the error occurs, we discard the message from the sensor for a given time step and use the values from prior time step. With message check we, in phase one, ensure effective communication with data loss under 1% and, in phase two, we utilize control flags to detect the error in communication and help us reconstruct situation for debugging purposes with the same inputs.
|